offlineimap debugging - how can I get the Message-ID of a rejected mail?
rea at codelabs.ru
Tue Jul 1 04:56:59 BST 2014
Christian, good day.
Mon, Jun 30, 2014 at 01:07:21PM +0200, Christian Recktenwald wrote:
> I'm trying to synchronize a cyrus and a zarafa imap server.
> This does not work out as I get errors like these:
> [imap]: 44:13.83 10.1.11.31 writer > AGludmFsaWQAc2VjcmV0\r\n
> Thread 'Copy message from Local-someuser at mail-zarafa:Public folders/some/folder' terminated with exception:
> Traceback (most recent call last):
> File "/usr/lib/python2.7/dist-packages/offlineimap/threadutil.py", line 158, in run
> File "/usr/lib/python2.7/threading.py", line 763, in run
> self.__target(*self.__args, **self.__kwargs)
> File "/usr/lib/python2.7/dist-packages/offlineimap/folder/Base.py", line 358, in copymessageto
> new_uid = dstfolder.savemessage(uid, message, flags, rtime)
> File "/usr/lib/python2.7/dist-packages/offlineimap/folder/IMAP.py", line 554, in savemessage
> raise OfflineImapError(msg, OfflineImapError.ERROR.REPO)
> OfflineImapError: Saving msg in folder 'INBOX.some.folder', repository 'Remote-someuser at mail-zarafa' failed (abort). Server responded: NO ['Message contains invalid header']
> I thought it would help to understand what's going on if I just
> new /which/ mail is rejected, so I could track it down on the file
> system and investigate further.
> Therefore I'd need some more information regarding the rejected
> email itself, like the Message-ID header.
It is not possible with the current OfflineIMAP releases, but I had
just pushed two patches to the "next" branch that will make you to be
able to see message-id of the failed content.
> Offlineimap is version 6.5.5-0.1 from Debian.
Not sure that you will be able to directly apply these patches
on top of 6.5.5: too many modification since that release. You
can try to download current "next" from
unzip it and use the following wrapper script:
BASE=<directory you put unzipped files to>
if [ -z "$PYTHONPATH" ]; then
exec python "$BASE"/offlineimap.py "$@"
More information about the OfflineIMAP-project