Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

How to Disable IPv6 for Exim4 That Comes With Vesta Panel

DZone's Guide to

How to Disable IPv6 for Exim4 That Comes With Vesta Panel

If you've run into a problem with Exim4, Vesta CP, and your server running IPv6 and IPv4, you've come to the right place. Here's how to disable IPv6 with a few code snippets.

· Integration Zone ·
Free Resource

How to Transform Your Business in the Digital Age: Learn how organizations are re-architecting their integration strategy with data-driven app integration for true digital transformation.

I had a server which has both IPv4 and IPv6 and they were working perfectly fine. I had installed Vesta CP which is an amazing control panel application and it was working just great. But there was only one problem with Exim4. It was not sending emails properly to Gmail. Mails sent to gmail were bounced. I checked the log and the message was:

message does not meet IPv6 sending guidelines regarding PTR records

Ok, that is pretty straight forward. The server’s IPv6 didn’t have a reverse DNS or PTR. To fix this problem I had to set it up. But then I was thinking how to tell Exim not touse IPv6 but IPv4. The problem begins

Exim in this server came with Vesta Panel, and in most forums people suggested to add a new entry as disable_ipv6=true in the/etc/exim4/update-exim4.conf.con file. I’ve added that and restarted exmi4, but there were no changes. Netstat shows that exim is still listening on port 25 against the IPv6 address.

netstat -tulpn | grep :25
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      7013/exim4     
tcp        0      0 0.0.0.0:2525            0.0.0.0:*               LISTEN      7013/exim4     
tcp6       0      0 :::25                   :::*                    LISTEN      7013/exim4     
tcp6       0      0 :::2525                 :::*   

Some people in different forum suggested thatdc_local_interfaces should be set to 127.0.0.1 but it still didn’t make any change in exim.

Finally, finally, I noticed that there is a configuration template file/etc/exim4/exim4.conf.template. Curiously, I’ve addeddisable_ipv6=true directive over there, restarted exim and voila! It started working.

netstat -tulpn | grep :25
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      8110/exim4     
tcp        0      0 0.0.0.0:2525            0.0.0.0:*               LISTEN      8110/exim4 

I hope you will find this article useful, and save some time when you run into similar problem with exim and vesta panel.

Make your mark on the industry’s leading annual report. Fill out the State of API Integration 2019 Survey and receive $25 to the Cloud Elements store.

Topics:
ipv6 ,exim4 ,ei ,integration ,enterprise integration

Published at DZone with permission of

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}