rpms/amavisd-new/devel README.fedora, NONE, 1.1 amavis-clamd.conf, NONE, 1.1 amavis-clamd.init, NONE, 1.1 amavis-clamd.sysconfig, NONE, 1.1 amavisd-condrestart.patch, NONE, 1.1 amavisd-conf.patch, NONE, 1.1 amavisd-db.patch, NONE, 1.1 amavisd-init.patch, NONE, 1.1 amavisd-new.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Steven Pritchard (steve) fedora-extras-commits at redhat.com
Thu Jan 26 22:11:54 UTC 2006


Author: steve

Update of /cvs/extras/rpms/amavisd-new/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18362/devel

Modified Files:
	.cvsignore sources 
Added Files:
	README.fedora amavis-clamd.conf amavis-clamd.init 
	amavis-clamd.sysconfig amavisd-condrestart.patch 
	amavisd-conf.patch amavisd-db.patch amavisd-init.patch 
	amavisd-new.spec 
Log Message:
auto-import amavisd-new-2.3.3-4 on branch devel from amavisd-new-2.3.3-4.src.rpm


--- NEW FILE README.fedora ---
INSTALLATION
------------
Installing amavisd-new from Fedora Extras is simple.  First, install
the amavisd-new package:

  yum -y install amavisd-new

Don't be alarmed at the number of dependencies this installs.  This
package tries to be as full-featured as possible, including many
optional components for amavisd-new.

Next, configure amavisd-new to start on boot:

  chkconfig --level 2345 amavisd on

If you want to use the Clam Antivirus daemon (recommended), set it to
start on boot as well:

  chkconfig --level 2345 clamd.amavisd on

When you are ready, start the clamd.amavisd (optional but recommended)
and amavisd services:

  service clamd.amavisd start
  service amavisd start

Check /var/log/maillog for startup messages from both daemons.

The next step is to integrate amavisd with your MTA.

POSTFIX
-------
The simplest method for enabling amavisd-new support in postfix is to
use the content_filter configuration option to tell postfix to relay
mail through amavisd-new using SMTP.  In this configuration, incoming
mail passes from postfix to amavisd and back to postfix.  (Mail never
actually leaves the control of postfix however, since amavisd does not
answer OK until it scans the message and transfers it back to postfix.
The worst that can happen is a failure at just the right time could
allow a message to be queued twice.)

Add the following to /etc/postfix/main.cf:

  content_filter = smtp:[127.0.0.1]:10024

You will probably also want to limit the number of postfix processes
to keep mail from coming in faster than it can be processed by adding
the following to /etc/postfix/main.cf:

  default_process_limit = 20

Add the following to /etc/postfix/master.cf:

  127.0.0.1:10025 inet n - - - 0 smtpd -o content_filter=

Be sure to read the TUNING section in README.postfix for information
on process limits.

SENDMAIL
--------
See README.sendmail* in this directory.

Please note that amavisd-new's milter functionality is not enabled in
this package.

EXIM
----
See README.exim* in this directory.


--- NEW FILE amavis-clamd.conf ---
# Use system logger.
LogSyslog

# Specify the type of syslog messages - please refer to 'man syslog'
# for facility names.
LogFacility LOG_MAIL

# This option allows you to save a process identifier of the listening
# daemon (main thread).
PidFile /var/run/amavisd/clamd.pid

# Remove stale socket after unclean shutdown.
# Default: disabled
FixStaleSocket

# Run as a selected user (clamd must be started by root).
User amavis

# Path to a local socket file the daemon will listen on.
LocalSocket /var/spool/amavisd/clamd.sock


--- NEW FILE amavis-clamd.init ---
#!/bin/bash
#
# chkconfig: - 78 32
# description: The clamd server running for amavisd

CLAMD_SERVICE=amavisd
. /usr/share/clamav/clamd-wrapper


--- NEW FILE amavis-clamd.sysconfig ---
CLAMD_CONFIGFILE=/etc/clamd.d/amavisd.conf
CLAMD_SOCKET=/var/spool/amavisd/clamd.sock
CLAMD_OPTIONS=

amavisd-condrestart.patch:

--- NEW FILE amavisd-condrestart.patch ---
--- amavisd_init.sh.orig	2004-02-23 16:09:02.000000000 -0600
+++ amavisd_init.sh	2004-02-23 16:13:52.000000000 -0600
@@ -60,8 +60,12 @@
 	action $"Reloading ${prog_base}:" ${prog} -c ${prog_config_file} reload
 	RETVAL=$?
 	;;
