Hi I'm trying to log my users imap actions, like when creating a folder, moving an email or deleting an email. So I've enabled 'mail_debug' and I'm checking /var/log/dovecot/debug.log this is what happens when I delete an email: Nov 26 07:46:38 auth-worker(1555): Debug: sql(XXX,127.0.0.1): query: SELECT password FROM mailbox WHERE username = 'XXX' and active = 1 and restrictedAccess = 0 Nov 26 07:46:38 auth: Debug: client out: OK 1 user=XXX Nov 26 07:46:38 auth-worker(1555): Debug: sql(XXX,127.0.0.1): SELECT '/var/vmail/XXX/XXX' as home, 5000 AS uid, 5000 AS gid, concat('*:storage=', quota) AS quota_rule FROM mailbox WHERE username = 'XXX' Nov 26 07:46:38 auth: Debug: master out: USER 374472705 XXX home=/var/vmail/XXX/XXX uid=5000 gid=5000 quota_rule=*:storage=524288 Nov 26 07:46:38 imap(XXX): Debug: Effective uid=5000, gid=5000, home=/var/vmail/XXX/XXX Nov 26 07:46:38 imap(XXX): Debug: Quota root: name=User quota backend=maildir argsNov 26 07:46:38 imap(XXX): Debug: Quota rule: root=User quota mailbox=* bytes=536870912 messages=0 Nov 26 07:46:38 imap(XXX): Debug: Quota rule: root=User quota mailbox=Trash bytes=+104857600 messages=0 Nov 26 07:46:38 imap(XXX): Debug: maildir++: root=/var/vmail/XXX/XXX/Maildir, index=/var/vmail/XXX/XXX/Maildir/indexes, control=, inbox=/var/vmail/XXX/XXX/Maildir, alt and when creating a folder, access an email or moving an email, the output is basically the same: I'm unable to find the actual IMAP command. So, question: is there a way to log IMAP commands to a file ? Thank you, Mike
Hi, perhaps this is what you need. http://wiki2.dovecot.org/Plugins/MailLog No "mail_debug enabled" neccessary. Regards Urban Am 26.11.2015 um 07:51 schrieb mancyborg at gmail.com:> Hi I'm trying to log my users imap actions, like when creating a folder, moving an email or deleting an email. > So I've enabled 'mail_debug' and I'm checking /var/log/dovecot/debug.log > this is what happens when I delete an email: > > Nov 26 07:46:38 auth-worker(1555): Debug: sql(XXX,127.0.0.1): query: SELECT password FROM mailbox WHERE username = 'XXX' and active = 1 and restrictedAccess = 0 > Nov 26 07:46:38 auth: Debug: client out: OK 1 user=XXX > Nov 26 07:46:38 auth-worker(1555): Debug: sql(XXX,127.0.0.1): SELECT '/var/vmail/XXX/XXX' as home, 5000 AS uid, 5000 AS gid, concat('*:storage=', quota) AS quota_rule FROM mailbox WHERE username = 'XXX' > Nov 26 07:46:38 auth: Debug: master out: USER 374472705 XXX home=/var/vmail/XXX/XXX uid=5000 gid=5000 quota_rule=*:storage=524288 > Nov 26 07:46:38 imap(XXX): Debug: Effective uid=5000, gid=5000, home=/var/vmail/XXX/XXX > Nov 26 07:46:38 imap(XXX): Debug: Quota root: name=User quota backend=maildir args> Nov 26 07:46:38 imap(XXX): Debug: Quota rule: root=User quota mailbox=* bytes=536870912 messages=0 > Nov 26 07:46:38 imap(XXX): Debug: Quota rule: root=User quota mailbox=Trash bytes=+104857600 messages=0 > Nov 26 07:46:38 imap(XXX): Debug: maildir++: root=/var/vmail/XXX/XXX/Maildir, index=/var/vmail/XXX/XXX/Maildir/indexes, control=, inbox=/var/vmail/XXX/XXX/Maildir, alt> > and when creating a folder, access an email or moving an email, the output is basically the same: > I'm unable to find the actual IMAP command. > > So, question: is there a way to log IMAP commands to a file ? > > Thank you, > Mike >
Works wonders thank you! Finally I can use my accusation finger with my users! http://cdn.scooppick.com/wp-content/uploads/2015/03/Keeps-Talking.jpg On Thu, 26 Nov 2015 08:52:55 +0100 Urban Loesch <bind at enas.net> wrote:> Hi, > > perhaps this is what you need. > > http://wiki2.dovecot.org/Plugins/MailLog > > No "mail_debug enabled" neccessary. > > Regards > Urban > > Am 26.11.2015 um 07:51 schrieb mancyborg at gmail.com: > > Hi I'm trying to log my users imap actions, like when creating a folder, moving an email or deleting an email. > > So I've enabled 'mail_debug' and I'm checking /var/log/dovecot/debug.log > > this is what happens when I delete an email: > > > > Nov 26 07:46:38 auth-worker(1555): Debug: sql(XXX,127.0.0.1): query: SELECT password FROM mailbox WHERE username = 'XXX' and active = 1 and restrictedAccess = 0 > > Nov 26 07:46:38 auth: Debug: client out: OK 1 user=XXX > > Nov 26 07:46:38 auth-worker(1555): Debug: sql(XXX,127.0.0.1): SELECT '/var/vmail/XXX/XXX' as home, 5000 AS uid, 5000 AS gid, concat('*:storage=', quota) AS quota_rule FROM mailbox WHERE username = 'XXX' > > Nov 26 07:46:38 auth: Debug: master out: USER 374472705 XXX home=/var/vmail/XXX/XXX uid=5000 gid=5000 quota_rule=*:storage=524288 > > Nov 26 07:46:38 imap(XXX): Debug: Effective uid=5000, gid=5000, home=/var/vmail/XXX/XXX > > Nov 26 07:46:38 imap(XXX): Debug: Quota root: name=User quota backend=maildir args> > Nov 26 07:46:38 imap(XXX): Debug: Quota rule: root=User quota mailbox=* bytes=536870912 messages=0 > > Nov 26 07:46:38 imap(XXX): Debug: Quota rule: root=User quota mailbox=Trash bytes=+104857600 messages=0 > > Nov 26 07:46:38 imap(XXX): Debug: maildir++: root=/var/vmail/XXX/XXX/Maildir, index=/var/vmail/XXX/XXX/Maildir/indexes, control=, inbox=/var/vmail/XXX/XXX/Maildir, alt> > > > and when creating a folder, access an email or moving an email, the output is basically the same: > > I'm unable to find the actual IMAP command. > > > > So, question: is there a way to log IMAP commands to a file ? > > > > Thank you, > > Mike > >