Hi, updated the patch for 1.5.20-5.
Can we please get this included/upstream? I don't want to maintain yet another patched debian package. regards Stefan -- Don't get stuck in a closet -- wear yourself out.
diff --git a/debian/changelog b/debian/changelog index 27ceeef..7a710cf 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,10 @@ +mutt (1.5.20-5.1) unstable; urgency=low + + * Non-maintainer upload. + * Do not write out BCC header to MTA (Closes: 467432) + + -- Stefan Völkel <b...@bc-bd.org> Thu, 03 Dec 2009 11:15:54 +0100 + mutt (1.5.20-5) unstable; urgency=low * debian/patches: diff --git a/debian/patches/debian-specific/Muttrc b/debian/patches/debian-specific/Muttrc index 02173fa..fa02bff 100644 --- a/debian/patches/debian-specific/Muttrc +++ b/debian/patches/debian-specific/Muttrc @@ -3,9 +3,11 @@ * 2009-01-15 myon: refreshed for mutt-1.5.19; drop our list of ignored headers in favor of upstream's new unignore list ---- a/doc/Muttrc.head -+++ b/doc/Muttrc.head -@@ -12,6 +12,32 @@ unignore from: subject to cc date x-mail +Index: mutt/doc/Muttrc.head +=================================================================== +--- mutt.orig/doc/Muttrc.head 2009-06-30 17:44:37.837828815 +0200 ++++ mutt/doc/Muttrc.head 2009-06-30 17:46:20.668989316 +0200 +@@ -12,6 +12,31 @@ # Display the fields in this order hdr_order date from to cc subject @@ -24,9 +26,8 @@ +# Specifies how to sort messages in the index menu. +set sort=threads + -+# Uncomment if your MTA does not strip Bcc: headers. -+# (postfix strips them, exim4 does not.) -+#unset write_bcc ++# Do not write out Bcc headers ++unset write_bcc +# Postfix and qmail use Delivered-To for detecting loops +unset bounce_delivered + @@ -38,7 +39,7 @@ # imitate the old search-body function macro index \eb "<search>~b " "search in message bodies" -@@ -23,7 +49,7 @@ macro index,pager,attach,compose \cb "\ +@@ -23,7 +48,7 @@ "call urlview to extract URLs out of a message" # Show documentation when pressing F1 @@ -47,7 +48,7 @@ # show the incoming mailboxes list (just like "mutt -y") and back when pressing "y" macro index,pager y "<change-folder>?<toggle-mailboxes>" "show incoming mailboxes list" -@@ -35,7 +61,7 @@ bind browser y exit +@@ -35,7 +60,7 @@ # append-hook \\.gz$ "gzip -c %t >> %f" # If Mutt is unable to determine your site's domain name correctly, you can @@ -56,7 +57,7 @@ # # set hostname=cs.hmc.edu -@@ -101,6 +127,9 @@ attachments +I text/plain +@@ -101,6 +126,9 @@ attachments -A message/external-body attachments -I message/external-body diff --git a/debian/patches/debian-specific/document_debian_defaults b/debian/patches/debian-specific/document_debian_defaults index 7240bef..b9a1dd4 100644 --- a/debian/patches/debian-specific/document_debian_defaults +++ b/debian/patches/debian-specific/document_debian_defaults @@ -3,8 +3,8 @@ only on Debian systems Index: mutt/init.h =================================================================== ---- mutt.orig/init.h 2009-06-25 12:36:35.000000000 +0200 -+++ mutt/init.h 2009-06-25 12:36:36.000000000 +0200 +--- mutt.orig/init.h 2009-06-30 17:51:50.080932210 +0200 ++++ mutt/init.h 2009-06-30 17:52:09.189609014 +0200 @@ -312,6 +312,9 @@ ** .pp ** When this variable is \fIset\fP, mutt will include Delivered-To headers when @@ -66,13 +66,3 @@ Index: mutt/init.h */ { "sort_alias", DT_SORT|DT_SORT_ALIAS, R_NONE, UL &SortAlias, SORT_ALIAS }, /* -@@ -3348,6 +3367,9 @@ - ** is set to deliver directly via SMTP (see $$smtp_url), this - ** option does nothing: mutt will never write out the ``Bcc:'' header - ** in this case. -+ ** .pp -+ ** \fBNote:\fP On Debian systems, exim4 and postfix strip BCC headers by -+ ** default. The above warning applies to exim3 users, see /etc/Muttrc. - */ - { "write_inc", DT_NUM, R_NONE, UL &WriteInc, 10 }, - /* diff --git a/debian/patches/debian-specific/write_bcc.patch b/debian/patches/debian-specific/write_bcc.patch new file mode 100644 index 0000000..7a28c8b --- /dev/null +++ b/debian/patches/debian-specific/write_bcc.patch @@ -0,0 +1,93 @@ +Index: mutt/headers.c +=================================================================== +--- mutt.orig/headers.c 2009-06-30 17:51:05.276042945 +0200 ++++ mutt/headers.c 2009-06-30 17:53:33.055007250 +0200 +@@ -52,7 +52,7 @@ + } + + mutt_env_to_local (msg->env); +- mutt_write_rfc822_header (ofp, msg->env, NULL, 1, 0); ++ mutt_write_rfc822_header (ofp, msg->env, NULL, 1, 0, 1); + fputc ('\n', ofp); /* tie off the header. */ + + /* now copy the body of the message. */ +Index: mutt/init.h +=================================================================== +--- mutt.orig/init.h 2009-06-30 17:53:32.683367849 +0200 ++++ mutt/init.h 2009-06-30 17:53:33.075058388 +0200 +@@ -3365,11 +3365,9 @@ + { "write_bcc", DT_BOOL, R_NONE, OPTWRITEBCC, 1}, + /* + ** .pp +- ** Controls whether mutt writes out the ``Bcc:'' header when preparing +- ** messages to be sent. Exim users may wish to unset this. If mutt +- ** is set to deliver directly via SMTP (see $$smtp_url), this +- ** option does nothing: mutt will never write out the ``Bcc:'' header +- ** in this case. ++ ** Controls whether mutt writes out the Bcc header when saving ++ ** messages to FCC. Bcc headers will never be written to a message ++ ** when sending it. + */ + { "write_inc", DT_NUM, R_NONE, UL &WriteInc, 10 }, + /* +Index: mutt/protos.h +=================================================================== +--- mutt.orig/protos.h 2009-06-30 17:51:05.437001183 +0200 ++++ mutt/protos.h 2009-06-30 17:53:33.079080252 +0200 +@@ -372,7 +372,7 @@ + int mutt_write_mime_body (BODY *, FILE *); + int mutt_write_mime_header (BODY *, FILE *); + int mutt_write_one_header (FILE *fp, const char *tag, const char *value, const char *pfx, int wraplen, int flags); +-int mutt_write_rfc822_header (FILE *, ENVELOPE *, BODY *, int, int); ++int mutt_write_rfc822_header (FILE *, ENVELOPE *, BODY *, int, int, int); + void mutt_write_references (LIST *, FILE *, int); + int mutt_yesorno (const char *, int); + void mutt_set_header_color(CONTEXT *, HEADER *); +Index: mutt/send.c +=================================================================== +--- mutt.orig/send.c 2009-06-30 17:51:05.517523685 +0200 ++++ mutt/send.c 2009-06-30 17:53:33.087100946 +0200 +@@ -994,10 +994,10 @@ + unset_option (OPTWRITEBCC); + #endif + #ifdef MIXMASTER +- mutt_write_rfc822_header (tempfp, msg->env, msg->content, 0, msg->chain ? 1 : 0); ++ mutt_write_rfc822_header (tempfp, msg->env, msg->content, 0, msg->chain ? 1 : 0, 0); + #endif + #ifndef MIXMASTER +- mutt_write_rfc822_header (tempfp, msg->env, msg->content, 0, 0); ++ mutt_write_rfc822_header (tempfp, msg->env, msg->content, 0, 0, 0); + #endif + #ifdef USE_SMTP + if (old_write_bcc) +Index: mutt/sendlib.c +=================================================================== +--- mutt.orig/sendlib.c 2009-06-30 17:51:05.610742969 +0200 ++++ mutt/sendlib.c 2009-06-30 17:53:33.095126896 +0200 +@@ -1835,7 +1835,7 @@ + + + int mutt_write_rfc822_header (FILE *fp, ENVELOPE *env, BODY *attach, +- int mode, int privacy) ++ int mode, int privacy, int should_write_bcc) + { + char buffer[LONG_STRING]; + char *p, *q; +@@ -1878,7 +1878,7 @@ + else if (mode > 0) + fputs ("Cc: \n", fp); + +- if (env->bcc) ++ if (env->bcc && should_write_bcc) + { + if(mode != 0 || option(OPTWRITEBCC)) + { +@@ -2616,7 +2616,7 @@ + /* post == 1 => postpone message. Set mode = -1 in mutt_write_rfc822_header() + * post == 0 => Normal mode. Set mode = 0 in mutt_write_rfc822_header() + * */ +- mutt_write_rfc822_header (msg->fp, hdr->env, hdr->content, post ? -post : 0, 0); ++ mutt_write_rfc822_header (msg->fp, hdr->env, hdr->content, post ? -post : 0, 0, 1); + + /* (postponment) if this was a reply of some sort, <msgid> contians the + * Message-ID: of message replied to. Save it using a special X-Mutt- diff --git a/debian/patches/series b/debian/patches/series index b5e3544..51035c7 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -26,6 +26,8 @@ misc/define-pgp_getkeys_command.diff misc/gpg.rc-paths misc/smime.rc +debian-specific/write_bcc.patch + # patches integrated from upstream mercurial # drop them with a new upstream release upstream/533209-mutt_perror.patch