linux-admin.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Scrip Help
@ 2006-01-04  9:09 Kev
  2006-01-04 15:25 ` Scott Taylor
  0 siblings, 1 reply; 6+ messages in thread
From: Kev @ 2006-01-04  9:09 UTC (permalink / raw)
  To: linux-admin

im seting up a scrip pipe for postfix + spamassassin as a filter in
postfix. 

this really works how ever i have a prb with the FWD depending on the
recipent, can any one help me with this line

if $EGREP -q -i "To: *kav@domain.net*" < /var/tempfs/out.$$

how can i tell egrep to check for any format of To: in the email heder.

===================

SENDMAIL="/usr/sbin/sendmail.postfix -i"
EGREP=/bin/egrep

EX_UNAVAILABLE=69

SPAMLIMIT=5

trap "rm -f /var/tempfs/out.$$" 0 1 2 3 15

cat | /usr/bin/spamc -u filter > /var/tempfs/out.$$

if $EGREP -q "^X-Spam-Level: \*{$SPAMLIMIT,}" < /var/tempfs/out.$$
then

KEV=kalinga@orbitsl.net

if $EGREP -q -i "To: *kev@domain.net*" < /var/tempfs/out.$$
        then

 $SENDMAIL admin@domain.net < /var/tempfs/out.$$

else

 $SENDMAIL spam@domain.net  < /var/tempfs/out.$$

fi

else
  $SENDMAIL "$@" < /var/tempfs/out.$$
fi

exit $?

======================================

thanks a lot

Kev


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2006-01-05  9:20 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-01-04  9:09 Scrip Help Kev
2006-01-04 15:25 ` Scott Taylor
2006-01-05  2:31   ` Re[2]: " Kev
2006-01-05  3:18     ` Tim Walberg
2006-01-05  4:27       ` Re[4]: " Kev
2006-01-05  9:20       ` Kev

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).