Re: [Evolution] Importing from KMail -- Lost Messages



On Wed, 2005-03-30 at 21:10 -0500, Garry Williams wrote:
On Wed, 2005-03-30 at 17:10 -0500, Rob Matlack wrote:
> I would like to import my mail from KMail to Evolution. My KMail folders are 
> in MBox format. I have tried simply copying the folders to the correct 
> Evolution location, importing with automatic detection, and importing with 
> MBox selected. All three have the same results--I lose emails. In one folder 
> of about 50 I lost about 12. They seem to come in as blank emails, no body, 
> no headers. I have compacted the folder before importing. I understand that 
> there are different MBox formats.

I had troubles when I imported from UNIX mbox-es, too.

I have no idea what your problem is, but the same symptoms were produced
in my case because some of my messages had lines in them that matched
this regular _expression_:

    ^[Ff]rom[[:space:]]

It seems that Evolution's importer treats *any* line beginning with the
word from (either capitalized or not) followed by a space as a message
header.

Hmm, no, it definitely must be capitalised.  I can't see how you could see it matching against non capitalised words.  It uses a memcmp to look for the "From " line.

BTW this is actually "Berkely mailbox format", content beginning with "From " must be munged to become ">From ".

Also note the munging is one-way, which is slightly different from a similar convention which is reversed on data read.

I fixed it by examining all lines matching the problem and inserting a
`>' character in front of them before importing.

I also notice that Evolution does not realize that a line beginning with
`>From ' is *not* a quote.  (The convention is that `>>From ' is a quote
-- not a quote of a quote.)

I don't know if the "quoting" of a line beginning with the characters
`From ' is specified in a standard, but it is very well-understood
practice among E-mail clients that manipulate mbox format files.

Convention perhaps, doubt it is a standard.

My problem was caused by two different events: my UNIX mail client
(mutt) would copy a mail message to a mbox file without quoting the
lines beginning with `From '.  I found out that this practice was not
ambiguous because mutt maintained the Content-Length: header accurately
and used it to parse the messages in mbox files.  MIME also
disambiguates the length of a message.  (Of course there is no
requirement for a mail message to have any special treatment for such
lines in their bodies.  MTAs are completely insensitive to them.)

Ahh well, that isn't berkeley mailbox format then.  That's something similar but different.  Rather like sunos' mailbox format which also uses/honours the content-length header.

I had no idea mutt did such a thing, it is a pity, since it is a poor convention to use.

The other problem was that Evolution's importer considered `from ' a
separator, too.  That's just plain wrong.

I find this very hard to believe, as I said above it uses memcmp to check for the From line.



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]