Re: [exim] how to log specific infos

Startseite
Nachricht löschen
Nachricht beantworten
Autor: Drav Sloan
Datum:  
To: Rainer Sigl
CC: Exim Mailing List
Betreff: Re: [exim] how to log specific infos
Rainer Sigl wrote:
> Hi all,
> I would like to log into a file all outgoing emails with sender,
> recipient, a specific header line $h_x-spam-level on exim4.
> Can somebody give me a hint how to do this?


<untested>

In ya data acl:

   warn condition = ${if def:h_x-spam-level:{yes}{no}}
        log_message = SPAM_LEVEL_HEADER: <$sender_address> $recipients


(note the <> around $sender_address as this can be null for bounces)

and then

shell$ tail -f mainlog | grep 'SPAM_LEVEL_HEADER' > logfile

or at the end of each day (after log rotation):

shell$ grep SPAM_LEVEL_HEADER mainlog.01 > logfile

Regards

Drav.