Mercurial > dnsbl
annotate dnsbl.spec.in @ 41:d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
author | carl |
---|---|
date | Mon, 05 Jul 2004 10:52:02 -0700 |
parents | |
children | acbe44bbba22 |
rev | line source |
---|---|
41
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
1 Summary: DNSBL Sendmail Milter |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
2 Name: dnsbl |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
3 Version: 3.1 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
4 Release: 1 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
5 Copyright: GPL |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
6 Group: System Environment/Daemons |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
7 Source: http://www.five-ten-sg.com/util/dnsbl.tar.gz |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
8 BuildRoot: %{_tmppath}/%{name}-%{version} |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
9 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
10 BuildRequires: sendmail-devel >= 8.12.1 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
11 Requires(pre): /usr/sbin/groupadd |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
12 Requires(pre): /usr/sbin/useradd |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
13 Requires(pre): /usr/bin/getent |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
14 Requires(postun): /usr/sbin/userdel |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
15 Requires(postun): /usr/sbin/groupdel |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
16 Requires(post,preun): /sbin/chkconfig |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
17 Requires: sendmail |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
18 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
19 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
20 %description |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
21 We present here a mechanism whereby the backup mail server can use the correct set of DNSBLs for each recipient for each message. As a side-effect, it gives us the ability to customize the set of DNSBLs on a per-recipient basis, so that fred@example.com could use SPEWS and the SBL, where all other users @example.com use only the SBL. |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
22 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
23 This milter will also decode (base64, mime, html entity, url encodings) and scan for HTTP and HTTPS URLs and bare hostnames in the body of the mail. If any of those host names have A or NS records on the SBL (or a single configurable DNSBL), the mail will be rejected unless previously whitelisted. This milter also counts the number of invalid HTML tags, and can reject mail if that count exceeds your specified limit. |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
24 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
25 The DNSBL milter reads a text configuration file (dnsbl.conf) on startup, and whenever the config file (or any of the referenced include files) is changed. The entire configuration file is case insensitive. |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
26 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
27 %prep |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
28 # %setup -q -n Zope-%{zope_version} |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
29 # %patch0 -p1 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
30 # %patch1 -p1 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
31 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
32 %setup |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
33 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
34 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
35 %build |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
36 pwd |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
37 g++ -c $CXXFLAGS -pthread dnsbl.cpp |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
38 g++ -o dnsbl dnsbl.o /usr/lib/libresolv.a -lmilter -pthread |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
39 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
40 %install |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
41 # hoisted from install.bash |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
42 #DST=/var/dnsbl |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
43 DST=%{buildroot} |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
44 if [ "%{buildroot}" = "/" -o -z "%{buildroot}" ] ; then |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
45 echo sorry, you probably do not want me to delete the old buildroot at %{buildroot} |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
46 exit 1 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
47 fi |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
48 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
49 rm -rf %{buildroot} |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
50 mkdir -p %{buildroot}/etc/dnsbl |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
51 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
52 install -m 644 dnsbl.conf %{buildroot}/etc/dnsbl/dnsbl.conf |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
53 install -m 644 html-tags.conf %{buildroot}/etc/dnsbl/html-tags.conf |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
54 install -m 644 tld.conf %{buildroot}/etc/dnsbl/tld.conf |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
55 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
56 mkdir -p %{buildroot}/usr/sbin |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
57 install -m 755 dnsbl %{buildroot}/usr/sbin/dnsbl |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
58 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
59 mkdir -p %{buildroot}/etc/init.d |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
60 install -m 755 dnsbl.rc %{buildroot}/etc/init.d/dnsbl |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
61 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
62 mkdir -p %{buildroot}/var/run/dnsbl |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
63 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
64 %pre |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
65 /usr/bin/getent passwd dnsbl || |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
66 useradd -r -d /etc/dnsbl -M -c "dnsbl pseudo-user" -s /sbin/nologin dnsbl |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
67 %post |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
68 /sbin/chkconfig --add dnsbl |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
69 /sbin/chkconfig dnsbl on |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
70 /sbin/service dnsbl start |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
71 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
72 # [JOG] TODO: spew out a message indicating what should be added to sendmail.mc |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
73 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
74 %preun |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
75 if [ $1 -eq 0 ]; then |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
76 /sbin/service dnsbl stop || : |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
77 /sbin/chkconfig --del dnsbl |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
78 userdel dnsbl || : |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
79 fi |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
80 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
81 %postun |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
82 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
83 %clean |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
84 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
85 %files |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
86 %defattr(-,root,root) |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
87 %config /etc/dnsbl/ |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
88 /etc/init.d/dnsbl |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
89 /usr/sbin/dnsbl |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
90 %dir %attr(0750,dnsbl,root) /var/run/dnsbl |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
91 |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
92 %changelog |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
93 Revision 1.1 2004/06/30 10:08:48 jgunkel@palliser.ca |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
94 Initial revision of spec file. Need to add a better description, docs and a sendmail.mc message |
d95af8129dfa
updates for 3.2, changing file layout, add queueid to messages
carl
parents:
diff
changeset
|
95 |