Sending emails using a different IP address
by Manoj[ Edit ] 2012-04-21 12:30:37
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