• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: use Sheeva to backup imap mail account(s)  (Read 2373 times)
Jr. Member

Karma: 2
Posts: 88

View Profile
« on: November 16, 2009, 03:35:34 AM »

I have several IMAP mail accounts and searched for an easy automated backup procedure. I succeeded by installing imapsync on the plug and create a cronjob to backup my mailaccounts to my Google account. I use this google account just for this backup.
Each mailaccount has 2 seperate cronjob's. The first one makes a backup every 12 hours and copies just the new mails to google, the second one runs once a month and besides copying the new ones, it also deletes mails from google which are deleted from the original mailaccount. Of course you can adjust this as you please.
The benefit from this backup procedure is that i don't need to install a mailserver (too complicated), there is no writing done on the sheeva (wearing out of sd-card, nand), does not take up any space on the sheeva.

To install imapsync on the sheeva just do a apt-get install imapsync. Then create a file with your password and put it somewhere on your sheeva. chmod 600 to the file. Create another one with your google pasword.

Then create a cronjob with the following command:

imapsync --syncinternaldates --host1 AA --user1 BB --passfile1 CC --host2 imap.gmail.com --port2 993 --ssl2 --user2 DD --passfile2 EE --noauthmd5 --exclude 'INBOX.Junk|INBOX.Trash|INBOX.Drafts|INBOX.Spam' --useheader 'Message-Id'  --skipsize --prefix2 '[FF]/' --delete2

AA = mailserver addres (i.e. mail.mail.com)
BB = username
CC = location of passfile (i.e. /etc/passfile1)
DD = username for google
EE = location of passfile 2
FF = when you use this procedure to backup more then 1 mailaccount, you can specify a name so each account gets it's own name in google
delete2 indicates that all mail which is not on mailaccount 1 will be removed from your google backup. you can remove it if this is not wanted


Pages: [1]
Jump to: