Is it at all possible to log IMAP activity TO A FILE? (tb 115.3.0, linux mint 21)
Hi,
I'm trying to diagnose a random problem I'm having (SOME emails I delete disappear from the inbox and 5 seconds later they reappear).
I can't predict when this will happen, so I'd like to just send logging data to a file. I followed the instructions at https://wiki.mozilla.org/MailNews:Logging and no log file is created.
I set mailnews.imap.loglevel to "All" (without quote marks).
Still no log file and looking at the Error Console, as I gleaned from another reply on this forum, yields nothing whenever I delete an email (whether successfully or not).
Thanks!
Chosen solution
OK. That was the push I needed to try one more thing and it worked.
The variables' values must be enclosed in quotes (")
AND
The name of the log file and its path must be fully specified (i.e. "~/" doesn't work).
These commands did the trick:
export MOZ_LOG="IMAP:5,timestamp"
export MOZ_LOG_FILE="/home/[username]/logs/imap.log"
/media/data-e/downld/Thunderbird/thunderbird/thunderbird-bin
I'll try to update the wiki. If I can't, hopefully someone else will do it.
Thanks for your help!
Read this answer in context 👍 0All Replies (8)
mailnews.imap.loglevel is the modern style, but this is not yet used in release versions of Thunderbird.
You should be using Gecko logging https://wiki.mozilla.org/MailNews:Logging#Gecko_Logging
Hi,
Sorry I wasn't clear. I tried the instructions under Gecko logging as well and no log file is ever created.
The only other source of information I could find has the same instructions as the wiki under Gecko logging (https://www.thunderbird-mail.de/lexicon/entry/215-protokoll-log-datei-der-server-verbindung-mit-imap-pop-und-smtp-erstellen/).
The first paragraph of the gecko section in the wiki - https://wiki.mozilla.org/MailNews:Logging#Gecko_Logging - indicates that "Gecko logging may be enabled via preferences," but I couldn't find any preference that contains the word "gecko."
I wonder what I might be missing here.
Interestingly, I just added quote marks around the environment variables' values and at least got logging output sent to the console (no log files created, though).
Thanks!!!
"Gecko logging may be enabled via preferences" is inaccurate. For imap you must use command line variables with log module names listed in that section.
Modified
Suluhisho teule
OK. That was the push I needed to try one more thing and it worked.
The variables' values must be enclosed in quotes (")
AND
The name of the log file and its path must be fully specified (i.e. "~/" doesn't work).
These commands did the trick:
export MOZ_LOG="IMAP:5,timestamp"
export MOZ_LOG_FILE="/home/[username]/logs/imap.log"
/media/data-e/downld/Thunderbird/thunderbird/thunderbird-bin
I'll try to update the wiki. If I can't, hopefully someone else will do it.
Thanks for your help!
I can tweak the wiki after you give it a shot.
OK. I tried, but I really don't have the patience or the time to register with yet another web site.
Could you do the honors, please? :-)
This is what needs to be changed:
https://wiki.mozilla.org/MailNews:Logging#Linux.2Funix
- Add quote marks around variables' values.
- Indicate that the path to the log file must be fully specified (i.e. without shortcuts, such as "~/").
https://wiki.mozilla.org/MailNews:Logging#Gecko_Logging
- Change the sentence that reads "may be enabled via preferences (not discussed in this document), or command line, which is discussed here." to "is enabled via environment variables, as follows:"
I sent an email to the webmaster of thunderbird-mail.de (the ONLY other place that has this information) with these changes. Hopefully he'll get my message.
Thanks!
Done, Thanks for the suggestions.
I have added and clarified in several places, plus notations under "Missing Log File"
- If linux, Variables MOZ_LOG and MOZ_LOG_file must be in quotation marks.
- If logging imap, you must use [[MailNews:Logging#Gecko_Logging|Gecko module logging]] using environment variables.
No. Thank YOU!