3

I maintain a custom built web application. Any time this application sends an email, it adds a custom header X-UUID to the mail, to assist me in tracking abuse and email delivery. This UUID is written to my application's log file so I can correlate any given email with what was happening in my application at that time.

Is it possible to configure Exim on the cPanel server which delivers these emails to log this X-UUID header in the exim_mainlog file? For example, could these existing log entries:

2011-12-05 11:38:18 1RXbYY-00074m-0T <= [email protected] H=oak01.sitepalette.com (trees.sitepalete.com) [172.16.1.50] P=esmtp S=7779 [email protected]
2011-12-05 11:38:18 1RXbYY-00074m-0T => redacted@redactedcom R=lookuphost T=remote_smtp H=redacted.redacted.redacted.net [111.222.333.444]
2011-12-05 11:38:18 1RXbYY-00074m-0T Completed

be changed to somehow include this header? Something like:

2011-12-05 11:38:18 1RXbYY-00074m-0T <= [email protected] H=oak01.sitepalette.com (trees.sitepalete.com) [172.16.1.50] P=esmtp S=7779 [email protected]
2011-12-05 11:38:18 1RXbYY-00074m-0T X-UUID: 2b1d7e3f-0ca0-4790-a21d-a5922cd34002
2011-12-05 11:38:18 1RXbYY-00074m-0T => redacted@redactedcom R=lookuphost T=remote_smtp H=redacted.redacted.redacted.net [111.222.333.444]
2011-12-05 11:38:18 1RXbYY-00074m-0T Completed
3
  • Yes it is possible. In cPanel: No.
    – mailq
    Jan 4, 2012 at 22:06
  • Could you expand on that @mailq? I could probably set up another Exim server if necessary...
    – Josh
    Jan 5, 2012 at 13:31
  • @mailq it can be done, even with cPanel!
    – Josh
    Jan 6, 2012 at 20:24

1 Answer 1

3

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)

enter image description here

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:

Screencapture of the above

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 <= [email protected] H=hatchet.sitepalette.com (trees.sitepalete.com) [172.16.1.60] P=esmtp S=3182 [email protected]
2012-01-06 15:13:18 1RjGAA-0007ec-B1 => josh <[email protected]> R=virtual_user T=virtual_userdelivery
2012-01-06 15:13:18 1RjGAA-0007ec-B1 Completed

(Edited to indicate the header logging)

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .