How to log connection errors in Thunderbird

How to enable logging on mozilla thunderbird?

This is how to temporatly allow logging of thunderbird imap4, php3 or smtp connection events to a file to find out why things don’t work as expected.
The only permanent changes it makes, is the creation of your logfile… the logging mode will turn off, as soon as you close thunderbird and the commandline.

Open your commandline and type in these settings:

Windows command line:
set MOZ_LOG=IMAP:5,timestamp
set MOZ_LOG_FILE=%USERPROFILE%\Desktop\imap.log
“%ProgramFiles(x86)%\Mozilla Thunderbird\thunderbird.exe”

Mac OS X:
export MOZ_LOG=IMAP:5,timestamp
export MOZ_LOG_FILE=$HOME/imap.log
/Applications/ &
if on 10.5 change the above line to arch -arch i386 /Applications/

Linux Bash:
# For bash shell (the default shell on most GNU/Linux systems):
export MOZ_LOG=IMAP:5,timestamp
export MOZ_LOG_FILE=/tmp/imap.log

# For tcsh / csh (which is not as common):
setenv MOZ_LOG IMAP:5
setenv MOZ_LOG_FILE /tmp/imap.log

As seen on