1 # set this back to /var/amavis
2 Summary: Sendmail milter for amavisd-new with support for the AM.PDP protocol
7 Group: Applications/System
8 URL: http://amavisd-milter.sourceforge.net/
9 Source0: http://downloads.sourceforge.net/amavisd-milter/%{name}-%{version}.tar.gz
10 # Source0-md5: 2c9f601012164d14a0c2815a9e0928fe
12 Source2: %{name}.sysconfig
13 BuildRequires: libmilter-devel >= 8.13
14 Requires: amavisd-new >= 1:2.4.3
16 Requires(post,preun): /sbin/chkconfig
17 BuildRequires: rpmbuild(macros) >= 1.268
18 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
20 %define _localstatedir %{_var}/spool/amavis
23 amavisd-milter is a sendmail milter (mail filter) for amavisd-new
24 2.4.3 or and sendmail 8.13 and above (limited support for sendmail
25 8.12 is provided) which use the new AM.PDP protocol.
27 Instead of older amavis-milter helper program, full amavisd-new
28 functionality is available, including adding spam and virus
29 information header fields, modifying Subject, adding address
30 extensions and removing certain recipients from delivery while
31 delivering the same message to the rest.
38 --with-working-dir=%{_localstatedir}
42 rm -rf $RPM_BUILD_ROOT
44 DESTDIR=$RPM_BUILD_ROOT
46 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
47 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
48 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
51 rm -rf $RPM_BUILD_ROOT
54 /sbin/chkconfig --add amavisd-milter
55 %service amavisd-milter restart
58 if [ "$1" -eq 0 ]; then
59 %service amavisd-milter stop
60 /sbin/chkconfig --del amavisd-milter
64 %defattr(644,root,root,755)
65 %doc README TODO CHANGES
66 %attr(754,root,root) /etc/rc.d/init.d/%{name}
67 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
68 %attr(755,root,root) %{_sbindir}/amavisd-milter
69 %{_mandir}/man8/amavisd-milter.8*