How to disable IPv6 for exim?

vpsgeek

Verified User
Joined
Jul 21, 2020
Messages
7
How to disable exim in such a way that updates to exim or directadmin don't modify this setting?

I tried adding disable_ipv6=true to /usr/local/directadmin/custombuild/custom/exim/exim.conf

And ran the following commands

Code:
./build update
./build exim_conf

But it has had no effect as exim still tries to send emails over IPv6

I will be grateful for any help related to this issue. Thanks
 
This option is negated by the exim.variables.conf file, there is a custom file to achieve this.

You should use exim.variables.conf.custom in /etc and put disable_ipv6=true in there and do a exim_conf rewrite.
 
I got the following error when trying to apply the above method

Code:
Oct 10 15:20:06 domain.com systemd[1]: Started Exim Mail Transport Agent.
Oct 10 15:20:06 domain.com exim[3665]: 2020-10-10 15:20:06 Exim configuration error in line 3 of /etc/exim.variables.conf:
Oct 10 15:20:06 domain.com exim[3665]:   "truedaemon_smtp_ports" is not a valid value for the "disable_ipv6" option
Oct 10 15:20:06 domain.com systemd[1]: exim.service: Main process exited, code=exited, status=1/FAILURE
Oct 10 15:20:06 domain.com systemd[1]: exim.service: Failed with result 'exit-code'
.
Line 3 of /etc/exim.variables.conf is

Code:
disable_ipv6=truedaemon_smtp_ports=25 : 587 : 465
 
Code:
disable_ipv6=truedaemon_smtp_ports=25 : 587 : 465
seems logic to me. You didn't do what Imtek said:
You should use exim.variables.conf.custom in /etc and put disable_ipv6=true in there and do a exim_conf rewrite.
So create that file if it does not exist yet and add:
Code:
disable_ipv6=true
and not the rest you got after it. Then restart exim.
 
Code:
disable_ipv6=truedaemon_smtp_ports=25 : 587 : 465
seems logic to me. You didn't do what Imtek said:

So create that file if it does not exist yet and add:
Code:
disable_ipv6=true
and not the rest you got after it. Then restart exim.
Hi Richard, sorry I should have been more clear in my last post that I exactly followed what imtek said & created exim.variables.conf.custom in /etc and put only disable_ipv6=true there & did:

Code:
./build exim_conf


This caused exim to fail & exit with the error code I described in my last post in this thread. The OS I am using is CentOS 8
 

Attachments

  • exim.variables.conf.custom.zip
    203 bytes · Views: 73
It might be the old bug is returning, try doing it like this.
Code:
disable_ipv6= true
with a space behind the = and then do the ./build exim_conf again and restart exim. Does that help?

If you don't use ipv6 for anything else, you might consider disabling ipv6 in Directadmin.
 
It might be the old bug is returning, try doing it like this.
Code:
disable_ipv6= true
with a space behind the = and then do the ./build exim_conf again and restart exim. Does that help?

If you don't use ipv6 for anything else, you might consider disabling ipv6 in Directadmin.
Unfortunately the error still persists after doing that. I wish to use IPv6 for all services except email
 
If recompiling Exim itself also not works, you might want to consider to send in a ticket, unless maybe smtalk sees this thread.
 
If you have no other customizations in /etc/exim.variables.conf.custom, just do:
Code:
echo "disable_ipv6=true" > /etc/exim.variables.conf.custom
/usr/local/directadmin/custombuild/build exim_conf
 
Back
Top