Hello:

maildrop adds a newline to mbox files before delivering new messages.
This effectively alters the final message in the mbox, causing a
running mutt (and maybe other MUAs) with that mbox open to freak out
and lose unsaved state [1,2].

I realize it's against policy to include patches not accepted upstream
but I thought I'd post this any way in case someone else is annoyed by
this as well.

I've tested this for delivering mail fetched from getmail on i386.

The last hunk also fixes an RCS tag in a patch file and should
probably actually be committed if correct.

[1] http://markmail.org/message/w5mwn3jpmn3qeo5x
[2] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=132411

cvs server: Diffing inside .
Index: Makefile
===================================================================
RCS file: /cvs/ports/mail/maildrop/Makefile,v
retrieving revision 1.32
diff -N -u Makefile
--- Makefile    21 Apr 2010 07:23:58 -0000      1.32
+++ Makefile    24 Jun 2010 23:00:59 -0000
@@ -5,7 +5,7 @@
 
 V=                     2.4.3
 DISTNAME=              maildrop-$V
-PKGNAME-main=          maildrop-$V
+PKGNAME-main=          maildrop-$Vp0
 FULLPKGNAME-utils=     courier-utils-$V
 FULLPKGPATH-utils=     mail/maildrop,-utils
 CATEGORIES=            mail
cvs server: Diffing inside files
cvs server: Diffing inside patches
Index: patches/patch-maildrop_deliver_C
===================================================================
RCS file: patches/patch-maildrop_deliver_C
diff -N -u patches/patch-maildrop_deliver_C
--- /dev/null   24 Jun 2010 23:00:59 -0000
+++ patches/patch-maildrop_deliver_C    24 Jun 2010 23:00:59 -0000
@@ -0,0 +1,20 @@
+$OpenBSD$
+--- maildrop/deliver.C.orig    Sat Jun 27 13:26:54 2009
++++ maildrop/deliver.C Wed Jun 23 15:45:28 2010
+@@ -231,15 +231,7 @@ Buffer    b;
+               {
+                       format_mbox.Init(1);
+ 
+-                      if ((stat_buf.st_size > 0 &&
+-                           mio.write(
+-#if   CRLF_TERM
+-                                     "\r\n", 2
+-#else
+-                                     "\n", 1
+-#endif
+-                                     ) < 0) ||
+-                          format_mbox.DeliverTo(mio))
++                      if (format_mbox.DeliverTo(mio))
+                       {
+                               dotlock.truncate();
+                               log(mailbox, -1, format_mbox);
Index: patches/patch-rfc2045_reformime_1
===================================================================
RCS file: /cvs/ports/mail/maildrop/patches/patch-rfc2045_reformime_1,v
retrieving revision 1.1
diff -N -u patches/patch-rfc2045_reformime_1
--- patches/patch-rfc2045_reformime_1   21 Apr 2010 07:23:59 -0000      1.1
+++ patches/patch-rfc2045_reformime_1   24 Jun 2010 23:00:59 -0000
@@ -1,13 +1,9 @@
 $OpenBSD: patch-rfc2045_reformime_1,v 1.1 2010/04/21 07:23:59 giovanni Exp $
---- rfc2045/reformime.1.orig   Tue Mar 30 12:58:02 2010
-+++ rfc2045/reformime.1        Tue Mar 30 12:59:02 2010
-@@ -1,26 +1,26 @@
--.\"  <!-- $Id: patch-rfc2045_reformime_1,v 1.1 2010/04/21 07:23:59 giovanni 
Exp $ -->
--.\"  <!-- Copyright 1998 - 2009 Double Precision, Inc.  See COPYING for -->
--.\"  <!-- distribution information. -->
-+ \"  <!-- $Id: patch-rfc2045_reformime_1,v 1.1 2010/04/21 07:23:59 giovanni 
Exp $ -->
-+ \"  <!-- Copyright 1998 - 2009 Double Precision, Inc.  See COPYING for -->
-+ \"  <!-- distribution information. -->
+--- rfc2045/reformime.1.orig   Fri Feb 19 23:13:27 2010
++++ rfc2045/reformime.1        Wed Jun 23 16:38:19 2010
+@@ -2,25 +2,25 @@
+ .\"  <!-- Copyright 1998 - 2009 Double Precision, Inc.  See COPYING for -->
+ .\"  <!-- distribution information. -->
  '\" t
 -.\"     Title: reformime
 -.\"    Author: [FIXME: author] [see http://docbook.sf.net/el/author]
cvs server: Diffing inside pkg

Reply via email to