Start by running the mailq
and exiwhat
commands to get a handle on what is happening. mailq
will show what is queued. exiwhat
will tell you what the running processes are doing.
Log files for Exim include mainlog (all messagess), rejectlog (reject messages with more details), and paniclog (failures, rare). They should be under /var/log possibly in /var/log/exim or /var/log/exim4.
Messages in the queue can be found in Exim's spool directory, likely /var/spool/exim4 or such. Messages are in the input directory, and status information is in the corresponding msglog directory.
If you are getting a lot of retries something is not configured correctly. My rant on Running an Email Server will give you an idea what is required, and my posting on Detecting Email Server Forgery may give you an idea why your queue is growing. It has been my experience that mail servers for web sites tend to be poorly configured. Take the time to get the configuration right, it isn't that difficult.
A few variables which may help you include:
- deliver_queue_load_max - disables messages delivery from queue
- queue_only_load - forces queuing when system is loaded
- queue_run_max - limits number of queue processes
See the Exim Specification section 14 for more details.
UPDATE: My server updated to cPanel / WHM 11.32.0 (build 1)
this morning and I received an email stating
cPanel was unable to automatically merge your Exim configuration with the new settings that shipped
with the build you have installed (11.32.0 (build 1)) because you have a custom or broken configuration which
cannot be automatically configured
To fix this, I had to change my custom ACL to:
warn logwrite = X-UUID=$h_X-UUID:; Subject=$h_Subject:
I placed this new ACL in the custom_begin_check_message_pre section at the top of acl_smtp_data:
under the cPanel "Advanced Exim Configuration Editor" (accessed by going to Main >> Service Configuration >> Exim Configuration Editor and then clicking the Advanced Editor)
Below are the steps I was following for my previous cPanel / WebHostManager version:
I was able to figure this out with the help of a post on cPanel's forums.
I used the cPanel "Advanced Exim Configuration Editor" accesed by going to Main >> Service Configuration >> Exim Configuration Editor and then clicking the Advanced Editor button at the bottom of the page. I placed the following configuration directives inside the begin acl
section right before the begin authenticators
section:
logwrite = X-UUID=$h_X-UUID:; Subject=$h_Subject:
Now, my log files look like:
2012-01-06 15:13:18 H=hatchet.sitepalette.com (trees.sitepalete.com) [172.16.1.60] Warning: Sender rate 3.6 / 1h
2012-01-06 15:13:18 1RjGAA-0007ec-B1 1RjGAA-0007ec-B1: UUID=4e4b6985-c1e0-4386-92e0-f3c17a2fc777; Subject=Email Form "signup" Submission
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
2012-01-06 15:13:18 1RjGAA-0007ec-B1 <= www-data@trees.sitepalette.com H=hatchet.sitepalette.com (trees.sitepalete.com) [172.16.1.60] P=esmtp S=3182 id=20120106201319.76CE7119C@trees.sitepalete.com
2012-01-06 15:13:18 1RjGAA-0007ec-B1 => josh <josh@digitalfruition.com> R=virtual_user T=virtual_userdelivery
2012-01-06 15:13:18 1RjGAA-0007ec-B1 Completed
(Edited to indicate the header logging)
Best Answer
cPanel has a ratelimit option on the
exim
configuration.Basically it tells you for each IP address its send rate.
You can configure a maximum send rate per IP per hour (after which that IP is temporarily rejected, i.e. with code 4XX) to reduce the server load.