procmail
[Top] [All Lists]

Re: if-then or something similar

2001-07-19 13:38:32
* Arvid Warnecke <arvid(_dot_)warnecke(_at_)tu-clausthal(_dot_)de> [010719 
13:39]:
Hello!

I'd like to do something like a "if-then" in procmail, like I would be
able to do in a shell-script.
Here is it as shell-script, is there any way to translate it to my
.procmailrc?

if [ "`cat .mutt.aliases | grep -ic $FROM`" != "0" ]; then
      $PERLSCRIPT
fi

Maybe "!=" has to be replaced by "-gt", I am not sure about that yet.
$FROM is from "FROM=`formail -zxFrom:`"

So, is something like that possible?

Try this (untested, of course!):

:0:
* ? grep -i "$FROM" .mutt.aliases
| $PERLSCRIPT

-- 
- Matt Dunford <> zoot(_at_)zotikos(_dot_)com ..
-. www.zotikos.com -- o,;-
        
If a man knows not what harbour he seeks, any wind is the right wind.
  -- Seneca
--
_______________________________________________
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>