• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Qmail outgoing IP

B

BudutzUs

Guest
Ok I got a weird problem:

Qmail's outgoing IP address it's the one from eth0:1 instead of eth0 after we added 3 extra IP addresses.

I modified the entries in /etc/xinetd.d/smtp_psa and added bind to eth0 IP, it binds successfully but upon communicating to other SMTP addresses it's still going nanners and connects from the eth0:1 IP.

Any ideeas?

I guess qmail outgoing IP patch it's out of the question on Plesk right?

Please don't confuse binded address with the outgoing address.
 
Greetings:

Have you set up a /var/qmail/control/outgoingip file that contains the IP address you want qmail to use?

If not, then create one (plain text, just one line with the IP address); and restart qmail.

Thank you.
 
Greetings:

What is the output of


netstat -lntpe | grep ":25"

and

netstat -anp | grep ":25"


NOTE: If, for privacy purposes, you change the IP addresses listed which are yours, please do clear designate which one is eth0:0, eth0:1, and so on.

Also, if you leave the IP addresses "as is," please specify which one is eth0:0, eth0:1, etc.

Thank you.
 
Qmail is listens to eth0 IP only and still goes out on eth0:1 IP even I specified the eth0:1 ip on /var/qmail/control/outgoingip
 
Greetings:

1. If you want the ip to be eth0:0 then put eth0:0's IP in /var/qmail/control/outgoingip and restart qmail.

In your reply, yous stated you have eth0:1 in the outgoing IP.

2. If you want additional help, I asked questions you avoided.

Please consider reviewing the netstat questions, and responding if #1 doesn't work.

Thank you.
 
So I added the IP: xx.xx.xx.194 to the /var/qmail/control/outgoingip and the restarted xinetd and qmail. I still have a ton of connects on my other IP even after restarting the network, I even bound using bind = xx.xx.xx.194 in my smtp_psa, please help. I need to bind this to the specific ip:


Starting xinetd: [ OK ]
[root@jasmine xinetd.d]# service qmail restart
Starting qmail: [ OK ]
[root@jasmine xinetd.d]# netstat -anp | grep ":25"
tcp 0 0 69.65.15.194:2525 0.0.0.0:* LISTEN 24536/xinetd
tcp 0 0 69.65.15.193:57034 76.96.30.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:57037 76.96.30.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:57036 76.96.30.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:57027 76.96.30.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:57051 76.96.30.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:57049 76.96.30.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:57052 76.96.30.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:57047 76.96.30.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:57044 76.96.30.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:57058 76.96.30.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:57057 76.96.30.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:57060 76.96.30.116:25 TIME_WAIT -
tcp 0 37 69.65.15.191:25 196.206.192.110:3013 ESTABLISHED 19511/qmail-smtpd
tcp 0 0 69.65.15.193:52728 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52729 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52730 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52731 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52735 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52720 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52722 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52723 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52724 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52725 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52726 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52714 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52715 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52716 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52717 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52718 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52704 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52703 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52738 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52737 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52736 76.96.62.116:25 TIME_WAIT -
tcp 0 0 69.65.15.193:52740 76.96.62.116:25 TIME_WAIT -
tcp 0 1 69.65.15.193:52346 208.69.36.132:25 SYN_SENT 24646/qmail-remote.
tcp 0 4086 69.65.15.193:40829 208.49.245.21:25 ESTABLISHED 21894/qmail-remote.
tcp 0 4097 69.65.15.193:40821 208.49.245.21:25 ESTABLISHED 21665/qmail-remote.
tcp 0 1333 69.65.15.193:40745 208.49.245.21:25 ESTABLISHED 20775/qmail-remote.
tcp 0 4097 69.65.15.193:43505 208.49.245.21:25 ESTABLISHED 24625/qmail-remote.
tcp 0 1326 69.65.15.193:43511 208.49.245.21:25 ESTABLISHED 24670/qmail-remote.
tcp 0 4093 69.65.15.193:43509 208.49.245.21:25 ESTABLISHED 24661/qmail-remote.
tcp 0 1337 69.65.15.193:43402 208.49.245.21:25 ESTABLISHED 24196/qmail-remote.
tcp 0 4086 69.65.15.193:43401 208.49.245.21:25 ESTABLISHED 24210/qmail-remote.
tcp 0 1333 69.65.15.193:43399 208.49.245.21:25 ESTABLISHED 24011/qmail-remote.
 
QMail Change IP Plesk 8.6 on Mediatemple DV

I spent ages trying to solve this same problem for Plesk 8.6 on Mediatemple DV, and 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 :)
 
Hi solucionesuno,

Did you try a command `/sbin/ip -6 route change default ...`? What does it return?
 
Last edited:
Back
Top