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: 6bddb725115c2682110b82d41494df73
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-Convert-BinHex
36 Requires: perl-Convert-TNEF
37 Requires: perl-Convert-UUlib >= 1.05
38 Requires: perl-IO-Compress
39 Requires: perl-MIME-tools
40 Requires: perl-Net-Server >= 0.93
41 Requires: perl-Time-HiRes >= 1.49
42 Requires: perl-Unix-Syslog
44 Requires: rc-scripts >= 0.4.1.23
62 Suggests: perl-Authen-SASL
65 # required already by perl-Mail-SpamAssassin
66 #Suggests: perl-DB_File
67 #Suggests: perl-IO-Socket-INET6
68 # required when doing SQL lookups
70 #Suggests: perl-DBD-mysql
71 Suggests: perl-Digest-MD5
72 Suggests: perl-Mail-DKIM >= 0.31
73 Suggests: perl-Mail-SpamAssassin
84 Provides: group(amavis)
85 Provides: user(amavis)
89 Obsoletes: amavisd-daemon
90 Obsoletes: amavisd-exim
91 Obsoletes: amavisd-new-exim
92 Obsoletes: amavisd-new-postfix
93 Obsoletes: amavisd-new-qmail
94 Obsoletes: amavisd-postfix
95 Obsoletes: amavisd-qmail
96 Conflicts: amavis-stats <= 0.1.12
97 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
99 %define _tmpwatchdir /etc/tmpwatch
100 %define schemadir /usr/share/openldap/schema
103 AMaViS is a script that interfaces a mail transport agent (MTA) with
104 one or more virus scanners and SpamAssasin. This is daemonized version
107 %description -l pl.UTF-8
108 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
109 a jednym lub więcej programów antywirusowych i SpamAssasinem. Wersja
113 Summary: A Mail Virus Scanner with SpamAssasin support - sendmail backend
114 Summary(pl.UTF-8): Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
115 Group: Applications/Mail
116 Requires: %{name} = %{epoch}:%{version}-%{release}
119 %description sendmail
120 AMaViS is a script that interfaces a mail transport agent (MTA) with
121 one or more virus scanners. This is daemonized version of amavis.
123 This package contains backend for sendmail.
125 %description sendmail -l pl.UTF-8
126 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
127 a jednym lub więcej programów antywirusowych. Wersja zdemonizowana.
129 Pakiet ten zawiera back-end dla sendmaila.
131 %package -n openldap-schema-amavisd-new
132 Summary: Amavisd-new LDAP schema
133 Summary(pl.UTF-8): Schemat LDAP dla amavisd-new
134 Group: Networking/Daemons
135 Requires: openldap-servers
137 %description -n openldap-schema-amavisd-new
138 This package contains LDAP schema for use with amavisd-new.
140 %description -n openldap-schema-amavisd-new -l pl.UTF-8
141 Ten pakiet zawiera schemat LDAP do używania z amavisd-new.
151 --with-sendmail=/usr/lib/sendmail \
152 --with-runtime-dir=/var/spool/amavis/runtime \
153 --with-sockname=/var/run/amavisd/amavisd.sock \
154 --with-milterlib=%{_libdir}
158 rm -rf $RPM_BUILD_ROOT
159 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails,db},%{_var}/run/amavisd,/etc/rc.d/init.d,%{_sbindir},%{_tmpwatchdir}}
161 install amavisd $RPM_BUILD_ROOT%{_sbindir}
162 install amavisd-agent $RPM_BUILD_ROOT%{_sbindir}
163 install amavisd-nanny $RPM_BUILD_ROOT%{_sbindir}
164 install amavisd-release $RPM_BUILD_ROOT%{_sbindir}
165 install amavisd.conf-sample $RPM_BUILD_ROOT%{_sysconfdir}/amavisd.conf
166 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavisd
167 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavis-milter
168 install helper-progs/amavis $RPM_BUILD_ROOT%{_sbindir}
169 install helper-progs/amavis-milter $RPM_BUILD_ROOT%{_sbindir}
170 install %{SOURCE3} $RPM_BUILD_ROOT%{_tmpwatchdir}/%{name}.conf
171 install -D LDAP.schema $RPM_BUILD_ROOT%{schemadir}/amavisd-new.schema
174 rm -rf $RPM_BUILD_ROOT
177 %groupadd -g 116 -r -f amavis
178 %useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g amavis amavis
181 if [ "$1" = "0" ]; then
187 /sbin/chkconfig --add amavisd
188 %service amavisd restart "Amavisd daemon"
191 if [ "$1" = "0" ]; then
192 %service amavisd stop
193 /sbin/chkconfig --del amavisd
197 /sbin/chkconfig --add amavis-milter
198 %service amavis-milter restart "Amavis-milter daemon"
201 if [ "$1" = "0" ];then
202 %service amavis-milter stop
203 /sbin/chkconfig --del amavis-milter
206 %post -n openldap-schema-amavisd-new
207 %openldap_schema_register %{schemadir}/amavisd-new.schema
208 %service -q ldap restart
210 %postun -n openldap-schema-amavisd-new
211 if [ "$1" = "0" ]; then
212 %openldap_schema_unregister %{schemadir}/amavisd-new.schema
213 %service -q ldap restart
217 %defattr(644,root,root,755)
218 %doc AAAREADME.first INSTALL RELEASE_NOTES README_FILES/* test-messages
219 %attr(755,root,root) %{_sbindir}/amavisd*
220 %attr(754,root,root) /etc/rc.d/init.d/amavisd
221 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavisd.conf
222 %config(noreplace) %verify(not md5 mtime size) %{_tmpwatchdir}/%{name}.conf
223 %attr(750,amavis,amavis) %{_var}/spool/amavis
224 %attr(750,amavis,amavis) %{_var}/run/amavisd
227 %defattr(644,root,root,755)
228 %attr(754,root,root) /etc/rc.d/init.d/amavis-milter
229 %attr(755,root,root) %{_sbindir}/amavis
230 %attr(755,root,root) %{_sbindir}/amavis-milter
232 %files -n openldap-schema-amavisd-new
233 %defattr(644,root,root,755)
234 %{schemadir}/*.schema