This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.
Differences between revisions 5 and 6
Revision 5 as of 2008-02-11 17:09:14
Size: 1616
Editor: custnets-66-43-94-202
Comment: added comment line for macosx
Revision 6 as of 2008-10-29 07:23:42
Size: 1627
Editor: ofme-ckp42-1
Comment: usually on windows user can't write to C:\ (only Administrator can do it)
Deletions are marked like this. Additions are marked like this.
Line 14: Line 14:
set NSPR_LOG_FILE=c:\thunderbird_%mydate%_%mytime%.log set NSPR_LOG_FILE=%USERPROFILE%\thunderbird_%mydate%_%mytime%.log

Debugging using Thunderbird's logging

Thunderbird has the ability to log its client actions based on protocol; this can be useful when you're experiencing a problem with Dovecot and want to trap the commands that the client is sending.

Windows batch file

Save the below as runtbird.bat and place it on the desktop, then run this instead of the Thunderbird icon.

set mydate=%date:~-4,4%%date:~-7,2%%date:~-10,2%
set mytime=%time:~0,2%%time:~+3,2%

set NSPR_LOG_MODULES=IMAP:5
set NSPR_LOG_FILE=%USERPROFILE%\thunderbird_%mydate%_%mytime%.log

start /d "c:\program files\mozilla thunderbird" thunderbird.exe

Adjust the log location and Thunderbird install folder as appropriate. If you want to log all modules instead of just IMAP (SMTP, e.g.) then replace "IMAP" above with "all". The above will create a date/time stamped logfile for each run, so you won't lose the previous logs.

Linux/BSD/etc. shell script

Save the below as runtbird.sh, chmod it 0755, then run this instead of the Thunderbird icon.

MYDATE=`date "+%Y%m%d_%H%M%S"`
NSPR_LOG_MODULES=IMAP:5
NSPR_LOG_FILE=/tmp/thunderbird_${MYDATE}.log
export NSPR_LOG_MODULES NSPR_LOG_FILE

/usr/bin/thunderbird &
# /Applications/Thunderbird.app/Contents/MacOS/thunderbird-bin &  # for MacOSX
exit $?

Adjust the log location and Thunderbird launch binary as appropriate. If you want to log all modules instead of just IMAP (SMTP, e.g.) then replace "IMAP" above with "all". The above will create a date/time stamped logfile for each run, so you won't lose the previous logs.

None: Debugging/Thunderbird (last edited 2011-03-07 10:46:47 by 5)