procmail
[Top] [All Lists]

Re: html bouncer

2001-03-21 22:03:15
Dear David, all...

On my previous mail, if you run the recipe against the test message I pasted
you will see that not even the address matches, when that is suppoused to be
the first thing to happen: if the address matches -cba(fac|stf|adj...)?(_at_)-
then check if ()<HTML> and do the rest. Run:

machine_prompt$ procmail VERBOSE=on DEFAULT=/dev/null LOGFILE=/dev/pts/0  \
MYTEST_LOG=/dev/pts/0 ~/no-html.rc < ~/test.txt

Where test is:

Received: from bogart.geeworld.com 
(IDENT:root(_at_)bogart(_dot_)geeworld(_dot_)com
[205.244.243.18])
        by atlantis.bus.ucf.edu (8.9.3/8.9.3) with ESMTP id TAA14537
        for <cba(_at_)bus(_dot_)ucf(_dot_)edu>; Wed, 21 Mar 2001 19:36:29 -0500
Received: from crypto (ubr-33.11.20.curryford.cfl.rr.com [65.33.11.20])
        by bogart.geeworld.com (8.9.3/8.9.3) with SMTP id TAA08712
        for <cba(_at_)bus(_dot_)ucf(_dot_)edu>; Wed, 21 Mar 2001 19:37:07 -0500
Message-ID: <00ad01c0b268$2d6599b0$01000001(_at_)crypto>
From: "David Collantes" <david(_at_)netbros(_dot_)com>
To: <cba(_at_)bus(_dot_)ucf(_dot_)edu>
Subject: The same...
Date: Wed, 21 Mar 2001 19:36:16 -0500
MIME-Version: 1.0
Content-Type: multipart/alternative;
        boundary="----=_NextPart_000_00AA_01C0B23E.324A23D0"
X-Priority: 3
X-MSMail-Priority: Normal
X-Mailer: Microsoft Outlook Express 5.50.4133.2400
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400

This is a multi-part message in MIME format.

------=_NextPart_000_00AA_01C0B23E.324A23D0
Content-Type: text/plain;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

Disregard

------=_NextPart_000_00AA_01C0B23E.324A23D0
Content-Type: text/html;
        charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<DEFANGED_META http-equiv=3DContent-Type content=3D"text/html; =
charset=3Diso-8859-1">
<DEFANGED_META content=3D"MSHTML 5.50.4611.1300" name=3DGENERATOR>
 <!-- <DEFANGED_STYLE> --> </DEFANGED_STYLE>
</HEAD>
<BODY>
<DIV><FONT color=3D#800080=20
size=3D2><STRONG><EM><U>Disregard</U></EM></STRONG></FONT></DIV></BODY></=
HTML>

------=_NextPart_000_00AA_01C0B23E.324A23D0--

And you will see what I mean. This is what I get when I run the above:

procmail: [18122] Wed Mar 21 23:48:40 2001
procmail: Assigning "DEFAULT=/dev/null"
procmail: Assigning "LOGFILE=/dev/pts/0"
procmail: Opening "/dev/pts/0"
procmail: Assigning "MYTEST_LOG=/dev/pts/0"
procmail: Rcfile: "/admin/d/david/no-html.rc"
procmail: Assigning "MAILDIR=/admin/d/david"
procmail: Executing "date,+%s"
procmail: Assigning "file_name=985236520"
procmail: No match on ! "(^(Mailing-List:|Precedence:.*(junk|bulk|list)|To:
Multiple recipients of
|(((Resent-)?(From|Sender)|X-Envelope-From):|>?From 
)([^>]*[^((_dot_)%(_at_)a-z0-9])?(P
ost(ma?(st(e?r)?|n)|office)|(send)?Mail(er)?|daemon|m(mdf|ajordomo)|n?uucp|L
IST(SERV|proc)|NETSERV|o(wner|ps)|r(e(quest|sponse)|oot)|b(ounce|bs\.smtp)|e
cho|mirror|s(erv(ices?|er)|mtp(error)?|ystem)|A(dmin(istrator)?|MMGR|utoansw
er))(([^).!:a-z0-9][-_a-z0-9]*)?[%@>         ][^<)]*(\(.*\).*)?)?$([^>]|$)))
"
procmail: Assigning "LASTFOLDER=/dev/null"
procmail: Opening "/dev/null"
From owner-cba(_at_)atlantis(_dot_)bus(_dot_)ucf(_dot_)edu  Wed Mar 21 
19:36:29 2001
 Subject: The same...
  Folder: /dev/null
1667

The no-html.rc reads, as per your suggestion:

file_name = `date +%s`

:0c # are you positive $file_name will be unique and you don't need a lock?
* ! ^FROM_DAEMON
* cba(stf|fac)?@(atlantis\.)?bus\.ucf\.edu
* B ?? ()<HTML>
* B ?? ()</HTML>
/tmp/$file_name.txt

:0A
| /usr/local/bin/html_bouncer.pl $file_name.txt

Any help, please?


----- Original Message -----
From: "David W. Tamkin" <dattier(_at_)ripco(_dot_)com>
To: "David Collantes" <david(_at_)netbros(_dot_)com>
Cc: "Procmail Mailing List" <procmail-users(_at_)procmail(_dot_)org>
Sent: Wednesday, March 21, 2001 10:29 PM
Subject: Re: html bouncer


David Collantes followed up,

| Neither one of the recipes works. I am pasting a test message for you to
try
| them on "dry" below. Any help highly appreciated.

Well, of course not.  The regexp ()</HTML> doesn't appear in the body
because
it is broken up by quoted-[un]printable encoding:

| size=3D2><STRONG><EM><U>Disregard</U></EM></STRONG></FONT></DIV></BODY></=
| HTML>

so the conditions don't match.  Even at that I don't know what your perl
script is supposed to do or how well it would function, so when you say that
neither recipe works without saying what happens instead, you give people
nothing to go on.

_______________________________________________
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>