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: 0b3b0ef8771af8e4a950e7381d42adbd
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-TNEF
37 Requires: perl-Convert-UUlib >= 1.05
38 Requires: perl-MIME-tools
39 Requires: perl-Net-Server >= 0.93
40 Requires: perl-Time-HiRes >= 1.49
41 Requires: perl-Unix-Syslog
62 Suggests: perl-Authen-SASL
63 # required already by perl-Mail-SpamAssassin
64 #Suggests: perl-DB_File
65 #Suggests: perl-IO-Socket-INET6
66 # required when doing SQL lookups
67 #Suggests: perl-DBD-mysql
68 Suggests: perl-Digest-MD5
69 Suggests: perl-Mail-DKIM >= 0.31
70 Suggests: perl-Mail-SpamAssassin
82 Provides: group(amavis)
83 Provides: user(amavis)
87 Obsoletes: amavisd-daemon
88 Obsoletes: amavisd-exim
89 Obsoletes: amavisd-new-exim
90 Obsoletes: amavisd-new-postfix
91 Obsoletes: amavisd-new-qmail
92 Obsoletes: amavisd-postfix
93 Obsoletes: amavisd-qmail
94 Conflicts: amavis-stats <= 0.1.12
95 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
97 %define _tmpwatchdir /etc/tmpwatch
98 %define schemadir /usr/share/openldap/schema
101 AMaViS is a script that interfaces a mail transport agent (MTA) with
102 one or more virus scanners and SpamAssasin. This is daemonized version
105 %description -l pl.UTF-8
106 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
107 a jednym lub więcej programów antywirusowych i SpamAssasinem. Wersja
111 Summary: A Mail Virus Scanner with SpamAssasin support - sendmail backend
112 Summary(pl.UTF-8): Antywirusowy skaner poczty elektronicznej - backend dla sendmaila
113 Group: Applications/Mail
114 Requires: %{name} = %{epoch}:%{version}-%{release}
117 %description sendmail
118 AMaViS is a script that interfaces a mail transport agent (MTA) with
119 one or more virus scanners. This is daemonized version of amavis.
121 This package contains backend for sendmail.
123 %description sendmail -l pl.UTF-8
124 AMaViS to skrypt pośredniczący pomiędzy agentem transferu poczty (MTA)
125 a jednym lub więcej programów antywirusowych. Wersja zdemonizowana.
127 Pakiet ten zawiera back-end dla sendmaila.
129 %package -n openldap-schema-amavisd-new
130 Summary: Amavisd-new LDAP schema
131 Summary(pl.UTF-8): Schemat LDAP dla amavisd-new
132 Group: Networking/Daemons
133 Requires: openldap-servers
135 %description -n openldap-schema-amavisd-new
136 This package contains LDAP schema for use with amavisd-new.
138 %description -n openldap-schema-amavisd-new -l pl.UTF-8
139 Ten pakiet zawiera schemat LDAP do używania z amavisd-new.
149 --with-sendmail=/usr/lib/sendmail \
150 --with-runtime-dir=/var/spool/amavis/runtime \
151 --with-sockname=/var/run/amavisd/amavisd.sock \
152 --with-milterlib=%{_libdir}
156 rm -rf $RPM_BUILD_ROOT
157 install -d $RPM_BUILD_ROOT{%{_var}/spool/amavis/{runtime,virusmails,db},%{_var}/run/amavisd,/etc/rc.d/init.d,%{_sbindir},%{_tmpwatchdir}}
159 install amavisd $RPM_BUILD_ROOT%{_sbindir}
160 install amavisd-agent $RPM_BUILD_ROOT%{_sbindir}
161 install amavisd-nanny $RPM_BUILD_ROOT%{_sbindir}
162 install amavisd-release $RPM_BUILD_ROOT%{_sbindir}
163 install amavisd.conf-sample $RPM_BUILD_ROOT%{_sysconfdir}/amavisd.conf
164 install %{SOURCE1} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavisd
165 install %{SOURCE2} $RPM_BUILD_ROOT/etc/rc.d/init.d/amavis-milter
166 install helper-progs/amavis $RPM_BUILD_ROOT%{_sbindir}
167 install helper-progs/amavis-milter $RPM_BUILD_ROOT%{_sbindir}
168 install %{SOURCE3} $RPM_BUILD_ROOT%{_tmpwatchdir}/%{name}.conf
169 install -D LDAP.schema $RPM_BUILD_ROOT%{schemadir}/amavisd-new.schema
172 rm -rf $RPM_BUILD_ROOT
175 %groupadd -g 116 -r -f amavis
176 %useradd -u 97 -r -d %{_var}/spool/amavis -s /bin/false -c "Anti Virus Checker" -g amavis amavis
179 if [ "$1" = "0" ]; then
185 /sbin/chkconfig --add amavisd
186 %service amavisd restart "Amavisd daemon"
189 if [ "$1" = "0" ]; then
190 %service amavisd stop
191 /sbin/chkconfig --del amavisd
195 /sbin/chkconfig --add amavis-milter
196 %service amavis-milter restart "Amavis-milter daemon"
199 if [ "$1" = "0" ];then
200 %service amavis-milter stop
201 /sbin/chkconfig --del amavis-milter
204 %post -n openldap-schema-amavisd-new
205 %openldap_schema_register %{schemadir}/amavisd-new.schema
206 %service -q ldap restart
208 %postun -n openldap-schema-amavisd-new
209 if [ "$1" = "0" ]; then
210 %openldap_schema_unregister %{schemadir}/amavisd-new.schema
211 %service -q ldap restart
215 %defattr(644,root,root,755)
216 %doc AAAREADME.first INSTALL RELEASE_NOTES README_FILES/* test-messages
217 %attr(755,root,root) %{_sbindir}/amavisd*
218 %attr(754,root,root) /etc/rc.d/init.d/amavisd
219 %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/amavisd.conf
220 %config(noreplace) %verify(not md5 mtime size) %{_tmpwatchdir}/%{name}.conf
221 %attr(750,amavis,amavis) %{_var}/spool/amavis
222 %attr(750,amavis,amavis) %{_var}/run/amavisd
225 %defattr(644,root,root,755)
226 %attr(754,root,root) /etc/rc.d/init.d/amavis-milter
227 %attr(755,root,root) %{_sbindir}/amavis
228 %attr(755,root,root) %{_sbindir}/amavis-milter
230 %files -n openldap-schema-amavisd-new
231 %defattr(644,root,root,755)
232 %{schemadir}/*.schema