docker-offlineimap/offlineimap/folder
Rodolfo García Peñas (kix) 442c88d838 imaplib expect bytes in the append
imaplib2 is doing this code for strings:

        if isinstance(message, str):
            message = bytes(message, 'ASCII')

But our message is already encoded using 'utf-8'.
Then, we can set the message as bytes, encoded using 'utf-8'
in offlineimap and imaplib2 won't change our message.

This patch solves this problem:

WARNING:OfflineImap:
Traceback:
  File "/home/kix/src/offlineimap3/offlineimap/folder/Base.py", line 1127, in syncmessagesto
    action(dstfolder, statusfolder)
  File "/home/kix/src/offlineimap3/offlineimap/folder/Base.py", line 955, in __syncmessagesto_copy
    self.copymessageto(uid, dstfolder, statusfolder, register=0)
  File "/home/kix/src/offlineimap3/offlineimap/folder/Base.py", line 855, in copymessageto
    new_uid = dstfolder.savemessage(uid, message, flags, rtime)
  File "/home/kix/src/offlineimap3/offlineimap/folder/IMAP.py", line 668, in savemessage
    (typ, dat) = imapobj.append(self.getfullIMAPname(),
  File "/usr/lib/python3/dist-packages/imaplib2.py", line 660, in append
    message = bytes(message, 'ASCII')
2020-10-25 20:36:07 +01:00
..
__init__.py Removed extra line in offlineimap/folder/__init__.py 2020-08-29 20:41:27 +02:00
Base.py Base.py Comment unused code in savemessagelabels 2020-10-10 17:23:05 +02:00
Gmail.py Renamed variable already used 2020-10-10 17:24:18 +02:00
GmailMaildir.py Removed mutable arguments 2020-10-10 15:00:34 +02:00
IMAP.py imaplib expect bytes in the append 2020-10-25 20:36:07 +01:00
LocalStatus.py Removed mutable arguments 2020-10-10 15:00:34 +02:00
LocalStatusSQLite.py Removed mutable arguments 2020-10-10 15:00:34 +02:00
Maildir.py Remove email.Parse 2020-10-12 12:40:54 +02:00
UIDMaps.py Changed the doxygen in change_message_uid 2020-10-11 23:57:17 +02:00