procmail
[Top] [All Lists]

Re: /dev/null Recipe

1998-01-27 14:47:25
Hermann Wecke asked,

| Which one is correct??? Or both do the same?
| 
| :0
| * 1^1 ^.*hsbrasil\.com\.br
| * -1^1 ^Subject:.*hsbrasil\.com\.br
| /dev/null
| 
| :0
| * 1^1 ^.*hsbrasil\.com\.br\>
| * -1^1 ^Subject:.*hsbrasil\.com\.br\>
| /dev/null

They are not exactly the same, but the difference is slight.

The second version requires that the character after ".br" be a newline, a
tab, a space, or a punctuation mark (other than an underscore).  If the
character after the "r" is a digit, a letter of the alphabet, or an under-
score, the first recipe will find matches but the second recipe will not.

As to which one is correct, that depends on your purposes.  Forced to guess
at your goal, I'd suppose that the second is closer, but it is very unlikely
that the first recipe will make any wrong decisions.

[Actually, neither is correct; the "^.*" on the first condition of each
 is just cycle-eating waste and should be deleted.]

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