Configure IP address for outgoing mail from exim

CanadaGuy

Verified User
Joined
Nov 14, 2019
Messages
158
I noticed that my server is using a secondary IP address that isn't configured anywhere in DA for sending mail. I saw this:


Which maybe seems related based on what I saw in exim.conf, but I thought I would check.

I also saw this (https://help.directadmin.com/item.php?id=152) but it seems like it might be outdated.

How do I bind exim to the domain/account IP address?
 
I should note, there is one IPv4 address which is used for all hosting. A second IPv4 address exists solely for second nameserver use.

I also have IPv6 enabled, again one used for all hosting, and second used for second nameserver.

The emails are being sent from the second IPv6 address.
 
I have tried various combinations of settings from these pages, and nothing seems to influence what IP Exim connects from:


advice from:


old and seems overruled by the above thread:


along with this unofficial info:

 
After plenty of playing with configurations and Googling, I have discovered that Exim will use IPv6 without any reservation, if it and the remote server support IPv6. I added several more IPv6 addresses to my server, and noticed that it used either the latest address in the interface config, or the "largest" address... configuring /etc/virtual/domainips as per the above mentioned threads and features does not work to force Exim to use IPv4. If IPv6 is enabled, and there is an IPv6 address in domainips, then it seems to use that one, otherwise it will use some other IPv6 address.


Is this an Exim bug or "feature" or is this due to DA in some way?
 
Thanks for the info. I did just finish this up, where a domain in the /etc/virtual/domainips can have both IPv4 and IPv6 at the same time:
(it's in the pre-release area)

As for only having the IPv4 in the domainips, I wasn't aware that exim would ignore that, should the interface support IPv6.
The id=1692 should be able to help with that, just add the IPv6 as a secondary value to the domain.

John
 
Back
Top