procmail
[Top] [All Lists]

Re: recipe not working correctly

2001-09-26 15:33:08
Thanks for the input....
It's working now...  the mailbox was temporary, ultimatley I will
just drop the messages, just did not want to lose any until
I got it working, but thankx for the info on locking.

Again, thanx for all the help.


Holger Wahlen <H(_dot_)Wahlen(_at_)gmx(_dot_)de> 26-Sep-01 11:57:34 AM >>>
Walter Werner wrote:
:0
* ^Subject.*[Ss][Ee][Xx]*
${MAILDIR}/sex

and it appears to be matching things I did not expect, here
is the output from the log, can someone explain what I've
done wrong.
...
procmail: Match on "^Subject.*[Ss][Ee][Xx]*"
...
 Subject: Re: copies of messages sent

A "*" in a regular expression doesn't mean "anything", it means "any
amount (including zero) of the preceding item", therefore you have a
match: "sent" contains an "s", an "e", and zero "x"s. Drop the "*" at
the end of your condition, and it should work.

Two more remarks: You don't need the [Ss] stuff, just "^Subject:.*sex"
is okay; unless you use the "D" flag (":0 D"), procmail ignores
case. And if you're delivering to a mbx file, you should add locking
(":0:" instead of ":0") to be on the safe side if two messages arrive
shortly after each other and two procmail processes try to write to
the same file simultaneously.

/HW
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail
Thanks for the input....
It's working now...  the mailbox was temporary, ultimatley I will
just drop the messages, just did not want to lose any until
I got it working, but thankx for the info on locking.
 
Again, thanx for all the help.


>>> Holger Wahlen <H(_dot_)Wahlen(_at_)gmx(_dot_)de> 26-Sep-01 11:57:34 AM >>>
Walter Werner wrote:
> :0
> * ^Subject.*[Ss][Ee][Xx]*
> ${MAILDIR}/sex
>
> and it appears to be matching things I did not expect, here
> is the output from the log, can someone explain what I've
> done wrong.
...
> procmail: Match on "^Subject.*[Ss][Ee][Xx]*"
...
>  Subject: Re: copies of messages sent

A "*" in a regular _expression_ doesn't mean "anything", it means "any
amount (including zero) of the preceding item", therefore you have a
match: "sent" contains an "s", an "e", and zero "x"s. Drop the "*" at
the end of your condition, and it should work.

Two more remarks: You don't need the [Ss] stuff, just "^Subject:.*sex"
is okay; unless you use the "D" flag (":0 D"), procmail ignores
case. And if you're delivering to a mbx file, you should add locking
(":0:" instead of ":0") to be on the safe side if two messages arrive
shortly after each other and two procmail processes try to write to
the same file simultaneously.

/HW
_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>