nmh-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Nmh-commits] nmh ./ChangeLog uip/post.c uip/spost.c


From: David Levine
Subject: [Nmh-commits] nmh ./ChangeLog uip/post.c uip/spost.c
Date: Wed, 18 Jan 2006 00:09:00 +0000

CVSROOT:        /sources/nmh
Module name:    nmh
Branch:         
Changes by:     David Levine <address@hidden>   06/01/18 00:09:00

Modified files:
        .              : ChangeLog 
        uip            : post.c spost.c 

Log message:
        Fixed make_bcc_file () to use contents of From: in draft, if draft_from 
masquerade flag is enabled.

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/nmh/nmh/ChangeLog.diff?tr1=1.226&tr2=1.227&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/nmh/nmh/uip/post.c.diff?tr1=1.17&tr2=1.18&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/nmh/nmh/uip/spost.c.diff?tr1=1.16&tr2=1.17&r1=text&r2=text

Patches:
Index: nmh/ChangeLog
diff -u nmh/ChangeLog:1.226 nmh/ChangeLog:1.227
--- nmh/ChangeLog:1.226 Tue Jan 17 18:06:58 2006
+++ nmh/ChangeLog       Wed Jan 18 00:09:00 2006
@@ -1,3 +1,12 @@
+2006-01-17  David Levine <address@hidden>
+
+       * uip/post.c, uip/spost.c: in make_bcc_file (), use same
+       logic as in finish_headers () to detect whether there is an
+       existing From: line in the draft.  If draft_from masquerade
+       flag is enabled, this allows the From: to be obeyed in the
+       Bcc, instead of the old behavior of always replacing it with
+       the signature.
+
 2006-01-17  Oliver Kiddle  <address@hidden>
 
        * sbr/fmt_scan.c: more robust multi-byte/column support for field
Index: nmh/uip/post.c
diff -u nmh/uip/post.c:1.17 nmh/uip/post.c:1.18
--- nmh/uip/post.c:1.17 Mon Jan 16 17:07:14 2006
+++ nmh/uip/post.c      Wed Jan 18 00:09:00 2006
@@ -2,7 +2,7 @@
 /*
  * post.c -- enter messages into the mail transport system
  *
- * $Id: post.c,v 1.17 2006/01/16 17:07:14 bress Exp $
+ * $Id: post.c,v 1.18 2006/01/18 00:09:00 levine Exp $
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -1167,7 +1167,18 @@
     if (msgid)
        fprintf (out, "Message-ID: <address@hidden>\n",
                (int) getpid (), (long) tclock, LocalName ());
-    fprintf (out, "From: %s\n", signature);
+    if (msgflags & MFRM) {
+      /* There was already a From: in the draft.  Don't add one. */
+      if (!draft_from_masquerading)
+        /* mts.conf didn't contain "masquerade:[...]draft_from[...]"
+           so we'll reveal the user's actual address@hidden
+           address in a Sender: header (and use it as the envelope
+           From: later). */
+        fprintf (out, "Sender: %s\n", from);
+    }
+    else
+      /* Construct a From: header. */
+      fprintf (out, "From: %s\n", signature);
     if (subject)
        fprintf (out, "Subject: %s", subject);
     fprintf (out, "BCC:\n");
Index: nmh/uip/spost.c
diff -u nmh/uip/spost.c:1.16 nmh/uip/spost.c:1.17
--- nmh/uip/spost.c:1.16        Mon Jan 16 17:07:15 2006
+++ nmh/uip/spost.c     Wed Jan 18 00:09:00 2006
@@ -5,7 +5,7 @@
  * This is a simpler, faster, replacement for "post" for use
  * when "sendmail" is the transport system.
  *
- * $Id: spost.c,v 1.16 2006/01/16 17:07:15 bress Exp $
+ * $Id: spost.c,v 1.17 2006/01/18 00:09:00 levine Exp $
  *
  * This code is Copyright (c) 2002, by the authors of nmh.  See the
  * COPYRIGHT file in the root directory of the nmh distribution for
@@ -761,7 +761,18 @@
     chmod (bccfil, 0600);
 
     fprintf (out, "Date: %s\n", dtimenow (0));
-    fprintf (out, "From: %s\n", signature);
+    if (msgflags & MFRM) {
+      /* There was already a From: in the draft.  Don't add one. */
+      if (!draft_from_masquerading)
+        /* mts.conf didn't contain "masquerade:[...]draft_from[...]"
+           so we'll reveal the user's actual address@hidden
+           address in a Sender: header (and use it as the envelope
+           From: later). */
+        fprintf (out, "Sender: %s\n", from);
+    }
+    else
+      /* Construct a From: header. */
+      fprintf (out, "From: %s\n", signature);
     if (subject)
        fprintf (out, "Subject: %s", subject);
     fprintf (out, "BCC:\n\n------- Blind-Carbon-Copy\n\n");




reply via email to

[Prev in Thread] Current Thread [Next in Thread]