exim choosing randomly from IPv6 addresses assigned to DA for sending mail

jvdwilk

Verified User
Joined
Aug 2, 2006
Messages
40
Well, not really random, but it doesn't choose the IPv6 I thought it would.

I have set up a new CentOS 6.5 box with DA.
All the latest software versions, and running the Spamblocker 4.2 exim.conf.

In my idea this could either be a DA issue with IPv6 or something odd with Exim.

IPv6 is working properly.
In my /etc/sysconfig/network-scripts/ifcfg-eth0 file there is one IPv4 and one IPv6 address for the server.
I would expect these to be my 'server IPs'.

Now when I add some IP's (both IPv4 and IPv6 ips) in DA and run ifconfig, I get a list of all IP's:

Code:
[root@seti ~]# ifconfig
eth0      Link encap:Ethernet  HWaddr 52:54:00:2F:5C:16
          inet addr:149.210.159.111  Bcast:149.210.159.255  Mask:255.255.255.0
          inet6 addr: 2a01:7c8:aab4:5e0::fefe/128 Scope:Global
          inet6 addr: 2a01:7c8:aab4:5e0::bebe/128 Scope:Global
          inet6 addr: 2a01:7c8:aab4:5e0::ae06/128 Scope:Global
          inet6 addr: 2a01:7c8:aab4:5e0::ae07/128 Scope:Global
          inet6 addr: fe80::5054:ff:fe2f:5c16/64 Scope:Link
          inet6 addr: 2a01:7c8:aab4:5e0::ae08/128 Scope:Global
          inet6 addr: 2a01:7c8:aab4:5e0::ae09/128 Scope:Global
          inet6 addr: 2a01:7c8:aab4:5e0::ae0a/128 Scope:Global
          inet6 addr: 2a01:7c8:aab4:5e0::ae0b/128 Scope:Global
          inet6 addr: 2a01:7c8:aab4:5e0::9f6f/48 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:898 errors:0 dropped:0 overruns:0 frame:0
          TX packets:903 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:181359 (177.1 KiB)  TX bytes:96715 (94.4 KiB)

eth0:0    Link encap:Ethernet  HWaddr 52:54:00:2F:5C:16
          inet addr:149.210.174.6  Bcast:149.210.174.6  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:1    Link encap:Ethernet  HWaddr 52:54:00:2F:5C:16
          inet addr:149.210.174.7  Bcast:149.210.174.7  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:2    Link encap:Ethernet  HWaddr 52:54:00:2F:5C:16
          inet addr:149.210.174.8  Bcast:149.210.174.8  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:3    Link encap:Ethernet  HWaddr 52:54:00:2F:5C:16
          inet addr:149.210.174.9  Bcast:149.210.174.9  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:4    Link encap:Ethernet  HWaddr 52:54:00:2F:5C:16
          inet addr:149.210.174.10  Bcast:149.210.174.10  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

eth0:5    Link encap:Ethernet  HWaddr 52:54:00:2F:5C:16
          inet addr:149.210.174.11  Bcast:149.210.174.11  Mask:255.255.255.255
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1

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:246 errors:0 dropped:0 overruns:0 frame:0
          TX packets:246 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:21936 (21.4 KiB)  TX bytes:21936 (21.4 KiB)

[root@seti ~]#

Exim is always choosing the first IPv6 address it finds in this order for sending email to another IPv6 capable mailserver.
In this case it would choose 2a01:7c8:aab4:5e0::fefe as the sending IP address.

This greatly messes up my SPF records and other policies, not even speaking about it messing with my head...

Now, if there would be a way to force exim into using specific IP addresses, and not 'just any', in combination with the Spamblocker configuration then that would be a great help. Anyone any ideas on this?
 
Well, I found a solution. A work around in my idea, but it works:

A small addition to the remote_smtp: transport and the server started behaving as I would expect it to:

#COMMENT#61:
remote_smtp:
driver = smtp
interface = <; 149.210.159.111 ; 2a01:7c8:aab4:5e0::9f6f

This should not have been needed though - it should have worked just out of the box, not..?
 
Yes I know, this is an old thread. But I'm looking for a solution that prevents Exim from choosing a random IPv6 address to send outbound mail from. Is the mentioned work around still a good option or is there a better solution available (9 years later)?
 
Back
Top