-diff -ur amavisd-new-20021227.orig/amavisd amavisd-new-20021227/amavisd
---- amavisd-new-20021227.orig/amavisd Mon Dec 30 17:36:10 2002
-+++ amavisd-new-20021227/amavisd Tue Jan 7 18:00:57 2003
-@@ -214,7 +214,7 @@
+--- ./amavisd.conf-sample.org 2006-08-03 09:46:31.000000000 +0000
++++ ./amavisd.conf-sample 2006-08-03 09:52:09.000000000 +0000
+@@ -82,7 +82,7 @@
+ # (no trailing slash, may be a scratch file system)
+ $TEMPBASE = "$MYHOME/runtime"; # prefer to keep home dir /var/amavis clean?
+
+-#$db_home = "$MYHOME/db"; # DB databases directory, default "$MYHOME/db", -D
++$db_home = "$MYHOME/db"; # DB databases directory, default "$MYHOME/db", -D
+
+ # $helpers_home sets environment variable HOME, and is passed as option
+ # 'home_dir_for_helpers' to Mail::SpamAssassin::new. It should be a directory
+@@ -92,8 +92,8 @@
+ # Run the daemon in the specified chroot jail if nonempty:
+ #$daemon_chroot_dir = $MYHOME; # (default is undef, meaning: do not chroot), -R
+
+-#$pid_file = "$MYHOME/amavisd.pid"; # (default is "$MYHOME/amavisd.pid"), -P
+-#$lock_file = "$MYHOME/amavisd.lock"; # (default is "$MYHOME/amavisd.lock"), -L
++$pid_file = "/var/run/amavisd/amavisd.pid"; # (default is "$MYHOME/amavisd.pid"), -P
++$lock_file = "/var/run/amavisd/amavisd.lock"; # (default is "$MYHOME/amavisd.lock"), -L
+
+ # set environment variables if you want (no defaults):
+ $ENV{TMPDIR} = $TEMPBASE; # wise to set TMPDIR, but not obligatory
+@@ -111,6 +111,8 @@
+ #$forward_method = 'smtp:[127.0.0.1]:10025'; # where to forward checked mail
+ #$notify_method = $forward_method; # where to submit notifications
+
++#@auth_mech_avail = ('PLAIN','LOGIN'); # empty list disables incoming AUTH
++
+ #$os_fingerprint_method = 'p0f:127.0.0.1:2345'; # query p0f-analyzer.pl
+
+ # To make it possible for several hosts to share one content checking daemon,
+@@ -170,7 +172,7 @@
+ # and see further down what these two lookup lists really mean.
#
- # Receiving mail related
-
--# $unix_socketname = '/var/amavis/amavisd.sock'; # traditional amavis client protocol
-+# $unix_socketname = '/var/spool/amavis/runtime/amavisd.sock'; # traditional amavis client protocol
- # $inet_socket_port = 10024; # accept SMTP on this TCP port
- $inet_socket_bind = '127.0.0.1'; # limit socket bind to loopback interface
-
-@@ -223,7 +223,7 @@
- $gets_addr_in_quoted_form = 0;
-
- # Temporary directory
--$TEMPBASE = "/var/amavis";
-+$TEMPBASE = "/var/spool/amavis/runtime";
-
- $notify_method = 'smtp:127.0.0.1:10025';
- $forward_method = 'smtp:127.0.0.1:10025';
-diff -ur amavisd-new-20021227.orig/amavisd.conf amavisd-new-20021227/amavisd.conf
---- amavisd-new-20021227.orig/amavisd.conf Fri Dec 27 16:04:17 2002
-+++ amavisd-new-20021227/amavisd.conf Tue Jan 7 18:00:02 2003
-@@ -40,7 +40,7 @@
- $daemon_group = 'amavis'; # (no default)
-
- # Runtime directory (no trailing slash, defaults to '/var/amavis')
--$TEMPBASE = '/var/amavis';
-+$TEMPBASE = '/var/spool/amavis/runtime';
-
-
- # MTA SETTINGS, UNCOMMENT AS APPROPRIATE, defaults to 'smtp:127.0.0.1:10025'
-@@ -59,7 +59,7 @@
- #$notify_method = 'pipe:flags=q argv=/usr/sbin/sendmail -i -f ${sender} -- ${recipient}';
-
-
--#$daemon_chroot_dir = '/var/amavis'; # (default is undef => do not chroot)
-+#$daemon_chroot_dir = '/var/spool/amavis'; # (default is undef => do not chroot)
-
- #$pid_file = "$TEMPBASE/amavisd.pid"; # (default: "$TEMPBASE/amavisd.pid")
- #$lock_file = "$TEMPBASE/amavisd.lock"; # (default: "$TEMPBASE/amavisd.lock")
-@@ -221,12 +221,12 @@
- # assigning new text to template variables, or by reading template text
- # from files:
- #
--# $notify_sender_templ = read_text('/var/amavis/notify_sender.txt');
--# $notify_virus_sender_templ= read_text('/var/amavis/notify_virus_sender.txt');
--# $notify_virus_admin_templ = read_text('/var/amavis/notify_virus_admin.txt');
--# $notify_virus_recips_templ= read_text('/var/amavis/notify_virus_recips.txt');
--# $notify_spam_sender_templ = read_text('/var/amavis/notify_spam_sender.txt');
--# $notify_spam_admin_templ = read_text('/var/amavis/notify_spam_admin.txt');
-+# $notify_sender_templ = read_text('/var/spool/amavis/notify_sender.txt');
-+# $notify_virus_sender_templ= read_text('/var/spool/amavis/notify_virus_sender.txt');
-+# $notify_virus_admin_templ = read_text('/var/spool/amavis/notify_virus_admin.txt');
-+# $notify_virus_recips_templ= read_text('/var/spool/amavis/notify_virus_recips.txt');
-+# $notify_spam_sender_templ = read_text('/var/spool/amavis/notify_spam_sender.txt');
-+# $notify_spam_admin_templ = read_text('/var/spool/amavis/notify_spam_admin.txt');
-
- # Treat envelope sender address as unreliable and don't send
- # sender notification if name(s) of detected virus(es) match the list.
-@@ -255,9 +255,9 @@
- # for compatibility, which in turn defaults to undef (empty) )
+ # @bypass_virus_checks_maps = (1); # uncomment to DISABLE anti-virus code
+-# @bypass_spam_checks_maps = (1); # uncomment to DISABLE anti-spam code
++@bypass_spam_checks_maps = (1); # uncomment to DISABLE anti-spam code
#
- $mailfrom_notify_sender = ''; # null reserse path. Should not be changed!
--$mailfrom_notify_admin = 'virusalert@example.com';
--$mailfrom_notify_recip = 'virusalert@example.com';
--$mailfrom_notify_spamadmin = 'spam.police@example.com';
-+$mailfrom_notify_admin = 'virusalert@localhost';
-+$mailfrom_notify_recip = 'virusalert@localhost';
-+$mailfrom_notify_spamadmin = 'spam.police@localhost';
-
- # 'From' HEADER FIELD for sender and admin notifications.
- # This should be a replyable address, see rfc1894. Not to be confused
-@@ -285,7 +285,7 @@
-
- # $virus_admin = undef; # do not send virus admin notifications (default)
- # $virus_admin = {'not.example.com' => '', '.' => 'virusalert@example.com'};
--$virus_admin = 'virus-admin@example.com';
-+$virus_admin = 'virus-admin@localhost';
-
- # equivalent to $virus_admin, but for spam admin notifications:
- # $spam_admin = undef; # do not send spam admin notifications (default)
-@@ -309,7 +309,7 @@
+ # Any setting can be changed with a new assignment, so make sure
+ # you do not unintentionally override these settings further down!
+@@ -216,8 +218,8 @@
+ # AMAVIS-CLIENT PROTOCOL INPUT SETTINGS (e.g. with amavisd-release, or
+ # sendmail milter through helper clients like amavis-milter.c and amavis.c)
+ # option(s) -p overrides $inet_socket_port and $unix_socketname
+-$unix_socketname = "$MYHOME/amavisd.sock"; # amavis helper protocol socket
+-#$unix_socketname = undef; # disable listening on a unix socket
++#$unix_socketname = "/var/run/amavisd/amavisd.sock"; # amavis helper protocol socket
++$unix_socketname = undef; # disable listening on a unix socket
+ # (default is undef, i.e. disabled)
+ # (usual setting is $MYHOME/amavisd.sock)
+
+@@ -300,7 +302,7 @@
+ # choose from: emerg, alert, crit, err, warning, notice, info, debug
+
+ # Log file (if not using syslog)
+-$LOGFILE = "$MYHOME/amavis.log"; # (defaults to empty, no log)
++#$LOGFILE = "$MYHOME/amavis.log"; # (defaults to empty, no log)
+
+ #NOTE: levels are not strictly observed and are somewhat arbitrary
+ # 0: startup/exit/failure messages, viruses detected
+@@ -309,7 +311,7 @@
+ # 3: server, client
+ # 4: decompose parts
+ # 5: more debug details
+-$log_level = 2; # (defaults to 0), -d
++#$log_level = 2; # (defaults to 0), -d
+
+ # Customizable template for the most interesting log file entry (e.g. with
+ # $log_level=0) (take care to properly quote Perl special characters like '\')
+@@ -683,7 +685,8 @@
# or a directory (no trailing slash)
- # (the default value is undef, meaning no quarantine)
- #
--$QUARANTINEDIR = '/var/virusmails';
-+$QUARANTINEDIR = '/var/spool/amavis/virusmails';
-
-
- # A finer control of quarantining is available through variable
-@@ -638,7 +638,7 @@
- # a hash lookup table can be read from a file,
- # one address per line, comments and empty lines are permitted:
+ # (the default value is undef, meaning no quarantine)
#
--read_hash(\%whitelist_sender, '/var/amavis/whitelist_sender');
-+read_hash(\%whitelist_sender, '/var/spool/amavis/whitelist_sender');
+-$QUARANTINEDIR = '/var/virusmails'; # -Q
++#$QUARANTINEDIR = '/var/virusmails'; # -Q
++$QUARANTINEDIR = '/var/spool/amavis/virusmails'; # -Q
+
+ #$quarantine_subdir_levels = 1; # add level of subdirs to disperse quarantine
+
+@@ -1805,13 +1808,13 @@
+ # ['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$/ ],
+-# # 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"],
++ ['ClamAV-clamd',
++ \&ask_daemon, ["CONTSCAN {}\n", "/var/lib/clamav/clamd.socket"],
++ 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"],
+
+ # ### http://www.clamav.net/ and CPAN (memory-hungry! clamd is preferred)
+ # ['Mail::ClamAV', \&ask_clamav, "*", [0], [1], qr/^INFECTED: (.+)/],
+@@ -1968,10 +1971,11 @@
+ # NOTE: requires suid wrapper around inocmd32; consider flag: -mod reviewer
+ # see http://marc.theaimsgroup.com/?l=amavis-user&m=109229779912783
+
+- ### http://mks.com.pl/english.html
+- ['MkS_Vir for Linux (beta)', ['mks32','mks'],
+- '-s {}/*', [0], [1,2],
+- qr/--[ \t]*(.+)/ ],
++# Moved to secondary scanner
++# ### http://mks.com.pl/english.html
++# ['MkS_Vir for Linux (beta)', ['mks32','mks'],
++# '-s {}/*', [0], [1,2],
++# qr/--[ \t]*(.+)/ ],
+
+ ### http://mks.com.pl/english.html
+ ['MkS_Vir daemon', 'mksscan',
+@@ -2174,6 +2178,10 @@
+ # ],
+ # # other options to consider: -mime -oe -idedir=/usr/local/sav
+
++ ['MkS_Vir for Linux (beta)', ['mks32','mks'],
++ '-s {}/*', [0], [1,2],
++ qr/--[ \t]*(.+)/ ],
++
+ # always succeeds (uncomment to consider mail clean if all other scanners fail)
+ # ['always-clean', sub {0}],
- # ... or set directly:
- map { $whitelist_sender{lc($_)}=1 } (qw(
-Only in amavisd-new-20021227: amavisd~