[SOLVED] Postfix status=deferred (mail transport unavailable)

Discussion in 'Installation/Configuration' started by Andres Hocevar, Jun 23, 2015.

  1. Andres Hocevar

    Andres Hocevar New Member

    Hi there.
    I trying to make work posfix to recibe mail, but it's not work.
    I'm on:
    • openSUSE 20150612 Tumbleweed
    • ISPConfig-3.0.5.4p8.
    • postfix-2.11.5-2.1
    • dovecot-2.2-3.2
    amavis is working and I can send mails without problems.

    Maill log:
    Code:
    jun 22 17:33:52 vps postfix/smtpd[9416]: connect from unknown[127.0.0.1]
    jun 22 17:33:52 vps postfix/smtpd[9416]: 972A7408D6: client=unknown[127.0.0.1]
    jun 22 17:33:52 vps postfix/cleanup[9593]: 972A7408D6: message-id=<CAAHD+nwE1p-CfPnOV5Qqdqt-PG22W+KeUUeYKDf8vdLdVmzr6Q@mail.gmail.com>
    jun 22 17:33:52 vps postfix/qmgr[7816]: 972A7408D6: from=<[email protected]>, size=2132, nrcpt=1 (queue active)
    jun 22 17:33:52 vps postfix/qmgr[7816]: warning: connect to transport private/dovecot: No such file or directory
    jun 22 17:33:52 vps postfix/smtp[9594]: E75EB408C5: to=<[email protected]>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.7, delays=0.25/0.01/0.01/0.44, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:[127.0.0.1]:10025): 250 2.0.0 Ok: queued as 972A7408D6)
    jun 22 17:33:52 vps postfix/qmgr[7816]: E75EB408C5: removed
    jun 22 17:33:52 vps postfix/error[9598]: 972A7408D6: to=<[email protected]>, relay=none, delay=0.03, delays=0.01/0.01/0/0.01, dsn=4.3.0, status=deferred (mail transport unavailable)
    jun 22 17:35:02 vps postfix/smtpd[9584]: connect from localhost[127.0.0.1]
    jun 22 17:35:02 vps postfix/smtpd[9584]: lost connection after CONNECT from localhost[127.0.0.1]
    jun 22 17:35:02 vps postfix/smtpd[9584]: disconnect from localhost[127.0.0.1]
    
    Amavis log:
    Code:
    Jun 22 17:33:52 vps amavis[9582]: (09582-01) Passed CLEAN {RelayedInbound}, [209.85.213.54]:33815 [209.85.213.54] <[email protected]> -> <[email protected]>, Queue-ID: E75EB408C5, Message-ID: <CAAHD+nwE1p-CfPnOV5Qqdqt-PG22W+KeUUeYKDf8vdLdVmzr6Q@mail.gmail.com>, mail_id: 48Gj3kpbXWLO, Hits: -0.098, size: 1702, queued_as: 972A7408D6, 439 ms
    

    postconf -n

    Code:
    alias_database = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    alias_maps = hash:/etc/aliases, hash:/var/lib/mailman/data/aliases
    biff = no
    body_checks = regexp:/etc/postfix/body_checks
    broken_sasl_auth_clients = yes
    canonical_maps =
    command_directory = /usr/sbin
    config_directory = /etc/postfix
    content_filter = amavis:[127.0.0.1]:10024
    daemon_directory = /usr/lib/postfix
    data_directory = /var/lib/postfix
    debug_peer_level = 2
    debugger_command = PATH=/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin ddd $daemon_directory/$process_name $process_id & sleep 5
    defer_transports =
    delay_warning_time = 0h
    disable_dns_lookups = no
    disable_mime_output_conversion = no
    disable_vrfy_command = yes
    header_checks = regexp:/etc/postfix/header_checks
    html_directory = /usr/share/doc/packages/postfix-doc/html
    inet_interfaces = all
    inet_protocols = ipv4
    mail_owner = postfix
    mail_spool_directory = /var/mail
    mailbox_command =
    mailbox_size_limit = 0
    mailbox_transport =
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    masquerade_classes = envelope_sender, header_sender, header_recipient
    masquerade_domains =
    masquerade_exceptions =
    message_size_limit = 0
    message_strip_characters =
    mime_header_checks = regexp:/etc/postfix/mime_header_checks
    mydestination = vps.proteoerp.org, localhost, localhost.localdomain
    myhostname = vps.proteoerp.org
    mynetworks = 127.0.0.0/8 [::1]/128
    mynetworks_style = subnet
    nested_header_checks = regexp:/etc/postfix/nested_header_checks
    newaliases_path = /usr/bin/newaliases
    proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/packages/postfix-doc/README_FILES
    receive_override_options = no_address_mappings
    relay_clientcerts =
    relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
    relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
    relayhost =
    relocated_maps =
    sample_directory = /usr/share/doc/packages/postfix-doc/samples
    sender_canonical_maps =
    sendmail_path = /usr/sbin/sendmail
    setgid_group = maildrop
    smtp_enforce_tls = no
    smtp_sasl_auth_enable = no
    smtp_sasl_password_maps =
    smtp_sasl_security_options =
    smtp_tls_CAfile =
    smtp_tls_CApath =
    smtp_tls_cert_file =
    smtp_tls_key_file =
    smtp_tls_protocols = !SSLv2,!SSLv3
    smtp_tls_security_level = may
    smtp_tls_session_cache_database =
    smtp_use_tls = no
    smtpd_banner = $myhostname ESMTP
    smtpd_client_message_rate_limit = 100
    smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
    smtpd_delay_reject = yes
    smtpd_helo_required = yes
    smtpd_helo_restrictions =
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_sasl_path = private/auth
    smtpd_sasl_type = dovecot
    smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
    smtpd_tls_CAfile =
    smtpd_tls_CApath =
    smtpd_tls_ask_ccert = no
    smtpd_tls_cert_file = /etc/postfix/smtpd.cert
    smtpd_tls_key_file = /etc/postfix/smtpd.key
    smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
    smtpd_tls_protocols = !SSLv2,!SSLv3
    smtpd_tls_received_header = no
    smtpd_tls_security_level = may
    smtpd_use_tls = yes
    strict_8bitmime = no
    strict_rfc821_envelopes = no
    transport_maps = hash:/var/lib/mailman/data/transport-mailman, proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
    unknown_local_recipient_reject_code = 550
    virtual_alias_domains =
    virtual_alias_maps = hash:/etc/mailman/virtual-mailman, proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, proxy:mysql:/etc/postfix/mysql-virtual_email2email.cf
    virtual_gid_maps = static:5000
    virtual_mailbox_base = /var/vmail
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
    virtual_transport = dovecot
    virtual_uid_maps = static:5000
    postconf: warning: /etc/postfix/main.cf: unused parameter: maildrop_destination_concurrency_limit=1
    postconf: warning: /etc/postfix/main.cf: unused parameter: maildrop_destination_recipient_limit=1
    postconf: warning: /etc/postfix/main.cf: unused parameter: dovecot_destination_recipient_limit=1
    
    master.cf
    Code:
    #
    
    smtp      inet  n       -       n       -       -       smtpd
    pickup    unix  n       -       n       60      1       pickup
    cleanup   unix  n       -       n       -       0       cleanup
    qmgr      unix  n       -       n       300     1       qmgr
    #qmgr     unix  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
    relay     unix  -       -       n       -       -       smtp
    showq     unix  n       -       n       -       -       showq
    error     unix  -       -       n       -       -       error
    retry     unix  -       -       n       -       -       error
    discard   unix  -       -       n       -       -       discard
    local     unix  -       n       n       -       -       local
    virtual   unix  -       n       n       -       -       virtual
    lmtp      unix  -       -       n       -       -       lmtp
    anvil     unix  -       -       n       -       1       anvil
    scache    unix  -       -       n       -       1       scache
    ${recipient} ${user} ${nexthop} ${sender} ${extension} ${recipient} ${user} ${nexthop} ${sender} ${extension} ${recipient} ${user} ${nexthop} ${sender}
    amavis unix - - - - 2 smtp
            -o smtp_data_done_timeout=1200
            -o smtp_send_xforward_command=yes
    
    127.0.0.1:10025 inet n - - - - smtpd
            -o content_filter=
            -o local_recipient_maps=
            -o relay_recipient_maps=
            -o smtpd_restriction_classes=
            -o smtpd_client_restrictions=
            -o smtpd_helo_restrictions=
            -o smtpd_sender_restrictions=
            -o smtpd_recipient_restrictions=permit_mynetworks,reject
            -o mynetworks=127.0.0.0/8
            -o strict_rfc821_envelopes=yes
            -o receive_override_options=no_unknown_recipient_checks,no_header_body_checks
    
    Any suggestions?

    Regards
    Andres
     
  2. Blackdove

    Blackdove New Member

    Your master.cf seems to not have the dovecot setup properly.
    Should have something similar to:
    Code:
    dovecot   unix  -       n       n       -       -       pipe
      flags=DRhu user=vmail:vmail argv=/usr/libexec/dovecot/deliver -f ${sender} -d ${user}@${nexthop}
    instead of ${recipient} ${user} ${nethop} ${sender} ${extension} $(recipient) ${user} etc etc
     
    Andres Hocevar likes this.
  3. Andres Hocevar

    Andres Hocevar New Member

    Thanks!, that solve my problems and it's working now
    Maybe there is a problem in ISPConfig installer in "opensuse.lib.php" file at this lines:
    PHP:
            if(!stristr($content"dovecot/deliver")) {
                
    $deliver_content 'dovecot   unix  -       n       n       -       -       pipe'."\n".'  flags=DROhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}';
                
    af($conf["postfix"]["config_dir"].'/master.cf'$deliver_content);
            }
    If in the master.cf there are the config lines but commented (OpenSuSE case) the condition "!stristr($content, "dovecot/deliver")" won't work, this proposal will work in this conditions:
    PHP:
            if(!preg_match('/\n[^#]*dovecot\/deliver/'$content)) {
                
    $deliver_content 'dovecot   unix  -       n       n       -       -       pipe'."\n".'  flags=DROhu user=vmail:vmail argv=/usr/lib/dovecot/deliver -f ${sender} -d ${user}@${nexthop}';
                
    af($conf["postfix"]["config_dir"].'/master.cf'$deliver_content);
            }
    Thank you very much!
     
  4. florian030

    florian030 Well-Known Member HowtoForge Supporter

    It seems, that the installer for opensuse doesn´t work as expected. I will check this.
    Can you post the lda-part from your dovecot.conf?
     
  5. Andres Hocevar

    Andres Hocevar New Member

    In OpenSuSE the dovecot.conf file is all lines commented exept :
    Code:
    dict {
      #quota = mysql:/etc/dovecot/dovecot-dict-sql.conf.ext
      #expire = sqlite:/etc/dovecot/dovecot-dict-sql.conf.ext
    }
    
    # Most of the actual configuration gets included below. The filenames are
    # first sorted by their ASCII value and parsed in that order. The 00-prefixes
    # in filenames are intended to make it easier to understand the ordering.
    !include conf.d/*.conf
    
    # A config file can also tried to be included without giving an error if
    # it's not found:
    !include_try local.conf
    
    And the lda part is in the /etc/dovecot/conf.d/15-lda.conf file and this is the content:
    Code:
    ##
    ## LDA specific settings (also used by LMTP)
    ##
    
    # Address to use when sending rejection mails.
    # Default is postmaster@<your domain>. %d expands to recipient domain.
    #postmaster_address =
    
    # Hostname to use in various parts of sent mails (e.g. in Message-Id) and
    # in LMTP replies. Default is the system's real hostname@domain.
    #hostname =.
    
    # If user is over quota, return with temporary failure instead of
    # bouncing the mail.
    #quota_full_tempfail = no
    
    # Binary to use for sending mails.
    #sendmail_path = /usr/sbin/sendmail
    
    # If non-empty, send mails via this SMTP host[:port] instead of sendmail.
    #submission_host =
    
    # Subject: header to use for rejection mails. You can use the same variables
    # as for rejection_reason below.
    #rejection_subject = Rejected: %s
    
    # Human readable error message for rejection mails. You can use variables:
    #  %n = CRLF, %r = reason, %s = original subject, %t = recipient
    #rejection_reason = Your message to <%t> was automatically rejected:%n%r
    
    # Delimiter character between local-part and detail in email address.
    #recipient_delimiter = +
    
    # Header where the original recipient address (SMTP's RCPT TO: address) is taken
    # from if not available elsewhere. With dovecot-lda -a parameter overrides this..
    # A commonly used header for this is X-Original-To.
    #lda_original_recipient_header =
    
    # Should saving a mail to a nonexistent mailbox automatically create it?
    #lda_mailbox_autocreate = no
    
    # Should automatically created mailboxes be also automatically subscribed?
    #lda_mailbox_autosubscribe = no
    
    protocol lda {
      # Space separated list of plugins to load (default is global mail_plugins).
      #mail_plugins = $mail_plugins
    }
    Share the folder with many config files
    ls /etc/dovecot/conf.d/
    Code:
    10-auth.conf  20-lmtp.conf  auth-deny.conf.ext
    10-director.conf  20-managesieve.conf  auth-dict.conf.ext
    10-logging.conf  20-pop3.conf  auth-ldap.conf.ext
    10-mail.conf  90-acl.conf  auth-master.conf.ext
    10-master.conf  90-plugin.conf  auth-passwdfile.conf.ext
    10-ssl.conf  90-quota.conf  auth-sql.conf.ext
    15-lda.conf  90-sieve.conf  auth-static.conf.ext
    15-mailboxes.conf  90-sieve-extprograms.conf  auth-system.conf.ext
    20-imap.conf  auth-checkpassword.conf.ext  auth-vpopmail.conf.ext
    but after the ISPconfig installation the dovecot.conf look like a this:
    Code:
    listen = *,[::]
    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
    ssl_protocols = !SSLv2 !SSLv3
    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
    }
    service imap-login {
      client_limit = 1000
      process_limit = 500
    }
    protocol imap {
      mail_plugins = quota imap_quota
    }
    protocol pop3 {
      pop3_uidl_format = %08Xu%08Xv
      mail_plugins = quota
    }
    protocol lda {
      mail_plugins = sieve quota
    }
    I had to add the "postmaster_address" manually in the protocol lda section
     
  6. florian030

    florian030 Well-Known Member HowtoForge Supporter

    That´s what i wanted to know. Thanks. Currently i have no idea why you need this with OpenSUSE. On Debian you don´t need this value.

    BTW: i don´t like the way the installer / updater checks postfix´s master.cf. Using grep or somethin similar may work.
    Maybe we can switch to "postconf -M dovecot.unix" to detect the service dovecot in postfix.
     

Share This Page