1# $Id: Makefile,v 1.171 1998/09/13 23:05:46 brian Exp $ 2 3default: 4.if exists(/etc/mail/ips.txt) 5 mv -f /etc/mail/ips.txt /etc/mail/ips.txt.0 6.endif 7 fetch ftp://ftp.gulf.net/pub/docs/ips.txt 8 sort ips.txt > block_ips.txt 9 touch allowsorted_ips.txt 10.if exists(/etc/mail/allow_ips.txt) 11 sort allow_ips.txt > allowsorted_ips.txt 12.endif 13 comm -23 block_ips.txt allowsorted_ips.txt | \ 14 cut -d ' ' -f 1 | \ 15 sed -e 's/$$/ #blocked. contact postmaster/' > \ 16 /etc/mail/block_ips.new 17 rm allowsorted_ips.txt 18 mv /etc/mail/block_ips.new /etc/mail/block_ips.txt 19.if exists(/etc/mail/domains.txt) 20 mv -f /etc/mail/domains.txt /etc/mail/domains.txt.0 21.endif 22 fetch ftp://ftp.gulf.net/pub/docs/domains.txt 23 sort domains.txt > block_domains.txt 24 touch allowsorted_domains.txt 25.if exists(/etc/mail/allow_domains.txt) 26 sort allow_domains.txt > allowsorted_domains.txt 27.endif 28 comm -23 block_domains.txt allowsorted_domains.txt | \ 29 cut -d ' ' -f 1 | \ 30 sed -e 's/$$/ #blocked. contact postmaster/' > \ 31 /etc/mail/block_domains.new 32 rm allowsorted_domains.txt 33 mv /etc/mail/block_domains.new /etc/mail/block_domains.txt 34 35install: 36 /usr/sbin/makemap hash /etc/mail/spamsites < /etc/mail/block_domains.txt 37.if exists(/etc/mail/spamsites.local) 38 /usr/sbin/makemap -o hash /etc/mail/spamsites < /etc/mail/spamsites.local 39.endif 40 /usr/sbin/makemap hash /etc/mail/denyip < /etc/mail/block_ips.txt 41.if exists(/etc/mail/denyip.local) 42 /usr/sbin/makemap -o hash /etc/mail/denyip < /etc/mail/denyip.local 43.endif 44 45all: default install 46