1999-09-06-15:58:24 David Benfell:
Forgive me, this has to be a newbie question, but there is this
obnoxious person who sends into a mailing list I subscribe to. Because
this person is widely considered obnoxious, we've all pretty much agreed
to ignore him. Hence my foray into procmail.
A popular recourse, no doubt about it.
I put the following in my .procmailrc, basically copying from the
examples:
:0
* ^From.*Mekonnen #piece of (expletive deleted) on sftaxi
/dev/null
I'd change a couple of things here; first, I don't think you can use a comment
on one of the pattern-matching lines. In fact, from procmailrc(5), I see:
Comments
A word beginning with # and all the following characters up to a
NEWLINE are ignored. This does not apply to condition lines, which
cannot be commented.
Recipes
A line starting with ':' marks the beginning of a recipe. It has the
following format:
:0 [flags] [ : [locallockfile] ]
<zero or more conditions (one per line)>
<exactly one action line>
Conditions start with a leading `*', everything after that character
is passed on to the internal egrep literally, except for leading and
trailing whitespace.
so that seems like it's probably your problem. Change that middle line to read
* ^From.*Mekonnen
with no comment on the line and you should be go.
Another caution would be to make sure that this recipe comes before anything
else that might try to deliver that message, since procmailrc is handled in a
strictly sequential order; hence if you are using procmail to file this
mailing list into its own folder, make sure you put your antiMekonnen recipe
before the one that's filing the mailing list, or it'll never see his
messages.
And I'd also make that formula slightly more specific; I'd tell it to only
search headers, and tell it to match the line quite precisely. If it turns out
that his sender addresses seem to vary, then try and carefully craft a pattern
that will cover the variations without including anything else. The tighter
you can make these things the safer.
And a final warning, if it were me I wouldn't toss 'em, at least not right
away; I'd start by filling 'em in a separate folder:
:0 H
* ^From: "Mamo Mekonnen" <mmekonnen(_at_)hotmail(_dot_)com>
unwanted
then review that folder occasionally and make sure it's really full of
unwanted messages, and that nothing of interest has accidentally slipped
in. When you err in setting up mail filters, you want to never lose anything
you care about. This approach can be a big help.