This documentation is for Dovecot v2.x, see wiki1 for v1.x documentation.
Differences between revisions 2 and 12 (spanning 10 versions)
Revision 2 as of 2007-03-19 01:00:43
Size: 1535
Editor: TimoSirainen
Comment: It's Thunderbird, not ThunderBird :)
Revision 12 as of 2011-03-07 10:46:47
Size: 1802
Editor: 5
Comment: add a note to get log lines with timestamp
Deletions are marked like this. Additions are marked like this.
Line 1: Line 1:
== Debugging using Thunderbird logging == == Debugging using Thunderbird's logging ==
Line 3: Line 3:
Thunderbird has the ability to log it's 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. 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.
Line 14: Line 14:
set NSPR_LOG_FILE=c:\thunderbird_%mydate%_%mytime%.log set NSPR_LOG_FILE=%USERPROFILE%\thunderbird_%mydate%_%mytime%.log
Line 21: Line 21:
Line 25: Line 26:
{{{ {{{#!plain
Line 27: Line 28:

TB_PATH=`which thunderbird`
# or for MacOSX:
#TB_PATH="/Applications/Thunderbird.app/Contents/MacOS/thunderbird-bin"
Line 33: Line 38:
/usr/bin/thunderbird & $TB_PATH &
Line 37: Line 42:
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. 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". You can also get a timestamp at the begining of all the log lines, if you add ",timestamp" after "NSPR_LOG_MODULES=IMAP:5" for example. The above will create a date/time stamped logfile for each run, so you won't lose the previous logs.

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.

#!/bin/sh

TB_PATH=`which thunderbird`
# or for MacOSX:
#TB_PATH="/Applications/Thunderbird.app/Contents/MacOS/thunderbird-bin"

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

$TB_PATH &
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". You can also get a timestamp at the begining of all the log lines, if you add ",timestamp" after "NSPR_LOG_MODULES=IMAP:5" for example. 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)