Exim: how to log email body

1

How can I log the body of an email in Exim?

My specific need is to trace why an email from user www-data is being generated every so often - I can see the record of its delivery in the Exim logs, but not what's in it.

I'm on Debian Jessie, and using the split configuration.

Thanks!

Ray O'Donnell

Posted 2015-08-19T15:19:25.380

Reputation: 111

Answers

1

I'm not sure if it's possible to write the contents of a mail to exim's log, but even if it is, I would recommend against it since it would make your logs fairly unreadable.

However, exim has a shadow_transport option which you can set on another transport, and which would allow you to write the contents of a mail to a local mailbox for later reference; this should allow you to do what you want to do. For more information, check out this part of the exim specification.

Note though that some jurisdictions may not look kindly on this type of casual intrusion of your users' privacy. If in doubt, contact your lawyer.

Wouter Verhelst

Posted 2015-08-19T15:19:25.380

Reputation: 226