From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/34379 Path: main.gmane.org!not-for-mail From: merlyn@stonehenge.com (Randal L. Schwartz) Newsgroups: gmane.emacs.gnus.general Subject: Re: htmlified mail Date: 24 Jan 2001 06:06:03 -0800 Sender: owner-ding@hpc.uh.edu Message-ID: References: NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1035170316 30105 80.91.224.250 (21 Oct 2002 03:18:36 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:18:36 +0000 (UTC) Cc: ding@gnus.org Return-Path: Original-Received: from karazm.math.uh.edu (karazm.math.uh.edu [129.7.128.1]) by mailhost.sclp.com (Postfix) with ESMTP id B86E7D049D for ; Wed, 24 Jan 2001 09:06:51 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by karazm.math.uh.edu (8.9.3/8.9.3) with ESMTP id IAC07951; Wed, 24 Jan 2001 08:06:38 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Wed, 24 Jan 2001 08:06:00 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id IAA26083 for ; Wed, 24 Jan 2001 08:05:50 -0600 (CST) Original-Received: from halfdome.holdit.com (halfdome.holdit.com [209.102.105.64]) by mailhost.sclp.com (Postfix) with ESMTP id BDE06D049D for ; Wed, 24 Jan 2001 09:06:17 -0500 (EST) Original-Received: (from merlyn@localhost) by halfdome.holdit.com (8.9.1/8.9.1) id GAA01899; Wed, 24 Jan 2001 06:06:03 -0800 Original-To: Bill White In-Reply-To: User-Agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/20.3 Precedence: list X-Majordomo: 1.94.jlt7 Original-Lines: 53 Xref: main.gmane.org gmane.emacs.gnus.general:34379 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:34379 >>>>> "Bill" == Bill White writes: Bill> I'm seeing a lot of this crap nowadays. Is this MS Lookout! output? Apparently, MS Outlook (not Outlook Express) for Windows 2K does not have a global "send plaintext mail only". To send plaintext mail, the address must be added to an address book, and then for that specific address, an option must be individually selected to say "send plaintext". This is pure evil. I wrote the following Perl program as a hasty response, and pipe everything through it that matches "Content-type:.*boundary" in the header. It's harmless on *real* MIME content, other than eating a bit of CPU. Requires the MIME::Tools distribution from teh CPAN. #!/usr/bin/perl -w use strict; $|++; my $envelope = ; use MIME::Parser; use MIME::Entity; my $parser = MIME::Parser->new; $parser->output_to_core(1); $parser->tmp_to_core(1); my $ent = eval { $parser->parse(\*STDIN) }; die "$@" if $@; if ($ent->effective_type eq "multipart/alternative" and $ent->parts == 2 and $ent->parts(0)->effective_type eq "text/plain" and $ent->parts(1)->effective_type eq "text/html") { my $newent = MIME::Entity->build(Data => $ent->parts(0)->body_as_string . "\n\n[[HTML alternate version deleted]]\n"); $ent->parts([$newent]); $ent->make_singlepart; $ent->sync_headers(Length => 'COMPUTE', Nonstandard => 'ERASE'); } print $envelope; $ent->print; -- Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095 Perl/Unix/security consulting, Technical writing, Comedy, etc. etc. See PerlTraining.Stonehenge.com for onsite and open-enrollment Perl training!