[KLUG Members] SPAM

Bruce Smith members@kalamazoolinux.org
13 May 2003 10:16:04 -0400


--=-wChTTmicd1wjy0MeAFtU
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

> Well I configured my sendmail for the black list that was recomended. Is 
> there any way to see it it's working?

You should see messages like this in /var/log/maillog* 

May 13 10:10:11 mail sendmail[27047]: h4DEABa27047: ruleset=check_relay,
arg1=[200.38.187.34], arg2=200.38.187.34, relay=[200.38.187.34],
reject=553 5.3.0 Spam blocked see:http://spamcop.net/bl.shtml?
200.38.187.34

I'll attach a short script I wrote to this email to check the maillog.
Run it without any arguments to check the current log, or you can give
it an argument of ".1"  (or ".2", ".3", etc) to check your old logs.

--------------------------------------------
Bruce Smith                bruce@armintl.com
System Administrator / Network Administrator
Armstrong International, Inc.
Three Rivers, Michigan  49093  USA
http://www.armstrong-intl.com/
--------------------------------------------

--=-wChTTmicd1wjy0MeAFtU
Content-Disposition: attachment; filename=spamcop
Content-Type: text/x-sh; name=spamcop; charset=ANSI_X3.4-1968
Content-Transfer-Encoding: 7bit

#!/bin/sh
h=`hostname|sed 's/\..*$//'`
grep spamcop.net/bl.shtml /var/log/maillog${1} | \
	sed -e 's/ '$h' sendmail.*ruleset=check_relay//' \
	-e 's/ '$h' sendmail.*SYSERR: putoutmsg//' \
	-e 's/, reject=553 5.3.0 Spam.*$//' -e 's/, arg.=/ /g' \
	-e 's/error on output channel sending.*$//' \
	-e 's/(may be forged)//' -e 's/, relay=.*/ /' | nl

--=-wChTTmicd1wjy0MeAFtU--