1 Oct 2006 01:52
Re: Running a script from procmail
Dallman Ross <dman <at> nomotek.com>
2006-09-30 23:52:12 GMT
2006-09-30 23:52:12 GMT
On Sat, Sep 30, 2006 at 01:56:46PM -0700, Professional Software
Engineering wrote:
> REALLY simplify and speed things up (since you're making use of fewer
> processes):
>
> :0:
> * ^X-Original-To:[ ]*\/[^ ]* <at> mydomain\.tld
> * MATCH ?? ^\/[^ <at> ]+
> * $? fgrep -x -i "$MATCH" $RCPT_BLACKLIST
> blacklist
> Note that I started composing this before I saw Dallman's
> most recent contribution (which also suggests eliminating the
> formail/awk). This remains an improvement over his very similar
> method because there's no need to pipe the match string from echo
> into formail, and this also brings in the outer domain condition.
> Short of setting RCPT_BLACKLIST, the recipe above is the ENTIRETY
> of the recipe you need.
What pipe to formail? I had this:
:0
* ^X-Original-To: \/[^ <at> ]+
* $? echo $MATCH | fgrep -i -x -f $RCPT_BLACKLIST
blacklist
(I should have used a lockfile.)
Okay, you mean pipe to fgrep instead of just running fgrep.
(Continue reading)
RSS Feed