Edit the Exim configuration via the CLI

Operating System & Version
CloudLinux 8
cPanel & WHM Version
112

MH-Stefan

Active Member
Dec 3, 2013
26
3
53
cPanel Access Level
Root Administrator
Hi,

I'm working on some bash scripts that require editing the Exim configuration. After a lot of searching through the documentation and on Google, I've found this URL:

Unfortunately, it's not public, as I get this error when I login with my cPanel account: "You're not authorized to access this page"

Is it work in progress? Any chance I can get a sneak peek to it?

Any help would be appreciated. Thanks in advance!
 
Last edited by a moderator:

vanessa

Well-Known Member
PartnerNOC
Sep 26, 2006
959
76
178
Virginia Beach, VA
cPanel Access Level
DataCenter Provider
I have a login but can't access that page either. You shouldn't modify exim.conf directly, but what you can do is:

1) For settings that are controlled by WHM, those are stored in /etc/exim.conf.localopts
2) For most other things, you would edit /etc/exim.conf.local and add your options to the correct section

After making changes, rebuild exim.conf with /scripts/buildeximconf and restart Exim.

Maybe someone from cPanel can fix that article so it's viewable.
 

cPRex

Jurassic Moderator
Staff member
Oct 19, 2014
17,470
2,843
363
cPanel Access Level
Root Administrator
We actually have removed that article so it isn't viewable to anyone, so I don't have any way to provide that on my end. Vanessa's details are correct, although you'll want to be mindful of this case right now, which could affect the behavior:

https://support.cpanel.net/hc/en-us/articles/12322823241367 - Exim configuration editor does not accurately reflect settings in /etc/exim.conf.localopts
 

MH-Stefan

Active Member
Dec 3, 2013
26
3
53
cPanel Access Level
Root Administrator
Thank you both for the replies, greatly appreciated!

Too bad that the article is no longer viewable, it would've probably made things a lot easier.

I'll try to code our script using the solution suggested by Vanessa.

Edit: Actually, the article seems to be viewable again. It's almost the same solution suggested by Vanessa, just in case the article becomes unavailable again. :)
 
  • Like
Reactions: cPRex