procmail
[Top] [All Lists]

A little help with my recipe...

2002-05-01 09:38:09
Hello everyone!

    I really hope someone can help me out... Here's what I would like my 
procmail recipe to do... All incoming email attachments should get discarded 
except for .doc and .xls files. I can't figure out how to do this... I've been 
trying to find information on how to do it but I can't find anything. I know 
how to block "a" email attachment... here is what my procmail recipe is:

LOGFILE=/var/log/procmaillog
COMSAT=off

:0 B
* ^Content-Disposition:.*
* .*.vbs.*
* !^FROM_DAEMON
* !^X-Loop: vbscheck
{

SUBJECT=`formail -xSubject:`
ARRIVED=`formail -xDate:`

    :0 c
    /dev/null

    :0
    | (formail -rt -A"Precedence: No Attachments" -A"X-Loop: vbscheck"; \
    echo "ATTENTION:"; \
    echo " "; \
    echo "The Mailer-Daemon at" $HOST "successfully received email from you"; \
    echo "on $ARRIVED with the subject: "$SUBJECT; \
    echo " "; \
    echo "However, we do not accept attachments with that file extension."; \
    echo " "; \
    echo "As a result, your email was NOT delivered to the recipient."; \
    echo " "; \
    echo "If you believe this to be a mistake, please email 
mbergeron@"stokesonline.com; \
    echo " "; \
    echo "Unless this is the case, please do not respond to this mail, it is an 
auto reply"; \
    ) | $SENDMAIL -oi -t -fmbergeron(_at_)$HOST
}


Can anyone give me a helping hand? =)

Thanks alot!!!

Pantelis H.
(email: phadzi(_at_)tsrtech(_dot_)net)
<Prev in Thread] Current Thread [Next in Thread>