Sophie

Sophie

distrib > Fedora > 13 > i386 > media > updates-src > by-pkgid > 2f7e4f1e3b0cba9e0bebc1d9497ea9ac > files > 12

spamass-milter-0.3.1-21.fc13.src.rpm

Summary:	Milter (mail filter) for spamassassin
Name:		spamass-milter
Version:	0.3.1
Release:	21%{?dist}
License:	GPLv2+
Group:		System Environment/Daemons
URL:		http://savannah.nongnu.org/projects/spamass-milt/
Source0:	http://savannah.nongnu.org/download/spamass-milt/spamass-milter-%{version}.tar.bz2
Source1:	spamass-milter-wrapper
Source2:	spamass-milter.sysv
Source3:	spamass-milter.sysconfig
Source4:	spamass-milter.README.Postfix
# Patches submitted upstream:
# http://savannah.nongnu.org/bugs/?29326
Patch0:		spamass-milter-0.3.1-syntax.patch
Patch1:		spamass-milter-0.3.1-popen.patch
Patch2:		spamass-milter-0.3.1-authuser.patch
Patch3:		spamass-milter-0.3.1-rcvd.patch
Patch4:		spamass-milter-0.3.1-bits.patch
Patch5:		spamass-milter-0.3.1-group.patch
# Patch not yet submitted upstream
Patch7:		spamass-milter-0.3.1-ipv6.patch
# Fedora-specific patches
Patch10:	spamass-milter-0.3.1-pathnames.patch
BuildRoot:	%{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:	spamassassin, sendmail-devel
Requires:	spamassassin, /usr/sbin/sendmail

Requires(pre): /usr/bin/getent, /usr/sbin/groupadd, /usr/sbin/useradd, /usr/sbin/usermod
Requires(post): /sbin/chkconfig
Requires(preun): /sbin/chkconfig, initscripts
Requires(postun): initscripts

%description
A milter (Mail Filter) application that pipes incoming mail (including things
received by rmail/UUCP) through SpamAssassin, a highly customizable spam
filter. A milter-compatible MTA such as Sendmail or Postfix is required.

%package postfix
Summary:	Postfix support for spamass-milter
Group:		System Environment/Daemons
Requires:	%{name} = %{version}-%{release}
Requires(pre):	postfix
Requires(post):	shadow-utils, %{name} = %{version}-%{release}
%if 0%{?fedora} > 9 || 0%{?rhel} > 5
BuildArch:	noarch
%endif

%description postfix
This package adds support for running spamass-milter using a Unix-domain
socket to communicate with the Postfix MTA.

%prep
%setup -q

# Address compiler warnings
%patch0 -p1 -b .syntax

# Preliminary upstream patch for input validation bug letting
# remote users execute arbitrary code (#572117, #572119)
# http://savannah.nongnu.org/bugs/?29136
# (patch modified to apply after patch0, and fix zombie processes - #583523)
%patch1 -p0 -b .popen

# Add -I option to ignore (don't check) mail from authenticated users
# (#437506, #496767) http://savannah.nongnu.org/bugs/?21046
%patch2 -p1 -b .authuser

# Fix Received-header generation (#496763)
%patch3 -p1 -b .rcvd

# Add authentication info to dummy Received-header (#496769)
%patch4 -p1 -b .bits

# Add -g option for group-writable socket for Postfix support (#452248)
%patch5 -p1 -b .group

# Add IPv6 whitelisting support
%patch7 -p1 -b .ipv6

# Local patch for initscript and socket paths
%patch10 -p1 -b .pathnames

%{__cp} -p %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} .
%{__sed} -i -e 's|%%{_localstatedir}|%{_localstatedir}|g;
		s|%%{_initrddir}|%{_initrddir}|g;
		s|%%{_sysconfdir}|%{_sysconfdir}|g;
		s|%%{_sbindir}|%{_sbindir}|g;' \
	spamass-milter.{README.Postfix,sysv,sysconfig} README
%{__mv} spamass-milter.README.Postfix README.Postfix

%build
export SENDMAIL=/usr/sbin/sendmail
%configure
%{__make} %{?_smp_mflags}

%install
%{__rm} -rf %{buildroot}
%{__make} DESTDIR=%{buildroot} install

