Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I want to use Thunderbird as an IMAP client to backup Gmail and would prefer to run it from a CRON... Basically want to wake it up, sync IMAP folders than shutdown... I tried offlineIMAP with no success and it seems that Thunderbird is a reasonable solution.

What would the command line settings be to have it check, download, then shutdown?

share|improve this question
If you want to backup Gmail you need to use POP not IMAP as IMAP only shows you what is on your server it doesn't download anything. – Allan Mar 2 '11 at 15:55
@Allan, that isn't strictly true. You can download IMAP content for later use, however, if a message is deleted from Gmail, when you sync your local imap it'll be deleted locally, too. – Amanda May 3 '11 at 17:33

Perhaps fetchmail would be better suited to what you're trying to accomplish?

share|improve this answer

I believe you can launch Thunderbird by just typing thunderbird in the terminal. As to auto checking, I believe Thunderbird has an option (burred in the settings somewhere) to check for new mail at start up. Also be sure that you're fetching the entire messages with IMAP and not just the headers. Otherwise it wont exactly be a backup.

share|improve this answer

If you just want to backup your Gmail account, maybe should you have a look at this post.
It's about the Backup Gmail script.
You can also set up automated incremental backups if i'm right (haven't personally tested it).

Usage: backup_dir email@address password

  -h, --help            show this help message and exit
  -r, --restore         Restore backup to online gmail account
  -i, --inc             Use incremental backup
  -k, --keep_status     Keep the mail read status (Slow)
                        Backup mail starting from this date. Format:
  -e END_DATE, --end=END_DATE
                        Backup mail until to this date Format: 30-Jan-2010
                        Only backup these labels. Separate labels by '^'
                        Format: label1^label2
                        Do not backup these labels. If --include is used this
                        flag will be ignored. Separate labels by '^' Format:
                        Load setting from config file
  -p PROFILE, --profile=PROFILE
                        Use this profile in the config file.
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.