QMAIL SMTP IP Address
When mail is sent from my server, Qmail uses not right IP for the connection. How do I change the IP that is used for any outgoing connection from my server?
If no ‘src’ listed in ‘ip’ output for default route, then main IP on
the interface is used for an outgoing connections. You can change it
using:
Now:
Article ID: 1190
Last Review: Oct,6 2008
Author:
Last updated by: system APPLIES TO:
- Parallels Plesk Panel for Linux/Unix
Resolution
Default IP for an outgoing connections can be set using ‘ip’ utility. First of all check how routing is configured on the server:# /sbin/ip route
192.168.50.0/24 dev eth1 proto kernel scope link src 192.168.50.53
169.254.0.0/16 dev eth1 scope link
default via 192.168.50.254 dev eth1
# /sbin/ip route change default via 192.168.50.254 dev eth1 src 192.168.50.100
/sbin/ip route
192.168.50.0/24 dev eth1 proto kernel scope link src 192.168.50.53
169.254.0.0/16 dev eth1 scope link
default via 192.168.50.254 dev eth1 src 192.168.50.100
Note: be careful, if you set wrong IP as source you lose link to the server.
reference
http://kb.parallels.com/en/1190