procmail
[Top] [All Lists]

Re: Procmail and Antivirus

2003-07-16 11:56:00
dlucio wrote:

# I forward all mail to antivirus.sh script
:0 fw
| /etc/procmail/antivirus.sh

The 'f' flag stands for "filter", and the message will be replaced with 
whatever the script writes to stdout.

# If script fails then I send a mail telling that you have a virus
# This actually does not work, I realy dont know why

Search for LOGFILE in 'man procmailrc' and use this file to root cause
the failure.

:0 e
| (formail -r -A "ASA: Virus en correo electronico" \
       -l"From: security(_at_)asa(_dot_)gob(_dot_)mx" \
       -l"Subject: Correo con virus (Re: $SUBJECT)" \
       -A "X-Loop: security(_at_)asa(_dot_)gob(_dot_)mx"; \
       echo "Revice su maquina por favor" ) | $SENDMAIL -t

This recipe might be prone to mail loops, see the examples in 'man
procmailex' for ways to preclude them. It seems you're setting X-Loop 
but not actually checking it.

# If scripts does not fail then mail is stored on mailbox
# This I currently dont know if it's ok like this
---------------------------------------------
Here is antivirus.sh
[snip]

Your script isn't writing the message back to stdout yet it 
is used with the 'f' flag.

-TFC

_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>