Subject: Re: OT: Carriage return inserts in MS Exchange email -- fix?
From: "Karsten M. Self" <kmself@ix.netcom.com>
Date: Thu, 21 Jul 2005 19:33:05 -0700
Thu, 21 Jul 2005 19:33:05 -0700
on Fri, Jul 22, 2005 at 03:50:44AM +0200, A. Pagaltzis (pagaltzis@gmx.de) wrote:
> * A. Pagaltzis <pagaltzis@gmx.de> [2005-07-22 01:45]:
> > Add ???;format=flowed??? to the Content-Type and watch the CRs
> > disappear from view. At least in mutt. I???m not sure this is the
> > right fix, to be honest; but it???s the only thing which managed to
> > excise those pesky CRs. (See <http://www.joeclark.org/ffaq.html>
> > as well as RFC2646.)
> 
> Here???s a generic procmail recipe:
> 
>     :0
>     * ^Content-Transfer-Encoding:.*quoted-printable
>     * ^Content-Type:.*text/plain
>     * ! ^Content-Type:.*format=flowed
>     * B ?? \r
>     {
>         CONTENT TYPE=`formail -x Content-Type`
> 
>         :0 fhw
>         | formail -i "Content-Type:$CONTENT TYPE; format=flowed"
>     }
> 
> This checks quoted-printable encoded text/plain messages that
> don't use format=flowed for CRs in the message body. (procmail
> decodes the transfer encoding before applying regexen, hence `\r`
> instead `=0D`.)
> 
> I'm still unsure whether this is the correct thing to do, but the
> only other solution I found is to sed the CRs out of the body,
> which is way more invasive.

Right.  And would break a number of things.

I've restricted this to dentrix for the moment:

============================================================================
# ----------------------------------------------------------------------
# Format=flowed
# Rerwite rule for some mailers....
# Thu Jul 21 19:28:57 PDT 2005
:0 fhw
* 1^0 ^FROM:.*@dentrix.com
{
    :0 fhw
    | $FORMAIL -R "Content-Type:" "X-Original-Content-Type:"

    :0 fhw
    | $FORMAIL -a "Content-Type: text/plain; charset=\"iso-8859-1\"; format=\"fl
owed\""
}
============================================================================

...which seems to do the trick.


Peace.

-- 
Karsten M. Self <kmself@ix.netcom.com>        http://kmself.home.netcom.com/
 What Part of "Gestalt" don't you understand?
    So don't deal with it.  Don't use software that uses it.
    - Jeff Waugh, offering preferred GNOME usability workaround.
       http://zgp.org/pipermail/linux-elitists/2004-January/008588.html



["application/pgp-signature" not shown]