Thanks for the clear and speedy reply, Oswald!
On 1/1/20 2:18 PM, Oswald Buddenhagen wrote:
Is there a way to get mbsync to save these anyhow?
not as of now. in principle it wouldn't be too hard to hack it to skip
leading empty lines, but i'd recommend that you just fix the files on
the server instead (a simple sed script would do, in case there are
too many to fix them by hand).
Excellent idea. For those wondering, the sed script I used is
sed -i.bak '/./,$!d' `cat /tmp/badfiles`
And then once I was happy I move the .bak files out of the directory.
That fixes the raw message files; I then removed Dovecot's index files,
restarted the server, and checked that everything looked ok from my mail
client. Unfortunately, I think I need to do something more. I blew away
my output dir and reran mbsync. I get messages like this:
C: 0/1 B: 37/52 M: +0/0 *0/0 #0/0 S: +0/0 *0/0 #0/0
Maildir notice: no UIDVALIDITY, creating new.
C: 0/1 B: 37/52 M: +0/0 *0/0 #0/0 S: +2904/19070 *0/0 #0/0
Warning: message 2909 from master has incomplete header.
C: 0/1 B: 37/52 M: +0/0 *0/0 #0/0 S: +2905/19070 *0/0 #0/0
Warning: message 2910 from master has incomplete header.
When I connect to the IMAP server directly, here's what that first
message looks like to two different commands:
03 fetch 2909 full
* 2909 FETCH (FLAGS (\Seen) INTERNALDATE "01-Jan-2020 15:01:07
-0800" RFC822.SIZE 227 ENVELOPE ("Thu, 23 Jun 2005 22:16:00 -0700"
"In Control" ((NIL NIL "william" "pota.to")) ((NIL NIL "william"
"pota.to")) ((NIL NIL "william" "pota.to")) (("Flickr Upload" NIL
"free66coming" "photos.flickr.com")) NIL NIL NIL NIL) BODY ("text"
"plain" ("charset" "us-ascii") NIL NIL "7bit" 0 0))
05 fetch 2909 body[header]
* 2909 FETCH (BODY[HEADER] {227}
MAIL FROM: <william@REDACTED>
To: "Flickr Upload" <redac...@photos.flickr.com>;
Subject: In Control
From: <william@REDACTED>
Date: Thu, 23 Jun 2005 22:16:00 -0700
X-Sender: william@REDACTED
X-Sender: william@REDACTED
)
I don't know IMAP well, but that seems about right to me. Does mbsync
need something else in there to be able to sync successfully? Or is
there an option I should be setting? Nothing in the docs seemed like a
good fit, but I'm definitely not an expert.
Thanks,
William
_______________________________________________
isync-devel mailing list
isync-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/isync-devel