comparison dnsbl.spec.in @ 203:92a5c866bdfa

Verify from/to pairs even if they might be explicitly whitelisted. Document DCC greylisting and bulk detection usage. Fix DCC bulk thresholds of many. Update spec file for fedora packaging.
author Carl Byington <carl@five-ten-sg.com>
date Tue, 04 Mar 2008 21:42:51 -0800
parents 7a722f482bfb
children 391e4dd074c2
comparison
equal deleted inserted replaced
202:ae0585d64dd2 203:92a5c866bdfa
1 %define localstatedir /var/lib 1 %define localstatedir /var/lib
2 2
3 Summary: @PACKAGE@ Sendmail Milter 3 Summary: Sendmail milter for spam control
4 Name: @PACKAGE@ 4 Name: @PACKAGE@
5 Version: @VERSION@ 5 Version: @VERSION@
6 Release: %{?custom_release}%{!?custom_release:1} 6 Release: 1%{?dist}
7 License: GPL 7 License: GPLv3+
8 Group: System Environment/Daemons 8 Group: System Environment/Daemons
9 Source: http://www.five-ten-sg.com/@PACKAGE@/packages/@PACKAGE@-@VERSION@.tar.gz 9 Source: http://www.five-ten-sg.com/%{name}/packages/%{name}-%{version}.tar.gz
10 BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot 10 BuildRoot: %(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
11 URL: http://www.five-ten-sg.com/@PACKAGE@/ 11 URL: http://www.five-ten-sg.com/%{name}/
12 Vendor: 510 Software Group
13 Packager: 510 Software Group
14 AutoReqProv: no
15 12
16 Requires(pre): /usr/sbin/useradd 13 Requires(pre): /usr/sbin/useradd
17 Requires(pre): /usr/bin/getent 14 Requires(pre): /usr/bin/getent
18 Requires(postun): /usr/sbin/userdel 15 Requires(postun): /usr/sbin/userdel
19 Requires(post,preun): /sbin/chkconfig 16 Requires(post,preun): /sbin/chkconfig
20 Requires(post,preun): /sbin/service 17 Requires(post,preun): /sbin/service
21 BuildRequires: sendmail-devel >= 8.12.1 18 BuildRequires: sendmail-devel >= 8.12.1
22 Requires: sendmail >= 8.12.1 19 Requires: sendmail >= 8.12.1
23 Requires: sendmail-cf 20 Requires: sendmail-cf
24 Requires: spamassassin 21 Requires: spamassassin
25 Requires: libc.so.6, libgcc_s.so.1, libm.so.6, libpthread.so.0, libstdc++.so.6
26 22
27 23
28 %description 24 %description
29 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 LOCAL and the SBL, where all other users @example.com use only the SBL. 25 We present here a mechanism whereby the backup mail server can use the
26 correct set of DNSBLs for each recipient for each message. As a
27 side-effect, it gives us the ability to customize the set of DNSBLs on
28 a per-recipient basis, so that fred@example.com could use LOCAL and
29 the SBL, where all other users @example.com use only the SBL.
30 30
31 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. 31 This milter will also decode (base64, mime, html entity, url
32 encodings) and scan for HTTP and HTTPS URLs and bare hostnames in the
33 body of the mail. If any of those host names have A or NS records on
34 the SBL (or a single configurable DNSBL), the mail will be rejected
35 unless previously whitelisted. This milter also counts the number of
36 invalid HTML tags, and can reject mail if that count exceeds your
37 specified limit.
32 38
33 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. 39 The DNSBL milter reads a text configuration file (dnsbl.conf) on
40 startup, and whenever the config file (or any of the referenced
41 include files) is changed. The entire configuration file is case
42 insensitive.
34 43
35 44
36 %prep 45 %prep
37 46 %setup -q
38
39 %setup
40
41 47
42 %build 48 %build
43 ./configure --prefix=%{_prefix} \ 49 %configure
44 --bindir=%{_bindir} --mandir=%{_mandir} \ 50 make %{?_smp_mflags}
45 --localstatedir=%{localstatedir} --libdir=%{_libdir} \
46 --datadir=%{_datadir} --includedir=%{_includedir} \
47 --sysconfdir=%{_sysconfdir}
48 make
49
50 51
51 %install 52 %install
52 if [ "$RPM_BUILD_ROOT" = "/" -o -z "$RPM_BUILD_ROOT" ] ; then
53 echo sorry, you probably do not want me to delete the old buildroot at $RPM_BUILD_ROOT
54 exit 1
55 fi
56 rm -rf $RPM_BUILD_ROOT 53 rm -rf $RPM_BUILD_ROOT
57 make prefix=$RPM_BUILD_ROOT%{_prefix} bindir=$RPM_BUILD_ROOT%{_bindir} \ 54 make DESTDIR=$RPM_BUILD_ROOT install
58 mandir=$RPM_BUILD_ROOT%{_mandir} libdir=$RPM_BUILD_ROOT%{_libdir} \
59 localstatedir=$RPM_BUILD_ROOT%{localstatedir} \
60 datadir=$RPM_BUILD_ROOT%{_datadir} \
61 includedir=$RPM_BUILD_ROOT%{_includedir} \
62 sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} install
63 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d 55 mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
64 mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@ 56 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/%{name} $RPM_BUILD_ROOT/etc/rc.d/init.d
65 mv -f $RPM_BUILD_ROOT%{_sysconfdir}/@PACKAGE@/@PACKAGE@ $RPM_BUILD_ROOT/etc/rc.d/init.d 57 mkdir -p %{buildroot}/var/run/%{name}
66 mv AUTHORS COPYING ChangeLog NEWS README $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@ 58 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/autowhite
67 mkdir -p %{buildroot}/var/run/@PACKAGE@ 59 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/.spamassassin
68 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/@PACKAGE@/autowhite
69 mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/@PACKAGE@/.spamassassin
70 60
71 61
72 %pre 62 %pre
73 /usr/bin/getent passwd @PACKAGE@ >/dev/null || /usr/sbin/useradd -r -d %{_sysconfdir}/@PACKAGE@ -M -c "@PACKAGE@ pseudo-user" -s /sbin/nologin @PACKAGE@ >/dev/null 63 /usr/bin/getent passwd %{name} >/dev/null || /usr/sbin/useradd -r -d %{_sysconfdir}/%{name} -M -c "%{name} pseudo-user" -s /sbin/nologin %{name} >/dev/null
74 64
75 65
76 %post 66 %post
77 /sbin/chkconfig --add @PACKAGE@ 67 /sbin/chkconfig --add %{name}
78 echo Remember to edit %{_sysconfdir}/@PACKAGE@/@PACKAGE@.conf and add the following line to your sendmail.mc: 68 echo Remember to edit %{_sysconfdir}/%{name}/%{name}.conf and add the following line to your sendmail.mc:
79 echo "INPUT_MAIL_FILTER(\`dnsbl', \`S=local:/var/run/dnsbl/dnsbl.sock, F=T, T=C:30s;S:5m;R:5m;E:5m')" 69 echo "INPUT_MAIL_FILTER(\`dnsbl', \`S=local:/var/run/dnsbl/dnsbl.sock, F=T, T=C:30s;S:5m;R:5m;E:5m')"
80 echo 70 echo
81 71
82 72
83 %preun 73 %preun
84 [ $1 = 0 ] && /sbin/service @PACKAGE@ stop || : 74 [ $1 = 0 ] && /sbin/service %{name} stop || :
85 75
86 76
87 %postun 77 %postun
88 [ $1 = 0 ] && /sbin/chkconfig --del @PACKAGE@ 78 [ $1 = 0 ] && /sbin/chkconfig --del %{name}
89 [ $1 = 0 ] && userdel @PACKAGE@ || : 79 [ $1 = 0 ] && userdel %{name} || :
90 80
91 81
92 %clean 82 %clean
93 83
94 %files 84 %files
95 %defattr(-,root,root) 85 %defattr(-,root,root,-)
96 %{_sbindir}/* 86 %{_sbindir}/*
97 %doc %{_mandir}/* 87 %{_mandir}/man1/*
98 %docdir %{_datadir}/doc/@PACKAGE@-@VERSION@ 88 %{_mandir}/man5/*
99 %{_datadir}/doc/@PACKAGE@-@VERSION@ 89 %doc AUTHORS COPYING ChangeLog NEWS README
100 %config(noreplace) %{_sysconfdir}/@PACKAGE@ 90 %docdir %{_datadir}/doc/%{name}-%{version}
101 /etc/rc.d/init.d/@PACKAGE@ 91 %{_datadir}/doc/%{name}-%{version}
102 %dir %attr(0750,@PACKAGE@,root) /var/run/@PACKAGE@ 92 %config(noreplace) %{_sysconfdir}/%{name}
103 %dir %attr(0750,@PACKAGE@,root) %{_sysconfdir}/@PACKAGE@/autowhite 93 /etc/rc.d/init.d/%{name}
104 %dir %attr(0750,@PACKAGE@,root) %{_sysconfdir}/@PACKAGE@/.spamassassin 94 %dir %attr(0750,%{name},root) /var/run/%{name}
95 %dir %attr(0750,%{name},root) %{_sysconfdir}/%{name}/autowhite
96 %dir %attr(0750,%{name},root) %{_sysconfdir}/%{name}/.spamassassin
105 97
106 98
107 %changelog 99 %changelog
108 * Thu Aug 30 2007 Carl Byington 6.07 100 * Tue Mar 04 2008 Carl Byington <carl@five-ten-sg.com> - 6.17
101 - changes for Fedora packaging guidelines
102
103 * Thu Aug 30 2007 Carl Byington <carl@five-ten-sg.com> - 6.07
109 - Add generic rdns filtering, fix pre/post scripts 104 - Add generic rdns filtering, fix pre/post scripts
110 105
111 * Sun Aug 26 2007 Carl Byington 6.04 106 * Sun Aug 26 2007 Carl Byington <carl@five-ten-sg.com> - 6.04
112 - require spamassassin 107 - require spamassassin
113 108
114 * Sat Jul 07 2007 Carl Byington 6.01 109 * Sat Jul 07 2007 Carl Byington <carl@five-ten-sg.com> - 6.01
115 - GPL3, auto whitelisting 110 - GPL3, auto whitelisting
116 111
117 * Wed Aug 02 2006 Carl Byington 5.20 112 * Wed Aug 02 2006 Carl Byington <carl@five-ten-sg.com> - 5.20
118 - http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html help with postun 113 - http://www.rpm.org/max-rpm/s1-rpm-inside-scripts.html help with postun
119 114
120 * Thu Mar 16 2006 Carl Byington 5.16 115 * Thu Mar 16 2006 Carl Byington <carl@five-ten-sg.com> - 5.16
121 - use @PACKAGE@ in more places 116 - use %{name} in more places
122 117
123 * Fri Mar 10 2006 Carl Byington 5.13 118 * Fri Mar 10 2006 Carl Byington <carl@five-ten-sg.com> - 5.13
124 - remove redundant entry in files section 119 - remove redundant entry in files section
125 120
126 * Sun Dec 18 2005 Carl Byington 5.11 121 * Sun Dec 18 2005 Carl Byington <carl@five-ten-sg.com> - 5.11
127 - use autoconf and http://www.fedora.us/docs/rpm-packaging-guidelines.html 122 - use autoconf and http://www.fedora.us/docs/rpm-packaging-guidelines.html
128 123
129 * Tue Jan 03 2005 Carl Byington 4.0 124 * Tue Jan 03 2005 Carl Byington <carl@five-ten-sg.com> - 4.0
130 - added hosts-ignore conf file 125 - added hosts-ignore conf file
131 - see RELEASE_NOTES 126 - see RELEASE_NOTES
132 127
133 * Thu Jul 15 2004 John Gunkel <antispam@boing.ca> 1.3 128 * Thu Jul 15 2004 John Gunkel <antispam@boing.ca> - 1.3
134 - patch to rc file no longer needed 129 - patch to rc file no longer needed
135 - see RELEASE_NOTES 130 - see RELEASE_NOTES
136 131
137 * Mon Jul 05 2004 John Gunkel <jgunkel@palliser.ca> 1.2 132 * Mon Jul 05 2004 John Gunkel <jgunkel@palliser.ca> - 1.2
138 - Fixed some typos 133 - Fixed some typos
139 - removed patch into separate file 134 - removed patch into separate file
140 - added config migration as suggested by Carl 135 - added config migration as suggested by Carl
141 - Added reminder to edit sendmail.mc 136 - Added reminder to edit sendmail.mc
142 137
143 * Wed Jun 30 2004 John Gunkel <jgunkel@palliser.ca> 1.1 138 * Wed Jun 30 2004 John Gunkel <jgunkel@palliser.ca> - 1.1
144 - Initial revision of spec file. Need to add a better description, docs and a sendmail.mc message 139 - Initial revision of spec file. Need to add a better description, docs and a sendmail.mc message
145 140