procmail
[Top] [All Lists]

Re: Nested recipes... (sorry if this is sent twice.. )

2005-01-24 09:37:34
Toen ik Dallman Ross kietelde, kwam er dit uit:
Ruud H.G. van Tol:

   :0
   *$ ^List-Post:(.*\<)?\/$MYBSDLISTS@($HOSTCLASS[.])*freebsd[.]org\>
   *  MATCH ?? ^^\/[^(_at_)]+
   *$ MYBSDLISTS ?? ()[(|]\/$MATCH[|)]
   *  MATCH ?? ^^\/[^|)]+
   { LOG = "$NL$MATCH FreeBSD List$NL" }

   :0A
   .FreeBSD.$MATCH/

Rematching on $MYBSDLISTS is also better because then we
won't get the occasional odd thing like "PORTS" or "POrts"
when somebody at the other end of the email gets cute.
(We'd handled the first letter, but not the others, in
my schema.)

Yes, that is what I meant with "the right casing".
(non-proper casing, etc.)


This is a little bit safer:

   *$ MYBSDLISTS ?? ()[(|]\/$\MATCH[|)]


(added a backslash between $ and MATCH).


Safer, because 'six.even' and 'sixseven' would be different.

Not that freebsd-lists currently have names that could collide,
but the same kind of recipe can be used for mailing lists of
other organizations.

I use a slightly different approach, that allows grouping of
messages:

  [...]

  LIST2BOX = '
advocacy:meta
announce:tech
chat:misc
etc:etc'

  :0A
  *$ LIST2BOX ?? ^[$WSP]*$\MATCH:\/[^$WSP]+
  .FreeBSD.$MATCH/
  :0E
  .FreeBSD.misc/


In stead of the ':' one could also use '@', and that '@'
could be the one from the List-Post-header.


The LIST2BOX and MYLISTS could even be combined:
   MYLISTS = '(advocacy(:meta)?|announce(:tech)?|chat(:misc)?)'
but that really is too obscure.

-- 
Affijn, Ruud   `  -  ´
               + ` ´ *
                 ´ `     Jvr qvg yrrfg,
               ´  =  `   fgresg wbatre.


____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail