On Jun 17, Miroslav Ris SA of iNet wrote:
> Hi,
>
> need sort mail on delivery in separate sub-folders in Maildir format with exim.
>
> Sample:
> /path_to_home/$local_part/Maildir/.YYYYMM/
>
> Any hints?
> Thanks.
The date (and time) in the format used in exim's logs is in a $tod_log
variable - eg "2003-06-17 09:19:47". I use the first 10 characters of
this to get the date in some situations for a logfile in a system filter:
/var/log/exim/blah_log.${length_10:$tod_log} - ie. 2003-06-17
You could then (if you need to stick to YYYYMM format) use other string
operators to get rid of the "-" - possibly sg, substr or extract.
Maybe something like this would do it (untried!)
${extract{1}{-}{${length_7:$tod_log}}}${extract{2}{-}{${length_7:$tod_log}}}
although it's probably neater with sg, but I'm not used to using that.
--
| Mark Hynes mark.hynes@??? |
| Service Developer http://www.uk.easynet.net/ |
| Easynet Ltd -- a part of Easynet Group plc |