Software: Debug Thunderbird
We’ve migrated to Hosted Exchange, but we still have some of the die-hard FOSS Army on site, in the form of several developers (the majority of people I work with), holding onto Thunderbird with their teeth.
When I migrated their clients, I actually just added an additional mail account to their Thunderbird profiles. A few users were experiencing problems, and one in particular was having a bizarre issue where Thunderbird would send the Email, but report that the SMTP server disconnected. So, I figured, Thunderbird isn’t hearing the “okay, the mail is sent” message from the server.
I was able to find that debugging Thunderbird is very easy:
set mydate=%date:~-4,4%%date:~-7,2%%date:~-10,2% set mytime=%time:~0,2%%time:~+3,2% set NSPR_LOG_MODULES=SMTP:5,timestamp set NSPR_LOG_FILE=%USERPROFILE%\thunderbird_%mydate%_%mytime%.log start /d "c:\program files\mozilla thunderbird" thunderbird.exe
The NSPR_LOG_MODULES environmental variable can be changed to any of the following solo (like ‘SMTP:5’) or in a comma-separated list (like ‘SMTP:5,IMAP:5’), or the string ‘all’ (no quotes) if you wish to log everything.
imap ImapAutoSync ldap mime msgdb (level 1=opens/closes, level 5 lists open db's on close, number of msg hdrs in use) nntp pop3 smtp applemailimportlog bayesianfilter DockCounts (for logging issues with the mac dock unread count, 3.04 and above) gssapi imapoffline import ldapautocomplete mapi movemail msgbiff msgcompose MsgCopyService (3.3a4 nightly builds starting 5/2/2011) msgpurge negotiateauth nsaboutlookcardlog nsaboutlookdirectorylog nsabwinhelperlog nswabaddressbook
You can adjust the number that follows the module by the following:
NONE = 0 ALWAYS = 1 ERROR = 2 WARNING = 3 DEBUG = 4 everything = 5
Appending ‘timestamp’ will prepend a timestamp to each log entry.
Turns out that with SMTP logging enabled, Thunderbird did see the response:
0[e35140]: SMTP entering state: 0 0[e35140]: SMTP Response: 250 2.6.0 Queued mail for delivery 0[e35140]: SMTP entering state: 9 0[e35140]: SMTP Send: QUIT
Sure enough the message is sent. But what happened? An investigation into running services revealed a local SMTP proxy and Thunderbird weren’t getting along. I disabled the proxy and all worked fine.