1

On my server with Postfix, Dovecot and Postgresql I can receive email flawsly, but not send them. Via Thunderbird.

When trying to send it, I see this in the logs of Postfix:

  postfix/qmgr[14391]: B63131F952: from=<>, size=2376, nrcpt=1 (queue active)
  postfix/smtp[15967]: connect to fdsafds.com[11.22.33.44]:25: Connection timed out
  postfix/smtp[15967]: B63131F952: to=<fdsafds@fdsafds.com>, relay=none, delay=412770, delays=412739/0.03/30/0, dsn=4.4.1, status=deferred (connect to fdsafds.com[11.22.33.44]:25: Connection timed out)
  postfix/submission/smtpd[15973]: connect from unknown[33.44.55.66]
  postfix/submission/smtpd[15973]: warning: connect #1 to subsystem public/submission-header-cleanup: No such file or directory
  postfix/submission/smtpd[15973]: warning: connect #2 to subsystem public/submission-header-cleanup: No such file or directory
  postfix/submission/smtpd[15973]: warning: connect #10 to subsystem public/submission-header-cleanup: No such file or directory
  postfix/submission/smtpd[15973]: fatal: connect #11 to subsystem public/submission-header-cleanup: No such file or directory
  postfix/master[14389]: warning: process /usr/lib/postfix/bin/smtpd pid 15973 exit status 1
  postfix/master[14389]: warning: /usr/lib/postfix/bin/smtpd: bad command startup -- throttling
  postfix/anvil[15975]: statistics: max connection rate 1/60s for (submission:33.44.55.66) at Jun  1 03:34:19
  postfix/anvil[15975]: statistics: max connection count 1 for (submission:33.44.55.66) at Jun  1 03:34:19
  postfix/anvil[15975]: statistics: max cache size 1 at Jun  1 03:34:19

What can be a cause?

  $ sudo postconf -M
  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
  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 -o syslog_name=postfix/$service_name
  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
  smtp       inet  n       -       n       -       -       smtpd -o smtpd_sasl_auth_enable=no
  submission inet  n       -       y       -       -       smtpd -o syslog_name=postfix/submission -o smtpd_tls_security_level=encrypt -o smtpd_sasl_auth_enable=yes -o smtpd_sasl_type=dovecot -o smtpd_sasl_path=private/auth -o smtpd_sasl_security_options=noanonymous -o milter_macro_daemon_name=ORIGINATING -o smtpd_helo_required=no -o smtpd_helo_restrictions= -o cleanup_service_name=submission-header-cleanup

And

    $ sudo postconf -n 
    alias_database =
    alias_maps =
    allow_percent_hack = no
    biff = no
    command_directory = /usr/bin
    compatibility_level = 2
    daemon_directory = /usr/lib/postfix/bin
    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
    disable_vrfy_command = yes
    home_mailbox = Maildir/
    html_directory = no
    inet_interfaces = all
    inet_protocols = ipv4
    mail_owner = postfix
    mail_spool_directory = /var/mail/local
    mailbox_size_limit = 0
    mailq_path = /usr/bin/mailq
    manpage_directory = /usr/share/man
    message_size_limit = 51200000
    meta_directory = /etc/postfix
    mydestination = $mydomain, localhost.$mydomain, localhost
    mydomain = my_domain123.com
    myhostname = mail.my_domain123.com
    mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
    myorigin = $mydomain
    newaliases_path = /usr/bin/newaliases
    queue_directory = /var/spool/postfix
    readme_directory = /usr/share/doc/postfix
    recipient_delimiter = +
    sample_directory = /etc/postfix
    sendmail_path = /usr/bin/sendmail
    setgid_group = postdrop
    shlib_directory = /usr/lib/postfix
    show_user_unknown_table_name = no
    smtp_dns_support_level = dnssec
    smtp_tls_security_level = dane
    smtp_tls_session_cache_database = btree:${data_directory}/smtp_tlscache
    smtpd_client_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unknown_reverse_client_hostname, reject_unauth_pipelining
    smtpd_data_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_multi_recipient_bounce, reject_unauth_pipelining
    smtpd_helo_required = yes
    smtpd_helo_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_invalid_helo_hostname, reject_unauth_pipelining
    smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_pipelining
    smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination
    smtpd_sasl_auth_enable = yes
    smtpd_sasl_path = private/auth
    smtpd_sasl_security_options = noanonymous, noplaintext
    smtpd_sasl_tls_security_options = noanonymous
    smtpd_sasl_type = dovecot
    smtpd_sender_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining
    smtpd_tls_auth_only = yes
    smtpd_tls_cert_file = /etc/letsencrypt/live/mail.my_domain123.com/fullchain.pem
    smtpd_tls_dh1024_param_file = /etc/ssl/dh2048.pem
    smtpd_tls_dh512_param_file = /etc/ssl/dh512.pem
    smtpd_tls_key_file = /etc/letsencrypt/live/mail.my_domain123.com/privkey.pem
    smtpd_tls_mandatory_ciphers = high
    smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3, !TLSv1, !TLSv1.1, TLSv1.2
    smtpd_tls_received_header = yes
    smtpd_tls_security_level = may
    smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_tlscache
    strict_rfc821_envelopes = yes
    swap_bangpath = no
    tls_high_cipherlist = ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-AES256-SHA384:ECDHE-RSA-AES256-SHA384:ECDHE-ECDSA-AES128-SHA256:ECDHE-RSA-AES128-SHA256
    tls_ssl_options = no_ticket, no_compression
    unknown_local_recipient_reject_code = 550
    virtual_alias_domains =
    virtual_mailbox_domains = pgsql:/etc/postfix/virtual_mailbox_domains.cf
    virtual_mailbox_maps = pgsql:/etc/postfix/virtual_mailbox_maps.cf
    virtual_transport = lmtp:unix:private/dovecot-lmtp

Note that for receiving emails I have to use SSL/TLS in the settings of my Thunderbird, whereas for sending when I'm using SSL/TLS it won't connect. When I'm trying to send an email and using STARTTLS it at least connects.

1

You're invoking a your submission service with cleanup_service_name=submission-header-cleanup. However, you don't have any service named submission-header-cleanup configured.

Either remove -o cleanup_service_name=submission-header-cleanup from your master.cf (the default cleanup_service is cleanup and will take effect if you remove this override) or configure a submission-header-cleanup service.

  • which option do you recommend? – Omanokoto Jun 1 '18 at 4:44
  • Since you're asking, removing the override. – 84104 Jun 1 '18 at 4:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.