Logging POP, IMAP, and SMTP email traffic isn't just for the industrious developer. If you want to see what's going on behind the scenes of your email exchanges in Mozilla Thunderbird (especially if what's going on is not going right), logging yields lots of information that can help you or your tech-support person diagnose the problem.
Turning on transaction logging may not be a straightforward affair, but it is not difficult, either. To create a log file with all Post Office Protocol, Simple Mail Transfer Protocol, and Internet Message Access Protocol traffic in Mozilla Thunderbird, first, make sure it's not running. Then, follow the instructions for your operating system.
Turning on Transaction Logging in Windows
In Microsoft Windows, follow this procedure:
-
Open the Command Prompt.
Press Win+X and click Command Prompt to open the Command Prompt.
-
Type
set NSPR_LOG_MODULES=
followed immediately by:
- POP3:4 for POP logging
- IMAP:4 for IMAP logging
- SMTP:4 for SMTP logging
-
Enable logging for multiple protocols by separating them with commas. For example:
To log both POP and SMTP traffic, type:
set NSPR_LOG_MODULES=POP3:4,SMTP:4
To log only IMAP traffic, type:
set NSPR_LOG_MODULES=IMAP:4
-
Press Enter.
-
Type
set NSPR_LOG_FILE=%HOMEDRIVE%%HOMEPATH%\Desktop\tbird_log.txt
-
Press Enter.
-
Type
start thunderbird
-
Press Enter again.
-
Perform the desired email actions in Mozilla Thunderbird.
-
Quit Mozilla Thunderbird and open tbird_log.txt on your Desktop.
Turning on Transaction Logging in macOS
Use the following procedure on your Mac:
-
Open a Terminal window.
-
Type
set NSPR_LOG_MODULES=
followed immediately by:
- POP3:4 for POP logging
- IMAP:4 for IMAP logging
- SMTP:4 for SMTP logging
-
Press Enter.
-
Enable logging for multiple protocols by separating them with commas. For example:
To log both POP and SMTP traffic, type:
export NSPR_LOG_MODULES=POP3:4,SMTP:4
To log only IMAP traffic, type:
export NSPR_LOG_MODULES=IMAP:4
-
Type
export NSPR_LOG_FILE=~/Desktop/tbird.log
-
Press Enter.
-
Type
/Applications/Thunderbird.app/Contents/MacOS/thunderbird-bin
-
Press Enter again.
-
Perform the desired email actions in Mozilla Thunderbird.
-
Quit Mozilla Thunderbird and find tbird.log on your Desktop.
Turning on Transaction Logging in Linux
In Linux, follow this procedure:
-
Open a Terminal window.
-
Type
set NSPR_LOG_MODULES=
followed immediately by:
- POP3:4 for POP logging
- IMAP:4 for IMAP logging
- SMTP:4 for SMTP logging
-
Press Enter. Enable logging for multiple protocols by separating them with commas. For example, type:
export NSPR_LOG_MODULES=POP3:4,SMTP:4
to log both POP and SMTP traffic and
export NSPR_LOG_MODULES=IMAP:4
to log only IMAP traffic.
-
Type
export NSPR_LOG_FILE=~/tbird.log.txt
-
Press Enter.
-
Type
thunderbird
-
Press Enter again.
-
Perform the desired email actions in Mozilla Thunderbird.
-
Quit Mozilla Thunderbird and review tbird.log.txt in your Home directory.
Turn Logging off in Mozilla Thunderbird
Traffic logging is enabled only for the session you start from the command line. You do not have to turn it off.