procmail
[Top] [All Lists]

Re: some problems...

1997-05-20 16:45:00
"Roman V. Isaev" <rm(_at_)techno(_dot_)ru> writes:
On Tue, May 20, 1997 at 02:01:45PM -0500, Philip Guenther wrote:
BOZOS=`echo \`cat /u/halyava/.bozos\`|tr ' ' '|'`
:0
* !^FROM_DAEMON
* !^X-Loop: request(_at_)halyava(_dot_)ru
* $(^From:|by|from).*\/${BOZOS}
$MATCH is empty :(
Because you should be using something like:
     BOZOS=`perl -0777 -pe 's:\n+:|:g;s:[\s|]+$::;' /u/halyava/.bozos`

      Just tried it. No, $MATCH is empty anyway :( Recepie works, but
$MATCH is empty.

Try putting parens around the variable expansion:

        * $ (^From:|by|from).*\/(${BOZOS})

The alternations (|'s) in the variable's expansion have lower precedence
than the \/ token, so MATCH will only be set iff it's the first of the
possible alternations that is chosen.

Philip Guenther

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