Hello everyone, haven't posted in a while so bear with me.
I have a recipe that I want to reply to the sender and to the recipient
when matched. And I am not real sure how to do this. I can do one or the
other but haven't figured out a way to do both. I think this will make
more sense when you see my recipe.
I am attaching my recipe.
Thanks in advance,
Nick Mitchell
---------------------------------SNIP-------------------------------------------
#Variable Assignments Listed Below
VERBOSE="on"
LOGFILE="/var/log/procmail.log"
LOGABSTRACT="all"
SHELL="/bin/sh"
COMSAT = "no"
SENDMAIL=/usr/sbin/sendmail
PATH=/bin:/usr/bin:/usr/local/bin:/sbin:/usr/sbin
TEMP=/tmp
#More Variables for the actual filtering
BADGUYS="bill(_at_)microsoft(_dot_)com|bart(_at_)thesimpons(_dot_)com"
#Variable list to filter
:0 HB
* $($BADGUYS)
{
TO_=`formail -c -xTo:`
FROM_=`formail -c -xFrom:`
SUBJ_=`formail -c -xSubject:`
#This is so I can append text to emails if I so choose.
:0 fbwi
| /bin/cat /tmp/message.txt
#This is to overwrite the body of the message with my own message.
:0 fhw
| /bin/cat - ; \
echo "================= Filtered Email Information =================="; \
echo " "; \
echo "To : $TO_"; \
echo "Sender : $FROM_"; \
echo "Subject : $SUBJ_"; \
echo " "; \
echo "Filtered:"; \
echo "1. This is a bad person."; \
echo " "; \
echo "==============================================================="
#Replies to sender if matched
:0 fwh
| formail -rt
#Forwards to recipient if not matched.
:0
! -f "$@"
}
------------------END SNIP----------
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Nick Mitchell
Network Engineer
Delaware.Net, Inc.
Mail: nick(_at_)delaware(_dot_)net
Voice:302.736.5515 x17
Web: http://www.delaware.net
ICQ: 31676269
Artificial Intelligence: The Final Frontier
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail