<DKIM> Re:[offlineimap] Duplicates of messages copied from remote to local (#174)
Peter Lewis
pete at muddygoat.org
Mon Jul 20 22:52:26 BST 2015
Hi,
A long time ago, in May, I described an issue I was having with
OfflineIMAP, whereby occasionally it would duplicate all the mails in
a folder, by redownloading them.
This was a recently introduced and intermittent fault (typically once
every few days), so was difficult to track down. Nicholas suggested to
try a git bisect, since it's a regression.
So, since then, I have been attempting to git bisect OfflineIMAP. I have
ended up with this commit being the culprit:
https://github.com/OfflineIMAP/offlineimap/commit/25513e90387f60831b94c6041de08db5ba12e95f
I don't know the codebase, so can't comment further, but it seems
plausible, given the commit message and a quick look at the code.
Note that this is a best guess bisect -- since the fault was
intermittent, I did a "git bisect good" after about a week of
usage of a particular version without any mail duplication.
I also noticed that it only seems to affect the Inbox of an account,
though this has been on two accounts, and this might have been
coincidence.
Under this email is a slimmed down version of my config, showing just
one of the affected accounts. I also took some seemingly irrelevant
things out, such as [mbnames].
Two slightly interesting things to point out from my config:
1) I use IDLE on the affected folder,
2) I use some nametrans stuff to map folder names.
Not sure if either of those should affect this.
Peter.
[general]
metadata = ~/.offlineimap
accounts = Personal
ui = ttyui
ignore-readonly = no
socktimeout = 120
folderfilter = lambda accountname,foldername: not re.search('(Trash$|Archive|Queue$|Calendar$|Contacts$|Journal$|Sync$|Tasks$)', foldername)
##################################################
# Accounts
##################################################
[Account Personal]
localrepository = LocalPersonal
remoterepository = RemotePersonal
autorefresh = 5
[Repository LocalPersonal
type = Maildir
localfolders = ~/mail
sep = /
restoreatime = no
# Reverse nametrans (or filter them out)
# Convert local folder names to remote ones:
nametrans = lambda foldername: re.sub('^Personal '',
re.sub('^Personal 'INBOX', foldername))
# This puts Personal before INBOX, then removes all the Personal prefixes.
# But only sync things from the Personal account:
folderfilter = lambda foldername: re.search('^Personal foldername)
[Repository RemotePersonal
type = IMAP
remotehost = example.com
ssl = yes
remoteuser = me
preauthtunnel = ssh -q example.com 'sudo /usr/lib/dovecot/imap -u me at example.com'
########## Advanced settings
maxconnections = 1
holdconnectionopen = no
subscribedonly = no
nametrans = lambda foldername: re.sub('^Personal\.INBOX$', 'Personal',
re.sub('^', 'Personal.', foldername))
idlefolders = ['INBOX']
More information about the OfflineIMAP-project
mailing list