%{__install} -m 755 -D spamass-milter.sysv %{buildroot}%{_initrddir}/spamass-milter
%{__install} -m 644 -D spamass-milter.sysconfig %{buildroot}%{_sysconfdir}/sysconfig/spamass-milter
%{__install} -m 755 -d %{buildroot}%{_localstatedir}/lib/spamass-milter
%{__install} -m 711 -d %{buildroot}%{_localstatedir}/run/spamass-milter
%{__install} -m 750 -d %{buildroot}%{_localstatedir}/run/spamass-milter/postfix
%{__install} -m 755 spamass-milter-wrapper %{buildroot}%{_sbindir}/spamass-milter-wrapper

%pre
/usr/bin/getent group sa-milt >/dev/null || /usr/sbin/groupadd -r sa-milt
/usr/bin/getent passwd sa-milt >/dev/null || \
	/usr/sbin/useradd -r -g sa-milt -d %{_localstatedir}/lib/spamass-milter \
		-s /sbin/nologin -c "SpamAssassin Milter" sa-milt
# Fix homedir for upgrades
/usr/sbin/usermod --home %{_localstatedir}/lib/spamass-milter sa-milt &>/dev/null
exit 0

%post
/sbin/chkconfig --add spamass-milter || :

%preun
if [ $1 -eq 0 ]; then
	%{_initrddir}/spamass-milter stop &>/dev/null || :
	/sbin/chkconfig --del spamass-milter || :
fi

%postun
%{_initrddir}/spamass-milter condrestart &>/dev/null || :

%post postfix
# This is needed because the milter needs to "give away" the MTA communication
# socket to the postfix group, and it needs to be a member of the group to do
# that.
/usr/sbin/usermod -a -G postfix sa-milt || :

%clean
%{__rm} -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog NEWS README
%{_mandir}/man1/spamass-milter.1*
%config(noreplace) %{_sysconfdir}/sysconfig/spamass-milter
%{_initrddir}/spamass-milter
%{_sbindir}/spamass-milter
%{_sbindir}/spamass-milter-wrapper
%dir %attr(-,sa-milt,sa-milt) %{_localstatedir}/lib/spamass-milter/
%dir %attr(-,sa-milt,sa-milt) %{_localstatedir}/run/spamass-milter/

%files postfix
%defattr(-,root,root,-)
%doc README.Postfix
%dir %attr(-,sa-milt,postfix) %{_localstatedir}/run/spamass-milter/postfix/

