Re: [exim] Exim + filter + mkdir

Page principale
Supprimer ce message
Répondre à ce message
Auteur: Odhiambo Washington
Date:  
À: Andrey Morskoy
CC: exim users
Sujet: Re: [exim] Exim + filter + mkdir
On Sun, Mar 16, 2008 at 2:18 PM, Andrey Morskoy <
andrey.morskoy@???> wrote:

> Hi All.
> Please help me with little aspect.
> I have made setup of system filter for exim:
> unseen save /home/mailstore/mail/$reply_address+$tod_log+$message_exim_id
>
> Everything works fine, but now I want to store mail this way:
> /home/mailstore/mail/Mar/$reply_address+$tod_log+$message_exim_id
> /home/mailstore/mail/May/$reply_address+$tod_log+$message_exim_id
> ...
> /home/mailstore/mail/Dec/$reply_address+$tod_log+$message_exim_id


I do not want to change Exim's config every month, as well, as I do not
> want to have a set of empty dirs, created for further months...
>
> Can exim calculate current Month?



It used to:-)


> I suppose, that I need to make regex for $tod_log - I think can, but how
> does it looks in Exim?




What happens when the year rolls over? You overwite the months?
I used to do something like this, but I used the YYYY-MM instead, which in
your case would be:
/home/mailstore/mail/${substr_0_7:$tod_log}/$reply_address+$tod_log+$message_exim_id

but if the month is what you want, try this:
/home/mailstore/mail/${substr_5_2:$tod_log}/$reply_address+$tod_log+$message_exim_id


HTH!

--
Best regards,
Odhiambo WASHINGTON,
Nairobi,KE
+254733744121/+254722743223
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

"Oh My God! They killed init! You Bastards!"
--from a /. post