Search
j0ke.net Open Build Service
>
Projects
>
server:mail
>
amavisd-new
> Changes
Sign Up
|
Log In
Username
Password
Cancel
Overview
Repositories
Revisions
Requests
Users
Advanced
Attributes
Meta
Changes of Revision 6
[-]
[+]
Added
amavisd-new.spec
@@ -0,0 +1,620 @@ +# +# spec file for package amavisd-new (Version 2.5.1) +# +# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany. +# This file and all modifications and additions to the pristine +# package are under the same license as the package itself. +# +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + +# norootforbuild + +Name: amavisd-new +BuildRequires: krb5 sendmail sendmail-devel +License: GNU General Public License (GPL) +Group: Productivity/Networking/Security +URL: http://www.ijs.si/software/amavisd/ +Obsoletes: amavisd-postfix amavis-postfix amavis-sendmail amavisd-sendmail +Requires: gzip bzip2 lha unace unarj unrar zoo sharutils perl-Compress-Zlib perl-Convert-UUlib perl-IO-stringy perl-MIME-tools perl-MailTools perl-Archive-Tar perl-Unix-Syslog perl-Convert-TNEF perl-Archive-Zip perl-Net-Server perl-spamassassin file perl-BerkeleyDB +PreReq: /usr/sbin/useradd /bin/hostname /bin/sed /bin/cp /bin/mv %insserv_prereq +Autoreqprov: on +Summary: High-Performance E-Mail Virus Scanner +Version: 2.5.1 +Release: 1 +Source0: amavisd-new-%{version}.tar.gz +Source1: sysconfig.amavis +Source2: rc.amavis +Source3: README.SuSE +Source4: RELEASE_NOTES.2.5.0 +Patch: amavisd-new-suse.dif +BuildRoot: %{_tmppath}/%{name}-%{version}-build +%define avspool /var/spool/amavis +%define avquarantine /var/spool/amavis/virusmails +%define miltersockdir /var/run/amavis +%define avuser vscan +%define avgroup vscan +# --------------------------------------------------------------------------- +%prep +%setup -n amavisd-new-%{version} +%patch +# --------------------------------------------------------------------------- + +%build +cd helper-progs +export CFLAGS="$RPM_OPT_FLAGS" +./configure --prefix=/usr --with-user=%{avuser} \ + --with-runtime-dir=%{avspool} \ + --with-sockname=%{avspool}/amavisd.sock \ + --with-milterlib=%{_libdir} +make +# --------------------------------------------------------------------------- + +%install +rm -rf $RPM_BUILD_ROOT +# create the vscan user in the build system +/usr/sbin/groupadd -r %{avgroup} 2> /dev/null || : +/usr/sbin/useradd -r -o -g %{avgroup} -u 65 -s /bin/false -c "Vscan account" -d %{avspool} %{avuser} 2> /dev/null || : +mkdir -p $RPM_BUILD_ROOT/%{avquarantine} +mkdir -p $RPM_BUILD_ROOT/%{avspool}/tmp +mkdir -p $RPM_BUILD_ROOT/%{avspool}/db +mkdir -p $RPM_BUILD_ROOT/etc/init.d +mkdir -p $RPM_BUILD_ROOT/usr/sbin +mkdir -p $RPM_BUILD_ROOT/var/adm/fillup-templates +mkdir -p $RPM_BUILD_ROOT/etc/openldap/schema +install -m 644 $RPM_SOURCE_DIR/sysconfig.amavis $RPM_BUILD_ROOT/var/adm/fillup-templates +install -m 755 amavisd $RPM_BUILD_ROOT/usr/sbin/amavisd +install -m 755 amavisd-agent $RPM_BUILD_ROOT/usr/sbin/amavisd-agent +install -m 755 amavisd-nanny $RPM_BUILD_ROOT/usr/sbin/amavisd-nanny +install -m 755 amavisd-release $RPM_BUILD_ROOT/usr/sbin/amavisd-release +install -m 644 amavisd.conf $RPM_BUILD_ROOT/etc/amavisd.conf +install -m 755 $RPM_SOURCE_DIR/rc.amavis $RPM_BUILD_ROOT/etc/init.d/amavis +ln -s ../../etc/init.d/amavis $RPM_BUILD_ROOT/usr/sbin/rcamavis +install -m 755 helper-progs/amavis $RPM_BUILD_ROOT/usr/sbin/amavis +install -m 755 helper-progs/amavis-milter $RPM_BUILD_ROOT/usr/sbin/amavis-milter +# copy README.SuSE +install -m 644 %{S:3} . +install -m 644 %{S:4} . +mkdir -p $RPM_BUILD_ROOT/%{miltersockdir} +install -m 644 LDAP.schema $RPM_BUILD_ROOT/etc/openldap/schema/amavisd-new.schema +mkdir -p $RPM_BUILD_ROOT/%{perl_vendorlib} +install -m 644 JpegTester.pm $RPM_BUILD_ROOT/%{perl_vendorlib}/JpegTester.pm + +%pre +/usr/sbin/groupadd -r %{avgroup} 2> /dev/null || : +/usr/sbin/useradd -r -o -g %{avgroup} -u 65 -s /bin/false -c "Vscan account" -d %{avspool} %{avuser} 2> /dev/null || : +/usr/sbin/usermod %{avuser} -g %{avgroup} 2> /dev/null || : + +%preun +%stop_on_removal amavis + +%post +BAKSUFFIX=$(date +%Y-%m-%d) +AVCF=/etc/amavisd.conf +cp $AVCF $AVCF.NEW +FQHN=$(hostname -f) +if [ $1 -le 1 ]; then + AVDOMAIN=$(echo $FQHN | sed 's/[^\.]*\.//') + if [ -n "$AVDOMAIN" ]; then + perl -pi -e "s/mydomain =.*;/mydomain = '$AVDOMAIN';/" $AVCF.NEW + if ! cmp -s $AVCF $AVCF.NEW ; then + echo "setting \$mydomain to $AVDOMAIN in $AVCF" + fi + fi +fi +if [ -n "$FQHN" ]; then + if ! grep ^\$myhostname $AVCF > /dev/null; then + sed -ie "s%^#*[[:space:]]*\$myhostname[[:space:]]\+=.*%\$myhostname = '$FQHN';%" $AVCF.NEW + if ! cmp -s $AVCF $AVCF.NEW ; then + echo "setting \$myhostname to $FQHN in $AVCF" + fi + fi +fi +if [ -f $AVCF.NEW ]; then + if cmp -s $AVCF $AVCF.NEW ; then + rm -f $AVCF.NEW + else + cp --remove-destination $AVCF $AVCF.$BAKSUFFIX + mv $AVCF.NEW $AVCF + fi +fi +%{fillup_and_insserv -n amavis amavis} + +%postun +%restart_on_update amavis +%{insserv_cleanup} + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root) +%config /etc/init.d/amavis +%config(noreplace) /etc/amavisd.conf +%dir /etc/openldap/schema +/etc/openldap/schema/amavisd-new.schema +/var/adm/fillup-templates/sysconfig.amavis +/usr/sbin/* +%{perl_vendorlib}/JpegTester.pm +%dir %attr(0700, %{avuser}, root) %{avspool} +%dir %attr(0700, %{avuser}, root) %{avspool}/tmp +%dir %attr(0700, %{avuser}, root) %{avspool}/db +%dir %attr(0700, %{avuser}, root) %{avquarantine} +%dir %attr(0700, %{avuser}, root) %{miltersockdir} +%doc AAAREADME.first INSTALL LDAP.schema LICENSE MANIFEST RELEASE_NOTES TODO +%doc amavisd.conf-* JpegTester.pm +%doc README_FILES +%doc test-messages +%doc README.SuSE +%doc RELEASE_NOTES.2.5.0 + +%description +Amavisd-new is a high-performance interface between mailer (MTA) and +content checkers: virus scanners or SpamAssassin. It talks to the MTA +via (E)SMTP, LMTP, or by using helper programs. It works with the +following MTAs: + +- postfix + +- sendmail (sendmail-milter) + +- exim + + + +Authors: +-------- + Mark Martinec <mark.martinec@ijs.si> + + +%changelog +* Thu Jun 21 2007 - varkoly@suse.de +- Bug 230822 Amavisd-release Misconfiguration +- update to version 2.5.1 + SECURITY +- provides checking the number of archive members against $MAXFILES quota + even when just listing an archive directory, providing some additional + protection (besides a time limit) against runaway dearchivers + (such as a recent Zoo archiver DoS); +- please use the most recent versions of file(1) utility (currently 4.21) + and recent versions of external dearchivers/decoders to avoid known + security vulnerabilities in them; + NEW FEATURES +- introduced a variation of a message release from a quarantine, allowing + a releaser to choose between forwarding a message to the back-end MTA + port as usual (avoiding re-checking of a message), or to send it to MTA + on its incoming port (normally 25) and let the message be rescanned, + which might be useful after adjusting spam rules or antivirus database. + It is implemented by: + * adding a configuration variable $requeue_method (also a member + of policy banks), with a default value: 'smtp:[127.0.0.1]:25' + * extending the AM.PDP protocol with a 'request=requeue' attribute + which can be used in place of a 'request=release', + * enhancing the 'amavisd-release' utility program to choose between + sending 'request=release' and 'request=requeue' based on its + program name, i.e. by making a soft or hard link to amavisd-release + (or its copy) named 'amavisd-requeue', the utility will send + a 'request=requeue' in place of the usual 'request=release', e.g.: + [#] ln -s amavisd-release amavisd-requeue + $ amavisd-requeue spam/k/kg2P0rP9Lpu3.gz