VM

solaris makes .mailbox and INBOX files the linux vm can't parse right

Bug #1434657 reported by jeff sondeen
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
VM
Fix Committed
Low
Uday Reddy

Bug Description

I'm currently on a solaris platform (using emacs 21.1 with vm 8.0.14 (byte-compiled on solaris)), but must move my mail reader to linux, but my incoming mail will still be placed into my .mailbox file by a solaris system. It seems that emacs 21.1 plus vm 8.0.14 (byte-compiled on linux) has never been able to read both the .mailbox and INBOX files correctly. Out of, say, 100 messages that the solaris versions see in the files, the linux versions only see about 3 or 4, which are displayed correctly, so it seems that the linux versions simply skip lots of bytes in both files. I think the problem has to do with separators, because the only difference (besides tons of missing messages) between the solaris-derived and linux-derived INBOXs (other than different header orders) seems to be 1. loss of the Conten-Length: header, and 2. an extra LF inserted between messages in the linux created INBOX.

Can someone suggest what the differences between solaris-derived and linux-derived mail files would be, and/or VM file
format differences between linux and solaris, or suggest some type of failsafe/debugging mode i could invoke in emacs/vm that would allow me to debug this ? perhaps what function i could break on, and then begin single-stepping to trace how the INBOX and/or .mailbox files are being parsed ?

I think to reproduce the bug, all you have to do is get a solaris-derived .mailbox file and invoke a linux version emacs vm command to read it.

my apologies if i have the completely wrong forum, and if so, please direct me to the right one...

thanks,
/jeff

Related branches

Revision history for this message
Uday Reddy (reddyuday) wrote : Re: [Bug 1434657] [NEW] solaris makes .mailbox and INBOX files the linux vm can't parse right

jeff sondeen writes:

> Can someone suggest what the differences between solaris-derived and
> linux-derived mail files would be, and/or VM file format differences
> between linux and solaris, or suggest some type of failsafe/debugging mode
> i could invoke in emacs/vm that would allow me to debug this ? perhaps
> what function i could break on, and then begin single-stepping to trace
> how the INBOX and/or .mailbox files are being parsed ?

Your Solaris folders would in the From_-with-Content-Length format. So, you
must add the following settings to your .vm file:

(setq vm-default-folder-type 'From_-with-Content-Length)
(setq vm-trust-From_-with-Content-Length t)

Please read the documentation for these variables and make sure you
understand what they mean. (The User Manual for version 8.0.14 doesn't have
any documentation for them.)

Please test the settings with small test folders and make sure they work
before you start switching everything!

Cheers,
Uday

Revision history for this message
jeff sondeen (sondeen-b) wrote :

Thanks alot, Uday!!! that sure seems to fix the problem.

what's confusing is that it's parsing the both the INBOX and (incoming) .mailbox files OK, despite the fact that the .mailbox file (below) doesn't follow the convention as per the vm-trust-From_-with-Content-Length's documentation (also below) that the

   first message in a folder contains a Content-Length header and begins with "From "

as the first message in the .mailbox folder doesn't have the Content_Length header:

From MAILER-DAEMON Mon Mar 23 08:57:19 2015
Date: 23 Mar 2015 08:57:19 -0700
From: Mail System Internal Data ...
Subject: DON'T DELETE THIS MESSAGE -- FOLDER INTERNAL DATA
Message-ID: ...
X-IMAP: ...
Status: RO

This text is part of the internal format of your mail folder, and is not
a real message. It is created automatically by the mail system software.
If deleted, important folder data will be lost, and it will be re-created
with the data reset to initial values.

for reference, the doc for the vm-trust-From_-with-Content-Length variable:

vm-trust-From_-with-Content-Length's value is t

Documentation:
*Non-nil value means that if the first message in a folder contains
a Content-Length header and begins with "From " VM can safely
assume that all messages in the folder have Content-Length headers
that specify the length of the text section of each message. VM
will then use these headers to determine message boundaries
instead of the usual way of searching for two newlines followed by a
line that begins with "From ".

Revision history for this message
Uday Reddy (reddyuday) wrote : [Bug 1434657] Re: solaris makes .mailbox and INBOX files the linux vm can't parse right

I don't know much about how it works. I never used the
From_-with-Content-Length format myself. However, your version of VM has set
it for you automatically under Solaris, based on your operating system. Now
that you are switching the OS, you need to set it yourself. That is all
there is to it.

Revision history for this message
Uday Reddy (reddyuday) wrote :

Documentation updated in rev. 1506.

Changed in vm:
status: New → Fix Committed
importance: Undecided → Low
assignee: nobody → Uday Reddy (reddyuday)
milestone: none → 8.2.0b1
tags: added: compatibility doc
tags: added: 8.0
tags: added: info
removed: doc
Uday Reddy (reddyuday)
Changed in vm:
milestone: 8.2.2a → 8.2.1a
Uday Reddy (reddyuday)
Changed in vm:
milestone: 8.2.1a → 8.2.90a
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.