2009-10-19 14:01

To add mail subjects in Exim4 log (/var/log/exim4/mainlog), just change the /etc/exim4/exim4.conf.template file as following to add +subject to log_selector:

.ifdef MAIN_LOG_SELECTOR
log_selector = MAIN_LOG_SELECTOR +subject
.endif

Then restart Exim:

/etc/init.d/exim4 restart
2009-10-19 14:01 · Tags: ,

2 Comments

  1. Great this was just what I needed, now I get T=[subject] in my logs.
    Thank you!

    Reply

  2. That’s the wrong way to do it. The correct method is to:
    1. create or edit /etc/exim4/exim4.conf.localmacros and add
    MAIN_LOG_SELECTOR = +subject
    2. run update-exim4.conf
    3. and restart exim
    you’re not supposed to modify the template file directly as that will get overwritten.

    Reply

Leave a Reply to Lenny Cancel reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>