Subject: Cygwin maildrop patches and issues (was Re: fetchmail 5.9.8 ...)
From: Jason Tishler <[email-masked]>
To: Rui Carmo <[email-masked]>
Cc: [email-masked]
Date: Fri, 19 Apr 2002 13:48:49 -0400

Rui,

On Sat, Mar 02, 2002 at 12:45:12AM +0000, Rui Carmo wrote:
> However, mutt then complains that /var/spool/mail/user is not a valid
> mbox file, since somewhere along the line, an extra blank line is inserted
> at the beginning of the mailbox upon creation. Editing it out by hand
> solves the problem, but is a rather lame fix.

The first attachment solves the above problem.

Unfortunately, I have discovered other problems:

1. maildrop appears (at least under Cygwin) to not quite respect
dotlocking and actually removes the lock file created by other
processes!  The second attachment "solves" this problem.

2. maildrop appears to lock in a different order (i.e., dotlock then
fcntl()) than mutt (and procmail) (i.e., fcntl() then dotlock) so I'm
concerned about race conditions.

3. maildrop causes Cygwin to spin while another process has locked a mbox
via fcntl(F_SETLK).  If interested, see the third attachment for details.

I'm interested in getting Cygwin maildrop to work because it is much
easier to build (and maintain) than procmail.  Unfortunately, I'm getting
the impression that maildrop is used more for maildirs than for mboxes...

Thanks,
Jason
--- formatmbox.C.orig	Mon Apr  1 21:01:02 2002
+++ formatmbox.C	Mon Apr  1 21:01:12 2002
@@ -42,7 +42,7 @@ time_t	tm;
 
 	time(&tm);
 
-	tempbuf="\nFrom ";
+	tempbuf="From ";
 	tempbuf += maildrop.msginfo.fromname;
 	tempbuf += ' ';
 
--- dotlock.C.orig	Tue Apr  2 01:57:49 2002
+++ dotlock.C	Tue Apr  2 01:58:58 2002
@@ -112,7 +112,7 @@ AlarmTimer	stat_timer;
 			}
 			else if (stat_timer.Expired())
 			{
-				unlink(lockfile);
+				// unlink(lockfile);
 			}
 		}
 
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/