Some internet access providers have port 25 disabled in their routers to prevent spam. If you run your own mailserver in a datacenter, you might have to enable the submission port (587) in postfix to be able to send emails from your local email client to your own mailserver.
To enable port 587, edit the file /etc/postfix/master.cf
Copy this line
smtp inet n - - - - smtpd
And change “smtp” into “submission”.
submission inet n - - - - smtpd
Restart postfix
service postfix restart
The email server listens now to the alternative SMTP port 587.