• Our team is looking to connect with folks who use email services provided by Plesk, or a premium service. If you'd like to be part of the discovery process and share your experiences, we invite you to complete this short screening survey. If your responses match the persona we are looking for, you'll receive a link to schedule a call at your convenience. We look forward to hearing from you!
  • The BIND DNS server has already been deprecated and removed from Plesk for Windows.
    If a Plesk for Windows server is still using BIND, the upgrade to Plesk Obsidian 18.0.70 will be unavailable until the administrator switches the DNS server to Microsoft DNS. We strongly recommend transitioning to Microsoft DNS within the next 6 weeks, before the Plesk 18.0.70 release.
  • The Horde component is removed from Plesk Installer. We recommend switching to another webmail software supported in Plesk.

Chane qmail outbound IP address

R

RamziB

Guest
Hello,

I've edit the /etc/xinetd.d/smtp_psa file to bind a new IP. However now when I send I get "connection refused". How can I check which ports are blocked on that IP ?

I wish it was that easy http://platonic.techfiz.info/2009/03/change-outgoing-ip-for-qmail/ <--- doesn't work.

Do I have to change both ? One or the other ? Can someone please clarify this ? Our IP has been blacklisted.
 
Last edited by a moderator:
I've just managed to achieve an outgoing IP change by downing the interface that the IP address was on, then qmail automatically started using the next IP address on the server. It can stay down for a few weeks whilst the spam blacklist settles down, and then we can bring it back up again.
 
Hello,

I've edit the /etc/xinetd.d/smtp_psa file to bind a new IP. However now when I send I get "connection refused". How can I check which ports are blocked on that IP ?

I wish it was that easy http://platonic.techfiz.info/2009/03/change-outgoing-ip-for-qmail/ <--- doesn't work.

Do I have to change both ? One or the other ? Can someone please clarify this ? Our IP has been blacklisted.

That file is what controls the listener for incoming SMTP connections; it has nothing to do with the IP that outbound email is sent on. Qmail will always send on the first IP on the box, i.e. typically eth0 or em1.

The followup poster says you can take the primary IP down and qmail will switch to another; I haven't tried that before but that could be pretty difficult if you have a lot of sites hosted on the first IP on the box. You may instead want to simply switch the first IP on the server; i.e. edit the config for the eth0 interface, put a new IP on it, then move what had been the old IP into the config for the secondary IP's on the interface so everything keeps working but now SMTP connections are made from the new primary IP.

I assume you have found and fixed the cause of the blacklisting? You should do that first of course.
 
Change outgoing IP

Now why didn't I manage to find that two days ago? Would have saved a lot of pulling-out-hair (and I don't have much these days anyway).

Downing the interface for one IP was easy for us, as all we had on that IP was one test web site and there are 30 IP's on the server. qmail was using the second IP address, not the first. ie. not venet(0), but venet(0:0), so there was only one web site to move.

It worked, this morning we have an empty email queue.

Anyway, I'll be patching qmail next week some time.
 
I spent ages trying to solve this same problem for Plesk 8.6 on Mediatemple DV 3.5. I was trying to change the IP from which qmail sent emails to prevent Gmail Spam filters from spamming our messages after an incident where the site email was hacked and used for sending out spam.

The instructions on the Parallels site weren't helping. Finally, the instructions here worked for me: https://support.bodhost.com/index.p...-used-for-outgoing-connections-from-my-server

Here is the text:

The default IP for outgoing connections can be set using the "ip" utility. Check how routing is configured on the server:
~~~~~~~~~~~~~~~~~~~
[root@server]#/sbin/ip route
191.255.255.0/24 dev venet0 scope host
169.254.0.0/16 dev venet0 scope link
default via 191.255.255.1 dev venet0
~~~~~~~~~~~~~~~~~~~
If no "src" is listed in the "ip" output for the default route, the main IP on the interface is used for outgoing connections.

To change Plesk default Mail IP address, check ifconfig on the server first as :

~~~~~~~~~~~~~~~~~~~
[root@server]#ifconfig
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:98728 errors:0 dropped:0 overruns:0 frame:0
TX packets:98728 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:161811920 (154.3 MiB) TX bytes:161811920 (154.3 MiB)

venet0:0 Link encap:UNSPEC HWaddr 00-00-00-00-00-01-00-00-00-00-00-00-00-00-00-00
inet addr:xxx.xxx.xxx.xx1 P-t-P:213.175.218.180 Bcast:xxx.xxx.xxx.xx1 Mask:xxx.xxx.xxx.xxx
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1

venet0:1 Link encap:UNSPEC HWaddr 00-00-00-00-01-00-00-00-00-00-00-00-00-00-00-00
inet addr:xxx.xxx.xxx.xx2 P-t-P:213.175.218.181 Bcast:xxx.xxx.xxx.xx2 Mask:xxx.xxx.xxx.xxx
UP BROADCAST POINTOPOINT RUNNING NOARP MTU:1500 Metric:1
~~~~~~~~~~~~~~~~~~~

Change the mail IP address through following command as :
~~~~~~~~~~~~~~~~~~~
[root@server]#/sbin/ip route change default via 191.255.255.1 dev venet0:1 src xxx.xxx.xxx.xx2

now verify the mail IP address :
~~~~~~~~~~~~~~~~~~~
[root@server]#/sbin/ip route
191.255.255.0/24 dev venet0 scope host
169.254.0.0/16 dev venet0 scope link
default via 191.255.255.1 dev venet0 src xxx.xxx.xxx.xx2
[root@server]#
~~~~~~~~~~~~~~~~~~~
Thank you :)
 
The other option is simple to swap which IP is the "default" on your system by swapping round the IPs listed in the ifcfg-ethX configuration files the restarting the networking service. The default is usually the first IP listed e.g. (eth0 or possibly eth0:1 depending on a few other things).
 
Back
Top