Making postfix listen on port 587
Nowadays many WiFi hotspots are blocking or filtering port 25 traffic, leaving most email users with a problem: How do I send my mail?
If your lucky enough to be running your own postfix server that already is set up for SASL authentication, than give this a shot by adding it to your postfix master.cf file (Usually /etc/postfix/master.cf)
submission inet n - - - - smtpd -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes -o smtpd_client_restrictions=permit_sasl_authenticated,reject -o cleanup_service_name=sasl_cleanup sasl_cleanup unix n - n - 0 cleanup -o header_checks=regexp:/etc/postfix/sub_header
You will also need to create a /etc/postfix/sub_header file with the following contents
/^Received: / IGNORE
This sub_header file will remove the Received: header from your email, thus preventing other email servers from rejecting your mail due to the dynamic IP address from the hotspot.
Now all you need to to is set up your email client to use port 587 (submission) when connecting to your mail server. You also need to enable TLS authentication, since the submission port only allows encrypted connections. (You can change this by removing the smtpd_enforce_tls line, but that opens your passwords up to sniffing)
There are other ways to avoid the port 25 block of course, one of them namely being using ssh as a proxy for your connection.



