From: "Hongwei Li" <hongwei@xxxxxxxxx>
On 2/2/2006 12:10 PM, Hongwei Li wrote:
[snip]
The * is a wild char because there are probably other letters after office,
e.g. . ] or space etc. I also tried:
:0:
* ^Subject:.*is out of the office*
$MAILDIR/Trash
* 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 "*"
Don
Why does this work when the subject line has many other chars after FAILURE:
That is the way procmail works. Does the search string exist within any
line in the header or body?
# block junk mails from msnotes:
:0:
* ^Subject:.*DELIVERY FAILURE*
Matches ^Subject: DELIVERY FAILUR, ^Subject: asda asda DELIVERY FAILUREEEE,
and so forth.
$MAILDIR/Junk
So that declares the MAILDIR value is defined, at least.
The real subject is something like:
DELIVERY FAILURE: 550 5.7.1 Message content rejected...
I didn't use .*, but only * above.
As an aesthetic thing this might process quicker:
:0 h:
* ^Subject:.*is out of the office
$MAILDIR/Trash
Does $MAILDIR/Trash exist? Is it locked by something else? Is it a directory
or a file? (It should be the same kind of object as "Junk". And the suspicious
mind I have wonders if Trash is a special name for something else that peers
into that directory.)
{^_^}