2 # - Add polish info mail templates
3 # - move amavis part of tmpwatch configuration from tmpwatch.spec
5 %include /usr/lib/rpm/macros.perl
6 Summary: A Mail Virus Scanner with SpamAssassin support - daemon
7 Summary(pl.UTF-8): Antywirusowy skaner poczty elektronicznej z obsługą SpamAssasina - demon
13 Group: Applications/Mail
14 Source0: http://www.ijs.si/software/amavisd/%{name}-%{version}.tar.gz
15 # Source0-md5: 02b0bd38b40258841c60479603dc6842
17 Source2: %{name}-milter.init
18 Source3: %{name}.tmpwatch
19 Patch0: %{name}-config.patch
20 Patch1: %{name}-tools-dbdir.patch
21 URL: http://www.ijs.si/software/amavisd/
22 BuildRequires: libmilter-devel
23 BuildRequires: rpm-perlprov
24 BuildRequires: rpmbuild(macros) >= 1.304
25 Requires(post,preun): /sbin/chkconfig
26 Requires(postun): /usr/sbin/groupdel
27 Requires(postun): /usr/sbin/userdel
28 Requires(pre): /bin/id
29 Requires(pre): /usr/bin/getgid
30 Requires(pre): /usr/sbin/groupadd
31 Requires(pre): /usr/sbin/useradd
32 Requires: /usr/lib/sendmail
33 Requires: perl-Archive-Tar
34 Requires: perl-Archive-Zip >= 1.14
35 Requires: perl-Compress-Zlib >= 1.35
36 Requires: perl-Convert-BinHex
37 Requires: perl-Convert-TNEF
38 Requires: perl-Convert-UUlib >= 1.05
39 Requires: perl-MIME-tools
40 Requires: perl-Net-Server >= 0.93
41 Requires: perl-Time-HiRes >= 1.49
42 Requires: perl-Unix-Syslog
63 Suggests: perl-Authen-SASL
64 # required already by perl-Mail-SpamAssassin
65 #Suggests: perl-DB_File
66 #Suggests: perl-IO-Socket-INET6
67 # required when doing SQL lookups
68 #Suggests: perl-DBD-mysql
69 Suggests: perl-Digest-MD5
70 Suggests: perl-Mail-DKIM >= 0.31
71 Suggests: perl-Mail-SpamAssassin
83 Provides: group(amavis)
84 Provides: user(amavis)
88 Obsoletes: amavisd-daemon
89 Obsoletes: amavisd-exim
90 Obsoletes: amavisd-new-exim
91 Obsoletes: amavisd-new-postfix
92 Obsoletes: amavisd-new-qmail
93 Obsoletes: amavisd-postfix
94 Obsoletes: amavisd-qmail
95 Conflicts: amavis-stats <= 0.1.12
96 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
98 %define _tmpwatchdir /etc/tmpwatch
99 %define schemadir /usr/share/openldap/schema
102 AMaViS is a script that interfaces a mail transport agent (MTA) with
103 one or more virus scanners and SpamAssasin. This is daemonized version
106 %description -l pl.UTF-8
107 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
108 a jednym lub więcej programów antywirusowych i SpamAssasinem. Wersja
112 Summary: A Mail Virus Scanner with SpamAssasin support - sendmail backend
113 Summary(pl.UTF-8): Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
114 Group: Applications/Mail
115 Requires: %{name} = %{epoch}:%{version}-%{release}
118 %description sendmail
119 AMaViS is a script that interfaces a mail transport agent (MTA) with
120 one or more virus scanners. This is daemonized version of amavis.
122 This package contains backend for sendmail.
124 %description sendmail -l pl.UTF-8
125 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
126 a jednym lub więcej programów antywirusowych. Wersja zdemonizowana.
128 Pakiet ten zawiera back-end dla sendmaila.
130 %package -n openldap-schema-amavisd-new
131 Summary: Amavisd-new LDAP schema
132 Summary(pl.UTF-8): Schemat LDAP dla amavisd-new
133 Group: Networking/Daemons
134 Requires: openldap-servers
136 %description -n openldap-schema-amavisd-new
137 This package contains LDAP schema for use with amavisd-new.
139 %description -n openldap-schema-amavisd-new -l pl.UTF-8
140 Ten pakiet zawiera schemat LDAP do używania z amavisd-new.
150 --with-sendmail=/usr/lib/sendmail \
151 --with-runtime-dir=/var/spool/amavis/runtime \
152 --with-sockname=/var/run/amavisd/amavisd.sock \
153 --with-milterlib=%{_libdir}
157 rm -rf $RPM_BUILD_ROOT
158 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails,db},%{_var}/run/amavisd,/etc/rc.d/init.d,%{_sbindir},%{_tmpwatchdir}}
160 install amavisd $RPM_BUILD_ROOT%{_sbindir}
161 install amavisd-agent $RPM_BUILD_ROOT%{_sbindir}
162 install amavisd-nanny $RPM_BUILD_ROOT%{_sbindir}
163 install amavisd-release $RPM_BUILD_ROOT%{_sbindir}
164 install amavisd.conf-sample $RPM_BUILD_ROOT%{_sysconfdir}/amavisd.conf
165 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavisd
166 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavis-milter
167 install helper-progs/amavis $RPM_BUILD_ROOT%{_sbindir}
168 install helper-progs/amavis-milter $RPM_BUILD_ROOT%{_sbindir}
169 install %{SOURCE3} $RPM_BUILD_ROOT%{_tmpwatchdir}/%{name}.conf
170 install -D LDAP.schema $RPM_BUILD_ROOT%{schemadir}/amavisd-new.schema
173 rm -rf $RPM_BUILD_ROOT
176 %groupadd -g 116 -r -f amavis
177 %useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g amavis amavis
180 if [ "$1" = "0" ]; then
186 /sbin/chkconfig --add amavisd
187 %service amavisd restart "Amavisd daemon"
190 if [ "$1" = "0" ]; then
191 %service amavisd stop
192 /sbin/chkconfig --del amavisd
196 /sbin/chkconfig --add amavis-milter
197 %service amavis-milter restart "Amavis-milter daemon"
200 if [ "$1" = "0" ];then
201 %service amavis-milter stop
202 /sbin/chkconfig --del amavis-milter
205 %post -n openldap-schema-amavisd-new
206 %openldap_schema_register %{schemadir}/amavisd-new.schema
207 %service -q ldap restart
209 %postun -n openldap-schema-amavisd-new
210 if [ "$1" = "0" ]; then
211 %openldap_schema_unregister %{schemadir}/amavisd-new.schema
212 %service -q ldap restart
216 %defattr(644,root,root,755)
217 %doc AAAREADME.first INSTALL RELEASE_NOTES README_FILES/* test-messages
218 %attr(755,root,root) %{_sbindir}/amavisd*
219 %attr(754,root,root) /etc/rc.d/init.d/amavisd
220 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavisd.conf
221 %config(noreplace) %verify(not md5 mtime size) %{_tmpwatchdir}/%{name}.conf
222 %attr(750,amavis,amavis) %{_var}/spool/amavis
223 %attr(750,amavis,amavis) %{_var}/run/amavisd
226 %defattr(644,root,root,755)
227 %attr(754,root,root) /etc/rc.d/init.d/amavis-milter
228 %attr(755,root,root) %{_sbindir}/amavis
229 %attr(755,root,root) %{_sbindir}/amavis-milter
231 %files -n openldap-schema-amavisd-new
232 %defattr(644,root,root,755)
233 %{schemadir}/*.schema