Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I love the free webmail services out there but hate having years of mail tied up in one of these products.

I'm looking for a way to cache a mailbox locally but still be able to access it from a locally installed imap client.

I looked at offlineimap, which looks great except its doing a two-way sync. If mail gets deleted in gmail, it will also delete it in my local copy. There doesn't appear to be a way to configure it to do something that looks more like traditional pop access where the new message is copied locally and deleted from the remote source.

Has anyone done something like this before? I'm not tied to imap. If there is a pop based solution out there, I'm all ears. I'm using ubuntu 11.10.

share|improve this question

4 Answers 4

up vote 3 down vote accepted

The current behavior you describe is called "one-way sync" – all changes in one side, including deletion, are propagated to the other side.

For a permanent cache, look into getmail or fetchmail.

# ~/.getmail/getmailrc
[retriever]
  type = SimpleIMAPSSLRetriever
  server = imap.gmail.com
  username = ...
  password = ...
[destination]
  type = Maildir
  path = ~/backup/gmail

Both these programs support fetching from IMAP and POP3 mailboxes, but IMAP is usually preferred.

share|improve this answer
    
Exactly what I was looking for. Thanks. –  txyoji Dec 4 '11 at 18:18

OfflineIMAP does appear to support one-way sync (no updates to the actual mail server's mailbox): using the readonly = True option.

So a sample .offlineimap config file might be:

[Repository Gmailserver-foo]
#This is the remote repository
type = Gmail
remotepass = XXX
remoteuser = XXX
readonly = true

Also see createfolders option

Source and comments on the readonly option

share|improve this answer

Basically you want is an archive of mails. One way you can achieve it is you can automatically forward mails from your current mail account to another mail account. Most of all free mail services provide this facility. Then you setup offlineimap to sync this second mailbox locally. And never delete any mail from this second mailbox. Use this mailbox for only archiving.

share|improve this answer

this is my configuration file used to do one-way-sync from one gmail account to another

[general]
accounts = GmailMigration
socktimeout = 600
maxsize = 25000000

[Account GmailMigration]
localrepository = sourceAccount
remoterepository = dstAccount

[Repository sourceAccount]
type = IMAP
remotehost = imap.gmail.com
remoteport = 993
remoteuser = ...
remotepass = ...
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
readonly = true

[Repository dstAccount]
type = IMAP
remotehost = imap.gmail.com
remoteport = 993
remoteuser = ...
remotepass = ...
ssl = yes
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
share|improve this answer

Your Answer

 
discard

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.