4

I have an unmanaged VPS that runs CentOS 7 Minimal. I have installed Exim for sending emails. My main server IP is IPv4 and I have an additional IPv6 address.

Exim uses the IPv6 address to send emails. I want to overwrite this and use the IPv4 main server address. I added the interface line to the exim.conf:

remote_smtp:
   driver = smtp
   interface = x.x.x.x

And then restarted Exim but no matter what, it uses the IPv6 one. I thought that Exim is ignoring the config file but that's not the case as if I enter wrong IP format for interface and try sendmail, I get wrong IP format while sending email.

I tried adding disable_ipv6 = true to the end of exim.conf but when I saved and restarted Exim, I got the following error when running Sendmail: "Option disable_ipv6 unknown"

Thanks

Michael Samuel
  • 3,820
  • 12
  • 45
  • 85

2 Answers2

3

I had this problem too, moved the disable_ipv6 to the begining of the config file and it was solved

root@hostname/etc/exim4 # service exim4 restart
root@hostname/etc/exim4 # exim -bP disable_ipv6
disable_ipv6
Sniffleh
  • 319
  • 3
  • 12
0

It is possible to make IPv4 only transport work (with having IPv6 enabled or even other transports using it). You have to specify "ipv4_only = true" at the router section where you "call" the transport with the "interface" with IPv4 specified, eg:

dnslookup_IPv4:
  driver = dnslookup
  ipv4_only = true
  transport = remote_smtp
  ...
maques
  • 1