procmail question
Parker Morse
morse at sinauer.com
Thu Jan 9 16:21:12 CET 2003
On Thursday, January 9, 2003, at 07:44 AM, David Relson wrote:
> At 06:13 AM 1/9/03, Tom Allison wrote:
>
>> Not sure why you use
>> * 1^0 From.bogofilter-bugs
>> you could use
>> * ^From.bogofilter-bugs
>> just as well ... But it's early yet.
>
> I'm not sure either. procmail is not my core competency. I must have
> copied the line from somewhere. As it's working fine, I not inclined to
> change it.
The first version is for procmail's scoring machinery. I think that (a) it'
s unnecessary here, and (b)...well, I think the regexps in both might be
broken.
If I'm reading it correctly, the first option will match if any line in
the header contains the string "From", then a single wildcard character,
then the string "bogofilter-bugs", and assign that a positive score, which
then means the action will be performed (in this case, procmail will lock
the mail file "bogofilter-bugs", file a copy of the message to it, unlock
the file, and send the message along to the rest of the rc.)
The second will match the same string ("From", a single character,
"bogofilter-bugs") but only when it comes at the beginning of a line (that'
s what the ^ does.) The match is binary - either it finds it, and performs
the action, or it doesn't, and doesn't.
If you're trying to match mail coming from an address starting with
"bogofilter-bugs" I would suggest the following:
:0c:
* ^From:.*bogofilter-bugs
bogofilter-bugs
This matches "From:" at the beginning of a line, then any number of
characters between the : and "bogofilter-bugs" somewhere else on the line.
I don't know if this solves your problem, though. :-) Just part of what I'
ve managed to absorb in a year of letting the procmail list wash over my
head.
pjm
More information about the Bogofilter
mailing list