In GNU/Linux, how can one start Thunderbird in the background, let it run for a few minutes for emails to be fetched, and close it afterwards?
It appears that thunderbird does not support this functionality, however, there are some discussions here and here that discuss options for doing this with your window manager/desktop environment. Essentially by running it minimized, with no system tray icon, etc.
To make it only run for a few minutes, you could start TB from a script:
Another option would be to use another program to download your mail for you, and have Thunderbird read the mail from your localdisk. OfflineIMAP does a good job if your mail server supports IMAP. Fetchmail is another option that works with POP3, as well.
The solution I've settled for (thanks to Flimzy's answer) is to use the following script, saved in, say,
together with the following
to run Thunderbird for 5 minutes once a day at midnight, to fetch emails, and have it closed afterwards.
Update: Even if the option "Check for new messages at startup" is selected (under Account Settings/Server Settings) Thunderbird does not start downloading new messages until after a folder of your email account is selected. (The version I've tested is 3.1.10 under Ubuntu 10.04 LTS.) To automate this selection at startup, the add-on