At 13:54 2003-07-01 -0700, multimedia-fan(_at_)myrealbox(_dot_)com wrote:
It is basically an one line text file with all the email address each on
a line.
So, one address then? Or do you mean, a plain text file with individual
addresses each on separate lines, such as one might use with grep?
The recipe is like the following.
'is like' doesn't help with diagnosing your problem, since your problem
could very well be an issue with the specific syntax of your actual recipe.
## *********************************************
## Start of exclude list.
:0
* ? ($FORMAIL -x To: | $FGREP -iqwf $excludelist)
${DEFAULT}
FTR, It isn't uncommon that an address might appear in a Cc: or even be
Bcc'd. I'll assume for the time being that you really do expect just the
To: field.
If this recipe is intended for /etc/procmailrc, then you might consider
using $LOGUSER
What I want is to stop spammers from sending a spam with one of those
emails to be in the to field which will have it delivered.
The syntax of your statement is a bit screwy. Do you want spam addressed
to these addresses to be delivered normally?
Is there a way of limiting the condition
* ? ($FORMAIL -x To: | $FGREP -iqwf $excludelist)
To match only a single address in the To: filed?
I don't have the time to get into scrawling up the regexp for you, but you
should look at a multi-line condition. Not including the potential for
quoted nametext strings, the following would be a very basic method of
achieving this:
:0
* ! ^To:.*,
* ? ($FORMAIL -x To: | $FGREP -iqwf $excludelist)
action
Check the list archives for a thread about catching multiple recipients
with the same basic username. KEYADDR and RECIPIENTS should be keywords in
that discussion.
<http://www.xray.mpe.mpg.de/cgi-bin/w3glimpse/procmail?query=KEYADDR+RECIPIENTS&errors=0&case=on&maxfiles=100&maxlines=30>
I have tried the following in my sandbox.
* ! ($FORMAIL -x To: | $FGREP -iqwf $excludelist),.*
It still gets a match.
Well, uh, without the ? flag at the beginning of that condition line, it
isn't going to invoke anything, which means that so long as your line
doesn't include formail -x To: OR fgrep -iqwf your-exludelist-file,
followed by a comma, and any number of other symbols, then you're going to
have a match. No surprise at all.
BTW, excepting in MATCH constructs, a trailing .* is superfluous.
---
Sean B. Straw / Professional Software Engineering
Procmail disclaimer: <http://www.professional.org/procmail/disclaimer.html>
Please DO NOT carbon me on list replies. I'll get my copy from the list.
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail