Score:4

How to make Thunderbird mail sync in background without opening the app

br flag

How can I make thundermail sync E-mail in the background and notify of new e-mails as they arrive? Applications like Evolution have a background service that allows it to sync email even when the app is closed. Thundermail for me doesn't receive e-mail when I close the app. The answers here are outdated or rely on extensions that are not supported. I'm looking for a native way to do this. I read somewhere else that I had to enable the option "Allow immediate server notifications when new message arrives" from the account settings > server settings menu. Unfortunately this did not work. Any way to make this work?

Score:3
us flag

There is a application called Birdtray that kind of hides Thunderbird in the sense that there is only the Birdtray icon in the system tray, no minimized Thunderbird.

When you get an email, the system tray icon shows you by displaying a number of unread emails on the icon. You may be able to get sounds and notifications - not sure - I don't want that.

I do know you can set which folders to watch and change the icon colors based on which folder the email goes to.

You can read about it here: https://www.linuxuprising.com/2018/10/birdtray-thunderbird-tray-icon-with-new.html?m=1

The app is in the Ubuntu repos, at least for 20.04, but it is an older version there. There is an updated version in the 'linux uprising apps' ppa:

https://launchpad.net/~linuxuprising/+archive/ubuntu/apps

JackDaniels avatar
br flag
Thank you for your reply. I was looking for a native way to do this but this app seems to do the trick. Thanks
Score:2
jp flag

Thunderbird can run in headless mode, if you start it like so:

thunderbird --headless

It will still sync and notify you on new mail.

If your purpose is to just have Thunderbird, periodically, sync emails and notify you on new emails i.e. (to run an email pulling service) ... Then, you could use that with the timeout command like so:

timeout 30 thunderbird --headless

To run Thunderbird for just 30(or even less) seconds ... This will enable you to read emails and use the Thunderbird GUI app normally afterwards.

To automate that like a service, you can use it in a user cronjob that runs every say 10 minutes or alternatively, you can use it within a loop in a bash command string like so:

/bin/bash -c 'while true; do sleep 10m; timeout 30 thunderbird --headless; done'

and add it to your startup applications similar to this solution so it will automatically do the job every time you login by running Thunderbird(in headless mode) for 30 seconds every 10 minutes and allowing it to sync emails and notify you.

JackDaniels avatar
br flag
This worked partly for me. I opened Thunderbird through terminal using that command, but I had to leave terminal open in order for it to work. I tried using "thunderbird --headless & disown" which worked fine, but when trying to open thunderbird after getting notification it says that it is unable to open because it is already opened, which forced me to quit the app using system monitor.
Raffa avatar
jp flag
@JackDaniels I updated the answer to solve that as well :-)
JackDaniels avatar
br flag
Thank you for your suggestion. Although it works, it doesn't do push e-mail which is what I really need. I need to get the e-mail as it arrives. At this point leaving the app minimized seems to be the best bet.
Raffa avatar
jp flag
@JackDaniels You are most welcome … I wish I had a native solution for that one too :-) … There are, however, other non-Thunderbird solutions that you might find useful like [mailnag](https://github.com/pulb/mailnag)
Porcupine avatar
ar flag
@Thunderbird 115, Fedora 38: Getting this error: `[GFX1-]: RenderCompositorSWGL failed mapping default framebuffer, no dt` when started in headless mode, and it soes not show incoming email notification, unlike when GUI is opened
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.