diff options
author | Thomas Roessler <roessler@does-not-exist.org> | 1999-03-15 15:32:15 +0000 |
---|---|---|
committer | Thomas Roessler <roessler@does-not-exist.org> | 1999-03-15 15:32:15 +0000 |
commit | 9f26443a68515fe7683aa5f83c6698b28a39d7f9 (patch) | |
tree | cc68162b26ede03d82b108d1751ec6e56b9b32ae | |
parent | 0560bde39f6fc62c80843c6ebf3ff11b1debed81 (diff) |
Add $bounce_delivered.
-rw-r--r-- | copy.c | 5 | ||||
-rw-r--r-- | doc/manual.sgml.in | 9 | ||||
-rw-r--r-- | init.h | 1 | ||||
-rw-r--r-- | mutt.h | 2 | ||||
-rw-r--r-- | sendlib.c | 8 |
5 files changed, 22 insertions, 3 deletions
@@ -60,7 +60,7 @@ mutt_copy_hdr (FILE *in, FILE *out, long off_start, long off_end, int flags, 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 @@ -149,6 +149,9 @@ mutt_copy_hdr (FILE *in, FILE *out, long off_start, long off_end, int flags, 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)) diff --git a/doc/manual.sgml.in b/doc/manual.sgml.in index 08601669..9f2cd204 100644 --- a/doc/manual.sgml.in +++ b/doc/manual.sgml.in @@ -2608,6 +2608,15 @@ When this variable is set, mutt will beep whenever it prints a 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> @@ -85,6 +85,7 @@ struct option_t MuttVars[] = { { "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 }, @@ -86,6 +86,7 @@ #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 */ @@ -289,6 +290,7 @@ enum OPTAUTOTAG, OPTBEEP, OPTBEEPNEW, + OPTBOUNCEDELIVERED, OPTCHECKNEW, OPTCOLLAPSEUNREAD, OPTCONFIRMAPPEND, @@ -1821,9 +1821,13 @@ void mutt_bounce_message (HEADER *h, ADDRESS *to) 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); |