I mean I can use port 465 to submit an email(destined to email@example.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