frank.kintrup at fkware.de
2007-Nov-24 23:03 UTC
[Dovecot] Questions about deliver log files
Hi, I upgraded from Courier to dovecot, and now I try to rebuild some of the features I used to have. One was a monthly per user log of maildrop's work. I used this code in maildroprc: DATE=`date +%m` logfile "$MAILDIR/maildrop-$DATE.log" This created a monthly log in the each user's Maildir. I find it easier to have a log per user than having to filter the log entries from a large log file for all users. I tried to recreate it with deliver by using the variables %h and %d/%n, but they are not interpreted when the log file is accessed ("Can't open log file /var/vmail/%d/%n/deliver.log: No such file or directory"). And there seems to be no way to include a date in the file name (but maybe I could use logrotate for that). Another problem: Currently deliver only logs the message id. A user would never ask for this (especially if he asks where certain mails were stored/discarded), he would ask for the sender's name/email or subject. Is the contents of the log file configurable? Frank
On Sun, 2007-11-25 at 00:03 +0100, frank.kintrup at fkware.de wrote:> I tried to recreate it with deliver by using the variables %h and > %d/%n, but they are not interpreted when the log file is accessed > ("Can't open log file /var/vmail/%d/%n/deliver.log: No such file > or directory"). And there seems to be no way to include a date in > the file name (but maybe I could use logrotate for that).v2.0 will have better support for these kind of things, but for now you could use a dynamically generated config file. Before running deliver you'd create a config for it using perl or whatever where the log_path is set like you want it.> Currently deliver only logs the message id. A user would never > ask for this (especially if he asks where certain mails were > stored/discarded), he would ask for the sender's name/email or > subject. Is the contents of the log file configurable?Unfortunately not. I added this to my TODO now. It wouldn't be difficult to modify deliver's sources for this though. -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 189 bytes Desc: This is a digitally signed message part URL: <http://dovecot.org/pipermail/dovecot/attachments/20071126/32a1910a/attachment-0002.bin>