>wouldn't that break the Maildir "protocol" for creating unique filenames? >do other programs create files in "cur" directly?
My reading of the specification is "no". AFAICT, the way it's supposed to work is: - You create a unique filename in the "tmp" directory, and write it out. - You then rename that unique filename to "new". But that's supposed to be done (AFAICT) by delivery agents. But the uniqueness doesn't depend on the move from new to cur; it's supposed to be unique in tmp. When you rename messages to cur it should have an ":info" extension (where the info extension has some semi-defined flags), but the uniqness should have already existed when written to tmp. And, to see what OTHER programs do ... I decided to look at Mutt, since it is pretty popular and seems to be stable. AFAICT, the short answer is that if the message considered old (I don't know what an "old" message is, but I guess it's if the Status header line has an "O" in it?) OR if it has been marked as "read", then when the message is written to a Maildir it is renamed directly from "tmp" into "cur", otherwise it will get renamed to "new". --Ken -- Nmh-workers https://lists.nongnu.org/mailman/listinfo/nmh-workers