+  condrestart)
+	[ -f /var/lock/subsys/${prog_base} ] && $0 restart || :
+	RETVAL=$?
+	;;
   *)
-	echo "Usage: $0 {start|stop|status|restart|reload}"
+	echo "Usage: $0 {start|stop|status|restart|reload|condrestart}"
 	exit 1
 esac
 

amavisd-conf.patch:

--- NEW FILE amavisd-conf.patch ---
--- amavisd-new-2.3.2/amavisd.conf.orig	2005-06-29 05:26:05.000000000 -0500
+++ amavisd-new-2.3.2/amavisd.conf	2005-07-06 12:22:21.000000000 -0500
@@ -14,23 +14,23 @@
 # @bypass_spam_checks_maps  = (1);  # uncomment to DISABLE anti-spam code
 
 $max_servers = 2;            # number of pre-forked children (2..15 is common)
-$daemon_user  = 'vscan';     # (no default;  customary: vscan or amavis)
-$daemon_group = 'vscan';     # (no default;  customary: vscan or amavis)
+$daemon_user  = 'amavis';    # (no default;  customary: vscan or amavis)
+$daemon_group = 'amavis';    # (no default;  customary: vscan or amavis)
 
 $mydomain = 'example.com';   # a convenient default for other settings
 
-$MYHOME   = '/var/amavis';   # a convenient default for other settings
+$MYHOME   = '/var/spool/amavisd';   # a convenient default for other settings
 $TEMPBASE = "$MYHOME/tmp";   # working directory, needs to be created manually
 $ENV{TMPDIR} = $TEMPBASE;    # environment variable TMPDIR
-$QUARANTINEDIR = '/var/virusmails';
+$QUARANTINEDIR = undef;
 # $quarantine_subdir_levels = 1;  # add level of subdirs to disperse quarantine
 
 # $daemon_chroot_dir = $MYHOME;   # chroot directory or undef
 
 # $db_home   = "$MYHOME/db";
 # $helpers_home = "$MYHOME/var";  # prefer $MYHOME clean and owned by root?
-# $pid_file  = "$MYHOME/var/amavisd.pid";
-# $lock_file = "$MYHOME/var/amavisd.lock";
+$pid_file  = "/var/run/amavisd/amavisd.pid";
+$lock_file = "/var/run/amavisd/amavisd.lock";
 #NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually
 
 @local_domains_maps = ( [".$mydomain"] );
@@ -65,11 +65,11 @@
 #     ["DBI:SQLite:dbname=$MYHOME/sql/mail_prefs.sqlite", '', ''] );
 # @storage_sql_dsn = @lookup_sql_dsn;  # none, same, or separate database
 
-$virus_admin               = "virusalert\@$mydomain";  # notifications recip.
+$virus_admin               = undef;  # notifications recip.
 
-$mailfrom_notify_admin     = "virusalert\@$mydomain";  # notifications sender
-$mailfrom_notify_recip     = "virusalert\@$mydomain";  # notifications sender
-$mailfrom_notify_spamadmin = "spam.police\@$mydomain"; # notifications sender
+$mailfrom_notify_admin     = undef;  # notifications sender
+$mailfrom_notify_recip     = undef;  # notifications sender
+$mailfrom_notify_spamadmin = undef; # notifications sender
 $mailfrom_to_quarantine = ''; # null return path; uses original sender if undef
 
 @addr_extension_virus_maps      = ('virus');
@@ -99,10 +99,10 @@
 # $notify_method  = 'smtp:[127.0.0.1]:10025';
 # $forward_method = 'smtp:[127.0.0.1]:10025';  # set to undef with milter!
 
-# $final_virus_destiny      = D_DISCARD;
-# $final_banned_destiny     = D_BOUNCE;
-# $final_spam_destiny       = D_BOUNCE;
-# $final_bad_header_destiny = D_PASS;
+$final_virus_destiny      = D_DISCARD;
+$final_banned_destiny     = D_BOUNCE;
+$final_spam_destiny       = D_DISCARD;
+$final_bad_header_destiny = D_BOUNCE;
 
 
 # SOME OTHER VARIABLES WORTH CONSIDERING (see amavisd.conf-default for all)
@@ -286,10 +286,10 @@
 # ['Sophos SAVI', \&sophos_savi ],
 
 # ### http://www.clamav.net/
-# ['ClamAV-clamd',
-#   \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd"],
-#   qr/\bOK$/, qr/\bFOUND$/,
-#   qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
+['ClamAV-clamd',
+  \&ask_daemon, ["CONTSCAN {}\n", "/var/spool/amavisd/clamd.sock"],
+  qr/\bOK$/, qr/\bFOUND$/,
+  qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
 # # NOTE: the easiest is to run clamd under the same user as amavisd; match the
 # # socket name (LocalSocket) in clamav.conf to the socket name in this entry
 # # When running chrooted one may prefer: ["CONTSCAN {}\n","$MYHOME/clamd"],

amavisd-db.patch:

--- NEW FILE amavisd-db.patch ---
--- ./amavisd-nanny.org	2005-09-19 15:26:59.000000000 +0200
+++ ./amavisd-nanny	2005-09-19 15:27:37.000000000 +0200
@@ -51,7 +51,7 @@
 my($activettl) = 10*60; # stuck active children are sent a SIGTERM after this
                         # many seconds
 
-my($db_home) = '/var/amavis/db';  # DB databases directory
+my($db_home) = '/var/spool/amavisd/db';  # DB databases directory
 my($dbfile)  = 'nanny.db';
 my($wakeuptime) = 2;  # seconds
 
--- ./amavisd-agent.org	2005-09-19 15:28:15.000000000 +0200
+++ ./amavisd-agent	2005-09-19 15:20:24.000000000 +0200
@@ -107,7 +107,7 @@
 # main program starts here
   $SIG{INT} = sub { die "\n" };  # do the END code block
   my($env) = BerkeleyDB::Env->new(
-    '-Home'=>'/var/amavis/db', '-Flags'=> DB_INIT_CDB | DB_INIT_MPOOL);
+    '-Home'=>'/var/spool/amavisd/db', '-Flags'=> DB_INIT_CDB | DB_INIT_MPOOL);
   defined $env or die "BDB no env: $BerkeleyDB::Error $!";
   my($db) = BerkeleyDB::Hash->new(
     '-Filename'=>'snmp.db', '-Flags'=>DB_RDONLY, '-Env'=>$env );

amavisd-init.patch:

--- NEW FILE amavisd-init.patch ---
--- amavisd-new-2.3.2.orig/amavisd_init.sh	2002-11-15 22:22:47.000000000 -0600
+++ amavisd-new-2.3.2/amavisd_init.sh	2005-07-06 16:11:23.000000000 -0500
@@ -4,10 +4,10 @@
 #		(to be used with version amavisd-new-20020630 or later)
 #
 
-# chkconfig: 2345 79 31
+# chkconfig: - 79 31
 # description: amavisd is an interface between MTA and content checkers
 # processname: amavisd
-# pidfile: /var/amavis/amavisd.pid
+# pidfile: /var/run/amavisd/amavisd.pid
 
 # Source function library.
 . /etc/rc.d/init.d/functions
@@ -19,7 +19,7 @@
 prog="/usr/sbin/amavisd"
 prog_base="$(basename ${prog})"
 
-prog_config_file="/etc/amavisd.conf"
+prog_config_file="/etc/amavisd/amavisd.conf"
 
 # Source configuration.
 [ -e /etc/sysconfig/${prog_base} ] && . /etc/sysconfig/${prog_base}


--- NEW FILE amavisd-new.spec ---
#%%define prerelease rc1

Summary:        Email filter with virus scanner and spamassassin support
Name:           amavisd-new
Version:        2.3.3
Release:        4%{?prerelease:.%{prerelease}}
License:        GPL
Group:          Applications/System
URL:            http://www.ijs.si/software/amavisd/
Source0:        http://www.ijs.si/software/amavisd/amavisd-new-%{version}%{?prerelease:-%{prerelease}}.tar.gz
Source1:        amavis-clamd.init
Source2:        amavis-clamd.conf
Source3:        amavis-clamd.sysconfig
Source4:        README.fedora
Patch0:         amavisd-conf.patch
Patch1:         amavisd-init.patch
Patch2:         amavisd-condrestart.patch
Patch3:         amavisd-db.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-root/
Requires:       smtpdaemon
Requires:       /usr/sbin/clamd, /etc/clamd.d
Requires:       tmpwatch
Requires:       bzip2
Requires:       gzip
Requires:       lha
Requires:       cpio
Requires:       freeze
Requires:       lzop
Requires:       nomarch
Requires:       zoo
Requires:       cabextract
Requires:       /usr/bin/ar
# We probably should parse the fetch_modules() code in amavisd for this list.
# These are just the dependencies that don't get picked up otherwise.
Requires:       perl(IO::Stringy)
Requires:       perl(MIME::Body)
Requires:       perl(MIME::Decoder::Base64)
Requires:       perl(MIME::Decoder::Binary)
Requires:       perl(MIME::Decoder::Gzip64)
Requires:       perl(MIME::Decoder::NBit)
Requires:       perl(MIME::Decoder::QuotedPrint)
Requires:       perl(MIME::Decoder::UU)
Requires:       perl(MIME::Head)
Requires:       perl(Mail::Field)
Requires:       perl(Mail::Header)
Requires:       perl(Mail::Internet)
Requires:       perl(Mail::SpamAssassin)
Requires:       perl(Archive::Tar)
Requires:       perl(Archive::Zip)
Requires:       perl(Convert::TNEF)
Requires:       perl(Convert::UUlib)
Requires:       perl(URI)
Requires:       perl(Net::DNS)
Requires:       perl(Net::LDAP)
Requires:       perl(DBI)
Requires:       perl(DBD::mysql)
Requires:       perl(DBD::SQLite)
Requires:       perl(Razor2::Client::Version)
Requires:       perl(Authen::SASL)
Requires:       perl(Mail::SPF::Query)
Requires:       perl(Compress::Zlib) >= 1.35
BuildArch:      noarch

%description
amavisd-new is a high-performance and reliable interface between mailer
(MTA) and one or more content checkers: virus scanners, and/or
Mail::SpamAssassin Perl module. It is written in Perl, assuring high
reliability, portability and maintainability. It talks to MTA via (E)SMTP
or LMTP, or by using helper programs. No timing gaps exist in the design,
which could cause a mail loss.

%prep
%setup -q -n %{name}-%{version}%{?prerelease:-%{prerelease}}
%patch0 -p1
%patch1 -p1
%patch2 -p0
%patch3 -p0
cp -a %{SOURCE4} README_FILES/

%build

%install
rm -rf "$RPM_BUILD_ROOT"

mkdir -p $RPM_BUILD_ROOT%{_sbindir}
install -m755 amavisd $RPM_BUILD_ROOT%{_sbindir}/
( cd $RPM_BUILD_ROOT%{_sbindir} && ln -s clamd clamd.amavisd )

mkdir -p $RPM_BUILD_ROOT%{_bindir}
install -m755 amavisd-{agent,nanny} $RPM_BUILD_ROOT%{_bindir}/

mkdir -p $RPM_BUILD_ROOT%{_initrddir}
install -m755 amavisd_init.sh $RPM_BUILD_ROOT%{_initrddir}/amavisd
install -m755 %{SOURCE1} $RPM_BUILD_ROOT%{_initrddir}/clamd.amavisd

mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/amavisd
install -m644 amavisd.conf $RPM_BUILD_ROOT%{_sysconfdir}/amavisd/

mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d
install -m644 %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/clamd.d/amavisd.conf

mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
install -m644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/clamd.amavisd

mkdir -p $RPM_BUILD_ROOT/var/spool/amavisd/{tmp,db}
touch $RPM_BUILD_ROOT/var/spool/amavisd/clamd.sock
mkdir -p $RPM_BUILD_ROOT/var/run/amavisd/

%clean
rm -rf "$RPM_BUILD_ROOT"

%pre
if ! id amavis > /dev/null 2>&1 ; then
    useradd -r -s /sbin/nologin -d /var/spool/amavisd amavis
fi

%preun
if [ "$1" = 0 ]; then
    chkconfig --del amavisd
    chkconfig --del clamd.amavisd
fi

%post
chkconfig --add amavisd
service amavisd condrestart
chkconfig --add clamd.amavisd
service clamd.amavisd condrestart

%files
%defattr(-,root,root)
%doc AAAREADME.first LDAP.schema LICENSE RELEASE_NOTES TODO
%doc README_FILES test-messages amavisd.conf-*
%dir %{_sysconfdir}/amavisd/
%attr(755,root,root) %{_initrddir}/amavisd
%attr(755,root,root) %{_initrddir}/clamd.amavisd
%config(noreplace) %{_sysconfdir}/amavisd/amavisd.conf
%config(noreplace) %{_sysconfdir}/clamd.d/amavisd.conf
%config(noreplace) %{_sysconfdir}/sysconfig/clamd.amavisd
%{_sbindir}/amavisd
%{_sbindir}/clamd.amavisd
%{_bindir}/amavisd-*
%dir %attr(700,amavis,amavis) /var/spool/amavisd
%dir %attr(700,amavis,amavis) /var/spool/amavisd/tmp
%dir %attr(700,amavis,amavis) /var/spool/amavisd/db
%dir %attr(755,amavis,amavis) /var/run/amavisd
%ghost /var/spool/amavisd/clamd.sock

