procmail
[Top] [All Lists]

Re: Bounced mail

2001-04-05 09:45:01
[Re-ordered in sequence]

On  5 Apr, Poohba wrote:
| 
| Dave Robbins wrote:
| 
| > [...]
| >
| > BOZOS=.reject              # file with addresses to reject (one per line)
| > FROM=`formail -rzxTo:`
| > :0
| > * ? echo "$FROM" | $EGREP -i -f $BOZOS
| > * ? test -r $BOZOS -a -s $BOZOS
| > {
| >    EXITCODE = 77
| >    :0h:
| >    | gzip -fc >> $MAILDIR/.headers.gz
| > }
|
| This is my killfile.log.  Part of it anyway.  I did not receive a message
| back when sending from this address
| 
| >From poohba(_at_)hotmail(_dot_)com  Thu Apr  5 03:05:05 2001
|  Subject: Another test
|   Folder: BOZOS=.reject
| 1013
| procmail: Executing "formail,-rzxTo:"
| procmail: Assigning "FROM=poohba(_at_)hotmail(_dot_)com"
| procmail: Executing " echo "$FROM" | $EGREP -i -f $BOZOS"
| /bin/bash: -i: command not found
| procmail: Non-zero exitcode (127) from " echo "$FROM" | $EGREP -i -f $BOZOS"

Did you just copy/paste this code without understanding what it does?
If so, isn't that awfully trusting?  Did you understand you need to
assign to the $EGREP variable (1)(2) and populate the .reject file?  Did
you see that you'll be filtering To:, not From: (variable name $FROM
notwithstanding), against the .reject file?  Do you understand that
there is next to no chance that spam bounced this way will go back to
the originator of the spam?

Besides all that I suspect you'll have to show the actual recipe (and a
couple lines either side for context) from the rcfile, because I'm not
sure how this ended up in a file named "BOZOS=.reject" from the recipe
Dave posted.  

(1) The bash error tells you there was no value to expand from $EGREP.
(2) Not even mentioning the questionable practice of using variables
like $EGREP.

-- 
                         /"\
Don Hammond              \ /     ASCII RIBBON CAMPAIGN
Raleigh, NC US            X        AGAINST HTML MAIL,
                         / \      AND NEWS TOO

_______________________________________________
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>