Re: [Exim] dumb filter question

Kezdőlap
Üzenet törlése
Válasz az üzenetre
Szerző: Andrew D
Dátum:  
Címzett: Jason J. Horton, exim-users
Új témák: [Exim] Re: Outgoing messages and dumb filter question
Tárgy: 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.