procmail
[Top] [All Lists]

Re: Variable destination Inbox file year and month ?

2001-09-03 02:10:59
Hi Wash,

What about
:0:
* Some conditions
mail-`/bin/date +%Y.%m`

as far as I can see this one would decide in which file
to put the mail according to the current date.

That´s not exactly what I need - I´m looking for a way
to use the date issued in the mail header, as a basis for
the decision which file to use.

As a normal sentence this would mean
"Search for the String '^Date', take the three letters
of the month and the digits of the year, convert these
values into yyyy.mm (where mm is numeric) format and put
the mail into that mailbox".

As said in my earlier mail, I got the regular expression and

the propper 'date' commands to do the extrapolation and
conversion stuff.

Now, how do I get \1 (i.e. the month) and \2 (i.e. the year)
from my line "* Some conditions" with the grouping regular
expression into the command line where I do the conversion with
'date' (this line is called the recipe, isn´t it :) ?

Hope this is possible at all ...

Regards,

Emre



--
Emre Bastuz
info(_at_)emre(_dot_)de http://www.emre.de
UIN: 561260             PGP Key ID: 0xEA0E2CA1

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