12 messages in net.sourceforge.lists.courier-maildropRe: [maildropl] Hidden Feature in Mai...
FromSent OnAttachments
Ed WildgooseMar 28, 2005 10:45 am 
Jeremy KitchenMar 28, 2005 12:09 pm 
Ed WildgooseMar 28, 2005 1:14 pm 
Ed WildgooseMar 29, 2005 8:43 am 
Paul L. AllenMar 29, 2005 3:28 pm 
Sam VarshavchikMar 29, 2005 3:41 pm 
Ed WildgooseMar 29, 2005 5:25 pm 
Sam VarshavchikMar 29, 2005 5:42 pm 
Ron JohnsonMar 29, 2005 6:37 pm 
Sam VarshavchikMar 29, 2005 7:39 pm 
Ron JohnsonMar 29, 2005 8:23 pm 
Ed WildgooseMar 30, 2005 12:23 am 
Actions with this message:
Paste this link in email or IM:
Paste this link in email or IM:
Atom feed for this thread
Paste this URL into your reader:
Subject:Re: [maildropl] Hidden Feature in Maildrop?Actions...
From:Ron Johnson (ron.@cox.net)
Date:Mar 29, 2005 6:37:30 pm
List:net.sourceforge.lists.courier-maildrop

On Tue, 2005-03-29 at 20:41 -0500, Sam Varshavchik wrote:

Ed Wildgoose writes:

Sam Varshavchik wrote:

Ed Wildgoose writes:

The regex part. I agree it's standard regex syntax, but the docs *suggest* that maildrop doesn't support standard (full) regexp.

It's a little frustrating trying to guess exactly which bits of grep regexp are supported and which are not.

The maildropfilter man page describes exactly what works, and what doesn't.

Well, see my original comment then? I agree that maildrop has nice docs and hence I suggested that the (abc|cde) syntax was documented (since it is implemented).

So *NO* the man page DOESN'T describe exactly what works...

Yes it does. At least the maildropfilter page I'm looking at has a section called "PATTERNS", which describes every regular expression syntax implemented by maildrop. If something does not appear in that section, then it's not implemented, as far as regular expressions go.

So please try and work with me since I'm only trying to be constructive here.

I'm going to reproduce that portion of the man page, then you can explain to me what exactly "DOESN'T describe exactly what works", below:

PATTERNS The pattern syntax in maildrop is similar to the grep command’s syn- tax, with some minor differences. A pattern takes the following form in the filter file:

/pattern/:options

pattern specifies the text to look for in the message. pattern, because the leading slash will then be interpreted as a division sign. If you must search for text that starts with a space, use something [snip] patterns. For example:

/^From: *!.*/ matched against the same line will set MATCH to "From: " and MATCH2 to "postmaster@localhost". More than one ! character may be used. Sub- sequent matched text is assigned to MATCH3, MATCH4, and so on.

Note: Please note that the abuse of this feature will eat plenty of CPU time -- the ! character introduces a lot of com- plexity for maildrop to deal with.

When there is more than one way to match a string, maildrop favors matching as much as possible initially. For example:

/^To:.*,!.*/ when matched against

To: joe@somewhere,bo@somewhere.else,gary@whoknowswhere will set MATCH to "To: joe@somewhere,bo@somewhere.else," and MATCH2 to "gary@whoknowswhere".

The MATCH variables are NOT set when weighted scoring is used, since the same pattern is matched multiple times.

From the OP:

I'm converting some filters from procmail and I use the following construct quite a lot:

if (/^From: *(someaddress@somewhere|someotheraddress|somewhereelse)/) { }

However, it's not documented as being valid syntax in the maildrop documentation. I didn't even think to just try it, but converted a bunch of filters to a repetitive IF syntax instead. Completely by chance I spotted that it was possible from someones example filter.

I don't see where the OP's use of the logical-OR is explicitly mentioned in the PATTERNS section.

"I did not have sex with that woman." Bill Clinton