[Exim] System Filter - mail to local user only

Αρχική Σελίδα
Delete this message
Reply to this message
Συντάκτης: Sartorelli, Kevin
Ημερομηνία:  
Προς: exim-users
Αντικείμενο: [Exim] System Filter - mail to local user only
We have a requirement to hold mail messages that contain "suspect" attachments and advise the local user (be they sender or recipient) that that mail is held so they can have it released if it is work related. I have a system filter with snippets like the following (thanks Nigel):

if $header_content-type: matches "(?:file)?name=(\\\\S+\\\\.(?:avi|mov|mpg|mpeg|wmv))"
then
mail to $header_to: from zzzzzz@??? subject "Held message $message_id" expand file /usr/lib/exim/scripts/heldmessage.txt
save /var/spool/httpd/htdocs/suspectmail/held/$message_id 644
freeze
seen finish
endif

Rather than use $header_to:, I really need to send to the local address (ie, an @openpolytechnic.ac.nz address) so our user gets the message to say the email is held. I just can't seem to come up with a conditional that would allow me to do it. What I want is something like:

     if local_sender then mail to local_user ..... file /usr/lib/exim/scripts/heldmessagel.txt
     if remote_sender then mail to local_user .... file /usr/lib/exim/scripts/heldmessager.txt


I feel this should be straight forward, but I just can't see it.

Cheers
Kevin