[Dovecot] mail size needed in dovecot sieve log line
This is a dovecot sieve log line:
2012-09-26T13:47:52+02:00 host/192.168.1.1 dovecot: [ID 583609 mail.info] lmtp(7565, user@domain): vTtJDTrrYlCNHQAAs1WjhA: sieve: msgid=<MSGID>: stored mail into mailbox 'INBOX'
Would it be possible to have mail size logged here?
MU
Am 26.09.2012 13:52, schrieb Maciej Uhlig:
This is a dovecot sieve log line:
2012-09-26T13:47:52+02:00 host/192.168.1.1 dovecot: [ID 583609 mail.info] lmtp(7565, user@domain): vTtJDTrrYlCNHQAAs1WjhA: sieve: msgid=<MSGID>: stored mail into mailbox 'INBOX'
Would it be possible to have mail size logged here?
MU
perhaps try
http://wiki2.dovecot.org/Plugins/MailLog
plugin { # Events to log. Also available: flag_change save mailbox_create mail_log_events = delete undelete expunge copy mailbox_delete mailbox_rename
# Also available: flags vsize from subject mail_log_fields = uid box msgid size }
-- Best Regards MfG Robert Schetterer
Op 9/26/2012 1:52 PM, Maciej Uhlig schreef:
This is a dovecot sieve log line:
2012-09-26T13:47:52+02:00 host/192.168.1.1 dovecot: [ID 583609 mail.info] lmtp(7565, user@domain): vTtJDTrrYlCNHQAAs1WjhA: sieve: msgid=<MSGID>: stored mail into mailbox 'INBOX'
Would it be possible to have mail size logged here?
You can use the deliver_log_format setting. The default value is: "msgid=%m: %$"
I'm not sure where this is documented, so I took a look at the source code to find out which substitutions exist:
static struct var_expand_table static_tab[] = {
{ '$', NULL, NULL },
{ 'm', NULL, "msgid" },
{ 's', NULL, "subject" },
{ 'f', NULL, "from" },
{ 'e', NULL, "from_envelope" },
{ 'p', NULL, "size" },
{ 'w', NULL, "vsize" },
{ '\0', NULL, NULL }
};
So, this should work for you:
deliver_log_format=msgid=%m size=%p: %$
Regards,
Stephan
participants (3)
-
Maciej Uhlig
-
Robert Schetterer
-
Stephan Bosch