comparison 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
comparison
equal deleted inserted replaced
40:dc3d8d1aa2d2 41:d95af8129dfa
1 Summary: DNSBL Sendmail Milter
2 Name: dnsbl
3 Version: 3.1
4 Release: 1
5 Copyright: GPL
6 Group: System Environment/Daemons
7 Source: http://www.five-ten-sg.com/util/dnsbl.tar.gz
8 BuildRoot: %{_tmppath}/%{name}-%{version}
9
10 BuildRequires: sendmail-devel >= 8.12.1
11 Requires(pre): /usr/sbin/groupadd
12 Requires(pre): /usr/sbin/useradd
13 Requires(pre): /usr/bin/getent
14 Requires(postun): /usr/sbin/userdel
15 Requires(postun): /usr/sbin/groupdel
16 Requires(post,preun): /sbin/chkconfig
17 Requires: sendmail
18
19
20 %description
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.
22
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.
24
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.
26
27 %prep
28 # %setup -q -n Zope-%{zope_version}
29 # %patch0 -p1
30 # %patch1 -p1
31
32 %setup
33
34
35 %build
36 pwd
37 g++ -c $CXXFLAGS -pthread dnsbl.cpp
38 g++ -o dnsbl dnsbl.o /usr/lib/libresolv.a -lmilter -pthread
39
40 %install
41 # hoisted from install.bash
42 #DST=/var/dnsbl
43 DST=%{buildroot}
44 if [ "%{buildroot}" = "/" -o -z "%{buildroot}" ] ; then
45 echo sorry, you probably do not want me to delete the old buildroot at %{buildroot}
46 exit 1
47 fi
48
49 rm -rf %{buildroot}
50 mkdir -p %{buildroot}/etc/dnsbl
51
52 install -m 644 dnsbl.conf %{buildroot}/etc/dnsbl/dnsbl.conf
53 install -m 644 html-tags.conf %{buildroot}/etc/dnsbl/html-tags.conf
54 install -m 644 tld.conf %{buildroot}/etc/dnsbl/tld.conf
55
56 mkdir -p %{buildroot}/usr/sbin
57 install -m 755 dnsbl %{buildroot}/usr/sbin/dnsbl
58
59 mkdir -p %{buildroot}/etc/init.d
60 install -m 755 dnsbl.rc %{buildroot}/etc/init.d/dnsbl
61
62 mkdir -p %{buildroot}/var/run/dnsbl
63
64 %pre
65 /usr/bin/getent passwd dnsbl ||
66 useradd -r -d /etc/dnsbl -M -c "dnsbl pseudo-user" -s /sbin/nologin dnsbl
67 %post
68 /sbin/chkconfig --add dnsbl
69 /sbin/chkconfig dnsbl on
70 /sbin/service dnsbl start
71
72 # [JOG] TODO: spew out a message indicating what should be added to sendmail.mc
73
74 %preun
75 if [ $1 -eq 0 ]; then
76 /sbin/service dnsbl stop || :
77 /sbin/chkconfig --del dnsbl
78 userdel dnsbl || :
79 fi
80
81 %postun
82
83 %clean
84
85 %files
86 %defattr(-,root,root)
87 %config /etc/dnsbl/
88 /etc/init.d/dnsbl
89 /usr/sbin/dnsbl
90 %dir %attr(0750,dnsbl,root) /var/run/dnsbl
91
92 %changelog
93 Revision 1.1 2004/06/30 10:08:48 jgunkel@palliser.ca
94 Initial revision of spec file. Need to add a better description, docs and a sendmail.mc message
95