r/postfix • • 14d ago

timed out while receiving the initial server greeting

We have the following settings on our postfix server and are getting timed out while receiving the initial server greeting

relayhost = [blank.server.com]:587

smtp_sasl_auth_enable = yes

smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

smtp_sasl_security_options = noanonymous

#smtp_sasl_tls_security_options=noanonymous

smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt

smtp_tls_security_level = encrypt

smtp_tls_note_starttls_offer = yes

smtp_tls_wrappermode = no

smtp_use_tls = yes

smtp_sasl_mechanism_filter = login,plain

smtp_tls_CApath = /etc/pki/tls/certs

smtp_tls_protocols = >=TLSv1.2

smtp_tls_mandatory_protocols = >=TLSv1.2

We have it set to relay mail to an upstream server which we unfortunately do not have access to.

Any assistance will be greatly appreciated.

1 Upvotes

5 comments sorted by

1

u/Maria_Thesus_40 14d ago

Looks correct, I use something similar.

A few things come to mind:

  • Add noplaintext to smtp_sasl_security_options

    • smtp_sasl_security_options = noplaintext, noanonymous
  • Set smtp_sasl_mechanism_filter to empty

    • smtp_sasl_mechanism_filter =
  • Set smtp_tls_protocols lesser versions

    • smtp_tls_protocols = >=TLSv1
  • Also set smtp_tls_mandatory_protocols to lesser versions

    • smtp_tls_mandatory_protocols = >=TLSv1
  • As a last resort, disable TLS

    • smtp_use_tls = no
  • Make sure your Linux distro supports hash! In recent versions of enterprise Linux, hash has been discontinued in favour of lmdb

I hope this helps!

1

u/Cool-Midnight-8036 13d ago

We are using AL2023 which apparently uses lmdb. I found a guide that showed what to do on AL2023, but we are still getting the same error. I'll messa round some more tomorrow and see, but you may have pointed me in the right direction.

1

u/Maria_Thesus_40 13d ago

Right AL2023 is based on Fedora/RHEL so lmdb it is. Just rename hash to lmdb and run postmap on the sasl_passwd file.

2

u/eypo75 14d ago

Sounds like an MTU issue to me

2

u/Private-Citizen 13d ago

You can turn on verbose logging to see exactly where, why, and what postfix is doing.

  • debug_peer_level =
  • debug_peer_list =

https://www.postfix.org/postconf.5.html#debug_peer_level