Closed Bug 1736758 Opened 4 years ago Closed 4 years ago

Cannot log SMTP session to file

Categories

(Thunderbird :: Untriaged, defect)

Thunderbird 91
defect

Tracking

(Not tracked)

RESOLVED INVALID

People

(Reporter: vas, Unassigned)

Details

User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:93.0) Gecko/20100101 Firefox/93.0

Steps to reproduce:

I'm trying to log all SMTP protocol messages to a file (on a Manjaro Linux system). So I've set the appropriate environment variables and started thunderbird

export NSPR_LOG_MODULES=SMTP:5,timestamp
export NSPR_LOG_FILE=/home/vas/log/tbird.log.txt
export MOZ_LOG=SMTP:5,timestamp
export MOZ_LOG_FILE=/home/vas/log/tbird.log.txt
thunderbird

Then I send an E-mail, make sure it has arrived to the destination (it does), and close Thunderbird.

Actual results:

Multiple /home/vas/log/tbird.log.txt* files have been created but they are all empty. I also don't understand why multiple files are being created, but nonetheless, they all are empty.

Expected results:

I expect some SMTP debugging info in /home/vas/log/tbird.log.txt* .

It actually works with MOZ_LOG=IMAP:5 (I see lots of debug messages for the IMAP protocol), but not for SMTP:5. Yes, I'm sure the message has been sent and I've closed Thunderbird.

Is the key word not "SMTP" but changed to something different?

Thunderbird uses a new js implementation for the SMTP backend now. Those variables are for the old c++ backend. See https://thunderbirdtweaks.blogspot.com/2021/10/logging-mail-sending-in-thunderbird.html

Status: UNCONFIRMED → RESOLVED
Closed: 4 years ago
Resolution: --- → INVALID

Then you should probably update at least your knowledge base and Wiki, at least here https://wiki.mozilla.org/MailNews:Logging and maybe http://kb.mozillazine.org/Session_logging_for_mail/news and maybe somewhere else. Are you using blogspot as documentation?

No, I think we should add it to https://developer.thunderbird.net but haven't got around to it yet. I added a quick note on the wiki now.

You need to log in before you can comment on or make changes to this bug.