Sending emails using a different IP address

You can send emails of your server from an additional IP of your server instead of the main IP using iptables. Here is the iptable command:

iptables -t nat -A POSTROUTING -o eth0 -p tcp -j SNAT –dport 25 –to-source IPAddress

where, “IPAddress” is the additional IP of your server. To save the rule, execute

service iptables save

This will make the settings permanent and you can check the rule using

iptables -L -t nat

This entry was posted on Saturday, September 26th, 2009 and is filed under Linux Administration. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.