Postfix - LMTP Transport does not work

Discussion in 'Server Operation' started by mahafue, Jul 1, 2017.

  1. mahafue

    mahafue New Member

    Hi *,

    I'm working on a new mailserver.
    My goal is that Postfix and Dovecot are separated on two machines.

    Working: mail delivery
    Not working: mail reception

    Mail log:
    Code:
    ...
    mx postfix/qmgr[100]: qmgr_message_alloc: active 25D174A5
    mx postfix/qmgr[100]: 25D174A5: recipient limit 5000
    mx postfix/qmgr[100]: 25D174A5: from=<someone@gmail.com>, size=1937, nrcpt=1 (queue active)
    mx postfix/qmgr[100]: start sorted recipient list
    mx postfix/qmgr[100]: qmgr_message_sort: postmaster@exampledomain.local
    mx postfix/qmgr[100]: end sorted recipient list
    mx postfix/qmgr[100]: connect to subsystem private/rewrite
    mx postfix/qmgr[100]: send attr request = resolve
    mx postfix/qmgr[100]: send attr sender = someone@gmail.com
    mx postfix/qmgr[100]: send attr address = postmaster@exampledomain.local
    mx postfix/qmgr[100]: private/rewrite socket: wanted attribute: flags
    mx postfix/qmgr[100]: input attribute name: flags
    mx postfix/qmgr[100]: input attribute value: 0
    mx postfix/qmgr[100]: private/rewrite socket: wanted attribute: transport
    mx postfix/qmgr[100]: input attribute name: transport
    mx postfix/qmgr[100]: input attribute value: lmtp
    mx postfix/qmgr[100]: private/rewrite socket: wanted attribute: nexthop
    mx postfix/qmgr[100]: input attribute name: nexthop
    mx postfix/qmgr[100]: input attribute value: [dovecot.local]:24
    mx postfix/qmgr[100]: private/rewrite socket: wanted attribute: recipient
    mx postfix/qmgr[100]: input attribute name: recipient
    mx postfix/qmgr[100]: input attribute value: postmaster@exampledomain.local
    mx postfix/qmgr[100]: private/rewrite socket: wanted attribute: flags
    mx postfix/qmgr[100]: input attribute name: flags
    mx postfix/qmgr[100]: input attribute value: 1024
    mx postfix/qmgr[100]: private/rewrite socket: wanted attribute: (list terminator)
    mx postfix/qmgr[100]: input attribute name: (end)
    mx postfix/qmgr[100]: resolve_clnt: `someone@gmail.com' -> `postmaster@exampledomain.local' -> transp=`lmtp' host=`[dovecot.local]:24' rcpt=`postmaster@exampledomain.local' flags= class=virtual
    mx postfix/qmgr[100]: qmgr_transport_create: lmtp concurrency 20 recipients 50
    mx postfix/qmgr[100]: start sorted recipient list
    mx postfix/qmgr[100]: qmgr_message_sort: postmaster@exampledomain.local
    mx postfix/qmgr[100]: end sorted recipient list
    mx postfix/qmgr[100]: trigger_server_accept_fifo: trigger arrived
    mx postfix/qmgr[100]: master_notify: status 0
    mx postfix/qmgr[100]: request: 87 (W)
    mx postfix/qmgr[100]: qmgr_scan_start: start incoming queue scan
    mx postfix/qmgr[100]: master_notify: status 1
    mx postfix/qmgr[100]: qmgr_transport_select: lmtp
    mx postfix/qmgr[100]: qmgr_active_drain: allocate lmtp
    mx postfix/qmgr[100]: connect to subsystem private/lmtp: No such file or directory
    mx postfix/qmgr[100]: warning: connect to transport private/lmtp: No such file or directory
    mx postfix/qmgr[100]: done incoming queue scan
    mx postfix/qmgr[100]: qmgr_active_feed: queue deferred
    mx postfix/qmgr[100]: qmgr_active_feed: deferred/B/BC14C4A6
    mx postfix/qmgr[100]: qmgr_message_alloc: active BC14C4A6
    mx postfix/qmgr[100]: BC14C4A6: recipient limit 5000
    mx postfix/qmgr[100]: BC14C4A6: from=<someone@gmail.com>, size=1937, nrcpt=1 (queue active)
    mx postfix/qmgr[100]: start sorted recipient list
    mx postfix/qmgr[100]: qmgr_message_sort: postmaster@exampledomain.local
    mx postfix/qmgr[100]: end sorted recipient list
    mx postfix/qmgr[100]: resolve_clnt: cached: `someone@gmail.com' -> `postmaster@exampledomain.local' -> transp=`lmtp' host=`[dovecot.local]:24' rcpt=`postmaster@exampledomain.local' flags= class=virtual
    mx postfix/qmgr[100]: start sorted recipient list
    ...
    
    What surprised me is this:
    Code:
    connect to subsystem private/lmtp: No such file or directory
    The setup is configured for virtual transport. The domain is stored in the database, the transport lmtp:[dovecot.local]:24 is also loaded correctly from there. A telnet to dovecot.local 24 from the postfix machine works. Mail will also be sent.

    What is wrong?

    Attached my config for Postfix.

    Thanks, look forward to help :)

    Cheers,
    Marco
     
  2. mahafue

    mahafue New Member

    postconf
    Code:
    $ postconf -n
    alias_database = hash:/etc/aliases
    alias_maps = hash:/etc/aliases
    append_dot_mydomain = no
    biff = no
    bounce_queue_lifetime = 1d
    broken_sasl_auth_clients = yes
    disable_vrfy_command = yes
    html_directory = /usr/share/doc/postfix/html
    inet_interfaces = all
    inet_protocols = all
    mailbox_size_limit = 0
    maximal_backoff_time = 1800s
    maximal_queue_lifetime = 1d
    message_size_limit = 104857600
    minimal_backoff_time = 300s
    mydestination = mx.exampledomain.local, localhost
    myhostname = mx.exampledomain.local
    mynetworks = 127.0.0.0/8 172.17.0.0/16 172.19.0.0/16 [::ffff:127.0.0.0]/104 [::1]/128
    myorigin = mx.exampledomain.local
    notify_classes = bounce, 2bounce, delay, policy, resource, software
    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 $smtpd_sender_login_maps
    queue_run_delay = 300s
    readme_directory = /usr/share/doc/postfix
    recipient_delimiter = +
    relayhost =
    smtp_connect_timeout = 120s
    smtp_destination_concurrency_limit = 2
    smtp_destination_rate_delay = 12s
    smtp_extra_recipient_limit = 1
    smtp_tls_cert_file = /opt/postfix/cert/mx.exampledomain.local.cer
    smtp_tls_key_file = /opt/postfix/cert/mx.exampledomain.local.key
    smtp_tls_loglevel = 1
    smtp_tls_security_level = may
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
    smtpd_banner = $myhostname
    smtpd_client_restrictions = reject_unknown_client
    smtpd_data_restrictions = reject_unauth_pipelining, permit
    smtpd_delay_reject = yes
    smtpd_error_sleep_time = 10s
    smtpd_hard_error_limit = ${stress?1}${stress:5}
    smtpd_helo_required = yes
    smtpd_recipient_restrictions = permit_sasl_authenticated, permit_mynetworks, check_policy_service inet:dovecot.local:12340 check_client_access hash:/etc/postfix/check_client_access reject_unknown_reverse_client_hostname, reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_authenticated_header = yes
    smtpd_sasl_local_domain = $mydomain
    smtpd_sasl_path = inet:dovecot.local:12345
    smtpd_sasl_type = dovecot
    smtpd_sender_login_maps = proxy:mysql:/etc/postfix/mysql/postfix-mysql-virtual_alias_maps.cf
    smtpd_sender_restrictions = reject_authenticated_sender_login_mismatch, permit_mynetworks, permit_sasl_authenticated, reject_unlisted_sender, reject_unknown_sender_domain
    smtpd_soft_error_limit = 3
    smtpd_tls_cert_file = /opt/postfix/cert/mx.exampledomain.local.cer
    smtpd_tls_eecdh_grade = strong
    smtpd_tls_key_file = /opt/postfix/cert/mx.exampledomain.local.key
    smtpd_tls_loglevel = 1
    smtpd_tls_mandatory_ciphers = high
    smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3
    smtpd_tls_security_level = may
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
    transport_maps = mysql:/etc/postfix/mysql/postfix-mysql-virtual_transport_maps.cf
    unknown_address_reject_code = 554
    unknown_client_reject_code = 554
    virtual_alias_maps = proxy:mysql:/etc/postfix/mysql/postfix-mysql-virtual_alias_maps.cf
    virtual_gid_maps = static:5000
    virtual_mailbox_base = /
    virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql/postfix-mysql-virtual_domains_maps.cf
    virtual_mailbox_limit = 0
    virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql/postfix-mysql-virtual_mailbox_maps.cf
    virtual_minimum_uid = 5000
    virtual_transport = lmtp:[dovecot.localnet]:24
    virtual_uid_maps = static:5000
    
    Code:
    master.cf
    
    # =============================================================
    # service type  private unpriv  chroot  wakeup  maxproc command
    #               (yes)   (yes)   (yes)   (never) (100)
    # =============================================================
    smtp      inet  n       -       n       -       -       smtpd -v
    smtps     inet  n       -       n       -       -       smtpd -v
       -o smtpd_tls_wrappermode=yes
       -o smtpd_sasl_auth_enable=yes
    smtp      inet  n       -       n       -       1       postscreen
    smtpd     pass  -       -       n       -       -       smtpd
      -o smtpd_helo_restrictions=permit_mynetworks,reject_non_fqdn_helo_hostname
      #-o smtpd_proxy_filter=mail-filter:10024
      -o smtpd_client_connection_count_limit=10
      -o smtpd_proxy_options=speed_adjust
    
    submission inet n       -       n       -       -       smtpd
      -o smtpd_sasl_type=dovecot
      -o smtpd_sasl_path=inet:dovecot:12345
      -o smtpd_client_restrictions=permit_sasl_authenticated,reject
    #  -o smtpd_proxy_filter=mail-filter:10025
      -o smtpd_client_connection_count_limit=10
      -o smtpd_proxy_options=speed_adjust
    tlsproxy  unix  -       -       n       -       0       tlsproxy
    dnsblog   unix  -       -       n       -       0       dnsblog
    pickup    fifo  n       -       n       60      1       pickup
    cleanup   unix  n       -       n       -       0       cleanup
    qmgr      fifo  n       -       n       300     1       qmgr -v
    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 -v
    virtual   unix  -       n       n       -       -       virtual
    lmtp      inet  n       n       n       -       -       lmtp -v
    anvil     unix  -       -       n       -       1       anvil
    scache    unix  -       -       n       -       1       scache
    
     

Share This Page