procmail
[Top] [All Lists]

Re: Problem with recipe (Laurent Balloy)

2003-02-19 05:39:54
Laurent Balloy <laurent(_dot_)balloy(_at_)cadeaurelation(_dot_)com> writes:

Hello to all,

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

/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 "/"

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

Mysterious -- I tried a few tests, and it seemed to tell the difference between 
OBJECT and /OBJECT.
If you aren't using the D flag, then you don't need to worry about case 
sensitivity.
You don't need to end a pattern with .*
If you want to send both head and body to the action, you can leave out the h 
and b flags.
You also need to \ the period before the word 'class'.

~~~ begin file testrecipe ~~~
LOGFILE=testprocmail
VERBOSE=on

: 0HB
* ^Content-Type:.*(HTML|html).*
* (/APPLET|/applet|.CLASS|.class|/OBJECT|/object)
| echo "found something"

:0
/dev/null

~~~ begin file testmessage1 ~~~
From jeff Wed Feb 19 2003
From: jeff
To: bob
Subject: the /OBJECT of our lesson
Content-Type: text/html

can you see the OBJECT of our lesson?

~~~ begin file testmessage2 ~~~
From jeff Wed Feb 19 2003
From: jeff
To: bob
Subject: the OBJECT of our lesson
Content-Type: text/html

can you see the OBJECT of our lesson?

~~~ command lines ~~~

cat testmessage1 | procmail -m testrecipe
cat testmessage2 | procmail -m testrecipe

~~~ begin file testprocmail ~~~
procmail: [6513] Wed Feb 19 04:13:06 2003
procmail: Match on "^Content-Type:.*(HTML|html).*"
procmail: Match on "(/APPLET|/applet|.CLASS|.class|/OBJECT|/object)"
procmail: Assigning "LASTFOLDER=echo found something"
From jeff Wed Feb 19 2003
 Subject: the /OBJECT of our lesson
  Folder: echo found something                                              119
procmail: Executing "echo,found something"
procmail: [7411] Wed Feb 19 04:13:38 2003
procmail: Match on "^Content-Type:.*(HTML|html).*"
procmail: No match on "(/APPLET|/applet|.CLASS|.class|/OBJECT|/object)"
procmail: Assigning "LASTFOLDER=/dev/null"
procmail: Opening "/dev/null"


Do you have some log fragments we can look at?

Jeff

_______________________________________________
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>
  • Re: Problem with recipe (Laurent Balloy), Jeff Orrok <=