1998-09-13 23:14:20 +00:00
|
|
|
# $Id: Makefile,v 1.171 1998/09/13 23:05:46 brian Exp $
|
|
|
|
|
1997-10-19 16:40:10 +00:00
|
|
|
default:
|
|
|
|
.if exists(/etc/mail/ips.txt)
|
|
|
|
mv -f /etc/mail/ips.txt /etc/mail/ips.txt.0
|
|
|
|
.endif
|
|
|
|
fetch ftp://ftp.gulf.net/pub/docs/ips.txt
|
1998-02-25 22:06:34 +00:00
|
|
|
sort ips.txt > block_ips.txt
|
|
|
|
touch allowsorted_ips.txt
|
|
|
|
.if exists(/etc/mail/allow_ips.txt)
|
|
|
|
sort allow_ips.txt > allowsorted_ips.txt
|
|
|
|
.endif
|
|
|
|
comm -23 block_ips.txt allowsorted_ips.txt | \
|
|
|
|
cut -d ' ' -f 1 | \
|
1997-10-19 16:40:10 +00:00
|
|
|
sed -e 's/$$/ #blocked. contact postmaster/' > \
|
1998-02-25 22:06:34 +00:00
|
|
|
/etc/mail/block_ips.new
|
|
|
|
rm allowsorted_ips.txt
|
|
|
|
mv /etc/mail/block_ips.new /etc/mail/block_ips.txt
|
1997-10-19 16:40:10 +00:00
|
|
|
.if exists(/etc/mail/domains.txt)
|
|
|
|
mv -f /etc/mail/domains.txt /etc/mail/domains.txt.0
|
|
|
|
.endif
|
|
|
|
fetch ftp://ftp.gulf.net/pub/docs/domains.txt
|
1998-02-25 22:06:34 +00:00
|
|
|
sort domains.txt > block_domains.txt
|
|
|
|
touch allowsorted_domains.txt
|
|
|
|
.if exists(/etc/mail/allow_domains.txt)
|
|
|
|
sort allow_domains.txt > allowsorted_domains.txt
|
|
|
|
.endif
|
|
|
|
comm -23 block_domains.txt allowsorted_domains.txt | \
|
|
|
|
cut -d ' ' -f 1 | \
|
1997-10-19 16:40:10 +00:00
|
|
|
sed -e 's/$$/ #blocked. contact postmaster/' > \
|
1998-02-25 22:06:34 +00:00
|
|
|
/etc/mail/block_domains.new
|
|
|
|
rm allowsorted_domains.txt
|
|
|
|
mv /etc/mail/block_domains.new /etc/mail/block_domains.txt
|
1997-10-19 16:40:10 +00:00
|
|
|
|
|
|
|
install:
|
1998-07-20 12:30:39 +00:00
|
|
|
/usr/sbin/makemap hash /etc/mail/spamsites < /etc/mail/block_domains.txt
|
1997-10-19 16:40:10 +00:00
|
|
|
.if exists(/etc/mail/spamsites.local)
|
1998-07-20 12:30:39 +00:00
|
|
|
/usr/sbin/makemap -o hash /etc/mail/spamsites < /etc/mail/spamsites.local
|
1997-10-19 16:40:10 +00:00
|
|
|
.endif
|
1998-07-20 12:30:39 +00:00
|
|
|
/usr/sbin/makemap hash /etc/mail/denyip < /etc/mail/block_ips.txt
|
1997-10-19 16:40:10 +00:00
|
|
|
.if exists(/etc/mail/denyip.local)
|
1998-07-20 12:30:39 +00:00
|
|
|
/usr/sbin/makemap -o hash /etc/mail/denyip < /etc/mail/denyip.local
|
1997-10-19 16:40:10 +00:00
|
|
|
.endif
|
|
|
|
|
|
|
|
all: default install
|