On Fri, 6 Sep 2002, Eric Hilding wrote:
EH>
EH> This *should* work to:
EH>
EH> 1. Bounce e-mails in excess of 15KB
EH> 2. Return their e-mail below my REJECT text message
EH> 3. Record their e-mail address to a LOG file
EH> 4. Finish with /dev/null
EH>
EH> Can anyone please help me find the loose screw? Also, I'm a bit unclear
EH> if the * > 15000 includes any attachment file sizes???
EH>
EH> Thank you!
EH>
EH> Eric
EH>
I think this should add to the existing mail. I don't do it quite like
this - I extract the headers and the first 20 lines of the body and merge
them with my message with a script to create the reply.
:0
* !^FROM_DAEMON
* !^X-Loop: nospam(_at_)example(_dot_)com
* > 15000
{
:0 cw
| (formail -rtzk -I"Precedence: junk" \
-I"From: NO SPAM <nospam(_at_)example(_dot_)com>" \
-I"Subject: R E J E C T E D M A I L" \
-A"X-Loop: nospam(_at_)example(_dot_)com" ; \
cat $HOME/procmail/reject/over15k.txt ) \
| $SENDMAIL -oi -t
# Not sure about the next bit. It is a delivering recipe so
# the mail should be lost anyway without the need to clone and
# then deliver to /dev/null
:0 a:
| formail -rtzxTo: >> $HOME/procmail/reject/over15k.log
}
This recipe will result in a lot of bounces, either from your own sendmail
or from yahoo and the like, such as:
----- Transcript of session follows -----
... while talking to mx2.mail.yahoo.com.:
RCPT To:<databasemannn(_at_)yahoo(_dot_)com>
<<< 553 VS10-RT Possible forgery or deactivated due to abuse - see
http://help.yahoo.com/help/us/mail/spam/spam-18.html (#5.1.1)
550 databasemannn(_at_)yahoo(_dot_)com(_dot_)(_dot_)(_dot_) User unknown
So you need another recipe:
:0
* ^TO_nospam(_at_)example(_dot_)com
* ^FROM_MAILER
spam.daemonreturns
There may be another problem with bounces. I'm not sure if bounces come
back to the from: or the from_ address. To make sure, you should invoke
sendmail with the -f option
| $SENDMAIL -oi -f nospam(_at_)example(_dot_)com -t
To do this, nospam has to be an alias of your user name (/etc/aliases) or
you have to tell sendmail you are a trusted user (I have alan in my
/etc/sendmail.ct file)
Alan
( Please do not email me AS WELL as replying to the list. Personal
email is welcome but may invoke a password autoresponder. )
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail