%define name amavisd-new %define snapshot 20030616 %define version 0.%{snapshot} %define rel 18 %define build_plf 0 %{?_with_plf: %{expand: %%define build_plf 1}} %{?_without_plf: %{expand: %%define build_plf 0}} %if !%build_plf %define release %{rel}mdk %else %define release %{rel}plf %endif Summary: A Mail Virus Scanner Name: %{name} Version: %{version} Release: %{release} URL: http://www.ijs.si/software/amavisd/ Source0: %{name}-%{snapshot}-p8.tar.bz2 Patch10: amavisd-new-20030616-pidfile.patch.bz2 Patch11: amavisd-new-20030616p8-varpath.patch.bz2 Patch12: amavisd-new-20030616p6-usergroup.patch.bz2 Patch13: amavisd-new-20030616p8-myconf.patch.bz2 Patch14: amavisd-new-20030616p7-xspamscore.patch.bz2 Patch15: amavisd-new-20030616p7-deb.patch.bz2 License: GPL Group: Networking/Mail Requires: file >= 3.41 Requires: smtpdaemon Requires: perl-Archive-Tar Requires: perl-Archive-Zip Requires: perl-Compress-Zlib Requires: perl-Convert-UUlib Requires: perl-Convert-TNEF Requires: perl-DBI Requires: perl-Digest-MD5 Requires: perl-IO-stringy 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: bzip2 Requires: lha Requires: lzop Requires: ncompress Requires: nomarch %if %build_plf #Requires: arc Requires: unace Requires: unarj Requires: unrar Requires: zoo %endif Provides: amavisd BuildRoot: %{_tmppath}/%{name}-%{version}-root BuildArch: noarch PreReq: rpm-helper >= 0.3 #PreReq: clamav %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}-%{snapshot} %patch10 -p1 -b .pid %patch11 -p1 -b .varpath %patch12 -p1 -b .user %patch13 -p1 -b .myconf %patch14 -p1 -b .xspamscore %patch15 -p1 -b .deb %install mkdir -p \ %buildroot%_initrddir \ %buildroot%_sysconfdir \ %buildroot%_sbindir \ %buildroot%_bindir \ %buildroot/var/lib/amavis \ %buildroot/var/lib/amavis/.spamassassin \ %buildroot/var/spool/amavis/virusmails \ %buildroot/var/lib/amavis/tmp install -m 755 amavisd_init.sh %buildroot%_initrddir/amavisd install -m 640 amavisd.conf %buildroot%_sysconfdir/amavisd.conf install -m 755 amavisd %buildroot%_sbindir/amavisd cat > %buildroot/var/lib/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 auto_learn 1 skip_rbl_checks 1 use_razor2 0 use_pyzor 0 use_dcc 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 "/usr/bin/sa-learn --dump" -s /bin/sh EOF cat > %buildroot/%_bindir/amavisd-checkcfg <<EOF #!/bin/sh su amavis -c "/usr/bin/spamassassin --lint -D" -s /bin/sh EOF cat > %buildroot/%_bindir/amavisd-mboxlearnham <<EOF #!/bin/sh su amavis -c "/usr/bin/sa-learn --showdots --ham --mbox \$1" -s /bin/sh EOF cat > %buildroot/%_bindir/amavisd-mboxlearnspam <<EOF #!/bin/sh su amavis -c "/usr/bin/sa-learn --showdots --spam --mbox \$1" -s /bin/sh EOF %clean rm -rf %buildroot %pre %_pre_useradd amavis /var/lib/amavis /bin/false %_pre_groupadd amavis amavis,clamav %post %_post_service amavisd grep -q "virusalert" %_sysconfdir/aliases || \ echo "virusalert: root" >> %_sysconfdir/aliases [ -x %_bindir/newaliases ] && %_bindir/newaliases > /dev/null 2>&1 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 %config(noreplace) %_initrddir/amavisd %attr(640,root,amavis) %config(noreplace) %_sysconfdir/amavisd.conf %attr(755,root,root) %_sbindir/amavisd %attr(755,root,root) %_bindir/amavisd-* %attr(755,root,root) %dir /var/spool/amavis %attr(750,amavis,amavis) %dir /var/spool/amavis/virusmails %attr(750,amavis,amavis) %dir /var/lib/amavis %attr(750,amavis,amavis) %dir /var/lib/amavis/tmp %attr(750,amavis,amavis) %dir /var/lib/amavis/.spamassassin %config(noreplace) %attr(640,amavis,amavis) /var/lib/amavis/.spamassassin/user_prefs %changelog * 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.