I use procmail for just about everything, preferring it to any other
filter and organizer but I still have problems rejecting mail; that is
bouncing it back to the sender.
This is my config:
SHELL=/bin/bash
PATH=$HOME/bin:/usr/bin:/bin:/usr/local/bin:
MAILDIR=$HOME/mail # You'd better make sure it exists
#MAILDIR=$HOME/Mail
PMDIR=$HOME/Procmail
#INCLUDERC=$PMDIR/lists.rc
#LOGFILE=$MAILDIR/procmail.log
#LOGFILE=/mail/procmail.log
#LOGFILE=/dev/null
#LOGFILE=$MAILDIR/log.`date +%y-%m-%d`
# log message abstracts
LOGABSTRACT=all
SENDMAIL=/usr/sbin/sendmail
FORMAIL=/usr/bin/formail
#VERBOSE=no
VERBOSE=yes
LINEBUF=32768
LOCKEXT=.lock
:0c:
BACKUP.mbx
[..........]
AND, this recipe DOES WORK.
# - Begin Bounce with Comments (This works - See Headers)
:0
* ^(To|From|Received|Reply-To|Sender):(_dot_)*fljoy25(_at_)yahoo\(_dot_)com
{
# Here we simply add a few extra headers
:0fc
| formail -I "X-Hoser: I refuse unsolicited spam mail" \
-I "X-Inquisition: Rejection of junk mail - Take a hike!"
# Then we bounce the mail back to them
:0
! fljoy25(_at_)yahoo\(_dot_)com
}
BUT SOMETHING LIKE THIS DOES NOT WORK. Any ideas why sendmail does not or
could it be my recipe is incorrect?
# rejecting mail and sending it back
:0
*^(To|From|Received|Reply-To|Sender):(_dot_)*JamesW5900(_at_)prontomail(_dot_)com
|(formail -brt; \
echo "You have been filtered. This is procmail.";\
echo "Your mail is being returned automatically";\
echo "because sending mail here is going to bounce. ;\
echo "Your mail is being returned to you sucker.;\
echo "I will never see it.";\
) | sendmail -oi -t
AND, THIS ALSO DOES NOT WORK:
:0 eh
| (formail -r \
-A"X-Loop: beatle(_at_)webspan(_dot_)net" \
-I"Subject: You are Nuked!" ; \
echo "YOUR MAIL IS REJECTED" ; \
echo "" ; \
echo "I received your email about" ; \
echo "\"${SUBJ_}\"" ; \
echo "" ; \
echo "Your mail is being filtered in procmail." ; \
echo "This is an automated reply." ) \
echo "I'll never see your mail." ) \
echo "TAKE YOUR MEDS!" ) \
| /usr/lib/sendmail -oi -t
I ALSO TRIED THIS AND IT DID NOT WORK....
#:0
#* ^(To|From|Received|Reply-To|Sender|Subject):.*(@uaemail\.com|\
#don_smarty(_at_)yahoo\(_dot_)com|@goldtouchinc\.com|\
#*(_at_)success-secrets\(_dot_)org)
#{
#EXITCODE=67
#DELIVERED=yes
#:0
#/dev/null
#}
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail