procmail
[Top] [All Lists]

Re: Problem with recipe "FILTER HTML"

2003-02-18 10:29:38
On Tue, Feb 18, 2003 at 10:14:27AM +0100, Laurent Balloy wrote:

I have a recipe that should do me a copy of the receipts in HTML that
conteniennent the following words exclussivement:

Do you mean it should *only* contain one (or one or more) of
those words?  I'm wondering about "exclussivement" (exclusively).

/APPLET
/applet
.CLASS
.class
/OBJECT
/object

I have an error in this recipe for when a person writes in his mail
"OBJECT: SUBJECT OF THE WEEK" Procmail considers the my OBJECT while I
believe to request him the word "/OBJECT", it does not hold counts of
the "/"

While there are problems with your recipe's syntax, they do not appear
to me to have to do with the '/'.  Are you sure you're not reacting
erroneously to the copy sent you via the `c' flag you've used on
the recipe?  Why do you think the recipe is failing?

Here my recipe, you could say me where this finds my error.  

: 0cHBhb:
* ^Content-Type:.*(HTML|html).*
* (/APPLET|/applet|.CLASS|.class|/OBJET|/objet)
$MAILDIRREJECT/$DATEBACKUP.$LOGNAME

Note that procmail is not case-sensitive unless you tell it to be.
So you don't need to write your strings upper- and also lower-case.
(Anyway, what would happen if somebody sent with the word "/ObJeCt"?)

Note, also, that your HBhb flags are not helpful.  The small-case
pair is the default.  It specifies what happens to the message at
the delivery action.  The HB may or may not be overkill.  Do you
want to consider the headers in the condition line, or just the
body?  From your introductory paragraph above, I took it to be the
body only that you were interested in.  Finally, you want to
quote the dot in ".class".  Thus:

        :0:
        * ^Content-Type:.*html
        * B ?? (/(APPL|OBJ)ET|\.CLASS)
        $MAILDIRREJECT/$DATEBACKUP.$LOGNAME

-- 
dman

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