diff --git a/offlineimap/folder/IMAP.py b/offlineimap/folder/IMAP.py index f1d6d50..e18cb51 100644 --- a/offlineimap/folder/IMAP.py +++ b/offlineimap/folder/IMAP.py @@ -150,7 +150,7 @@ class IMAPFolder(BaseFolder): def savemessage_searchforheader(self, imapobj, headername, headervalue): if imapobj.untagged_responses.has_key('APPENDUID'): - return long(imapobj.untagged_responses['APPENDUID'][0].split(' ')[1]) + return long(imapobj.untagged_responses['APPENDUID'][-1].split(' ')[1]) ui = UIBase.getglobalui() ui.debug('imap', 'savemessage_searchforheader called for %s: %s' % \