joeyates / imap-backup

Backup and Migrate IMAP Email Accounts
MIT License
1.33k stars 74 forks source link

incompatible character encodings: UTF-8 and ASCII-8BIT #156

Closed garymoon closed 10 months ago

garymoon commented 1 year ago

Hello,

I believe I have a reproducible case for this issue. It's worth noting that this also breaks sync with Thunderbird and isync/mbsync.

Below is the -v output (semi-anonymized with [snip]) of imap-backup attempting to sync a directory with a message in it that appears to break Dovecot. This pattern will repeat with a small pause between attempts. There are three such messages in my mailbox.

For anyone else encountering this issue: To temporarily work around this I added instances of uids.delete([UID]) at the top of run in lib/imap/backup/downloader.rb for each offending message.

@joeyates I'm happy to share verbatim copies of the bad messages privately, directly copied from the server's maildir, but of course there's no guarantee this condition will be reproducible even with the verbatim messages. I'm happy to get you any further information you'd like, and apply any code changes for testing, but I would like to remove the bad messages as soon as I can so I have a working mailbox again haha :sob:

Some unsolicited ideas that would make problems of this type less of an issue:

Thank you muchly for imap-backup! :blue_heart:

imap-backup output

I, [2023-05-12T03:03:04.373303 #545]  INFO -- : Running backup of account: [snip]@[snip]
D, [2023-05-12T03:03:04.373382 #545] DEBUG -- : Creating IMAP instance: [snip], options: {:port=>993, :ssl=>{:ssl_version=>:TLSv1_2}}
D, [2023-05-12T03:03:04.373414 #545] DEBUG -- : Logging in: [snip]@[snip]/xxxxxxxxxxx
S: * OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE LITERAL+ AUTH=PLAIN AUTH=LOGIN] Dovecot (Ubuntu) ready.
C: RUBY0001 LOGIN [snip]@[snip] [PASSWORD REDACTED]
S: RUBY0001 OK [CAPABILITY IMAP4rev1 SASL-IR LOGIN-REFERRALS ID ENABLE IDLE SORT SORT=DISPLAY THREAD=REFERENCES THREAD=REFS THREAD=ORDEREDSUBJECT MULTIAPPEND URL-PARTIAL CATENATE UNSELECT CHILDREN NAMESPACE UIDPLUS LIST-EXTENDED I18NLEVEL=1 CONDSTORE QRESYNC ESEARCH ESORT SEARCHRES WITHIN CONTEXT=SEARCH LIST-STATUS BINARY MOVE SNIPPET=FUZZY PREVIEW=FUZZY LITERAL+ NOTIFY SPECIAL-USE] Logged in
D, [2023-05-12T03:03:04.777424 #545] DEBUG -- : Login complete
C: RUBY0002 LIST "" ""
S: * LIST (\Noselect) "." ""
S: RUBY0002 OK List completed (0.001 + 0.113 + 0.112 secs).
C: RUBY0003 LIST "" "*"
S: * LIST (\HasChildren) "." INBOX
S: * LIST (\HasNoChildren) "." INBOX.old-messages
S: * LIST (\HasNoChildren) "." INBOX.me
S: * LIST (\HasNoChildren \Trash) "." INBOX.Trash
S: * LIST (\HasNoChildren) "." INBOX.Templates
S: * LIST (\HasNoChildren \Junk) "." INBOX.Spam
S: * LIST (\HasNoChildren \Sent) "." INBOX.Sent
S: * LIST (\HasNoChildren) "." "INBOX.Sent Items"
S: * LIST (\HasNoChildren \Junk) "." INBOX.Junk
S: * LIST (\HasNoChildren) "." INBOX.GitHub
S: * LIST (\HasNoChildren \Drafts) "." INBOX.Drafts
S: * LIST (\HasChildren) "." INBOX.Archives
S: * LIST (\HasNoChildren) "." INBOX.Archives.2021
S: * LIST (\HasNoChildren) "." INBOX.Archives.2020
S: * LIST (\HasNoChildren) "." INBOX.Archives.2019
S: * LIST (\HasNoChildren) "." INBOX.Archives.2018
S: * LIST (\HasNoChildren) "." INBOX.Archives.2015
S: RUBY0003 OK List completed (0.002 + 0.073 + 0.073 secs).
C: RUBY0004 EXAMINE INBOX
S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft unknown-1 $MDNSent)
S: * OK [PERMANENTFLAGS ()] Read-only mailbox.
S: * 3826 EXISTS
S: * 8 RECENT
S: * OK [UNSEEN 600] First unseen.
S: * OK [UIDVALIDITY 1683653437] UIDs valid
S: * OK [UIDNEXT 3834] Predicted next UID
S: RUBY0004 OK [READ-ONLY] Examine completed (0.007 + 0.071 + 0.077 secs).
D, [2023-05-12T03:03:05.269811 #545] DEBUG -- : [INBOX] running backup
C: RUBY0005 UID SEARCH ALL
[snip]
S: RUBY0005 OK Search completed (0.010 + 0.110 + 0.009 secs).
D, [2023-05-12T03:03:05.612653 #545] DEBUG -- : [INBOX] 0 new messages
C: RUBY0006 EXAMINE INBOX.old-messages
S: * OK [CLOSED] Previous mailbox closed.
S: * FLAGS (\Answered \Flagged \Deleted \Seen \Draft unknown-0 unknown-1 unknown-2 unknown-3)
S: * OK [PERMANENTFLAGS ()] Read-only mailbox.
S: * 92449 EXISTS
S: * 0 RECENT
S: * OK [UNSEEN 84187] First unseen.
S: * OK [UIDVALIDITY 1683653438] UIDs valid
S: * OK [UIDNEXT 92450] Predicted next UID
S: RUBY0006 OK [READ-ONLY] Examine completed (0.084 + 0.068 + 0.151 secs).
D, [2023-05-12T03:03:05.835507 #545] DEBUG -- : [INBOX.old-messages] running backup
C: RUBY0007 UID SEARCH ALL
S: RUBY0007 OK Search completed (0.114 + 0.068 + 0.113 secs).
D, [2023-05-12T03:03:07.768162 #545] DEBUG -- : [INBOX.old-messages] 6 new messages
C: RUBY0008 UID FETCH 6012 (BODY[] FLAGS)
S: * 6012 FETCH (UID 6012 FLAGS (\Seen) BODY[] {4372}
S: Return-Path: <[snip]+caf_=[snip]=[snip]@gmail.com>
S: X-Original-To: [snip]@[snip]
S: Delivered-To: [snip]@[snip]
S: Received: from mail-qa0-f54.google.com (mail-qa0-f54.google.com [209.85.216.54])
S:  (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits))
S:  (No client certificate requested)
S:  by [snip] (Postfix) with ESMTPS id 991AC64A26FB4
S:  for <[snip]@[snip]>; Fri,  6 Jun 2014 11:51:01 -0700 (PDT)
S: Received: by mail-qa0-f54.google.com with SMTP id j15so4591377qaq.27
S:         for <[snip]@[snip]>; Fri, 06 Jun 2014 11:51:00 -0700 (PDT)
S: X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
S:         d=1e100.net; s=20130820;
S:         h=x-original-authentication-results:delivered-to:date:message-id
S:          :content-type:subject:to:from:to:reply-to:mime-version;
S:         bh=8CsGv1p6crGc5+D4BRpn4arf62FlBye7a6j0UFz5UVQ=;
S:         b=BQA6JkorPx4WnsCjXpjapf5ksobIlG2lm1+kuGpnInpUY2mFhCxtSXsB/yTfKw3601
S:          DBQaCm/0JmKABrYjpp3S5QVJfVW/nb1SG8Tau90Yf6RT8lLd/YgAXGvKwls9BCSZOGgu
S:          sMgjd3Gus1qtcSVR6Tqwm3nyAY5o1eorKO7Q37zibAPEeiiOWcyhlzfXqtRfVb8oNoPW
S:          1SeSkX/8Dq+kqJVhPSoONngB6fDR/bcODRNTIg7D4N/AXe0snOYh0LAN7wln63dExZ/q
S:          vbBPGTKg+qoDmKr3XjN7IAPoLwRCtMFPCToA+vo/BAhk/epZCmeFzwYOILGdsHJDCLRm
S:          gRRw==
S: X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com: domain of jvftyuvxrwtged6qoy@unirsm.sm designates 178.63.171.4 as permitted sender) smtp.mail=jvftyuvxrwtged6qoy@unirsm.sm
S: X-Received: by 10.140.50.168 with SMTP id s37mr11289259qga.36.1402080660864;
S:         Fri, 06 Jun 2014 11:51:00 -0700 (PDT)
S: X-Forwarded-To: [snip]@[snip]
S: X-Forwarded-For: [snip]@gmail.com [snip]@[snip]
S: Delivered-To: [snip]@gmail.com
S: Received: by 10.96.174.225 with SMTP id bv1csp158806qdc;
S:         Fri, 6 Jun 2014 11:51:00 -0700 (PDT)
S: X-Received: by 10.180.37.198 with SMTP id a6mr27944172wik.58.1402080659963;
S:         Fri, 06 Jun 2014 11:50:59 -0700 (PDT)
S: Received: from icmpm89-ukl056-set.flagtalk.net (static.4.171.63.178.clients.your-server.de. [178.63.171.4])
S:         by mx.google.com with ESMTP id na16si17931534wic.50.2014.06.06.11.50.59
S:         for <[snip]@gmail.com>;
S:         Fri, 06 Jun 2014 11:50:59 -0700 (PDT)
S: Received-SPF: pass (google.com: domain of jvftyuvxrwtged6qoy@unirsm.sm designates 178.63.171.4 as permitted sender) client-ip=178.63.171.4;
S: Authentication-Results: mx.google.com;
S:        spf=pass (google.com: domain of jvftyuvxrwtged6qoy@unirsm.sm designates 178.63.171.4 as permitted sender) smtp.mail=jvftyuvxrwtged6qoy@unirsm.sm
S: Date: Fri, 06 Jun 2014 11:50:59 -0700 (PDT)
S: Received: from 127.0.0.1 (127.0.0.1) by localhost 
S: Message-ID: <7BeNp.cOgHmMjtrRNOuot.qmail@localhost.localsomain>
S: Content-Type:multipart/alternative;boundary=Xaz3zScfeHq;
S: Subject: Attn_7OO_is_a_g00d_sc0re._View_y0urs_n0w
S: To: [snip]@gmail.com
S: From: <★FS36O★@bbc.co.uk>
S: To: [snip]@gmail.com
S: Reply-To: <reply@dmPp5vh.izugsoYmQFzc.gawker.com>
S: MIME-Version: 1.0
S: X-MSGID:5nqITQ7wtVg
S: 
S: --Xaz3zScfeHq
S: Content-Type: text/plain ;
S: 
S: 
S: 
S: 
S: 
S: 
S: <google.com>
S: --Xaz3zScfeHq
S: Content-Type: text/html; 
S: 
S: <html>
S: <base href='http://64.131.70.42:80//'/>
S: <title>
S: <google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com>
S:  <google.com><google.com><google.com><google.com><google.com>
S: </title>
S: <center>
S: <a href='/RLI=79-UI=61160123-OI=2216-ONI=89511-SI=148821-CI=2768799-BI=0-II=1074769-IDSP=58-KLEM=11-TIE=1-IDE=2917749-MID=254-FID=39163-DIOM=0:1'><img src =' /53920ac800ca7.jpg' /></a><br><br>
S: </center>
S: <center>
S: <a  href='/UALI=79-UI=61160123-OI=2216-ONI=89511-SI=148821-CI=2768799-BI=0-II=1074769-IDSP=58-KLEM=11-TIE=1-IDE=2917749-MID=254-FID=39163-DIOM=0:1'><img src =' /53920ac800d9d.jpg' /></a>
S: </center>
S: <center>
S: <a  href='/ULI=79-UI=61160123-OI=2216-ONI=89511-SI=148821-CI=2768799-BI=0-II=1074769-IDSP=58-KLEM=11-TIE=1-IDE=2917749-MID=254-FID=39163-DIOM=0:1'><img src =' /53920ac800e24.jpg' /></a>
S: </center>
S: </html>
S: 
S: 
S: --Xaz3zScfeHq--
S: )
S: RUBY0008 OK Fetch completed (0.213 + 0.068 + 0.212 secs).
D, [2023-05-12T03:03:08.119807 #545] DEBUG -- : [INBOX.old-messages] uid: 6012 (1/6) - 4372 bytes
W, [2023-05-12T03:03:08.503168 #545]  WARN -- : [INBOX.old-messages] failed to append message 6012:
Return-Path: <[snip]+caf_=[snip]=[snip]@gmail.com>
X-Original-To: [snip]@[snip]
Delivered-To: [snip]@[snip]
Received: from mail-qa0-f54.google.com (mail-qa0-f54.google.com [209.85.216.54])
(using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits))
(No client certificate requested)
by [snip] (Postfix) with ESMTPS id 991AC64A26FB4
for <[snip]@[snip]>; Fri,  6 Jun 2014 11:51:01 -0700 (PDT)
Received: by mail-qa0-f54.google.com with SMTP id j15so4591377qaq.27
for <[snip]@[snip]>; Fri, 06 Jun 2014 11:51:00 -0700 (PDT)
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20130820;
h=x-original-authentication-results:delivered-to:date:message-id
:content-type:subject:to:from:to:reply-to:mime-version;
bh=8CsGv1p6crGc5+D4BRpn4arf62FlBye7a6j0UFz5UVQ=;
b=BQA6JkorPx4WnsCjXpjapf5ksobIlG2lm1+kuGpnInpUY2mFhCxtSXsB/yTfKw3601
DBQaCm/0JmKABrYjpp3S5QVJfVW/nb1SG8Tau90Yf6RT8lLd/YgAXGvKwls9BCSZOGgu
sMgjd3Gus1qtcSVR6Tqwm3nyAY5o1eorKO7Q37zibAPEeiiOWcyhlzfXqtRfVb8oNoPW
1SeSkX/8Dq+kqJVhPSoONngB6fDR/bcODRNTIg7D4N/AXe0snOYh0LAN7wln63dExZ/q
vbBPGTKg+qoDmKr3XjN7IAPoLwRCtMFPCToA+vo/BAhk/epZCmeFzwYOILGdsHJDCLRm
gRRw==
X-Original-Authentication-Results: mx.google.com;       spf=pass (google.com: domain of jvftyuvxrwtged6qoy@unirsm.sm designates 178.63.171.4 as permitted sender) smtp.mail=jvftyuvxrwtged6qoy@unirsm.sm
X-Received: by 10.140.50.168 with SMTP id s37mr11289259qga.36.1402080660864;
Fri, 06 Jun 2014 11:51:00 -0700 (PDT)
X-Forwarded-To: [snip]@[snip]
X-Forwarded-For: [snip]@gmail.com [snip]@[snip]
Delivered-To: [snip]@gmail.com
Received: by 10.96.174.225 with SMTP id bv1csp158806qdc;
Fri, 6 Jun 2014 11:51:00 -0700 (PDT)
X-Received: by 10.180.37.198 with SMTP id a6mr27944172wik.58.1402080659963;
Fri, 06 Jun 2014 11:50:59 -0700 (PDT)
Received: from icmpm89-ukl056-set.flagtalk.net (static.4.171.63.178.clients.your-server.de. [178.63.171.4])
by mx.google.com with ESMTP id na16si17931534wic.50.2014.06.06.11.50.59
for <[snip]@gmail.com>;
Fri, 06 Jun 2014 11:50:59 -0700 (PDT)
Received-SPF: pass (google.com: domain of jvftyuvxrwtged6qoy@unirsm.sm designates 178.63.171.4 as permitted sender) client-ip=178.63.171.4;
Authentication-Results: mx.google.com;
spf=pass (google.com: domain of jvftyuvxrwtged6qoy@unirsm.sm designates 178.63.171.4 as permitted sender) smtp.mail=jvftyuvxrwtged6qoy@unirsm.sm
Date: Fri, 06 Jun 2014 11:50:59 -0700 (PDT)
Received: from 127.0.0.1 (127.0.0.1) by localhost 
Message-ID: <7BeNp.cOgHmMjtrRNOuot.qmail@localhost.localsomain>
Content-Type:multipart/alternative;boundary=Xaz3zScfeHq;
Subject: Attn_7OO_is_a_g00d_sc0re._View_y0urs_n0w
To: [snip]@gmail.com
From: <★FS36O★@bbc.co.uk>
To: [snip]@gmail.com
Reply-To: <reply@dmPp5vh.izugsoYmQFzc.gawker.com>
MIME-Version: 1.0
X-MSGID:5nqITQ7wtVg
--Xaz3zScfeHq
Content-Type: text/plain ;
<google.com>
--Xaz3zScfeHq
Content-Type: text/html; 
<html>
<base href='http://64.131.70.42:80//'/>
<title>
<google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com><google.com>
<google.com><google.com><google.com><google.com><google.com>
</title>
<center>
<a href='/RLI=79-UI=61160123-OI=2216-ONI=89511-SI=148821-CI=2768799-BI=0-II=1074769-IDSP=58-KLEM=11-TIE=1-IDE=2917749-MID=254-FID=39163-DIOM=0:1'><img src =' /53920ac800ca7.jpg' /></a><br><br>
</center>
<center>
<a  href='/UALI=79-UI=61160123-OI=2216-ONI=89511-SI=148821-CI=2768799-BI=0-II=1074769-IDSP=58-KLEM=11-TIE=1-IDE=2917749-MID=254-FID=39163-DIOM=0:1'><img src =' /53920ac800d9d.jpg' /></a>
</center>
<center>
<a  href='/ULI=79-UI=61160123-OI=2216-ONI=89511-SI=148821-CI=2768799-BI=0-II=1074769-IDSP=58-KLEM=11-TIE=1-IDE=2917749-MID=254-FID=39163-DIOM=0:1'><img src =' /53920ac800e24.jpg' /></a>
</center>
</html>
--Xaz3zScfeHq--
. incompatible character encodings: UTF-8 and ASCII-8BIT:
/usr/local/bundle/gems/imap-backup-9.3.0/lib/email/mboxrd/message.rb:31:in `+'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/email/mboxrd/message.rb:31:in `to_serialized'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/serializer/appender.rb:37:in `do_append'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/serializer/appender.rb:27:in `run'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/serializer.rb:130:in `append'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/downloader.rb:96:in `handle_uid_and_body'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/downloader.rb:77:in `block in download_block'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/downloader.rb:76:in `each'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/downloader.rb:76:in `with_index'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/downloader.rb:76:in `download_block'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/downloader.rb:34:in `block in run'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/downloader.rb:33:in `each'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/downloader.rb:33:in `each_slice'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/downloader.rb:33:in `with_index'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/downloader.rb:33:in `run'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/account/connection.rb:64:in `block in run_backup'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/account/connection.rb:122:in `block in each_folder'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/account/connection.rb:120:in `each'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/account/connection.rb:120:in `each_folder'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/account/connection.rb:46:in `run_backup'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/cli/backup.rb:17:in `block in run'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/cli/helpers.rb:93:in `block in each_connection'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/cli/helpers.rb:90:in `each'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/cli/helpers.rb:90:in `each_connection'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/cli/backup.rb:16:in `run'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/cli.rb:58:in `backup'
/usr/local/bundle/gems/thor-1.2.1/lib/thor/command.rb:27:in `run'
/usr/local/bundle/gems/thor-1.2.1/lib/thor/invocation.rb:127:in `invoke_command'
/usr/local/bundle/gems/thor-1.2.1/lib/thor.rb:392:in `dispatch'
/usr/local/bundle/gems/thor-1.2.1/lib/thor/base.rb:485:in `start'
/usr/local/bundle/gems/imap-backup-9.3.0/bin/imap-backup:12:in `block in <top (required)>'
/usr/local/bundle/gems/imap-backup-9.3.0/lib/imap/backup/logger.rb:39:in `sanitize_stderr'
/usr/local/bundle/gems/imap-backup-9.3.0/bin/imap-backup:11:in `<top (required)>'
/usr/local/bundle/bin/imap-backup:25:in `load'
/usr/local/bundle/bin/imap-backup:25:in `<main>'"

C: RUBY0009 UID FETCH 39910 (BODY[] FLAGS)
S: * 39910 FETCH (UID 39910 FLAGS (\Seen))
S: * BYE FETCH failed: Internal error occurred. Refer to server log for more information. [2023-05-11 20:03:08]

Including the isync/mbsync error here for Googlers since it's vastly easier to work around in imap-backup.

IMAP error: received extraneous data in FETCH response
joeyates commented 1 year ago

Hi @garymoon

This looks promising in helping work towards a workaround for this problem.

I'll message you via your commit email.

garymoon commented 1 year ago

Thanks for looking into this Joe! I've replied to your email with unredacted output :+1:

joeyates commented 1 year ago

@garymoon I've pushed a pre-release with a fix for this: 9.4.0.pre1

Please give it a try!

Note that this is for the character encoding problem only. The log shows a failed fetch at the end (UID 39910), for which I think there is nothing to be done.

patric-r commented 11 months ago

It still happens in 11.0.1.

E, [2023-08-04T19:21:44.791071 #2081] ERROR -- : Backup for account 'user@domain.com' failed with error incompatible character encodings: UTF-8 and ASCII-8BIT
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/email/mboxrd/message.rb:31:in `+'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/email/mboxrd/message.rb:31:in `to_serialized'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/serializer/delayed_metadata_serializer.rb:35:in `append'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/downloader.rb:95:in `handle_uid_and_body'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/downloader.rb:78:in `block in download_block'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/downloader.rb:77:in `each'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/downloader.rb:77:in `with_index'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/downloader.rb:77:in `download_block'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/downloader.rb:32:in `block in run'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/downloader.rb:31:in `each'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/downloader.rb:31:in `each_slice'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/downloader.rb:31:in `with_index'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/downloader.rb:31:in `run'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/account/backup.rb:76:in `block in backup_folder'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/serializer/delayed_metadata_serializer.rb:25:in `block (2 levels) in transaction'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/serializer/mbox.rb:19:in `block in transaction'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/serializer/transaction.rb:17:in `begin'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/serializer/mbox.rb:18:in `transaction'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/serializer/delayed_metadata_serializer.rb:24:in `block in transaction'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/serializer/transaction.rb:17:in `begin'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/serializer/delayed_metadata_serializer.rb:23:in `transaction'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/account/backup.rb:75:in `backup_folder'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/account/backup.rb:38:in `block in run'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/account/backup_folders.rb:39:in `block in each'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/account/backup_folders.rb:39:in `each'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/account/backup_folders.rb:39:in `each'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/account/backup.rb:37:in `run'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/cli/backup.rb:29:in `block in run'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/cli/backup.rb:27:in `each'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/cli/backup.rb:27:in `run'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/cli.rb:72:in `backup'
/home/user/.local/share/gem/ruby/3.2.0/gems/thor-1.2.2/lib/thor/command.rb:27:in `run'
/home/user/.local/share/gem/ruby/3.2.0/gems/thor-1.2.2/lib/thor/invocation.rb:127:in `invoke_command'
/home/user/.local/share/gem/ruby/3.2.0/gems/thor-1.2.2/lib/thor.rb:392:in `dispatch'
/home/user/.local/share/gem/ruby/3.2.0/gems/thor-1.2.2/lib/thor/base.rb:485:in `start'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/cli.rb:45:in `start'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/bin/imap-backup:12:in `block in <top (required)>'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/lib/imap/backup/logger.rb:41:in `sanitize_stderr'
/home/user/.local/share/gem/ruby/3.2.0/gems/imap-backup-11.0.1/bin/imap-backup:11:in `<top (required)>'
./imap-backup:25:in `load'
./imap-backup:25:in `<main>'
patric-r commented 11 months ago

@joeyates I can provide you a test imap account which immediately reproduces the problem. If you're interested, post your mail address I will send you the account details.

joeyates commented 11 months ago

Hi @patric-r

Could you contact me via the email address that shows up in my commits?

Thanks

joeyates commented 10 months ago

I've released version 11.1.0.rc1 with a fix for this problem. @patric-r please give it a try!

patric-r commented 10 months ago

@joeyates

The new 11.1.0.rc1 works like a charm and fixes the issue. I've tested it on several mailboxes containing a large amount of mails and I was now able to backup everything without any errors.

Thank you for your effort!

MatejKovacic commented 10 months ago

When the new version will be pushed out?

joeyates commented 10 months ago

@MatejKovacic I've just released version 11.1.0

MatejKovacic commented 10 months ago

Thanks a lot! Works like a charm.