Ok, so nowadays most ISP’s block port 25, the port for sending email through the internet. This leaves most hosting providers telling their customers to use their ISP’s outgoing mail server. I.E. smtp.comcast.net. Well this sucks! Here’s why:

I carry a laptop around, and I take it everywhere. When I boot it up it connects to any number of wifi signals that are pre-saved. I could be on a Verizon connection, a comcast connection, or even optimum online. So am I suppose to reconfigure my outgoing mailserver several times a day based on the wifi signal of the office I mobilized into? Well many host would have you believe so!

My work around on Redhat based linux servers is to set up the official alternative email port to listen and forward traffic to port 25. I do this via iptables and the command is:

/sbin/iptables -t nat -A PREROUTING -p tcp --dport 587 -i eth0 -j REDIRECT --to-ports 25

This command assumes your main interface is eth0. You may need to adjust it accordingly. Instead of just running this command from the shell prompt I recommend you append it to the /etc/rc.local file. This way when your server is ever rebooted the command is automatically reissued when the server reboots. Otherwise you may be wondering why your email stopped working out of the blue!

Plesk offers an alternative option to this which involves editing the /etc/xinetd.d/smtp_psa but it did not work well for me and was not as simple and clean as this solution.

Leave a Comment

Your email address will not be published. Required fields are marked *