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 BuildRequires: rpmbuild(macros) >= 1.268
15 Requires: amavisd-new >= 1:2.7.0
17 Requires(post,preun): /sbin/chkconfig
18 Obsoletes: amavisd-new-sendmail < 1:2.7.0
19 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
21 %define _localstatedir %{_var}/spool/amavis
24 amavisd-milter is a sendmail milter (mail filter) for amavisd-new
25 2.4.3 or and sendmail 8.13 and above (limited support for sendmail
26 8.12 is provided) which use the new AM.PDP protocol.
28 Instead of older amavis-milter helper program, full amavisd-new
29 functionality is available, including adding spam and virus
30 information header fields, modifying Subject, adding address
31 extensions and removing certain recipients from delivery while
32 delivering the same message to the rest.
39 --with-working-dir=%{_localstatedir}
43 rm -rf $RPM_BUILD_ROOT
45 DESTDIR=$RPM_BUILD_ROOT
47 install -d $RPM_BUILD_ROOT/etc/{rc.d/init.d,sysconfig}
48 install -p %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
49 cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
52 rm -rf $RPM_BUILD_ROOT
55 /sbin/chkconfig --add amavisd-milter
56 %service amavisd-milter restart
59 if [ "$1" -eq 0 ]; then
60 %service amavisd-milter stop
61 /sbin/chkconfig --del amavisd-milter
65 %defattr(644,root,root,755)
66 %doc README TODO CHANGES
67 %attr(754,root,root) /etc/rc.d/init.d/%{name}
68 %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
69 %attr(755,root,root) %{_sbindir}/amavisd-milter
70 %{_mandir}/man8/amavisd-milter.8*