procmail
[Top] [All Lists]

Converting mmm to mm

2004-02-04 14:01:53
I have a recipe that gets the date from a messages' received header and then sorts it into a mailbox based on the month and year. trouble is, the date in the received header is

(J(an|u[ln])|Feb|Ma[ry]|A(pr|ug)|Sep|Oct|Nov|Dec)

and I want the folder to be:

2003-05 instead of 2003-May

I could do this with a shell script, but I want the recipe to stand alone and not rely on anything external that may or may not be there.

a sed substitution is an idea, but I can't think how to do that in procmail without going through 12 iterations.


--
...when you're no longer searching for beauty or love, just some kind of life with the edges taken off. When you can't even define what it is that you're frightened of; this song will be here.


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