Enable Secondary SMTP Port
- October 7th, 2010
- Write comment
Okay, so this is a bit of a trick but will get the job done.
Lots of ISPs block outbound traffic on port 25 to stop spammers and the like. I recently had this problem and this is how I got around it.
If you’re running a Linux mail server with iptables then you can have it do some clever port forwarding and forward all traffic on say 9925 over to 25, thus ‘enabling’ a secondary SMTP port.
$iptables -t nat -A PREROUTING -t nat -p tcp -d SERVER_IP_HERE --dport 9925 -j DNAT --to SERVER_IP_HERE:25
Of course, don’t forget about any firewalls you need to allow 9925 through.