Source: bsd-mailx
Source-Version: 8.1.2-0.20160123cvs-2
Tags: patch

--

A previous upstream commit allowed to "Use sendmail's '-t' flag when
sendmail instead of specifying the list of recipients in argv." :
http://cvsweb.openbsd.org/cgi-bin/cvsweb/src/usr.bin/mail/send.c?rev=1.24&content-type=text/x-cvsweb-markup

But a previous fix of Debian bug http://bugs.debian.org/75232 is based on the 
fact
that bcc recipients is given to sendmail command.
So we end up not sending any mail to Bcc recipients.
I re-enabled Bcc recipient in the header, the upstream's way in spite of
comment in the bug 75232 :
"When using the "Bcc:" option using mailx, the line "Bcc: <address>" is
included in the outgoing message, which is forbidden by RFC841."

I only saw : https://tools.ietf.org/html/rfc841#section-3.2.1
"     Messages  containing  Bcc  fields  are  treated specially by
      CBMSs.  The contents of this field are not included in copies  of
      the  message sent to the recipients other than the originator who
      are not included in the Bcc field itself.  Some  systems  include
      the  contents  of  the  Bcc  field only in the originator's copy;
      others include all or part of the Bcc field in the copies sent to
      the recipients indicated in the Bcc field.    This  specification
      does not indicate exactly how the Bcc field is to be treated."

I don't know what CBMS i.e. Computer-Based Message Systems includes. If that 
includes
MTA, then we are good as MTA will delete the Bcc part of the header.
I see in http://www.sendmail.org/~ca/email/man/sendmail.html :
"     -t          Read message for recipients.  To:, Cc:, and Bcc: lines will
                 be scanned for recipient addresses.  The Bcc: line will be
                 deleted before transmission."
I guess postfix, exim, etc .. will behave based on that sendmail option 
compatibility's sake.

Also, I added that patch on top of all other instead of updating 
03-Base-fixes-2.patch
because, my quilt setup would not leave all other patches unchanged with 
meta-information
modified.

Thanks for reviewing,


F.
diff -Nru bsd-mailx-8.1.2-0.20160123cvs/debian/patches/33-Fix-bcc.patch bsd-mailx-8.1.2-0.20160123cvs/debian/patches/33-Fix-bcc.patch
--- bsd-mailx-8.1.2-0.20160123cvs/debian/patches/33-Fix-bcc.patch	1970-01-01 01:00:00.000000000 +0100
+++ bsd-mailx-8.1.2-0.20160123cvs/debian/patches/33-Fix-bcc.patch	2016-05-04 14:54:02.000000000 +0200
@@ -0,0 +1,23 @@
+Description: Fix Bcc addresses not being used
+ A previous upstream commit allowed to "Use sendmail's '-t' flag when executing
+ sendmail instead of specifying the list of recipients in argv." . But the fix of
+ bug 75232 is based on the fact that bcc recipients is given to sendmail command.
+ So we end up not sending any mail to Bcc recipients. Re-enabling Bcc recipient, the
+ upstream's way.
+Author: Frederic Bonnard <[email protected]>
+Bug: http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=823407
+---
+This patch header follows DEP-3: http://dep.debian.net/deps/dep3/
+--- a/send.c
++++ b/send.c
+@@ -579,10 +579,8 @@
+ 		fprintf(fo, "Subject: %s\n", hp->h_subject), gotcha++;
+ 	if (hp->h_cc != NULL && w & GCC)
+ 		fmt("Cc:", hp->h_cc, fo, w&GCOMMA), gotcha++;
+-/* Should not put bcc into mails (Closes: Bug#75232)
+ 	if (hp->h_bcc != NULL && w & GBCC)
+ 		fmt("Bcc:", hp->h_bcc, fo, w&GCOMMA), gotcha++;
+-*/
+ 	if (hp->h_header != NULL && w)
+ 		fprintf(fo, "%s\n", hp->h_header), gotcha++;
+         if (hp->h_replyto != NULL && w & GREPLYTO)
diff -Nru bsd-mailx-8.1.2-0.20160123cvs/debian/patches/series bsd-mailx-8.1.2-0.20160123cvs/debian/patches/series
--- bsd-mailx-8.1.2-0.20160123cvs/debian/patches/series	2016-01-28 23:35:39.000000000 +0100
+++ bsd-mailx-8.1.2-0.20160123cvs/debian/patches/series	2016-05-04 14:54:21.000000000 +0200
@@ -29,3 +29,4 @@
 30-Add-missing-includes.patch
 31-Do-not-call-pledge.patch
 32-Fix-FTBFS-on-Hurd.patch
+33-Fix-bcc.patch

Reply via email to