3 %bcond_with qmail # enable qmail
5 %include /usr/lib/rpm/macros.perl
6 Summary: A Mail Virus Scanner - Daemon
7 Summary(pl.UTF-8): Antywirusowy skaner poczty elektronicznej - Demon
13 Group: Applications/Mail
14 Source0: http://www.amavis.org/dist/perl/%{name}-%{version}.tar.gz
15 # Source0-md5: 432a32bfc6d473564f49028b540f53ad
17 Patch0: %{name}-notest-mta.patch
18 Patch1: %{name}-nomilter.patch
19 Patch2: %{name}-qmail.patch
20 Patch3: %{name}-mks_vir.patch
21 Patch4: %{name}-clamav.patch
22 Patch5: %{name}-mks_vir-mksd.patch
23 Patch6: %{name}-qmail-new.patch
24 Patch7: %{name}-acx_pthread.patch
25 URL: http://www.amavis.org/
27 BuildRequires: autoconf
28 BuildRequires: automake
31 BuildRequires: ncompress
32 BuildRequires: perl-Archive-Tar
33 BuildRequires: perl-Archive-Zip
34 BuildRequires: perl-Compress-Zlib
35 BuildRequires: perl-Convert-TNEF
36 BuildRequires: perl-Convert-UUlib
37 BuildRequires: perl-MIME-tools
38 BuildRequires: perl-Unix-Syslog
39 BuildRequires: perl-libnet
40 BuildRequires: rpmbuild(macros) >= 1.268
44 Requires(post,preun): /sbin/chkconfig
45 Requires(postun): /usr/sbin/userdel
46 Requires(pre): /bin/id
47 Requires(pre): /usr/sbin/useradd
48 Requires: /usr/lib/sendmail
49 Requires: amavisd-daemon
59 Provides: user(amavis)
62 Obsoletes: amavisd-new
63 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
69 AMaViS is a script that interfaces a mail transport agent (MTA) with
70 one or more virus scanners. This is daemonized version of amavis.
72 %description -l pl.UTF-8
73 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
74 a jednym lub więcej programów antywirusowych. Wersja zdemonizowana.
77 Summary: A Mail Virus Scanner - postfix back-end
78 Summary(pl.UTF-8): Antywirusowy skaner poczty elektronicznej - back-end dla postfiksa
79 Group: Applications/Mail
82 Provides: amavisd-daemon
83 Obsoletes: amavisd-daemon
84 Obsoletes: amavisd-exim
85 Obsoletes: amavisd-qmail
86 Obsoletes: amavisd-sendmail
89 AMaViS is a script that interfaces a mail transport agent (MTA) with
90 one or more virus scanners. This is daemonized version of amavis.
92 This package contains backend for postfix.
94 %description postfix -l pl.UTF-8
95 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
96 a jednym lub więcej programów antywirusowych. Wersja zdemonizowana.
98 Pakiet ten zawiera back-end dla postfiks.
101 Summary: A Mail Virus Scanner - exim backend
102 Summary(pl.UTF-8): Antywirusowy skaner poczty elektronicznej - backend dla exima
103 Group: Applications/Mail
106 Provides: amavisd-daemon
107 Obsoletes: amavisd-daemon
108 Obsoletes: amavisd-postfix
109 Obsoletes: amavisd-qmail
110 Obsoletes: amavisd-sendmail
113 AMaViS is a script that interfaces a mail transport agent (MTA) with
114 one or more virus scanners. This is daemonized version of amavis.
116 This package contains backend for exim.
118 %description exim -l pl.UTF-8
119 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
120 a jednym lub więcej programów antywirusowych. Wersja zdemonizowana.
122 Pakiet ten zawiera back-end dla exima.
126 Summary: A Mail Virus Scanner - qmail backend
127 Summary(pl.UTF-8): Antywirusowy skaner poczty elektronicznej - backend dla qmaila
128 Group: Applications/Mail
131 Provides: amavisd-daemon
132 Obsoletes: amavisd-daemon
133 Obsoletes: amavisd-exim
134 Obsoletes: amavisd-postfix
135 Obsoletes: amavisd-sendmail
138 AMaViS is a script that interfaces a mail transport agent (MTA) with
139 one or more virus scanners. This is daemonized version of amavis.
141 This package contains backend for qmail.
143 %description qmail -l pl.UTF-8
144 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
145 a jednym lub więcej programów antywirusowych. Wersja zdemonizowana.
147 Pakiet ten zawiera back-end dla qmaila.
150 Summary: A Mail Virus Scanner - sendmail backend
151 Summary(pl.UTF-8): Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
152 Group: Applications/Mail
155 Provides: amavisd-daemon
156 Obsoletes: amavisd-daemon
157 Obsoletes: amavisd-exim
158 Obsoletes: amavisd-postfix
159 Obsoletes: amavisd-qmail
161 %description sendmail
162 AMaViS is a script that interfaces a mail transport agent (MTA) with
163 one or more virus scanners. This is daemonized version of amavis.
165 This package contains backend for sendmail.
167 %description sendmail -l pl.UTF-8
168 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
169 a jednym lub więcej programów antywirusowych. Wersja zdemonizowana.
171 Pakiet ten zawiera back-end dla sendmaila.
173 %define no_install_post_chrpath 1
176 #-n %{name}-snapshot-%{version}
192 --with-sendmail-wrapper=/usr/lib/sendmail \
197 --with-runtime-dir=%{_var}/spool/amavis/runtime \
198 --with-virusdir=%{_var}/spool/amavis/virusmails \
199 --with-logdir=%{_var}/log \
200 --with-amavisuser=amavis \
201 --with-sockname=%{_var}/run/amavisd/amavisd.sock
204 mv amavis/amavisd amavis/amavisd.postfix
207 --with-sendmail-wrapper=/usr/lib/sendmail \
212 --with-runtime-dir=%{_var}/spool/amavis/runtime \
213 --with-virusdir=%{_var}/spool/amavis/virusmails \
214 --with-logdir=%{_var}/log \
215 --with-amavisuser=amavis \
216 --with-sockname=%{_var}/run/amavisd/amavisd.sock
219 mv amavis/amavisd amavis/amavisd.exim
223 --with-sendmail-wrapper=/usr/lib/sendmail \
228 --with-runtime-dir=%{_var}/spool/amavis/runtime \
229 --with-virusdir=%{_var}/spool/amavis/virusmails \
230 --with-logdir=%{_var}/log \
231 --with-amavisuser=amavis \
232 --with-sockname=%{_var}/run/amavisd/amavisd.sock
235 mv amavis/amavisd amavis/amavisd.qmail
236 mv amavis/amavis amavis/amavis.qmail-queue
239 --with-sendmail-wrapper=/usr/lib/sendmail \
244 --with-runtime-dir=%{_var}/spool/amavis/runtime \
245 --with-virusdir=%{_var}/spool/amavis/virusmails \
246 --with-logdir=%{_var}/log \
247 --with-amavisuser=amavis \
248 --with-sockname=%{_var}/run/amavisd/amavisd.sock
251 mv amavis/amavisd amavis/amavisd.sendmail
254 rm -rf $RPM_BUILD_ROOT
255 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails},%{_var}/run/amavisd}
258 amavisuser=$(id -u) \
259 DESTDIR=$RPM_BUILD_ROOT
260 install -D %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
262 install amavis/{amavisd.{exim,postfix,sendmail,qmail},amavis.qmail-queue} $RPM_BUILD_ROOT%{_sbindir}
265 rm -rf $RPM_BUILD_ROOT
268 %useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g nobody amavis
271 if [ "$1" = "0" ]; then
276 /sbin/chkconfig --add amavisd
277 %service amavisd restart "Amavisd daemon"
280 if [ "$1" = "0" ];then
281 %service amavisd stop
282 /sbin/chkconfig --del amavisd
286 ln -sf amavisd.exim %{_sbindir}/amavisd
289 ln -sf amavisd.postfix %{_sbindir}/amavisd
292 ln -sf amavisd.qmail %{_sbindir}/amavisd
293 # mv /var/bin/qmail-queue /var/bin/qmail-queue-real
294 # ln -s amavis.qmail-queue /var/bin/qmail-queue
297 ln -sf amavisd.sendmail %{_sbindir}/amavisd
300 %defattr(644,root,root,755)
301 %doc README* NEWS AUTHORS BUGS ChangeLog FAQ HINTS TODO doc/amavis.html doc/amavis.png
302 %attr(755,root,root) %{_sbindir}/amavis
303 %attr(754,root,root) /etc/rc.d/init.d/*
304 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavisd.conf
305 %attr(750,amavis,root) %{_var}/spool/amavis
306 %attr(755,amavis,root) %{_var}/run/amavisd
309 %defattr(644,root,root,755)
310 %attr(755,root,root) %{_sbindir}/amavisd.exim
311 %attr(777,root,root) %ghost %{_sbindir}/amavisd
314 %defattr(644,root,root,755)
315 %attr(755,root,root) %{_sbindir}/amavisd.postfix
316 %attr(777,root,root) %ghost %{_sbindir}/amavisd
320 %defattr(644,root,root,755)
321 %attr(755,root,root) %{_sbindir}/amavis.qmail-queue
322 %attr(755,root,root) %{_sbindir}/amavisd.qmail
323 %attr(777,root,root) %ghost %{_sbindir}/amavisd
327 %defattr(644,root,root,755)
328 %attr(755,root,root) %{_sbindir}/amavisd.sendmail
329 %attr(777,root,root) %ghost %{_sbindir}/amavisd