A question about procmailrc
jdow at earthlink.net
Fri Feb 3 02:07:37 UTC 2006
From: "Hongwei Li" <hongwei at wustl.edu>
>>> On 2/2/2006 12:10 PM, Hongwei Li wrote:
>>>> The * is a wild char because there are probably other letters after office,
>>>> e.g. . ] or space etc. I also tried:
>>>> * ^Subject:.*is out of the office*
>>> * is not a wild card character.
>>> dot is a wild card character.
>>> When dot is followed by splat (.*) that means "zero or more anything"
>>> So, the above says match on "subject:' starting in column 1
>>> followed by any number of characters (zero or more)
>>> followed by "is out of the office*"
>>> I'm not certain what that last asterisk does....
>>> did you try:
>>> * ^subject:.*is out of the office.*
>>> note the ".*" at the end, and not just "*"
>> Why does this work when the subject line has many other chars after FAILURE:
>> # block junk mails from msnotes:
>> * ^Subject:.*DELIVERY FAILURE*
>> The real subject is something like:
>> DELIVERY FAILURE: 550 5.7.1 Message content rejected...
>> I didn't use .*, but only * above.
> A strange thing: when I test, I clicked the "reply" or "Forward" for the junk
> email I received earlier, so the new subject line has either Re: or [Fwd:,
> i.e. the whole subject line is like:
> [Fwd: Aaa Bbbb/Cccc Dddd/Xxx Yyyy is out of....
> Re: Aaa Bbbb/Cccc Dddd/Xxx Yyyy is out of....
> Then, my procmailrc does not work for that mail. If I remove Re: and [Fwd:
> from the subject line, but keep all others there:
> Aaa Bbbb/Cccc Dddd/Xxx Yyyy is out of....
> and send it to myself or other testing account, then it works -- using .* or *
> at the end of that line in my procmailrc code!
> So, the Re: and [Fwd: in the subject line makes the code in procmailrc not
> working. Why?
Good question. "It's procmail" comes to mind. It might be this sort of
thing that has people down on procmail.
^Subject:.*:*.*is out of the office
I wonder if that one will work. Zero or more characters, zero or more colons,
another zero or more characters, then the real string.
One thing that comes to mind with Re: and Fwd: is that the actual message
is placed inside mime quoting. So there might be two Subject lines present
and that confuses things.
More information about the users