%define build_plf 0 %{?_with_plf: %{expand: %%define build_plf 1}} %{?_without_plf: %{expand: %%define build_plf 0}} %define rel 3 %if !%build_plf %define release %mkrel %{rel} %else %define release %{rel}plf %endif Summary: A Mail Virus Scanner Name: amavisd-new Version: 2.4.5 Release: %{release} License: GPL Group: Networking/Mail URL: http://www.ijs.si/software/amavisd/ Source0: %{name}-%{version}.tar.bz2 Patch10: amavisd-new-2.1.2-init.patch Patch11: amavisd-new-2.4.5-mdv_conf.patch Requires: file >= 3.41 # http://archives.mandrakelinux.com/cooker/2005-06/msg01987.php Requires: mail-server Requires: perl-Archive-Tar Requires: perl-Archive-Zip Requires: perl-BerkeleyDB Requires: perl-Compress-Zlib Requires: perl-Convert-UUlib >= 1.08 Requires: perl-Convert-TNEF Requires: perl-DBI Requires: perl-Digest-MD5 Requires: perl-IO-stringy Requires: perl-ldap Requires: perl-libnet Requires: perl-Mail-SpamAssassin Requires: perl-MailTools Requires: perl-MIME-Base64 Requires: perl-MIME-tools >= 5.411 Requires: perl-Net-Server >= 0.84 Requires: perl-Razor-Agent Requires: perl-Time-HiRes Requires: perl-Unix-Syslog Requires: spamassassin >= 2.60 Requires: spamassassin-spamd >= 2.60 Requires: spamassassin-spamc >= 2.60 Requires: binutils Requires: bzip2 Requires: cabextract Requires: tnef Requires: lha Requires: lzop Requires: ncompress Requires: nomarch Requires: pax Requires: ripole %if %build_plf #Requires: arc Requires: unace Requires: unarj Requires: unrar Requires: zoo Requires: freeze %endif Provides: amavisd BuildArch: noarch # this is for serviceadd, etc. Requires(post): rpm-helper Requires(preun): rpm-helper # this is for useradd, groupadd, etc. Requires(pre): rpm-helper Requires(postun): rpm-helper #PreReq: clamav Obsoletes: amavis-postfix BuildRoot: %{_tmppath}/%{name}-%{version}-root %description AMaViS is a perl script that interfaces a Mail Transport Agent (MTA) with one or more virus scanners (not provided). %prep %setup -q -n %{name}-%{version} %patch10 -p1 -b .init %patch11 -p1 -b .confpch %build %install rm -rf %{buildroot} install -d %{buildroot}%{_initrddir} install -d %{buildroot}%{_sysconfdir}/amavisd install -d %{buildroot}%{_sbindir} install -d %{buildroot}%{_bindir} install -d %{buildroot}%{_localstatedir}/amavis/.spamassassin install -d %{buildroot}/var/spool/amavis/virusmails install -d %{buildroot}%{_localstatedir}/amavis/{tmp,db} install -m0755 amavisd_init.sh %{buildroot}%{_initrddir}/amavisd install -m0640 amavisd.conf %{buildroot}%{_sysconfdir}/amavisd/amavisd.conf install -m0640 amavisd.conf-default %{buildroot}%{_sysconfdir}/amavisd/amavisd.conf-default install -m0640 amavisd.conf-sample %{buildroot}%{_sysconfdir}/amavisd/amavisd.conf-sample install -m0755 amavisd %{buildroot}%{_sbindir}/amavisd install -m0755 p0f-analyzer.pl %{buildroot}%{_sbindir}/ install -m0755 amavisd-agent %{buildroot}%{_sbindir}/ install -m0755 amavisd-nanny %{buildroot}%{_sbindir}/ install -m0755 amavisd-release %{buildroot}%{_sbindir}/ cat > %{buildroot}%{_localstatedir}/amavis/.spamassassin/user_prefs <<EOF # SpamAssassin User Preferences file # (see perldoc Mail::SpamAssassin::Conf for details of what can be tweaked). # Note that the entries for headers won't have effect, since those are # directly handled/overridden by amavisd and amavisd.conf. dns_available yes # Bayes filters requires at least 200 entries of spam and 200 of ham # for start working bayes_file_mode 0640 use_bayes 1 #bayes_auto_learn 0 skip_rbl_checks 1 use_razor2 0 use_pyzor 0 #dcc_add_header 1 # Custom scores (local|net|bayes|bayes+net) #score BAYES_99 4.300 4.300 5.400 5.400 #score BAYES_90 3.500 3.500 3.500 3.500 #score BAYES_80 3.000 3.000 3.000 3.000 #score DCC_CHECK 4.000 4.000 4.000 4.000 #score RAZOR2_CHECK 2.500 2.500 2.500 2.500 #score HABEAS_SWE -0.01 EOF cat > %{buildroot}%{_bindir}/amavisd-checkbayesdb <<EOF #!/bin/sh su amavis -c "%{_bindir}/sa-learn --dump" -s /bin/sh EOF cat > %{buildroot}%{_bindir}/amavisd-checkcfg <<EOF #!/bin/sh su amavis -c "%{_bindir}/spamassassin --lint -D" -s /bin/sh EOF cat > %{buildroot}%{_bindir}/amavisd-mboxlearnham <<EOF #!/bin/sh su amavis -c "%{_bindir}/sa-learn --showdots --ham --mbox \$1" -s /bin/sh EOF cat > %{buildroot}%{_bindir}/amavisd-mboxlearnspam <<EOF #!/bin/sh su amavis -c "%{_bindir}/sa-learn --showdots --spam --mbox \$1" -s /bin/sh EOF %clean rm -rf %{buildroot} %pre %_pre_useradd amavis %{_localstatedir}/amavis /bin/false %_pre_groupadd amavis amavis,clamav %post %_post_service amavisd # check mta mta="`readlink /etc/alternatives/sendmail-command 2>/dev/null | cut -d . -f 2`" if [ "$mta" = "postfix" ]; then aliases="%{_sysconfdir}/postfix/aliases" else aliases="%{_sysconfdir}/aliases" fi if [ -e "$aliases" ]; then grep -q "virusalert" "$aliases" || \ echo "virusalert: root" >> "$aliases" [ -x %{_bindir}/newaliases ] && %{_bindir}/newaliases > /dev/null 2>&1 fi if [ -x /usr/sbin/postconf ] && [ -z `/usr/sbin/postconf -h content_filter` ]; then postconf -e content_filter=lmtp-filter:127.0.0.1:10025 postconf -e receive_override_options=no_address_mappings fi %preun %_preun_service amavisd %files %defattr(-,root,root) %doc AAAREADME.first INSTALL LICENSE README_FILES RELEASE_NOTES test-messages %doc LDAP.schema amavisd-new-courier.patch amavisd-new-qmqpqq.patch %attr(0755,root,root) %{_initrddir}/amavisd %attr(0640,root,amavis) %config(noreplace) %{_sysconfdir}/amavisd/amavisd.conf %attr(0640,root,amavis) %{_sysconfdir}/amavisd/amavisd.conf-default %attr(0640,root,amavis) %{_sysconfdir}/amavisd/amavisd.conf-sample %attr(0755,root,root) %{_sbindir}/amavisd %attr(0755,root,root) %{_sbindir}/p0f-analyzer.pl %attr(0755,root,root) %{_sbindir}/amavisd-agent %attr(0755,root,root) %{_sbindir}/amavisd-nanny %attr(0755,root,root) %{_sbindir}/amavisd-release %attr(0755,root,root) %{_bindir}/amavisd-* %attr(0755,root,root) %dir /var/spool/amavis %attr(0750,amavis,amavis) %dir /var/spool/amavis/virusmails %attr(0750,amavis,amavis) %dir %{_localstatedir}/amavis %attr(0750,amavis,amavis) %dir %{_localstatedir}/amavis/tmp %attr(0750,amavis,amavis) %dir %{_localstatedir}/amavis/db %attr(0750,amavis,amavis) %dir %{_localstatedir}/amavis/.spamassassin %attr(0640,amavis,amavis) %config(noreplace) %{_localstatedir}/amavis/.spamassassin/user_prefs %changelog * Tue Feb 27 2007 Giuseppe Ghibò <ghibo@mandriva.com> 2.4.5-3mdv2007.1 + Revision: 126526 - Bump release to 3. - Added perl-ldap to Requires. - Specify release >= 1.08 for Requires: perl-Convert-UUlib. * Tue Feb 27 2007 Giuseppe Ghibò <ghibo@mandriva.com> 2.4.5-2mdv2007.1 + Revision: 126484 - Bumped release to 2. - Removed Patch13 (no longer needed). Thanks to Pixel for having spotted this (fix bug #28725). * Fri Feb 09 2007 Giuseppe Ghibò <ghibo@mandriva.com> 2.4.5-1mdv2007.1 + Revision: 118648 - Import amavisd-new * Fri Feb 09 2007 Giuseppe Ghibò <ghibo@mandriva.com> 2.4.5-1mdv2007.1 - Release 2.4.5. - Rediff Patch11. * Mon Aug 28 2006 Giuseppe Ghibò <ghibo@mandriva.com> 2.4.2-4mdv2007.0 - Fixed %%{rel} for plf. - removed use_dcc into default user_prefs (no longer supported). - commented auto_learn into default user_prefs (this option became bayes_auto_learn and by default is already enabled). * Sat Jul 26 2006 Giuseppe Ghibò <ghibo@mandriva.coM> 2.4.2-3mdv2007.0 - Remerge Patch12 into Patch11. * Sat Jul 26 2006 Giuseppe Ghibò <ghibo@mandriva.com> 2.4.2-2mdv2007.0 - Fixed Patch11 for problem with clamav (socket was in the wrong dir) and merged with Patch12. - Removed patch2. * Wed Jun 28 2006 Oden Eriksson <oeriksson@mandriva.com> 2.4.2-1mdv2007.0 - 2.4.2 - rediffed patches; P11 * Wed May 31 2006 Oden Eriksson <oeriksson@mandriva.com> 2.4.1-1mdv2007.0 - 2.4.1 - rediffed patches; P11,P13 - added some tools to the package - fix deps * Sat Oct 10 2005 Giuseppe Ghibò <ghibo@mandriva.com> 2.3.3-1mdk - Release: 2.3.3. - Rebuilt Patch12. * Wed Aug 24 2005 Andreas Hasenack <andreas@mandriva.com> 2.3.2-5mdk - fixed aliases handling in %%post to cope with postfix/others (mta test stolen from mailman, by Guillaume.Rousse@inria.fr) * Wed Aug 24 2005 Oden Eriksson <oeriksson@mandriva.com> 2.3.2-4mdk - fix deps - fix #17288 * Thu Aug 11 2005 Oden Eriksson <oeriksson@mandriva.com> 2.3.2-3mdk - correct the rpm-helper deps * Wed Aug 10 2005 Nicolas Lécureuil <neoclust@mandriva.org> 2.3.2-2mdk - fix rpmlint errors (PreReq) * Fri Aug 05 2005 Giuseppe Ghibò <ghibo@mandriva.com> 2.3.2-1mdk - Release: 2.3.2. - Rebuilt Patch11, Patch12, Patch13. * Mon Jul 18 2005 Andreas Hasenack <andreas@mandriva.com> 2.2.1-4mdk - changed requires: s/smtpdaemon/mail-server/ (see http://archives.mandrakelinux.com/cooker/2005-06/msg01987.php and http://archives.mandrakelinux.com/cooker/2005-06/msg01987.php) * Wed Jul 06 2005 Oden Eriksson <oeriksson@mandriva.com> 2.2.1-3mdk - added rediffed P13 from the openpkg kolab2 packages * Tue Mar 15 2005 Oden Eriksson <oden.eriksson@kvikkjokk.net> 2.2.1-2mdk - fix deps - rpmlint fixes * Thu Dec 23 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.2.1-1mdk - Release: 2.2.1. - Rebuilt Patch11. - Rebuilt Patch12. - Added pax, ripmime, freeze to Requires. * Thu Sep 23 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 2.1.2-1mdk - Release: 2.1.2. - Rebuilt Patch10. - Rebuilt Patch11. - Rebuilt Patch12. - Added mthredir, sdboot.gen, funlove, yaha, zafi, gibe, lovgate, nyxem, mabutu, plexus to list of viruses that fake sender maps. * Thu Jul 29 2004 Lenny Cartier <lenny@mandrakesoft.com> 0.20040701-1mdk - updated to 20040701 by Andre Nathan <andre@digirati.com.br> * Mon Mar 22 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.20030616-18mdk - Updated to release 20030616p8. - Added bagle to fakesender virus list. - Rebuilt Patch11, Patch13. * Wed Jan 28 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.20030616-17mdk - Added mydoom to fakesender virus list. - mark user_prefs file with config(noreplace) (Luca Berra). * Mon Jan 26 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.20030616-16mdk - Added X-Spam-Score flag for squirrelmail+avelsieve. * Sat Jan 24 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.20030616-15mdk - Removed "use_razor1 0" from user_prefs (after --lint -D check). * Fri Jan 23 2004 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.20030616-14mdk - Updated to release 20030616p7. - Sync with current postfix to use port 10026. * Sun Dec 28 2003 Luca Berra <bluca@vodka.it> 0.20030616-13mdk - plf package has plf extension. - remove arc from Requires list, for now (seems missed from plf). - more /var/amavis -> /var/lib/amavis in config. - enable clamav in daemon mode (add clamav to amavis group). - require smtpdaemon, not postfix. - change default ports according to postfix FILTER_README standards. - auto-add to postfix if found (commented right now). * Fri Dec 26 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.20030616-12mdk - Fixed Patch11 to use /var/lib/amavis as default for $MYHOME. * Fri Dec 26 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.20030616-11mdk - Release 20030616-p6. - Readapted patches 11, 12, 13. * Sun Nov 09 2003 Luca Berra <bluca@vodka.it> 0.20030616-10mdk - now depends on spamassassin 2.60+ * Sat Oct 11 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.20030616-9mdk - Fixed script amavisd-mboxlearnspam. * Wed Oct 08 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.20030616-8mdk - Fixed scripts amavisd-mboxlearnspam|ham. * Sat Sep 27 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.20030616-7mdk - Fixed bug #5324 (for real now, grrr!) - Fixed bug #5994. * Fri Sep 12 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.20030616-6mdk - Fixed bug #5324. * Tue Sep 09 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.20030616-5mdk - init script renamed to amavisd. * Tue Sep 09 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.20030616-4mdk - Added LDAP.schema do docs (Buchan). * Fri Aug 29 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.20030616-3mdk - Release 20030616-p5. - Removed Patch1 (merged). - DIRM: /var/spool/amavis. - Readapted Patch13. - Init script named amavisd-new. * Sat Jul 19 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.20030616-2mdk - Set $TEMPBASE to /var/lib/amavis/tmp. - Set default $final_virus_destiny to D_DISCARD (as they are anyway saved in /var/spool/amavisd/virusmails). - Set default $final_spam_destiny to D_PASS (is a waste of time to bounce them, and generally sysadmins don't wan't to D_DISCARD them until they have learned the bayes filter). - Added some script for bayes learning as 'amavis' user. - TODO: write some robust script to configure postfix master.cf files for supporting amavisd and a %post script for configuring mydomain in amavisd.conf to hostname. * Mon Jun 30 2003 Giuseppe Ghibò <ghibo@mandrakesoft.com> 0.20030616-1mdk - Initial release.