buf[0] = '\n';
buf[1] = 0;
- if ((flags & (CH_REORDER | CH_WEED | CH_MIME | CH_DECODE | CH_PREFIX)) == 0)
+ if ((flags & (CH_REORDER | CH_WEED | CH_MIME | CH_DECODE | CH_PREFIX | CH_WEED_DELIVERED)) == 0)
{
/* Without these flags to complicate things
* we can do a more efficient line to line copying
mutt_matches_ignore (buf, Ignore) &&
!mutt_matches_ignore (buf, UnIgnore))
continue;
+ if ((flags & CH_WEED_DELIVERED) &&
+ mutt_strncasecmp ("Delivered-To:", buf, 13) == 0)
+ continue;
if ((flags & (CH_UPDATE | CH_XMIT | CH_NOSTATUS)) &&
(mutt_strncasecmp ("Status:", buf, 7) == 0 ||
mutt_strncasecmp ("X-Status:", buf, 9) == 0))
message notifying you of new mail. This is independent of the
setting of the <ref id="beep" name="beep"> variable.
+<sect2>bounce_delivered<label id="bounce_delivered">
+<p>
+Type boolean<newline>
+Default: set
+
+When this variable is set, mutt will include Delivered-To headers
+when bouncing messages. Postfix users may wish to unset this
+variable.
+
<sect2>charset<label id="charset">
<p>
Type: string<newline>
{ "auto_tag", DT_BOOL, R_NONE, OPTAUTOTAG, 0 },
{ "beep", DT_BOOL, R_NONE, OPTBEEP, 1 },
{ "beep_new", DT_BOOL, R_NONE, OPTBEEPNEW, 0 },
+ { "bounce_delivered", DT_BOOL, R_NONE, OPTBOUNCEDELIVERED, 1 },
{ "charset", DT_STR, R_NONE, UL &Charset, UL "iso-8859-1" },
{ "check_new", DT_BOOL, R_NONE, OPTCHECKNEW, 1 },
{ "collapse_unread", DT_BOOL, R_NONE, OPTCOLLAPSEUNREAD, 1 },
#define CH_UPDATE_LEN (1<<10) /* update Lines: and Content-Length: */
#define CH_TXTPLAIN (1<<11) /* generate text/plain MIME headers */
#define CH_NOLEN (1<<12) /* don't write Content-Length: and Lines: */
+#define CH_WEED_DELIVERED (1<<13) /* weed eventual Delivered-To headers */
/* flags for mutt_enter_string() */
#define M_ALIAS 1 /* do alias "completion" by calling up the alias-menu */
OPTAUTOTAG,
OPTBEEP,
OPTBEEPNEW,
+ OPTBOUNCEDELIVERED,
OPTCHECKNEW,
OPTCOLLAPSEUNREAD,
OPTCONFIRMAPPEND,
if ((f = safe_fopen (tempfile, "w")) != NULL)
{
const char *fqdn;
-
+ int ch_flags = CH_XMIT | CH_NONEWLINE;
+
+ if (!option (OPTBOUNCEDELIVERED))
+ ch_flags |= CH_WEED_DELIVERED;
+
fseek (msg->fp, h->offset, 0);
- mutt_copy_header (msg->fp, h, f, CH_XMIT | CH_NONEWLINE, NULL);
+ mutt_copy_header (msg->fp, h, f, ch_flags, NULL);
fprintf (f, "Resent-From: %s", NONULL(Username));
if((fqdn = mutt_fqdn(1)))
fprintf (f, "@%s", fqdn);