nmh-workers
[Top] [All Lists]

Re: [Nmh-workers] Maildir support for inc

2008-06-02 10:47:51
Yes, I was thinking about that as a feature for 1.4 (since I now use nmh
on a system which uses Maildir :-)).

That should be a good source of motivation ;-)

I was a bit concerned about the suggestions in that thread that the patch
wasn't really following the Maildir protocol properly, though.

I don't believe there is any problem - the Maildir protocol really
applies to mail that stays in the Maildir and aims to keep the
directories consistent. The patch does:

        rename(maildir_new_file, nmh_file);

rather than:

        rename(maildir_new_file, maildir_cur_file);
        rename(maildir_cur_file, nmh_file);

Since the mail is about to leave the maildir, there is no consistency
gained by moving it through an extra directory. It would be easy
to do the extra renames if anyone really believes it is a problem
(rename has to work here because all the subdirectories of a Maildir
must be on the same filesystem to work).

There's also an argument that -notruncate on a Maildir ought to mean "put
messages in new into the MH folder and then move them to the Maildir cur
directory".

Yep - -notruncate should probably move stuff to the cur subdirectory.
However, I'm fairly sure that inc should always work on both new
and cur parts of a inc - at least my users found it confusing when
it didn't ;-)

Also, I think that main() function is pretty unwieldy already, and adding
yet another thing to increment from makes it even worse. Some refactoring
there would be nice at some point...

Yes - it was pretty bad when I looked at it in 2004. I could choose
a refactoring that suits me and port forward if you want. Alternatively
if you'd like to refactor then I can port forward once I know how
you're going to do it.

        David.


_______________________________________________
Nmh-workers mailing list
Nmh-workers(_at_)nongnu(_dot_)org
http://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>