Hi, I am trying to optimize an imap library and I am comparing with some existing webmail, for instance from roundcube I can log the imap commands with the following format : [11-Jan-2012 14:22:55 +0100]: [DBD1] S: * OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE STARTTLS AUTH=PLAIN AUTH=LOGIN AUTH=DIGEST-MD5 AUTH=CRAM-MD5] Dovecot ready. [11-Jan-2012 14:22:55 +0100]: [DBD1] C: A0001 ID ("name" "Roundcube Webmail" "version" "0.6" "php" "5.3.5-1ubuntu7.4" "os" "Linux" "command" "/") [11-Jan-2012 14:22:55 +0100]: [DBD1] S: * ID NIL [11-Jan-2012 14:22:55 +0100]: [DBD1] S: A0001 OK ID completed. [11-Jan-2012 14:22:55 +0100]: [DBD1] C: A0002 AUTHENTICATE CRAM-MD5 [11-Jan-2012 14:22:55 +0100]: [DBD1] S: + RDM1MTE1NjkxOTQzODE4NDEuMTMyNjI4ODE3NUBzZC0zMDYzNT4[11-Jan-2012 14:22:55 +0100]: [DBD1] C: d2ViZ3Vlc3RAc21hcnRtb2JpbGkuY29tIDczODMxNjUzZmVlYzdjNDVlNzRkYTg1YjIwMjk2NWM0 [11-Jan-2012 14:22:55 +0100]: [DBD1] S: A0002 OK [CAPABILITY IMAP4rev1 LITERAL+ SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS MULTIAPPEND UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS FUZZY] Logged in [11-Jan-2012 14:22:55 +0100]: [DBD1] C: A0003 NAMESPACE [11-Jan-2012 14:22:55 +0100]: [DBD1] S: * NAMESPACE (("" ".")) NIL NIL [11-Jan-2012 14:22:55 +0100]: [DBD1] S: A0003 OK Namespace completed. [11-Jan-2012 14:22:55 +0100]: [DBD1] C: A0004 LOGOUT [11-Jan-2012 14:22:55 +0100]: [DBD1] S: * BYE Logging out ... And now I would like to do the same from my imap library so I have started wireshark but it's a bit messy and difficult to compare. I was wondering if dovecot allows to log imap communications ? Thanks
On 1/11/2012 7:11 AM, forumer at smartmobili.com wrote:> I was wondering if dovecot allows to log imap communications ?You could look at Rawlog http://wiki.dovecot.org/Debugging/Rawlog http://wiki2.dovecot.org/Debugging/Rawlog
Le 11.01.2012 15:19, Willie Gillespie a ?crit?:> On 1/11/2012 7:11 AM, forumer at smartmobili.com wrote: >> I was wondering if dovecot allows to log imap communications ? > > You could look at Rawlog > http://wiki.dovecot.org/Debugging/Rawlog > http://wiki2.dovecot.org/Debugging/RawlogOk so I suppose I need to rebuild dovecot with the --with-rawlog option but I am under ubuntu and I was using some dovecot-2.x source package hosted here : http://xi.rename-it.nl/debian/ But now it seems to be dead, any idea where I could find a deb-src for dovecot 2.x ?
Le 11.01.2012 16:09, forumer at smartmobili.com a ?crit?:> Le 11.01.2012 15:19, Willie Gillespie a ?crit?: >> On 1/11/2012 7:11 AM, forumer at smartmobili.com wrote: >>> I was wondering if dovecot allows to log imap communications ? >> >> You could look at Rawlog >> http://wiki.dovecot.org/Debugging/Rawlog >> http://wiki2.dovecot.org/Debugging/Rawlog > > Ok so I suppose I need to rebuild dovecot with the --with-rawlog > option but I am under ubuntu > and I was using some dovecot-2.x source package hosted here : > http://xi.rename-it.nl/debian/ > But now it seems to be dead, any idea where I could find a deb-src > for dovecot 2.x ?Actually I finally found that repository it still working.
I have added the following lines to dovecot configuration(/etc/dovecot/conf.d/10-master.conf) : ... service pop3 { # Max. number of POP3 processes (connections) #process_limit = 1024 } service postlogin { executable = script-login -d rawlog unix_listener postlogin { } } ... and I have created a folder dovecot.rawlog was shown below : root at vf-12345:/home/vmail/smartmobili.com/webguest# ls -la ... drwxrwxrwx 2 vmail vmail 4096 2012-01-11 19:11 dovecot.rawlog/ -rw------- 1 vmail vmail 19002 2011-12-27 13:01 dovecot-uidlist -rw------- 1 vmail vmail 8 2012-01-11 12:52 dovecot-uidvalidity ... And after that I have restarted dovecot and logged in with the webguest account but cannot see any logs. What am I doing wrong ?