view @ 125:8b1562482b29

put hostname in smtp message for uribl style lookups
author carl
date Thu, 16 Mar 2006 15:20:37 -0800
parents ea6f9c812faa
children b8ce1b31237d
line wrap: on
line source

%define localstatedir   /var/lib

Summary:            @PACKAGE@ Sendmail Milter
Name:               @PACKAGE@
Version:            @VERSION@
Release:            %{?custom_release}%{!?custom_release:1}
Copyright:          GPL
Group:              System Environment/Daemons
BuildRoot:          %{_tmppath}/%{name}-%{version}-buildroot
Vendor:             510 Software Group
Packager:           510 Software Group
AutoReqProv:        no

Requires(pre):          /usr/sbin/useradd
Requires(pre):          /usr/bin/getent
Requires(postun):       /usr/sbin/userdel
Requires(post,preun):   /sbin/chkconfig
Requires(post,preun):   /sbin/service
BuildRequires:          sendmail-devel >= 8.12.1
Requires:               sendmail >= 8.12.1
Requires:               sendmail-cf
Requires:     ,,,,

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 could use SPEWS and the SBL, where all other users use only the SBL.

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.

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.



./configure --prefix=%{_prefix} \
    --bindir=%{_bindir} --mandir=%{_mandir} \
    --localstatedir=%{localstatedir} --libdir=%{_libdir} \
    --datadir=%{_datadir} --includedir=%{_includedir} \

if [ "$RPM_BUILD_ROOT" = "/" -o -z "$RPM_BUILD_ROOT" ] ; then
        echo sorry, you probably do not want me to delete the old buildroot at $RPM_BUILD_ROOT
        exit 1
make prefix=$RPM_BUILD_ROOT%{_prefix} bindir=$RPM_BUILD_ROOT%{_bindir} \
    mandir=$RPM_BUILD_ROOT%{_mandir} libdir=$RPM_BUILD_ROOT%{_libdir} \
    localstatedir=$RPM_BUILD_ROOT%{localstatedir} \
    datadir=$RPM_BUILD_ROOT%{_datadir} \
    includedir=$RPM_BUILD_ROOT%{_includedir} \
    sysconfdir=$RPM_BUILD_ROOT%{_sysconfdir} install
mkdir -p $RPM_BUILD_ROOT/etc/rc.d/init.d
mkdir -p $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@
mv -f $RPM_BUILD_ROOT%{_sysconfdir}/@PACKAGE@/@PACKAGE@     $RPM_BUILD_ROOT/etc/rc.d/init.d
mv AUTHORS COPYING ChangeLog NEWS README                    $RPM_BUILD_ROOT%{_datadir}/doc/@PACKAGE@-@VERSION@
mkdir -p %{buildroot}/var/run/@PACKAGE@

/usr/bin/getent passwd @PACKAGE@ >/dev/null ||
  useradd -r -d %{_sysconfdir}/@PACKAGE@ -M -c "@PACKAGE@ pseudo-user" -s /sbin/nologin @PACKAGE@

/sbin/chkconfig --add @PACKAGE@
echo Remember to edit %{_sysconfdir}/@PACKAGE@/@PACKAGE@.conf and add the following line to your
echo "INPUT_MAIL_FILTER(\`dnsbl', \`S=local:/var/run/dnsbl/dnsbl.sock, F=T, T=C:30s;S:5m;R:5m;E:5m')"

/sbin/service @PACKAGE@ stop || :
/sbin/chkconfig --del @PACKAGE@
userdel @PACKAGE@ || :



%doc %{_mandir}/*
%docdir %{_datadir}/doc/@PACKAGE@-@VERSION@
%config(noreplace) %{_sysconfdir}/@PACKAGE@
%dir %attr(0750,@PACKAGE@,root) /var/run/@PACKAGE@

* Thu Mar 16 2006 Carl Byington 5.16
- use @PACKAGE@ in more places

* Fri Mar 10 2006 Carl Byington 5.13
- remove redundant entry in files section

* Sun Dec 18 2005 Carl Byington 5.11
- use autoconf and

* Tue Jan 03 2005 Carl Byington 4.0
- added hosts-ignore conf file

* Thu Jul 15 2004 John Gunkel <> 1.3
- patch to rc file no longer needed

* Mon Jul 05 2004 John Gunkel <> 1.2
- Fixed some typos
- removed patch into separate file
- added config migration as suggested by Carl
- Added reminder to edit

* Wed Jun 30 2004 John Gunkel <> 1.1
- Initial revision of spec file. Need to add a better description, docs and a message