%changelog
* Wed Sep 21 2005 Steven Pritchard <steve at kspei.com> 2.3.3-4
- Add TODO and amavisd.conf-* to %%doc

* Mon Sep 19 2005 Steven Pritchard <steve at kspei.com> 2.3.3-3
- Add amavisd-db.patch to fix the path to the db directory in
  amavisd-agent and amavisd-nanny.  (Thanks to Julien Tognazzi.)

* Fri Sep 02 2005 Steven Pritchard <steve at kspei.com> 2.3.3-2
- Requires: perl(Compress::Zlib) >= 1.35

* Thu Sep 01 2005 Steven Pritchard <steve at kspei.com> 2.3.3-1
- Update to 2.3.3
- Remove explicit dependencies on core perl modules

* Fri Aug 19 2005 Steven Pritchard <steve at kspei.com> 2.3.2-10
- Recommend using 127.0.0.1 instead of localhost in README.fedora
- .deb support requires ar

* Wed Aug 17 2005 Steven Pritchard <steve at kspei.com> 2.3.2-9
- Set $virus_admin, $mailfrom_notify_admin, $mailfrom_notify_recip,
  and $mailfrom_notify_spamadmin to undef in the default config to
  turn off notification emails

* Fri Aug 12 2005 Steven Pritchard <steve at kspei.com> 2.3.2-8
- Add dependencies for freeze, lzop, nomarch, zoo, cabextract

* Wed Jul 27 2005 Steven Pritchard <steve at kspei.com> 2.3.2-7
- Add README.fedora with simplified Postfix instructions

* Mon Jul 25 2005 Steven Pritchard <steve at kspei.com> 2.3.2-6
- Create /var/spool/amavisd/db

* Thu Jul 21 2005 Steven Pritchard <steve at kspei.com> 2.3.2-5
- Add perl(Mail::SPF::Query) (now packaged for Extras) dependency
- Drop /var/log/amavisd since we weren't using it
- Fix paths for clamd.sock and amavisd.pid in a couple of places

* Tue Jul 12 2005 Steven Pritchard <steve at kspei.com> 2.3.2-4
- Add a bunch of other missing Requires (both actually required modules
  and optional modules)

* Tue Jul 12 2005 Steven Pritchard <steve at kspei.com> 2.3.2-3
- Add missing Requires: perl(Convert::TNEF)

* Wed Jul 06 2005 Steven Pritchard <steve at kspei.com> 2.3.2-2
- Fix init script ordering
- Don't enable amavisd by default

* Wed Jul 06 2005 Steven Pritchard <steve at kspei.com> 2.3.2-1
- Update to 2.3.2

* Wed Jun 29 2005 Steven Pritchard <steve at kspei.com> 2.3.2-0.1.rc1
- Update to 2.3.2-rc1
- Fedora Extras clamav integration
- Drop amavisd-syslog.patch (Unix::Syslog is in Extras)

* Mon Feb 23 2004 Steven Pritchard <steve at kspei.com> 0.20030616.p7-0.fdr.0.1
- Add amavisd-syslog.patch to eliminate Unix::Syslog dependency
- Add in clamd helper
- Fix up init script
- Initial package


Index: .cvsignore
===================================================================
RCS file: /cvs/extras/rpms/amavisd-new/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	26 Jan 2006 22:06:41 -0000	1.1
+++ .cvsignore	26 Jan 2006 22:11:53 -0000	1.2
@@ -0,0 +1 @@
+amavisd-new-2.3.3.tar.gz


Index: sources
===================================================================
RCS file: /cvs/extras/rpms/amavisd-new/devel/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	26 Jan 2006 22:06:41 -0000	1.1
+++ sources	26 Jan 2006 22:11:54 -0000	1.2
@@ -0,0 +1 @@
+0b02df514c1a2bf8af346bc9c7e97111  amavisd-new-2.3.3.tar.gz




More information about the fedora-extras-commits mailing list