Re: [Dovecot] Request for additional logging

2007-04-09 Thread Richard Stockton

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




Re: [Dovecot] Request for additional logging

2007-04-07 Thread Timo Sirainen

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));




PGP.sig
Description: This is a digitally signed message part


[Dovecot] Request for additional logging

2007-04-06 Thread Richard Stockton

Hi Timo,

First, thanks very much for dovecot, you are doing a fine thing
making it open source, and it is working very well here.

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.

I haven't been able to find much documentation on logging at all.
Have I just not been looking in the right place?  If so, I would
appreciate any enlightenment offered.

Thanks in advance,
 - Richard



Re: [Dovecot] Request for additional logging

2007-04-06 Thread Timo Sirainen

On 6.4.2007, at 22.10, Richard Stockton 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.




PGP.sig
Description: This is a digitally signed message part