How to edit /etc/exim.conf manually

chengkinhung

Member
Jun 15, 2007
16
1
53
Hi, every one. I want to modify /etc/exim.conf. I know best to modify it in WHM interface, however not all conent allow to edit in WHM eximconfiguration Advance Editor interface, therefor I need to edit /etc/exim.conf manually. I can not find any cPanel document regarding how to edit /etc/exim.conf. I know there is document: How to Edit the exim.conf File - cPanel Knowledge Base - cPanel Documentation told people should modify /etc/exim.conf.local, however I can not find this docment in my cPanel system. I not sure I can just simply copy from /etc/exim.conf to /etc/exim.conf.local and modify it. I had already open ticket to cPanel support but they refuse to help. Please help if any one know how to, thanks very much.
 

chengkinhung

Member
Jun 15, 2007
16
1
53
After grep full system, I found the WHM eximconfiguration AdvancedEditor interface is using files in path: /usr/local/cpanel/etc/exim/

I edit files under this path: /usr/local/cpanel/etc/exim/ and refresh WHM eximconfiguration AdvancedEditor interface, and saw the changing applied in there, then I click the Save, confirm the changing write into /etc/exim.conf. Seems all are working well, but I am not sure if this is right way.
 

Henry Carter

Active Member
Jul 31, 2019
28
2
3
India
cPanel Access Level
Website Owner
Any changes here /etc/exim.conf will be temporary until service restart, edit the /etc/exim.conf.local file and restart the service.
Kindly follow the Advanced Editor feature to make changes to avoid errors.
 

chengkinhung

Member
Jun 15, 2007
16
1
53
Any changes here /etc/exim.conf will be temporary until service restart, edit the /etc/exim.conf.local file and restart the service.
Kindly follow the Advanced Editor feature to make changes to avoid errors.
Thanks for your reply. did you mean even the changing of /etc/exim.conf through WHM EximConfigurationManager's AdvancedEditor interface will also be overwrite when exim or cpanel service restart ? However I had already restart this servcies many times, my changing are still exist.
 

chengkinhung

Member
Jun 15, 2007
16
1
53

Henry Carter

Active Member
Jul 31, 2019
28
2
3
India
cPanel Access Level
Website Owner
The Advanced Editor tab is to adjust the Exim's default configuration. For most changes that you make to your Exim setup, the system changes both the /etc/exim.conf.localopts and /etc/exim.conf.local documents. The system utilizes the data in these records when it rebuilds the /etc/exim.conf document. In the event that you alter exim.conf record, it will lost the changes when the exim gets updated or reconstructed.

The /etc/exim.conf.local file is Exim's override document and stores Exim's default configuration.

The /etc/exim.conf.local file doesn't exist naturally. The system makes the /etc/exim.conf.local file after you design Exim's settings to utilize non-default values.

cPanel is setting the custom ACLs here - /usr/local/cpanel/etc/exim

You need to rebuild the Exim when you alter /etc/exim.conf.local manually to mirror the changes. The following are the directions to revamp and restart the Exim.

/scripts/buildeximconf
/usr/local/cpanel/scripts/restartsrv_exim
 

chengkinhung

Member
Jun 15, 2007
16
1
53
Hi, Henry Carter and cPanelLauren, thanks for the reply and sorry for the delay.

I had tried many way to edit /etc/exim.conf.local but all failed, I guess this file only for adding the new lines but not for relacing the current lines.
 

ikstlan

Registered
Oct 5, 2019
1
0
1
Ukraine
cPanel Access Level
Root Administrator
Hi everyone,


Here is how it works in other words plus example:


/etc/exim.conf - you can edit this file to keep some changes temporary, then restart exim to get them working. After /scripts/buildeximconf you changes will be reset.
/etc/exim.conf.localopts - its the same as WHM --> Exim Configuration Manager --> Standard options (Basic editor). Watch your syntax, no spaces there.
/etc/exim.conf.local - its the same as WHM --> Exim Configuration Manager --> Advanced Editor


For example we need to update smtp_accept_queue_per_connection from cPanel's default 30 to 20

You cannot simply touch /etc/exim.conf.local and append there smtp_accept_queue_per_connection = 20.

You need to use WHM to get it generated in right way:

-
login WHM --> Exim Configuration Manager --> Advanced Editor
-
find and update smtp_accept_queue_per_connection
- save your changes.

Once its done you should be able to find
/etc/exim.conf.local file

And now you can change smtp_accept_queue_per_connection directly over /etc/exim.conf.local file.

Lets update it to 19. Edit /etc/exim.conf.local and rebuild exim conf and restart exim service:

/scripts/buildeximconf
service exim restart

exim -bP |grep smtp_accept_queue_per_connection
smtp_accept_queue_per_connection = 19


You can also copy /etc/exim.conf.local to another server to clone your settings there
 

chengkinhung

Member
Jun 15, 2007
16
1
53
Hi, @ikstlan, thanks for your detail guide. However, as my first post had already said: "not all conent allow to edit in WHM eximconfiguration Advance Editor interface", and what I want to change is not allow to modify in the WHM interface, and that is why I am trying to find the cPanel config files in path /usr/local/cpanel/etc/exim/.