%changelog
* Thu Sep 23 2010 Paul Howarth <paul@city-fan.org> 0.3.1-21
- Add IPv6 whitelisting support (#630263)

* Tue Jun  8 2010 Paul Howarth <paul@city-fan.org> 0.3.1-20
- RHEL-6 onwards have noarch subpackages, so make spamass-milter-postfix one

* Mon Apr 19 2010 Paul Howarth <paul@city-fan.org> 0.3.1-19
- Fix patch for CVE-2010-1132 to not create a zombie process per email when
  the -x or -b options are used (#583523)

* Tue Mar 23 2010 Paul Howarth <paul@city-fan.org> 0.3.1-18
- Add patch to get rid of compiler warnings
- Reorder and re-base patches to optimize chances of upstream accepting them
- Improve Received-header patch (#496763) incorporating additional fix from
  upstream update (http://savannah.nongnu.org/bugs/?17178)

* Fri Mar 12 2010 Paul Howarth <paul@city-fan.org> 0.3.1-17
- Update initscript to support running the milter as root, which is needed
  for the -x (expand aliases) option; note that the milter does not run as
  root by default
- Add patch for popen unsanitized input vulnerability
  (CVE-2010-1132, #572117, #572119, http://savannah.nongnu.org/bugs/?29136)
- Rebase authuser patch
- Update patch adding auth info to dummy Received-header so that it doesn't
  generate spurious warnings about missing macros (#532266), and update and
  merge the macro documentation patch into this patch
- Document patch usage in spec file

* Tue Aug 11 2009 Paul Howarth <paul@city-fan.org> 0.3.1-16
- Switch to bzipped source tarball

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 0.3.1-15
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Fri Apr 24 2009 Paul Howarth <paul@city-fan.org> 0.3.1-14
- Fix Received-header generation (#496763)
- Add authentication info to dummy Received-header (#496769)
- Add option to skip checks for authenticated senders (#437506, #496767)
  (thanks to Habeeb J. Dihu for the reports and patches)

* Wed Mar 18 2009 Paul Howarth <paul@city-fan.org> 0.3.1-13
- Call initscripts directly instead of via /sbin/service and fine-tune scriptlet
  dependencies
- Change sa-milt user's home directory from
  %%{_localstatedir}/run/spamass-milter to %%{_localstatedir}/lib/spamass-milter
  so as to retain directory contents across a reboot (#489995), and fix the home
  directory of any existing sa-milt account on upgrades

* Fri Feb 27 2009 Paul Howarth <paul@city-fan.org> 0.3.1-12
- Subpackage for postfix is now noarch for Fedora 10 onwards
- Fix scriptlet deps to ensure that sa-milt user exists before we attempt to
  add it to the postfix group

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> 0.3.1-11
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Fri Feb 13 2009 Paul Howarth <paul@city-fan.org> 0.3.1-10
- Rebuild for shared libmilter in Fedora 11 development

* Thu Jul  3 2008 Paul Howarth <paul@city-fan.org> 0.3.1-9
- Require /usr/sbin/sendmail (for -b/-B/-x options) rather than sendmail pkg
- Make summary and description less Sendmail-specific
- Add patch to support group-writable socket for MTA communication, needed
  to be able to use a Unix-domain socket with Postfix (#452248)
- Add subpackage with group-writable directory for Postfix support
- Tweak initscript to change default options when Postfix socket directory is
  present
- Document additional ENVRCPT macros to provide

* Tue May 20 2008 Paul Howarth <paul@city-fan.org> 0.3.1-8
- Fix initscript failure to start with SELinux in enforcing mode (#447247)
  (needs selinux-policy >= 3.3.1-55 on F9)

* Tue Feb 19 2008 Fedora Release Engineering <rel-eng@fedoraproject.org> 0.3.1-7
- Autorebuild for GCC 4.3

* Mon Feb 18 2008 Paul Howarth <paul@city-fan.org> 0.3.1-6
- Rebuild with gcc 4.3.0 for Fedora 9

* Fri Oct 12 2007 Paul Howarth <paul@city-fan.org> 0.3.1-5
- Split initscript and config out from being here documents in the spec and
  have them as separate source files instead
- Unexpand tabs
- Clarify license as GPL v2 or later (GPLv2+)
- Use the standard scriptlet for user/group creation in %%pre

* Wed Aug 30 2006 Paul Howarth <paul@city-fan.org> 0.3.1-4
- Use make/DESTDIR instead of deprecated %%makeinstall macro
- Expand tabs and clean up changelog entries

* Mon May 15 2006 Paul Howarth <paul@city-fan.org> 0.3.1-3
- Use upstream default settings (#191602)
  This change re-enables by default Subject/Content-Type header modification
  (which may have a performance impact for large messages) and disables by
  default the rejection of emails with a spam score of 15 or more. To re-enable
  these options, uncomment the line:
  EXTRA_FLAGS="-m -r 15"
  in %%{_sysconfdir}/sysconfig/spamass-milter
  
* Sun May  7 2006 Paul Howarth <paul@city-fan.org> 0.3.1-2
- Fix race condition in "stop" clause of initscript (#190894)

* Thu Apr  6 2006 Paul Howarth <paul@city-fan.org> 0.3.1-1
- Update to 0.3.1

* Wed Feb 16 2006 Paul Howarth <paul@city-fan.org> 0.3.0-9
- Don't use macros in command paths, hardcode them instead

* Mon Aug  1 2005 Paul Howarth <paul@city-fan.org> 0.3.0-8
- Run the milter in a wrapper script that restarts it if it crashes

* Thu Jun 16 2005 Paul Howarth <paul@city-fan.org> 0.3.0-7
- Bump and rebuild due to transient build system failure

* Wed Jun 15 2005 Paul Howarth <paul@city-fan.org> 0.3.0-6
- Adjust initscript chkconfig values so it starts before sendmail

* Mon Jun 13 2005 Paul Howarth <paul@city-fan.org> 0.3.0-5
- Help the configure script find sendmail

* Mon Jun 13 2005 Paul Howarth <paul@city-fan.org> 0.3.0-4
- Bump and rebuild

* Mon Jun 06 2005 Paul Howarth <paul@city-fan.org> 0.3.0-3
- Use Extras standard buildroot
- Unpack tarball quietly
- Create account sa-milt and run the milter using that instead of root
- Fix socket name in README
- Initscript not %%config

* Sun Jun 05 2005 Warren Togami <wtogami@redhat.com> 0.3.0-2
- Extras

* Tue Feb 08 2005 Dag Wieers <dag@wieers.com> 0.3.0-1
- Updated to release 0.3.0.

* Wed Sep 01 2004 Dag Wieers <dag@wieers.com> 0.2.0-1
- Fixed variables in sysconfig file. (mator)

* Tue Feb 17 2004 Dag Wieers <dag@wieers.com> 0.2.0-0
- Initial package. (using DAR)