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
Great this was just what I needed, now I get T=[subject] in my logs.
Thank you!
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.