<<< Date Index >>>     <<< Thread Index >>>

bug#571: marked as done (mutt should not replicate ">From " headers while bouncing)



Your message dated Mon, 8 Sep 2003 02:25:56 +0200
with message-id <20030908002553.GA18304@xxxxxxxxxxxxxxxxxxxxxxxxxx>
and subject line (no subject)
has caused the attached bug report to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what I am
talking about this indicates a serious mail system misconfiguration
somewhere.  Please contact me immediately.)

Herr der Kaefer
(administrator, GUUG bugs database)

--------------------------------------
Received: (at submit) by bugs.guug.de; 1 May 2001 15:37:11 +0000
>From md@xxxxxxxx Tue May 01 17:37:11 2001
Received: from attila.bofh.it ([213.92.8.2] ident=postfix)
        by trithemius.gnupg.org with esmtp (Exim 3.12 #1 (Debian))
        id 14ucD9-0005nC-00
        for <submit@xxxxxxxxxxxx>; Tue, 01 May 2001 17:37:11 +0200
Received: by attila.bofh.it (Postfix, from userid 10)
        id 2776461B81; Tue,  1 May 2001 17:36:42 +0200 (CEST)
Received: by wonderland.linux.it (Postfix/Md, from userid 1001)
        id 0CDEF18190; Tue,  1 May 2001 17:35:59 +0200 (CEST)
From: Marco d'Itri <md@xxxxxxxx>
To: submit@xxxxxxxxxxxx
Subject: mutt should not replicate ">From " headers while bouncing
X-GUUG-CC: 95924@xxxxxxxxxxxxxxx
Message-Id: <20010501153559.0CDEF18190@xxxxxxxxxxxxxxxxxxx>
Date: Tue,  1 May 2001 17:35:59 +0200 (CEST)

Package: mutt
Version: 1.2.5-4, but also 1.3.17-1
Severity: normal

[NOTE: this bug report has been submitted to the debian BTS as Bug#95924.
Please Cc all your replies to 95924@xxxxxxxxxxxxxxxx]

From: Bas Zoetekouw <bas@xxxxxxxxxxx>
Subject: mutt should not replicate ">From " headers while bouncing
Date: Tue, 1 May 2001 10:38:55 +0200

When delevering mail using procmail, in some cases procmail generates
new "From " headers and `escapes' the old From headers with an '>', like
this:
  From bas@xxxxxxxxxxx Mon Apr 02 09:30:39 2001
  >From bas  Mon Apr  2 09:30:39 2001
  Received: from localhost ([127.0.0.1])

Now, the problem is that when you bounce such a message in mutt, mutt
feeds this escaped header to sendmail (exim in my case), which
chokes on it, and interpretes the > as the beginning of the body. This
results in a mutilated message being recieved.
This could very well be a bug in exim or procmail, but here is a simple
workaround patch for mutt. The diff is against 1.2.5, but should also
work with recent versions.

diff -Naur mutt-1.2.5.old/copy.c mutt-1.2.5/copy.c
--- mutt-1.2.5.old/copy.c       Thu Jun 15 23:06:40 2000
+++ mutt-1.2.5/copy.c   Tue May  1 10:37:57 2001
@@ -84,6 +84,11 @@
        else if (buf[0] == '\n' || (buf[0] == '\r' && buf[1] == '\n'))
          break; /* end of header */
 
+        /* procmail sets these fake ">From " headers. 
+        * so ignore anything that does not look like a header */
+       if (!isalnum(buf[0])) 
+         continue;
+       
        if ((flags & (CH_UPDATE | CH_XMIT | CH_NOSTATUS)) &&
            (mutt_strncasecmp ("Status:", buf, 7) == 0 ||
             mutt_strncasecmp ("X-Status:", buf, 9) == 0))
@@ -145,6 +150,11 @@
       else if (buf[0] == '\n' || (buf[0] == '\r' && buf[1] == '\n'))
        break; /* end of header */
 
+      /* procmail sets these fake ">From " headers. 
+       * so ignore anything that does not look like a header */
+      if (!isalnum(buf[0])) 
+        continue;
+       
       /* note: CH_FROM takes precedence over header weeding. */
       if (!((flags & CH_FROM) && (flags & CH_FORCE_FROM) && this_is_from) &&
          (flags & CH_WEED) &&


-- 
Kind regards,
+---------------------------------------------------------------+
| Bas Zoetekouw                  | Si l'on sait exactement ce   |
|--------------------------------| que l'on va faire, a quoi    |
| zoetekw@xxxxxxxxxx             | bon le faire?                |
|    bas@xxxxxxxxxxx             |               Pablo Picasso  |
+---------------------------------------------------------------+ 


---------------------------------------
Received: (at 571-done) by bugs.guug.de; 8 Sep 2003 00:26:24 +0000
>From roessler+bounce@xxxxxxxxxxxxxxxxxx Mon Sep 08 02:24:05 2003
Received: from does-not-exist.info ([217.160.221.198] 
helo=kamino.does-not-exist.org)
        by trithemius.gnupg.org with esmtp (Exim 3.35 #1 (Debian))
        id 19w9p7-000560-00
        for <571-done@xxxxxxxxxxxx>; Mon, 08 Sep 2003 02:24:05 +0200
Received: from voyager.does-not-exist.org (pD900B2D0.dip0.t-ipconnect.de 
[217.0.178.208])
        (using TLSv1 with cipher EDH-RSA-DES-CBC3-SHA (168/168 bits))
        (No client certificate requested)
        by kamino.does-not-exist.org (Postfix) with ESMTP
        id 122E5314104; Mon,  8 Sep 2003 02:26:26 +0200 (CEST)
Received: by voyager.does-not-exist.org (Postfix, from userid 500)
        id 50EE68179; Mon,  8 Sep 2003 02:25:56 +0200 (CEST)
Date: Mon, 8 Sep 2003 02:25:56 +0200
From: Thomas Roessler <roessler@xxxxxxxxxxxxxxxxxx>
To: 571-done@xxxxxxxxxxxx
Message-ID: <20030908002553.GA18304@xxxxxxxxxxxxxxxxxxxxxxxxxx>
Mime-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
User-Agent: Mutt/1.5.4i
X-Spam-Status: No, hits=-102.5 required=5.0
        tests=USER_AGENT_MUTT,USER_IN_WHITELIST
        version=2.55
X-Spam-Level: 
X-Spam-Checker-Version: SpamAssassin 2.55 (1.174.2.19-2003-05-19-exp)

Closing bugs referenced from within mutt's ChangeLog.