Re: [exim] Using %D in the logfile directive in a filter?

Página Principal
Apagar esta mensagem
Responder a esta mensagem
Autor: Phil Pennock
Data:  
Para: Adam Funk
CC: exim-users
Assunto: Re: [exim] Using %D in the logfile directive in a filter?
On 2009-07-02 at 15:25 +0100, Adam Funk wrote:
> A while ago [1] I asked about getting a datestamp in the filename of
> the log generated by an Exim filter. (Note that I'm talking about a
> "~/.forward"-type filter on a user account, not Exim's main
> configuration and logfiles.)
>
> I was told that %D would expand to 20090602 as it does in Exim's own
> logfiles, but it isn't working; the directive
>
> logfile $home/mail_logs/test_%D.log
>
> puts the file in "~/mail_logs/test_%D.log".
>
> Am I doing something so silly I can't see it, or is this a bug, or was
> I misinformed? (The server is running "Exim version 4.69 #1 built
> 30-Sep-2008 18:26:44", if that matters.)


You were misinformed.

The string expansion of %X, for various X, is not done for the logfile
directive of filters. It's only for the normal Exim logs.

You do have access to all of Exim's string expansion variables (except
for those explicitly prohibited in config); you should just be able to
use $tod_logfile instead of %D.

Regards,
-Phil