Re: [Exim] dumb filter question

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Andrew D
Data:  
Para: Jason J. Horton, exim-users
Tópicos Novos: [Exim] Re: Outgoing messages and dumb filter question
Assunto: Re: [Exim] dumb filter question
----- Original Message -----
Sent: Wednesday, 25 October 2000 9:30 AM
Subject: [Exim] dumb filter question


> My boss wants all email from and all email to a certain email address
> to be logged to a file somewhere for archival purposes. Sounds simple
> enough, right? I am figuring I could do this with a system filter like so:
> # Exim filter
> if $message_headers contains "(test|Test)@domain.com" then
>         logfile /var/log/exim_filterlog
>         logwrite "$tod_log $message_id message-copy \
>         $sender_address ($sender_host_name[$sender_host_address]) \
>         => $recipients (recipients=$recipients_count) \
>         subject=$header_subject"
>         save /mail/spool/domain.com/test.copy 0600
>         save /mail/archive/domain.com/test 0600
> endif

try
if $h_to contains test@??? or $h_from contains test@??? or
$h_cc contains test@??? or $sender_address contains
test@??? or
$recipients contains test@??? then
blah blah
endif

This should catch all emails destined or sent from test@???
you are trying to use a regex which only the 'match' command can do
RTFM
HTH
cya
Andrew


--
Vital papers will demonstrate their vitality by
spontaneously moving from where you left them to where
you can't find them.