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