summaryrefslogtreecommitdiffstats
path: root/doc/wiki/Debugging.Thunderbird.txt
blob: db82307101ee545e49d33ad7be390ebb4f8b2a22 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
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.

(This file was created from the wiki on 2019-06-19 12:42)