3

I have Ubuntu 22.04 still installed on one partition and I recently installed Ubuntu 24.04 on another partition.

  • I've been using Thunderbird happily for a long time, most recently version 115.13.0 on my Ubuntu 22.04 partition.
  • I installed Thunderbird on the new 24.04 partition too, version 128.0esr. It correctly reads my emails (through imap), but it cannot send emails, save drafts or mark emails as read on the server.

So Thunderbird 115 works perfectly but Thunderbird 128 doesn't on the same GMail account (same problem with another non-GMail account). I checked the smtp settings carefully, they are identical.

It's possible I made a mistake, but I'm at a loss about what is going wrong. How can I diagnose and solve this problem?

Erwan
  • 289

2 Answers2

2

In case anybody is interested, I ended up removing the Thunderbird snap package and installing the Mozilla apt package. This installed Thunderbird 115.13.0 in 24.04, it solved the issue.

I'm disappointed that I didn't find any better solution: after all, isn't the snap version of Thunderbird supposed to be able to send emails too?

To change from snap to Mozilla apt, I followed this but with one more step:

  1. First, add the PPA by Mozilla Team.

    sudo add-apt-repository ppa:mozillateam/ppa
    
  2. Then, copy and paste the following code in a terminal in one go (don't copy-paste line by line) to prioritize the apt version of thunderbird over the snap version.

    echo '
    Package: *
    Pin: release o=LP-PPA-mozillateam
    Pin-Priority: 1001
    

    Package: thunderbird Pin: version 2:1snap* Pin-Priority: -1 ' | sudo tee /etc/apt/preferences.d/thunderbird

  3. Next, remove the snap version of thunderbird.

    sudo snap remove thunderbird
    
  4. Remove the transitional package from apt (otherwise apt says the package is already installed):

    sudo apt remove thunderbird
    
  5. Install Thunderbird with apt.

    sudo apt install thunderbird
    
  6. To ensure that unattended upgrades do not reinstall the snap version of Thunderbird, enter the following command.

    echo 'Unattended-Upgrade::Allowed-Origins:: "LP-PPA-mozillateam:${distro_codename}";' | sudo tee /etc/apt/apt.conf.d/51unattended-upgrades-thunderbird
    
Erwan
  • 289
1

I had a similar problem on Ubuntu 24.04 (upgrading from 22.04).

As it's been said in a comment, this is due to Thunderbird being installed as a snap package (instead of an apt/deb package).

I also considered purging the snap version to then install Thunderbird via apt, but, all things being considered, snap has some (few) advantages, like sandboxing (flatpak is also an option actually, but since snap is the new Ubuntu "standard", my goal was to try and fix that beast). So next was an interesting troubleshooting experience (I didn't say fun).

The symptoms were

  • cannot send mail
  • cannot save mail (draft)

All eyes pointed to the heavily criticized snap environment. But it happens that it was not the case, not directly at least.

Sending an email and then doing

# journalctl -e --no-pager | grep DENIED
apparmor="DENIED" operation="mkdir" class="file" profile="snap.thunderbird.thunderbird" name="/home/me/Downloads/thunderbird.tmp/

Interesting. Adding a rule in apparmor.d was out of question. Why would TB mkdir in my Downloads?

Looking for a setting in TB Settings / Config editor (bottom), and "Show all". Doing ^f (otherwise the search is only in the variables name), only messenger.save.dir had this dir, and changing it did not improve the situation.

Looking at the source code (3 GB! There must be an LLM hidden somewhere!), at first glance it seems the snap install comm/taskcluster/docker/tb-snap/tmpdir.sh sets the TMPDIR to the XDG var for downloads (i.e. the user's Downloads dir). Why did they use xdg-user-dir instead of something more "snapy" (thus accessible) is strange. Maybe it's a temporary setting.

Anyway to fix the problem, while keeping the snap version without customizing too much or touching apparmor, I did for the time being (with my me user)

mkdir /home/me/snap/thunderbird/common/.thunderbird/<profile>/thunderbird.tmp
cd ~/Downloads 
# Remove 'thunderbird.tmp' if it exists
ln -s /home/me/snap/thunderbird/common/.thunderbird/<profile>/thunderbird.tmp

And that works.

Déjà vu
  • 1,089