openbsd-ports/mail/maildrop/patches/patch-maildrop_deliver_C
gonzalo 773daa81c8 Update for Maildrop to 2.5.5:
* rfc2045/rfc2045reply.c (mkreply): Fix copying of the contents
  of the original message.
* rfc2045/reformime.c (do_print_info): rfc2231_udecodeDisposition()
  failure is not fatal.
* rfc2045/reformime.c (get_suitable_filename): Ditto.
* rfc2045/reformime.c (main2): Fixed segfault on some arches
  from an initial null given to strtok.
* mailbot: add "feedback" and "replyfeedback" formats,
  generating RFC 5965-formatted feedback report. -a option attaches the
  entire original message, instead of only its headers, for "replydsn",
  "feedback", and "replyfeedback" formats.

Ok giovanni@
2012-09-04 11:33:35 +00:00

37 lines
1.2 KiB
Plaintext

$OpenBSD: patch-maildrop_deliver_C,v 1.2 2012/09/04 11:33:35 gonzalo Exp $
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]. The maildrop folks prefer to keep this
(out of spec) behaviour to keep from breaking users working
configurations as well as to avoid problems caused by other out of
spec mail delivery agents (which may aberrantly neglect to leave a
blank line at the end of the mbox) [2].
This patch disables this behaviour of maildrop allowing an MUA to
gracefully handle the delivery of new mail to an open folder.
[1] http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=132411
[2] http://markmail.org/message/w5mwn3jpmn3qeo5x
--- maildrop/deliver.C.orig Mon Apr 4 12:58:58 2011
+++ maildrop/deliver.C Mon Sep 3 14:44:36 2012
@@ -230,15 +230,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);