On Fri, Mar 22, 2013 at 09:22:34AM +0000, James Griffin wrote:
> [--------- Fri 22.Mar'13 at  9:04:21 +0000  Chris Green :---------]
> 
> > On Thu, Mar 21, 2013 at 05:06:17PM -0500, Derek Martin wrote:
> > > On Wed, Mar 20, 2013 at 06:08:49PM -0500, David Champion wrote:
> > > > There absolutely should be a blank line.  I think though that the order
> > > > is wrong: mutt expects that a message (i.e. a From_ line) appears at
> > > > the old EOF marker, and that the EOF marker is on/after a blank line.
> > > > I think that if you adjust your filter to write the message and then a
> > > > blank line instead of a blank line and then a message, the error will go
> > > > away.
> > > 
> > > This matches my expectation also.
> > > 
> > That's all very well but it does have some issues:-
> > 
> >     What should an MTA do if there *isn't* a blank line at the end of
> >     the current mbox where it is going to append a new message?  It
> >     seems to me that what the Python libraries do guarantees that there
> >     will always be a blank line before the 'From ' line, if there's one
> >     already then it doesn't matter too much.
> > 
> >     Mutt itself *doesn't* put a blank line there, if you S[ave] or
> >     C[opy] messages to a new mbox the messages have no blank lines
> >     before the 'From '.
> 
> Sorry Chris, I believe you're confusing MTA with MDA/LDA, although

Yes, I am, though by default both are postfix on my system.


> that's not really relevent. Could you perhaps alter your python script
> as David suggested but start over with new mboxes; i.e. move the current
> mboxes into an archive folder inside the ~/Mail directory so as to avoid
> the confusion with how your messages are currently laid-out in the mbox
> file. Do you think that might help?
> 
I've already fixed the problem for myself, as follows:-

    Mutt accepts an mbox with no blank lines (not surprising as it's
    what it creates itself).

    I have created a derived class of my own from the Python library
    class mailbox.mbox and I have overriden the _pre_message_hook(self,
    f) method so that it doesn't append a blank line before appending a
    new message to an mbox.  I use this derived class in my filter
    program which delivers mail to my incoming mbox files.

So I have fixed my particular problem.

It does seem to me though that mutt doesn't necessarily do the right
thing to detect whether an mbox has been 'modified' or just appended to.


-- 
Chris Green

Reply via email to