Postfix problem. Please help!

Discussion in 'Server Operation' started by zaklad, May 2, 2013.

  1. zaklad

    zaklad New Member

    Hello!

    Set up server under this manual: http://www.howtoforge.com/perfect-server-centos-6.4-x86_64-nginx-dovecot-ispconfig-3

    Seems all working fine, exept when people sending mail to admin@ or any other address they receive MD error report:

    Code:
    The mail system
    
    <[email protected]>: unknown user: "admin"
    
    Reporting-MTA: dns; psylab.cc
    X-Postfix-Queue-ID: 1170E354044D
    X-Postfix-Sender: rfc822; [email protected]
    Arrival-Date: Thu,  2 May 2013 22:23:08 +0300 (EEST)
    
    Final-Recipient: rfc822; [email protected]
    Original-Recipient: rfc822;[email protected]
    Action: failed
    Status: 5.1.1
    Diagnostic-Code: X-Postfix; unknown user: "admin"
    And in maillog I can see someting like that:

    Code:
    May  2 22:23:04 psylab postfix/smtpd[2203]: connect from forward1h.mail.yandex.net[84.201.187.146]
    May  2 22:23:05 psylab postfix/trivial-rewrite[2666]: warning: do not list domain psylab.cc in BOTH mydestination and virtual_mailbox_domains
    May  2 22:23:05 psylab postfix/smtpd[2203]: 37C36354044C: client=forward1h.mail.yandex.net[84.201.187.146]
    May  2 22:23:05 psylab postfix/cleanup[2676]: 37C36354044C: message-id=<[email protected]>
    May  2 22:23:05 psylab postfix/qmgr[2008]: 37C36354044C: from=<[email protected]>, size=1370, nrcpt=1 (queue active)
    May  2 22:23:05 psylab postfix/smtpd[2203]: disconnect from forward1h.mail.yandex.net[84.201.187.146]
    May  2 22:23:08 psylab postfix/smtpd[2680]: connect from unknown[127.0.0.1]
    May  2 22:23:08 psylab postfix/trivial-rewrite[2666]: warning: do not list domain psylab.cc in BOTH mydestination and virtual_mailbox_domains
    May  2 22:23:08 psylab postfix/smtpd[2680]: 1170E354044D: client=unknown[127.0.0.1]
    May  2 22:23:08 psylab postfix/cleanup[2676]: 1170E354044D: message-id=<[email protected]>
    May  2 22:23:08 psylab postfix/smtpd[2680]: disconnect from unknown[127.0.0.1]
    May  2 22:23:08 psylab postfix/qmgr[2008]: 1170E354044D: from=<[email protected]>, size=1774, nrcpt=1 (queue active)
    May  2 22:23:08 psylab postfix/trivial-rewrite[2666]: warning: do not list domain psylab.cc in BOTH mydestination and virtual_mailbox_domains
    May  2 22:23:08 psylab amavis[2169]: (02169-02) Passed CLEAN {RelayedInbound}, [84.201.187.146]:50331 [**.**.**.**] <[email protected]> -> <[email protected]>, Message
    May  2 22:23:08 psylab postfix/smtp[2677]: 37C36354044C: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=3, delays=0.31/0.01/0/2.7, dsn=2.0.0, status=sent
    May  2 22:23:08 psylab postfix/qmgr[2008]: 37C36354044C: removed
    May  2 22:23:08 psylab postfix/local[2682]: 1170E354044D: to=<[email protected]>, relay=local, delay=0.17, delays=0.12/0.01/0/0.04, dsn=5.1.1, [B]status=bounced (unknown user: "admin")[/B]
    May  2 22:23:08 psylab postfix/cleanup[2676]: 3A38D3540456: message-id=<[email protected]>
    May  2 22:23:08 psylab postfix/bounce[2683]: 1170E354044D: sender non-delivery notification: 3A38D3540456
    May  2 22:23:08 psylab postfix/qmgr[2008]: 3A38D3540456: from=<>, size=3547, nrcpt=1 (queue active)
    May  2 22:23:08 psylab postfix/qmgr[2008]: 1170E354044D: removed
    May  2 22:23:09 psylab postfix/smtp[2684]: 3A38D3540456: to=<[email protected]>, relay=mx.yandex.ru[213.180.193.89]:25, delay=1.2, delays=0.05/0.01/0.47/0.65, dsn=2.0
    May  2 22:23:09 psylab postfix/qmgr[2008]: 3A38D3540456: removed
    
    my main.cnf

    Code:
    readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
    queue_directory = /var/spool/postfix
    command_directory = /usr/sbin
    daemon_directory = /usr/libexec/postfix
    data_directory = /var/lib/postfix
    mail_owner = postfix
    
    inet_interfaces = all
    inet_protocols = ipv4
    
    unknown_local_recipient_reject_code = 550
    
    alias_maps = hash:/etc/aliases
    alias_database = hash:/etc/aliases
    
    virtual_alias_domains =.
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_mailbox_base = /var/vmail
    virtual_uid_maps = static:5000
    virtual_gid_maps = static:5000
    smtpd_sasl_auth_enable = yes
    broken_sasl_auth_clients = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destina
    smtpd_use_tls = yes
    smtpd_tls_security_level = may
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    maildrop_destination_concurrency_limit = 1
    maildrop_destination_recipient_limit = 1
    virtual_transport = dovecot
    header_checks = regexp:/etc/postfix/header_checks
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    body_checks = regexp:/etc/postfix/body_checks
    myhostname = psylab.cc
    mynetworks = 127.0.0.0/8
    dovecot_destination_recipient_limit = 1
    smtpd_sasl_type = dovecot
    smtpd_sasl_path = private/auth
    receive_override_options = no_address_mappings
    content_filter = amavis:[127.0.0.1]:10024
    relayhost =.
    mailbox_size_limit = 0
    message_size_limit = 0
    
    my master.cf
    Code:
    smtp      inet  n       -       n       -       -       smtpd
    submission inet n       -       n       -       -       smtpd
    #  -o smtpd_tls_security_level=encrypt
    #  -o smtpd_sasl_auth_enable=yes
    #  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    #smtps     inet  n       -       n       -       -       smtpd
    #  -o smtpd_tls_wrappermode=yes
    #  -o smtpd_sasl_auth_enable=yes
    #  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o milter_macro_daemon_name=ORIGINATING
    #628      inet  n       -       n       -       -       qmqpd
    pickup    fifo  n       -       n       60      1       pickup
    cleanup   unix  n       -       n       -       0       cleanup
    qmgr      fifo  n       -       n       300     1       qmgr
    #qmgr     fifo  n       -       n       300     1       oqmgr
    tlsmgr    unix  -       -       n       1000?   1       tlsmgr
    rewrite   unix  -       -       n       -       -       trivial-rewrite
    bounce    unix  -       -       n       -       0       bounce
    defer     unix  -       -       n       -       0       bounce
    trace     unix  -       -       n       -       0       bounce
    verify    unix  -       -       n       -       1       verify
    flush     unix  n       -       n       1000?   0       flush
    proxymap  unix  -       -       n       -       -       proxymap
    proxywrite unix -       -       n       -       1       proxymap
    smtp      unix  -       -       n       -       -       smtp
    # When relaying mail as backup MX, disable fallback_relay to avoid MX loops
    relay     unix  -       -       n       -       -       smtp
              -o smtp_fallback_relay=
    #        -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
    showq     unix  n       -       n       -       -       showq
    error     unix  -       -       n       -       -       error
    
    mailman   unix  -       n       n       -       -       pipe
    #  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
    #  ${nexthop} ${user}
    dovecot   unix  -       n       n       -       -       pipe
      flags=DROhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
    amavis unix - - - - 2 smtp
            -o smtp_data_done_timeout=1200
            -o smtp_send_xforward_command=yes
    
    127.0.0.1:10025 inet n - - - - smtpd
    
    my dovecot.conf

    Code:
    protocols = imap pop3
    auth_mechanisms = plain login
    disable_plaintext_auth = no
    log_timestamp = "%Y-%m-%d %H:%M:%S "
    mail_privileged_group = vmail
    ssl_cert = </etc/postfix/smtpd.cert
    ssl_key = </etc/postfix/smtpd.key
    passdb {
         args = /etc/dovecot/dovecot-sql.conf
        driver = sql
        }
    userdb {
        args = /etc/dovecot/dovecot-sql.conf
        driver = sql
        }
    plugin {
        quota = dict:user::file:/var/vmail/%d/%n/.quotausage
        sieve=/var/vmail/%d/%n/.sieve
        }
    service auth {
        unix_listener /var/spool/postfix/private/auth {
        group = postfix
        mode = 0660
        user = postfix
        }
    unix_listener auth-userdb {
        group = vmail
        mode = 0600
        user = vmail
        }
    user = root
        }
    protocol imap {
        mail_plugins = quota imap_quota
        }
    protocol pop3 {
        pop3_uidl_format = %08Xu%08Xv
        mail_plugins = quota
        }
    protocol lda {
        mail_plugins = sieve quota
        }
    
    I skipped some lines in config to reduce post size!
    Please help me to mitigate and solve this!
     
    Last edited: May 2, 2013
  2. zaklad

    zaklad New Member

    No suggestions? Anyone? :(
     

Share This Page