On Tue, Apr 26, 2005 at 06:43:54PM +0200, Jakob Curdes wrote:
Kinda funny: I once encountered a UNIX mail utility that would always append messages to mbox files with a leading blank line even if the file was empty (i.e. it would create new mbox files with a leading blank line), but would refuse to open any mbox files that began with a blank line. Dunno how it survived in the wild... I suspect it was some broken interim version, but at any rate I hacked it to keep it from writing the blank line, *and* to skip blank lines when opening up an mbox.
Would you be able to disclose the name of that utility in case I am using it inadvertently ??
Yes but then I'd have to correct the inaccurate memory :-)
As it turns out, it really was a case of one utility (elm) writing to any empty mbox with the blank line, which it itself could read but other programs barfed on. So there were patches to more than one program.
The one writing the blank lines was elm 2.5PL3. I don't have any idea how current that version is; I haven't used elm in a while. But while I'm here, the patch was:
---cut--- *** savecopy.c.orig Tue Aug 1 17:03:25 2000 --- savecopy.c Wed Mar 12 11:03:11 2003
*** 268,274 **** --- 268,284 ---- #ifdef MMDF fputs(MSG_SEPARATOR, fp_copy); #else +
- # ifndef MV_COMM /* mem 20030311 */ putc('\n', fp_copy);
- # else
/* MV_COMM -- If it's an empty file, don't start out with a newline,
else we create a file that some mailers can't read!
*/
if ( ftell( fp_copy ) > 0L )
putc('\n', fp_copy);
- # endif /* MV_COMM */
- #endif /* MMDF */ time(&now); fprintf(fp_copy, "From %s %s", user_name, ctime(&now)); ---cut---
I no longer seem to have that specific patch to other utilitie(s) (probably because the problem went away once elm was patched), but I do have some others:
/bin/mail had issues reading some "From_" line date formats;
mutt-1.4.2.1 had at least one eggregious "From_"-line reading issue, which is that it would get fooled by From lines which didn't follow a blank line.
I think that none of those are against anywhere-near-current versions, though.
Probably way off topic, sorry..
mm