diff options
author | jmb <jmb@FreeBSD.org> | 1998-02-25 22:06:34 +0000 |
---|---|---|
committer | jmb <jmb@FreeBSD.org> | 1998-02-25 22:06:34 +0000 |
commit | bfdee87d0d15e71c10a68a61a5b294ec79e367e0 (patch) | |
tree | d3363f6430fd9095e23e6e8da26926d680a05c34 /etc/mail/Makefile | |
parent | bd35cc6b95048c6b84facb53c02bc1932faa9a13 (diff) | |
download | FreeBSD-src-bfdee87d0d15e71c10a68a61a5b294ec79e367e0.zip FreeBSD-src-bfdee87d0d15e71c10a68a61a5b294ec79e367e0.tar.gz |
added two new files: allowed_domains.txt and allowed_ips.txt.
domains/ips listed in these files are *NOT* filtered,
even if listed in domains.txt or ips.txt.
someone added netcom.com to the domains.txt file,
resulting in all mail from netcom.com being blocked.
Diffstat (limited to 'etc/mail/Makefile')
-rw-r--r-- | etc/mail/Makefile | 33 |
1 files changed, 22 insertions, 11 deletions
diff --git a/etc/mail/Makefile b/etc/mail/Makefile index 82f01b6..e42c9c2 100644 --- a/etc/mail/Makefile +++ b/etc/mail/Makefile @@ -3,30 +3,41 @@ default: 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 | \ + 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 | \ sed -e 's/$$/ #blocked. contact postmaster/' > \ - /etc/mail/ips.new - mv /etc/mail/ips.new /etc/mail/ips.txt + /etc/mail/block_ips.new + rm allowsorted_ips.txt + mv /etc/mail/block_ips.new /etc/mail/block_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 | \ + 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 | \ sed -e 's/$$/ #blocked. contact postmaster/' > \ - /etc/mail/domains.new - mv /etc/mail/domains.new /etc/mail/domains.txt + /etc/mail/block_domains.new + rm allowsorted_domains.txt + mv /etc/mail/block_domains.new /etc/mail/block_domains.txt install: - makemap hash /etc/mail/spamsites < /etc/mail/domains.txt + makemap hash /etc/mail/spamsites < /etc/mail/block_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 + makemap hash /etc/mail/denyip < /etc/mail/block_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 |