EXIM, How to prevent cpanel from keeping emails older than X days in the mail queue

fulleffect

Member
Feb 26, 2007
12
0
151
.
I know you can edit exim.conf and specify not to keep emails older than x days in the mail queue, but is there a way of setting this in cpanel? as i dont want to manually set it, only for cpanel to wipe the settings.


I've searched the forums with no success.

Thanks in advance.
 

Bailey

Well-Known Member
Aug 12, 2001
120
1
318
Wisconsin
Just use the Exim Configuration Editor in WHM to make the changes. Then cPanel won't wipe them out when Exim is upgraded.

:D Bailey
 

fulleffect

Member
Feb 26, 2007
12
0
151
When i go into Exim Configuration Editor, and then Advanced Editor,

I can see the bit i want to edit, (at the very top) but its not inside a text box

where as if you scroll down most of it is inside editable text boxes.



Any idea how to edit this bit....


# primary_hostname =
deliver_queue_load_max = 3
auto_thaw = 6d
ignore_bounce_errors_after = 7d
timeout_frozen_after = 8d

I dont get it? why is some parts of exim.conf editable and others arent in WHM?

Im using.........

WHM 11.11.0 cPanel 11.15.0-R18033
CENTOS Enterprise 4.5 i686 on standard - WHM X v3.1.0
 

andyaav

Member
Jan 1, 2007
17
0
151
Hi,

As i know whm is using another file for edit, but don't worry you can edit that section in exim.conf directly.

1. login to shell as root
2. open /etc/exim.conf in your favorite editor to edit it.
3. save the file and restart exim.

You can also setup cron on server to remove emails older than 5 days as follows.
#Remove all messages older than five days (86400 * 5 = 432000 seconds)

1. crontab -e
2. add folloiwng cron
* 0 * * * exiqgrep -o 432000 -i | xargs exim -Mrm &> /dev/null
3. save and restart crond

Hope it will helps you :)


Anand