Loading ...
Sorry, an error occurred while loading the content.

receiving with sasl2 and mysql

Expand Messages
  • teknet8
    Hello Postfix 2.3.3. WIth cyrus-sasl2 authentication with mysql plugin. I can send emails to other servers using authentication, but all messages arriving from
    Message 1 of 2 , Sep 29 4:24 AM
    • 0 Attachment
      Hello

      Postfix 2.3.3. WIth cyrus-sasl2 authentication with mysql plugin.
      I can send emails to other servers using authentication, but all messages arriving from other servers are not accepted

      When i try to send mail from my server to my server (same account) i receive:
      Sep 29 13:07:10 server postfix/smtpd[43196]: connect from xxx.org[home_ip]
      Sep 29 13:07:11 server postfix/smtpd[43196]: A74C54A0857: client=xxx.org[home_ip], sasl_method=PLAIN, sasl_username=admin1@...
      Sep 29 13:07:15 server postfix/cleanup[43199]: A74C54A0857: message-id=<20060929131037.73bfb6cf.admin1@...>
      Sep 29 13:07:15 server postfix/qmgr[43195]: A74C54A0857: from=<admin1@...>, size=541, nrcpt=1 (queue active)
      Sep 29 13:07:15 server postfix/pipe[43200]: A74C54A0857: to=<admin1@...>, relay=maildrop, delay=4.4, delays=4.4/0.01/0/0.05, dsn=5.1.1, status=bounced (user unknown. Command output: Invalid user specified. )

      When i tried to send mail from my server to my server (but to account postmaster@... which is
      alias to admin1@...):
      Sep 29 12:33:20 server postfix/error[42822]: 741864A0808: to=<postmaster@...>, orig_to=<postmaster>, relay=none, delay=0.01, delays=0/0/0/0, dsn=5.0.0, status=bounced (User has moved to admin1@...)
      Sep 29 12:33:20 server postfix/bounce[42838]: warning: 741864A0808: undeliverable postmaster notification discarded

      In main.cf i have:
      local_recipient_maps = $alias_maps $virtual_mailbox_maps unix:passwd.byname
      home_mailbox = Maildir/

      smtpd_sasl_auth_enable = yes
      smtpd_sasl2_auth_enable = yes
      smtpd_sasl_security_options = noanonymous
      smtpd_sasl_local_domain = $mydomain
      broken_sasl_auth_clients = yes
      smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,check_recipient_access mysql:/usr/local/etc/postfix/mysql-recipient.cf,reject_unauth_destination,permit

      smtpd_sender_restrictions = check_sender_access mysql:/usr/local/etc/postfix/mysql-sender.cf
      smtpd_client_restrictions = check_client_access mysql:/usr/local/etc/postfix/mysql-client.cf

      alias_maps = mysql:/usr/local/etc/postfix/mysql-aliases.cf
      relocated_maps = mysql:/usr/local/etc/postfix/mysql-relocated.cf

      #for redirection
      transport_maps = mysql:/usr/local/etc/postfix/mysql-transport.cf
      maildrop_destination_recipient_limit = 1
      virtual_transport = maildrop

      #Domain storage
      virtual_mailbox_domains = mysql:/usr/local/etc/postfix/mysql-virtual-domains.cf
      #virtual_alias_maps = mysql:/usr/local/etc/postfix/mysql-alias-maps.cf
      virtual_mailbox_base = /home/vmail

      #Email storage
      virtual_mailbox_maps = mysql:/usr/local/etc/postfix/mysql-virtual-maps.cf
      virtual_minimum_uid = 100
      virtual_uid_maps = static:1001
      virtual_gid_maps = static:1001

      -bash-2.05b# cat /usr/local/etc/postfix/mysql-recipient.cf
      user = vmailuser
      password = password123
      dbname = mail
      query = SELECT smtpaccess FROM postfix_users where email='%s'
      hosts = 127.0.0.1


      mysql> SELECT smtpaccess FROM postfix_users where email='admin1@...';
      +------------+
      | smtpaccess |
      +------------+
      | OK |
      +------------+
      1 row in set (0.00 sec)

      -bash-2.05b# cat /usr/local/etc/postfix/mysql-aliases.cf
      user = vmailuser
      password = password123
      dbname = mail
      query = SELECT destination FROM postfix_alias WHERE alias = '%s'
      hosts = 127.0.0.1

      mysql> SELECT destination FROM postfix_alias WHERE alias = 'postmaster@...';
      +--------------------+
      | destination |
      +--------------------+
      | admin1@... |
      +--------------------+
      1 row in set (0.00 sec)


      What's wrong ?
      I have cyrus-pop3 installed (maildrop + maildir) which works fine.

      Thanx
    • Andreas Winkelmann
      ... User is authenticated. ... maildrop has Problems handling Mails for User admin1@server.com . Look for the maildrop Configuration. [...] ... Cyrus,
      Message 2 of 2 , Oct 1, 2006
      • 0 Attachment
        Am Friday 29 September 2006 13:24 schrieb teknet8:

        > Postfix 2.3.3. WIth cyrus-sasl2 authentication with mysql plugin.
        > I can send emails to other servers using authentication, but all messages
        > arriving from other servers are not accepted
        >
        > When i try to send mail from my server to my server (same account) i
        > receive:
        > Sep 29 13:07:10 server postfix/smtpd[43196]: connect from
        > xxx.org[home_ip]
        > Sep 29 13:07:11 server postfix/smtpd[43196]: A74C54A0857:
        > client=xxx.org[home_ip], sasl_method=PLAIN, sasl_username=admin1@...

        User is authenticated.

        > Sep 29 13:07:15 server postfix/cleanup[43199]: A74C54A0857:
        > message-id=<20060929131037.73bfb6cf.admin1@...>
        > Sep 29 13:07:15
        > server postfix/qmgr[43195]: A74C54A0857: from=<admin1@...>,
        > size=541, nrcpt=1 (queue active)

        > Sep 29 13:07:15 server
        > postfix/pipe[43200]: A74C54A0857: to=<admin1@...>, relay=maildrop,
        > delay=4.4, delays=4.4/0.01/0/0.05, dsn=5.1.1, status=bounced (user unknown.
        > Command output: Invalid user specified. )

        "maildrop" has Problems handling Mails for User "admin1@...".

        Look for the maildrop Configuration.

        [...]

        > What's wrong ?
        > I have cyrus-pop3 installed (maildrop + maildir) which works fine.

        Cyrus, maildrop and Maildir?

        --
        Andreas
      Your message has been successfully submitted and would be delivered to recipients shortly.