[Dovecot] Request for additional logging

Richard Stockton dovecot at richardleestockton.org
Tue Apr 10 02:50:38 EEST 2007


At 12:47 AM 4/7/2007, you wrote:
>On 6.4.2007, at 23.29, Richard Stockton wrote:
>
>>At 12:32 PM 4/6/2007, you wrote:
>>>>It would be helpful to me if there were more logging options
>>>>available.  For example, I would like to see a record of each
>>>>email deleted, with the filename (if maildir), and size in the log.
>>>
>>>See http://wiki.dovecot.org/Plugins/MailLog
>>>
>>>It won't log the size or the filename though. Should be pretty easy
>>>to modify the sources to log them too. Maybe I'll make it
>>>configurable some day what it logs.
>>
>>That would great!  I took a quick look at the sources, but could not
>>easily see where to add this to the logging.  But then again I'm much
>>more comfortable with perl or php. [grin]
>
>src/plugins/mail-log/mail-log-plugin.c -> mail_log_action() change
>the i_info() to something like:
>
>         i_info("%s: uid=%u, msgid=%s%s, size=%"PRIuUOFF_T", filename=%s",
>action, mail->uid,
>                msgid == NULL ? "(null)" : str_sanitize(msgid, MSGID_LOG_LEN),
>                mailbox_str, mail_get_physical_size(mail), 
> mail_get_special (mail, MAIL_FETCH_UIDL_FILE_NAME));

Beautiful!  That works great.  Thanks very much.
  - Richard




More information about the dovecot mailing list