I did a change in offlineimaprc and got duplicated messages

Marcelo Luiz de Laia marcelolaia at gmail.com
Sun Jun 12 23:47:50 BST 2011


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?

Thank you very much!

Marcelo
>From Brazil





More information about the OfflineIMAP-project mailing list