[Dovecot] Logging subjects of messages
tss at iki.fi
Wed Jul 7 14:32:46 EEST 2010
On 7.7.2010, at 9.59, Sandu cucereanu wrote:
> I want to know if there is any possibility to log the subjects of the messages downloaded from ther server. We use dovecot 1.0.15 with POP3S and IMAP and we want to keep a trace of the reading of messages by the users of our mail server (who, when and what are the subjects of the e-mail messages read) because some users complain that they did not read some messages but in the logs of the server (maillog files( those messages appear to be delivered to their inboxes.
Not with v1.0, but I think with v1.2 or later you could use http://wiki.dovecot.org/Plugins/MailLog :
mail_log_events = flag_change
mail_log_fields = subject
Then as long as you have pop3_no_flag_updates=no (default) it should log a line for every RETR that is done. (Not tested, but I don't see why it wouldn't work.)
The main problem is that with IMAP this gets logged every time a flag changes. Also with IMAP there's really no reliable way to say if a message has been read/downloaded. Clients typically download messages headers, but it's possible to delete a message without reading it.
Maybe the mail_log plugin would be better used as it was originally intended? So that it would log whenever messages are deleted?
More information about the dovecot