summaryrefslogtreecommitdiffstats
path: root/etc/mail/Makefile
blob: 82f01b614b29367a816ce5224e75c0e210e5d500 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
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
	cat /etc/mail/ips.txt | cut -d ' ' -f 1 | \
		sed -e 's/$$/ 	#blocked. contact postmaster/' > \
		/etc/mail/ips.new
	mv /etc/mail/ips.new /etc/mail/ips.txt
.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
	cat /etc/mail/domains.txt | cut -d ' ' -f 1 | \
		sed -e 's/$$/ 	#blocked. contact postmaster/' > \
		/etc/mail/domains.new
	mv /etc/mail/domains.new /etc/mail/domains.txt

install:
	makemap hash /etc/mail/spamsites < /etc/mail/domains.txt
.if exists(/etc/mail/spamsites.local)
	makemap -o hash /etc/mail/spamsites < /etc/mail/spamsites.local
.endif
	makemap hash /etc/mail/denyip < /etc/mail/ips.txt
.if exists(/etc/mail/denyip.local)
	makemap -o hash /etc/mail/denyip < /etc/mail/denyip.local
.endif
.if exists(/etc/mail/fakenames)
	makemap hash /etc/mail/fakenames < /etc/mail/fakenames
.endif

all: default install
OpenPOWER on IntegriCloud