View Full Version : Plesk8 multiple IPs - set outgoing mail IP address
fishnyc22
28th June 2006, 12:11 AM
Hey there...
I have a box running plesk 8 on Linux 2.6.16-rc6-060427a
The box has 2 IPs running for 2 domains with dedicated SSL certs. And shows 1 (first) ip for outgoing traffic (I don't understand this too well. but thats what I was told)
Anyway....
Is it possible to set what IP sendmail goes out on rather than it showing its coming from the first IP?
Any info would be appreciated.
Thanks
phoenixisp
28th June 2006, 07:10 AM
First off, Plesk uses qmail, not sendmail. The IP that it sends mail on is the IP associated with the host name. I guess you could use the reconfigurator utility to swap IPs.
fishnyc22
28th June 2006, 11:12 AM
Thanks for the reply... Actually I wasn't referring to outgoing mail in the mail system sent out by users.... I mean web applications on the server that are using sendmail to send messages out.
At least I think thats how it works.
phoenixisp
28th June 2006, 11:24 AM
Although the scripts may say sendmail, the location (/usr/sbin/sendmail) is a symlink to /etc/alternatives/mat which points to qmail. That is why outgoing emails come from the "first" IP.
fishnyc22
29th June 2006, 01:43 AM
interesting. thanks for the info.
to be honest. I have no idea what "reconfigurator utility to swap IPs." mean. any suggestions of how to do this.
thanks
phoenixisp
30th June 2006, 06:32 AM
If you had run a search on reconfigurator you would have found a few threads, but...
From shell:
#/usr/local/psa/bin/reconfigurator.pl map_file
This will create a file named "map_file" - edit this file with the proper ip's. Directions are in the file.
fishnyc22
19th October 2006, 03:24 PM
Hey phoenixisp
I'm finally back to working on this. I tried to mess with reconfigurator but i don't think I did it right.
Just as background I have 4 ip addresses on my server. I have 3 domains each with an exclusive IP. the 4th ip is not really used yet.
xxx.xxx.xxx.xx1 - domain1.com PRIMARY IP
xxx.xxx.xxx.xx2 - domain2.com
xxx.xxx.xxx.xx3 - domain3.com
xxx.xxx.xxx.xx4
My Mapfile looks like this:
eth0:xxx.xxx.xxx.xx1 255.255.255.255 -> eth0:xxx.xxx.xxx.xx1 255.255.255.255
eth0:xxx.xxx.xxx.xx2 255.255.255.255 -> eth0:xxx.xxx.xxx.xx2 255.255.255.255
eth0:xxx.xxx.xxx.xx3 255.255.255.255 -> eth0:xxx.xxx.xxx.xx3 255.255.255.255
eth0:xxx.xxx.xxx.xx4 255.255.255.255 -> eth0:xxx.xxx.xxx.xx4 255.255.255.255
When I changed some of the mapfile and tried to view domain3.com in my browser but I was pointed to the site for domain1.com. so I did something wrong there I guess. So I switched it back to the way I had it.
My Primary IP xxx.xxx.xxx.xx1 is showing up for all outgoing traffic and email headers. My main concern is that the mail sent from domain3.com has a header from xxx.xxx.xxx.xx1 and I think a lot of mail ends up in a spam folder.
I've read several posts to solve this problem different ways. Domain1 and domain2 are not really in use. so if I can change my primary IP to xxx.xxx.xxx.xx3 will qmail follow suit?
http://forum.swsoft.com/showthread.php?s=&threadid=33802
http://forum.swsoft.com/showthread.php?s=&threadid=32044
http://forum.swsoft.com/showthread.php?s=&threadid=17760
I also found this post on swsofts knowledgebase:
http://kb.swsoft.com/article_22_1190_en.html
looking at my ip route I think I can run something liek this:
/sbin/ip route change default via 10.255.255.1 dev eth0 src xxx.xxx.xxx.xx3
but I'm a bit nervous to do so. any additional guidance would REALLY be appreciated.
dw604
20th October 2006, 11:27 PM
Here's how to patch qmail so you can set the outgoing IP to any one on the server:
http://forum.swsoft.com/showthread.php?s=&threadid=34664
vBulletin® v3.6.12, Copyright ©2000-2008, Jelsoft Enterprises Ltd.