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.