which port does postfix connect to remote smtp server?

1

1

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?

peter

Posted 2018-03-23T11:08:48.927

Reputation: 223

By default it should be using port 25 though that doesn't mean that it can't use STARTTLS or SMTPS to securely communicate with other servers. It depends on their and your configuration. Forcing smtp outgoing mail encryption on postfix on server fault

– Seth – 2018-03-23T11:11:36.163

Answers

2

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.

nKn

Posted 2018-03-23T11:08:48.927

Reputation: 4 960

I checked /var/log/maillog and found postfix used port 25. Thanks! – peter – 2018-03-24T07:08:24.393