This bug was introduced in v68.x and it is not yet fixed, awaiting this to be fixed here is a workaround, note that tmp/ns* files are required for TB v68 to work correctly.
Workaround I:
As suggested on the comments a custom temporary file can be used, you can then apply different restrictions to that specific temporary folder, also note that the environment variable changes does not need to be applied widely.
Edit the .desktop file used to run Thunderbird (usually under /usr/share/applications) by changing the Exec= line to the following command or launch Thunderbird with the given command:
export TMPDIR=/home/my/new/tmpdir; export TMP=$TMPDIR; thunderbird; rm -rf /home/my/new/tmpdir/ns*
This will set $TMPDIR and $TMP variable to a custom location, then Thunderbird is run and finally when it's closed rm -rf /home/my/new/tmpdir/ns* will delete tmp leftover.
Note that env. variable changes will just affect Thunderbird if this is ran from a bash or .desktop file. Otherwise if this command is ran directly from a terminal changes to $TMP will affect commands launched after this command.
Workaround II:
We can use a script to do the job manually while Thunderbird is used; To do so we would edit the .desktop file with the following:
Exec=env TMPDIR=/tmp /usr/bin/thunderbird & /path/to/watch-tb-script.sh
Where cat watch-tb-script.sh would be:
#!/bin/sh
[[ $(ps all -e | grep thunderbird | grep -v color | grep -v grep) ]]
while [[ "$?" == 0 ]]
do
for i in /tmp/ns*; do
if [ -f "$i" ]; then
rm -rf $i;
sleep 10s;
fi;
done;
sleep 60s;
[[ $(ps all -e | grep thunderbird | grep -v color | grep -v grep) ]]
done;
This script will keep running while thunderbird is opened, check for /tmp/ns* files and do remove each file every 10 sec then the script will sleep 60 sec before the next check.
TMPenvironment variable to point to e.g.$HOME/.cache/thunderbirdbefore starting Thunderbird? – telcoM Apr 13 '20 at 09:32nsmail-1.tmpis created not while editing, but after the email is sent. – Martin Vegter Apr 13 '20 at 10:07TMPactually works. – Martin Vegter Apr 13 '20 at 10:08thunderbird; rm /tmp/nsmail* /tmp/nscopy*. If you startthunderbirdfrom GUI you can replace$(command -v thunderbird)with a wrapper. Of course ideally this bug should be solved in Thunderbird itself https://bugzilla.mozilla.org/show_bug.cgi?id=1589890 – Arkadiusz Drabczyk Apr 13 '20 at 13:44The system: Win7SP164bit with now latest TB 78.8.0. We met this problem earlier on some Win 7 and 10 systems with mixed TB versions, and unknowing the real cause we solved the problem by removing TB, cleaning the system and meanwhile cleaning the temp folders as well.
– Tylla Mar 05 '21 at 14:35