I mean I can use port 465 to submit an email(destined to sombody@gmail.com) to my Postfix server in a secure way, but which port does Postfix use to connect to gmail's smtp server? If Postfix uses port 25, is the email transported without encryption? And does gmail's smtp server accept anonymous connections from other mail servers? By the way, how to see the port postfix connects to gmail server on CentOS?


For client connections, port should be 587 which is submission as you stated. But inter-MTA connections should be done (by default) on port 25.

Note that these parameters apply only if talking about plain traffic (not SSL), otherwise other ports are used. In that case, for SMTPS port 465 is used (by default).

All this connections are logged into your /var/log/maillog file (on CentOS). On other OSs it might be /var/log/mail.log.

  • I checked /var/log/maillog and found postfix used port 25. Thanks! – peter Mar 24 '18 at 7:08

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.