• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Specify which IP outgoing email uses?

L

lpittman

Guest
Hey everyone,

Is it possible to specify which IP outgoing mail is sent on?

Luke
 
Thanks man - I had a look at it and checked out my server with the IP ROUTE command ... but I am too afraid to break anything. Here is my output - can you suggest the right command for me?

---
[root@server ~]# ip route
69.10.144.0/24 dev eth1 proto kernel scope link src 69.10.144.8
209.97.212.0/24 dev eth1 proto kernel scope link src 209.97.212.224
209.97.214.0/24 dev eth1 proto kernel scope link src 209.97.214.72
169.254.0.0/16 dev eth1 scope link
default via 209.97.214.1 dev eth1 src 209.97.214.72
default via 69.10.144.1 dev eth1
[root@server ~]#
---

Thanks

Edit - I'd like everything to route through 69.10.144.8
 
There's another way to do this (at least it has worked for me in the past).

The IP used for outgoing connections is normally the first IP allocated (e.g. that of eth0 as opposed to eth0:1/2/3/4/5/6 or whatever).

So a quick edit of your /etc/sysconfig/network-scripts/ifcfg-eth0 and so on, swapping the IP in that with whichever other file has the one you want to go out on should do the trick. You'll need to do a "service network restart" afterwards.

Please be very careful though. It is easy to screw things up and this may not work on your distro anyway. So don't blame me if it all goes horribly wrong :-(

Faris.
 
Back
Top