procmail
[Top] [All Lists]

Re: Need assistance

2001-05-08 23:11:22
Poohba wrote:
I have this recipie that just won't work.  I want it to print just the
text/plain version of the email.  Not the text/html version.  What
I have is

:0 c
* ^Content-Type.*text/plain
{
 :0 fbw
 * ^Content-Transfer-Encoding: *quoted-printable
 | mimencode -u -q

   :0 Afhw
   | formail -I "Content-Transfer-Encoding: 8bit"

   :0 fbw
   * ^Content-Transfer-Encoding: *base64
   | mimencode -u -b

   :0 Afhw
   | formail -I "Content-Transfer-Encoding: 8bit"

 :0 c
 * 1^0 From.*(Clinical Subject|aaiclinic|aaiintl.com)
 * 1^0 Subject.*new test
 |  lpr
}

It doesn't even match on the header Content-Type:.

[...]

This is what I see when I look at the source of the letter in netscape

--------------A04BF840F973DA50E4E57090
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit

Your recipe is egrepping the header of the email for Content-Type.
However, since the email is probably "Content-Type: multipart/alternative"
or some such thing, that is why you don't get a match.  The
Content-Type you see after the boundary marker is declaring the
content of the attachemnt, but is not part of the email's header;
it's in the body.

-- 
Linux: The Choice of the GNU Generation


_______________________________________________
procmail mailing list
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail

<Prev in Thread] Current Thread [Next in Thread>