<p>I have been running offlineimap for going on a month now, and every week or so I see an issue where it will begin downloading two copies of each incoming message. Quitting and re-starting offlineimap fixes the problem. I am using offlineimap in combination with davmail to access an Office365 mailbox, but I don't think the problem is in that end since restarting offlineimap fixes it.</p>

<p>Here's my .offlineimaprc:</p>

<pre><code>[general]
accounts = davmail

[Account davmail]
localrepository = Local
remoterepository = Remote
autorefresh = 1
postsynchook = ~/bin/offlineimap-notmuch-hook

[Repository Local]
type = Maildir
localfolders = ~/.mail/

[Repository Remote]
type = IMAP
remotehost = localhost
remoteport = 1143
remoteuser = ...
keepalive = 60
holdconnectionopen = yes
idlefolders = ['INBOX']
folderfilter = lambda foldername: foldername in ['INBOX']
</code></pre>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br>Reply to this email directly or <a href="https://github.com/OfflineIMAP/offlineimap/issues/174">view it on GitHub</a>.<img alt="" height="1" src="https://github.com/notifications/beacon/AKFSELC-xU2-5qv6R0_30Bh9Y4A1OO6-ks5nzdvcgaJpZM4Dr024.gif" width="1" /></p>
<div itemscope itemtype="http://schema.org/EmailMessage">
  <div itemprop="action" itemscope itemtype="http://schema.org/ViewAction">
    <link itemprop="url" href="https://github.com/OfflineIMAP/offlineimap/issues/174"></link>
    <meta itemprop="name" content="View Issue"></meta>
  </div>
  <meta itemprop="description" content="View this Issue on GitHub"></meta>
</div>