procmail
[Top] [All Lists]

Re: filtering nearly-identical headers in one rule

1996-04-30 21:20:02
Jan Vicherek <honza(_at_)ied(_dot_)com> writes:
(please reply directly to me [honza(_at_)ied(_dot_)com] -- I'm not subscribed 
to the list)

Well, I'll let you live.


What would be an [elegant] way to process almost-same msgs in one rule :

e.g. all the relevant msgs have :

X-loop:  
mailing-list-XXXXX(_dot_)*XX-digest(_at_)an(_dot_)insti(_dot_)tution(_dot_)edu

  And I would like to use lockfile and destination mailbox :
digest-XXXXX.*XX.lock
  and
digest-XXXXX.*XX

 where the XXXXX.*XX may be different in different msgs.

This can be done wholly within procmail if the "XXXXX.*XX" part matches
some definate regexp that doesn't extend into the "-digest..." part.

For example, if the "XXXXX.*XX" part can never contain a '-', then the
following would work:

:0:
* ^X-Loop: *mailing-list-\/[^-]+
digest-$MATCH


Alternatively, if you knew that it was always exactly 9 characters long,
then this would work:

:0:
* ^X-Loop: *mailing-list-\/.........
digest-$MATCH


Philip Guenther

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