procmail
[Top] [All Lists]

Re: How I solved the mmm to mm

2004-02-10 18:23:47
Toen ik Bart Schaefer kietelde, kwam er dit uit:

MONTHTABLE="
Jan 01
Feb 02
Mar 03
Apr 04
May 05
Jun 06
Jul 07
Aug 08
Sep 09
Oct 10
Nov 11
Dec 12"

 : 0
 * $ MONTHTABLE ?? $TEMPMON \/..
 { MYMONTH=$MATCH }

I would anchor $TEMPMON to the start of the line:

  * $ MONTHTABLE ?? ^$TEMPMON \/..



I use this type of s&r quite a lot, for instance 
to get all kind of technical mailing-lists into 
a single -IN.list.tech-box.

Example of a file with s&r-info:

@ibm.email-publisher.com:ibm
@([-a-z0-9]+\.)+ibm.com:ibm
@nl.internet.com:tech
owner-isdnnews(_at_)listserv(_dot_)cc(_dot_)kuleuven(_dot_)ac(_dot_)be:isdnnews
@newsletters.microsoft.com:microsoft
@newsletters.online.com:tech
@oracle-mail.com:oracle

I import that file with sed, transforming the parts to the left 
of the colons into a regular expression to use in a condition-line. 
Example: http://www.xs4all.nl/~rvtol/xs4all/unstable/pm/listmail.rc
There is a second s&r (List_Cvt) that transforms ibm, microsoft and 
oracle etc. into tech. Very flexible.

-- 
Affijn, Ruud

_______________________________________________
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>