Closed MatejKovacic closed 9 months ago
Hi @MatejKovacic
That does sound like that mailbox is corrupt.
I suggest renaming the .mbox
and .imap
files and running another backup.
The error you are seeing during backup is unrelated as it a problem with accessing a remote folder.
So the error was:
INBOX/Arhivi/isju: .mbox file '/home/matej/.imap-backup/.../isju.mbox' is longer than indicated by .imap file '/home/matej/.imap-backup/isju.imap'
I went to this folder and renamed those two files:
isju.mbox
to isju.mbox.old
isju.imap
to isju.imap.old
I run imap-backup local check
and there was no error. Then I run imap-backup
again and got:
I, [2023-09-19T10:04:27.120641 #420190] INFO -- : Running backup of account: ***
I, [2023-09-19T10:04:40.717797 #420190] INFO -- : [INBOX/Arhivi/isju] 100 new messages
Right after that I run imap-backup local check
again, and the same error is back:
INBOX/Arhivi/isju: .mbox file '/home/matej/.imap-backup/.../isju.mbox' is longer than indicated by .imap file '/home/matej/.imap-backup/isju.imap'
.
@MatejKovacic I've found the source of the problem. It was a bug in the handling of character encodings, so it affects all people who have emails with non-ASCII characters.
Please upgrade to version 12.0.0 and rerun your backups.
Thanks for opening this issue as it allowed me to find an important bug.
I upgraded to the v. 12, but I get the same error when I run imap-backup local check
. This is the size of the files:
ls isju.* -lha
-rw-rw-r-- 1 matej matej 5,8K sep 20 08:27 isju.imap
-rw-rw-r-- 1 matej matej 1,2M sep 19 10:04 isju.mbox
Hi @MatejKovacic
I didn't make it explicit that you need to rename or move the old backups before re-running imap-backup
. Did you do so?
If you did, then I'll need to look into the problem again.
Please let me know
OK, I did that, and now it says everything is OK.
However, when I deleted the files and ran the imap-backup
, new mail were downloaded, but I got some errors:
WARNING: Ignoring unparsable header "osnutku. Kon=C4=8Dni produkt naj bi bila priporo=C4=8Return-Path: <lugos-list-bounces+***=***@lugos.si>": invalid header name syntax: "osnutku. Kon=C4=8Dni produkt naj bi bila priporo=C4=8Return-Path"
WARNING: Ignoring unparsable header "s.si/cgi-bin/mailman/listinfo/lugos-list>, \r\n\t<mailto:lugos-list-request@lugos.si?subject=unsubscribe>": invalid header name syntax: "s.si/cgi-bin/mailman/listinfo/lugos-list>, \r\n\t<mailto"
WARNING: Ignoring unparsable header "2A85665E120\r\n\tfor <lugos-list@fo.lugos.si>; Fri, 28 Jan 2022 13:44:21 +0100 (CET)": invalid header name syntax: "2A85665E120\r\n\tfor <lugos-list@fo.lugos.si>; Fri, 28 Jan 2022 13"
WARNING: Ignoring unparsable header "for <Return-Path: <lugos-list-bounces+***=***@lugos.si>": invalid header name syntax: "for <Return-Path"
I, [2023-09-20T13:37:33.600222 #488071] INFO -- : [INBOX/***] 740 new messages
WARNING: Ignoring unparsable header ":0:0:0:182 (LHLO ***.***.si)\r\n (*:*:*:*:*:*:*:*) by ***.***.si with LMTP; Wed, 19 Jan 2022\r\n 09:03:12 +0100 (CET)": invalid header name syntax: ""
I, [2023-09-20T13:41:07.290378 #488071] INFO -- : [INBOX/***] 7447 new messages
Any idea what should that mean? Are e-mail correctly backuped anyway?
Hello again. Those are warnings due to malformed email headers. Backups are stored even if emails are malformed.
I have the same problem with WARNING: Ignoring unparsable header
except that I'm trying to migrate. Since the headers are invalid, they are not exported correctly and the emails comes without subjects, recipients, etc... However, the headers are in the body of the mail. Quite annoying and unusable
Thanks
Hi @julpec
Please open an issue indicating what happens during your migration.
Please note, though, that in a migration, imap-backup copies messages to the destination as they are received. Parsing is only done to extract metadata used during storage. If headers are reported as unparseable during backup, it is not surprising that the destination server may not be able to parse them either — the problem lies with the messages themselves.
Hi, Ok, I will open another issue. By the way, there were no errors during the backup phase…
I have the same problem as originally reported, .mbox' is longer than indicated by .imap file
, but I'm already running version 13. I've deleted accounts and recreated them, deleted the backup directory and ran a backup from scratch, to no avail.
To expand on this a bit:
imap-backup local check
, it returns no errorsimap-backup
again, the output tells me it's deleting e-mails only present locally (even though no e-mail on the server was deleted or otherwise modified since the last backup)imap-backup local check
, it returns the errorIn case it matters, the account I'm backing up is hosted on iCloud.
Update: Through trial and error I found that it matters which mode I use for saving metadata, so I raised #178
I say
imap-backup local check
and for some folders I get this error:INBOX/...: .mbox file '/home/matej/.imap-backup/ ... .mbox' is longer than indicated by .imap file '/home/matej/.imap-backup/ ... .imap'
Also, I run
imap-backup
today and got this error (and that was the reason why I runlocal check
command):