[Dovecot] dovcot+offlineimap+gmail: INBOX empty, mail doubled

Uwe Brauer oub at mat.ucm.es
Tue Dec 11 21:11:37 EET 2012


Hello

I have used for years 
offlineimap-6.2.0
dovecot-imapd 1:1.2.9
in Kubuntu 10.04

Together with a imap server of my university. Yesterday we
switched to google, which I know, is not a real imap server.

I have 2 problems and the first I think has to do with
either an old version of offlineimap or a bad configuration file:

    -  All folders are downloaded+ Gmail[All Mail] so
       doubling my mail.

    -  My INBOX folder is empty, however this is the only
       folder for which offlinemap gives the following
       warning:

Syncing INBOX: Gmail -> MappedIMAP
WARNING: UID validity problem for folder INBOX (repo
UniLocal) (saved 1309334376; got 1355232397); skipping it 


So maybe this is also a offlineimap fault. 

In any case I have googled around and found out that I am not
the only person suffering this problem. I have attached my
configuration file in the hope that may be somebody could
give me a hint.

Thanks in advance

Uwe Brauer 

--8<------------------------schnipp------------------------->8---
[general]
accounts = Uni
ui = Noninteractive.Basic
maxsyncaccounts = 1


[Account Uni]
localrepository = UniLocal
remoterepository = UniRemote

[Repository UniLocal]
type = IMAP
ssl = no
remotehost = localhost
remoteuser = myuser
remotepass = mypasswd
maxconnections = 2

[Repository UniRemote]
type = Gmail
# ssl =no
ssl =yes
#remotehost = ucimap.ucm.es
remotehost = imap.gmail.com
remoteuser = myuser
remotepass = mypasswd
#  nametrans = lambda foldername: re.sub ('^\[gmail\]', 'bak',
#                                 re.sub ('sent_mail', 'sent',
#                                 re.sub ('starred', 'flagged',
#                                 re.sub (' ', '_', foldername.lower()))))
folderfilter = lambda foldername: foldername in ['INBOX']
idlefolders = ['INBOX']
folderfilter = lambda foldername: foldername not in '[Gmail]/All Mail'
sslcacertfile = /etc/ssl/certs/ca-certificates.crt
maxconnections = 1
realdelete = yes
# Don't sync shared folders
# folderfilter = lambda foldername: not re.search('Shared Folders', foldername)

# automatic stuff
maxsyncaccounts = 1
quick = 10
autorefresh = 5
keepalive = 60
holdconnectionopen = yes
# This will suppress anything but errors
ui = quiet
--8<------------------------schnapp------------------------->8---


--8<------------------------schnipp------------------------->8---
version_ignore=yes
first_valid_uid = 1
log_path = /var/log/dovecot.log
ssl_cert_file = /etc/ssl/certs/dovecot.pem
ssl_key_file = /etc/ssl/private/dovecot.pem
# mail_location = maildir:/var/spool/mail/%u
# not sure about the following
mail_location = maildir:/var/spool/mail/%u:INBOX=/var/spool/mail/%u
maildir_copy_with_hardlinks = yes

protocol imap {
  listen = 127.0.0.1:143
  ssl_listen = 127.0.0.1:943
}
  
auth default {
  mechanisms = plain
  # defines users/passwords
  passdb passwd-file {
    args = /etc/dovecot/passwd
  }

  userdb static {
    args = uid=mail gid=mail home=/var/spool/mail/%u
  }
}

--8<------------------------schnapp------------------------->8---




More information about the dovecot mailing list