Most of the time we have to troubleshoot mail clients for numerous reason. For the same Thunderbird provides session logging. Below mention methods are only useful for investigating problems that occur after Thunderbird establishes a connection to a server. If Thunderbird cannot connect to the server, then it is pointless trying to log the connection.

On Windows
Create a batch file to start Thunderbird & place it on desktop

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 log file location (NSPR_LOG_FILE) as per your need

On linux
Create a bash script to start the Thunderbird

#!/bin/sh

TB_PATH="/home/vidyadhar/thunderbird"

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 thunderbird path (TB_PATH) as per your installation.
If you want to log all modules instead of just IMAP (SMTP, e.g.) then replace “IMAP” above with “all”

Enabling Thunderbird’s logging
Tagged on:             

Leave a Reply

Your email address will not be published. Required fields are marked *