I've installed postfix in centos and attempted to send an email but I get the error 'Lost connection while receiving the initial server greeting'. The error occurs with gmail, hotmail and my work email domain. The VM where postfix is running is placed behind a firewall with outbound internet connection. I've googled the error message and most of the results point to

  • domain being blacklisted

  • lack of ssl

  • local firewall

I've just configured a local domain in the /etc/hosts file of the vm where postfix is running - privateip hostname.somedomain.com. Could this be the issue? Is SSL mandatory? Or am I completely wrong in the configuration?

  • What happens when you use other tools to connect to one of those domains' SMTP MX servers? For example, (based on information shown by host -t mx gmail.com), what happens when you use telnet gmail-smtp-in.l.google.com 25? Do you get the "220 <name> ESMTP" greeting line? – grawity Sep 12 at 5:03
  • I'm able to telnet to the gmail server on port 25 but I don't see a greeting Trying Connected to gmail-smtp-in.l.google.com. Escape character is '^]'. – Jerry Kross Sep 12 at 8:51
  • Can you do the same on the firewall? It is either a firewall problem or an ISP problem. – grawity Sep 12 at 9:18
  • I checked the firewall logs and I see the firewall rules allow the traffic. I suspect I'm not meeting the pre-requisites of gmail or any other domains. Is SSL mandatory? – Jerry Kross Sep 13 at 2:11
  • No. Additionally, Postfix's connection and your test are stopping before TLS can begin to be negotiated. – grawity Sep 13 at 4:23

Your Answer

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

Browse other questions tagged or ask your own question.