I did a change in offlineimaprc and got duplicated messages

Nicolas Sebrecht nicolas.s-dev at laposte.net
Mon Jun 13 10:24:23 BST 2011


On Sun, Jun 12, 2011 at 10:47:50PM +0000, Marcelo Luiz de Laia wrote:
> 
> Hi,
> 
> I changed the .offlineimaprc and got duplicated messages.
> 
> After googled, I have found this:
> 
> http://stuvel.eu//blog/109/removing-duplicate-mails
> 
> But, it didnt work for me!
> 
> After run it in GMail/Enviados dir, I got:
> 
> :~/Mail/GMail/Enviados$ python removedups.py 
> Traceback (most recent call last):
>   File "removedups.py", line 38, in <module>
>     dedupe(dir)
>   File "removedups.py", line 18, in dedupe
>     for (key, message) in box.iteritems():
>   File "/usr/lib/python2.6/mailbox.py", line 124, in iteritems
>     for key in self.iterkeys():
>   File "/usr/lib/python2.6/mailbox.py", line 352, in iterkeys
>     self._refresh()
>   File "/usr/lib/python2.6/mailbox.py", line 473, in _refresh
>     for entry in os.listdir(subdir_path):
> OSError: [Errno 2] No such file or directory:
> '/home/marcelo/Mail/GMail/Enviados/new/new'
> 
> If I run it on GMail dir, instead, I got:
> 
> :~/Mail/GMail$ python removedups.py 
> Traceback (most recent call last):
>   File "removedups.py", line 38, in <module>
>     dedupe(dir)
>   File "removedups.py", line 19, in dedupe
>     mid = message['Message-Id']
>   File "/usr/lib/python2.6/rfc822.py", line 388, in __getitem__
>     return self.dict[name.lower()]
> KeyError: 'message-id'
> :~/Mail/GMail$ 
> 
> Have you any trick to do?

What's your offlineimap version?

-- 
Nicolas Sebrecht




More information about the OfflineIMAP-project mailing list