procmail
[Top] [All Lists]

Re: some problems...

1997-05-20 17:20:00
On Tue, May 20, 1997 at 05:48:19PM -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.

        Thanks. This works :)

-- 
Roman V. Isaev                         Moscow, Russia
========================================================
Homepage ------------> http://accessnet.ru/lp/rm/index.html
Obscene limericks ---> http://accessnet.ru/lp/rm/eng/elim.html
Firearms in Russia --> http://accessnet.ru/lp/rm/eng/firearms.html

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