Re: [exim] how to log specific infos

トップ ページ
このメッセージを削除
このメッセージに返信
著者: Drav Sloan
日付:  
To: Rainer Sigl
CC: Exim Mailing List
題目: 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.