[Fwd: Whitelist ??]

David Relson relson at osagesoftware.com
Tue Dec 7 00:03:06 CET 2004


On Mon, 06 Dec 2004 15:46:53 -0700
Michael Gale wrote:


Reading stdin twice isn't doable, AFAIK.  I use "cat > tmp.$$" to create
a file and then use that.

> if [ `grep -c -i -f $BOGOFILTER_DIR/whitelist/$whitelistdir/whitelist
>
> /dev/null` ]; then
>          $FILTER -l -p -e --spamicity_tags="Whitelisted,Ham,Unsure" >
> msg.$$ || exit $EX_TEMPFAIL
> else
>          $FILTER -l -p -e > msg.$$ || exit $EX_TEMPFAIL
> fi

FWIW, these lines could be rewritten as:

 grep ...
 if [ $? ] ; then
   OPTIONS="--spamicity_tags=..."
 fi
 $FILTER -l -p -e $OPTIONS > msg.$$ || exit $EX_TEMPFAIL

...[snip]...

Looks reasonable to me.  I'll let others continue the search for
gotchas.

Regards,

David



More information about the Bogofilter mailing list