[Amavisd-new-debian-devel] suggestions for new configuration

Paul Traina amavisd-new-debian-devel@lists.alioth.debian.org
Thu, 21 Apr 2005 15:04:22 -0700


--fdj2RfSjLxBAspz7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline

First off, sorry for that critical bug report, the upgrade path for
amavisd-new to experimental is confusing.

I've got some suggestions on simplifying it.

1.  Remove the run-parts stuff from /etc/init.d/amavis.
    (Specifying the config file in there makes running
     amavisd-new debug or any other command run by hand a pain
     in the butt.)  This is REALLY a problem, if you chose
     to ignore everything else, don't ignore that.

2.  Replace /etc/amavisd.conf with the attached file, or
    better yet, just patch it into /usr/sbin/amavisd-new.

3.  Move 00-upstream, 10-debian, and 20-debconf to
    /usr/share/amavisd/conf.d

4.  Rename 30-user to 30-usertemplate, or better yet,
    move it to /usr/share/doc and instead document to
    people that they should create a 40-<blah> with just
    their changes in it (like my 40-local, also attached).

Paul

--fdj2RfSjLxBAspz7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=40-local

## my local changes

$max_servers  =  5;
$insert_received_line = 0;

$QUARANTINEDIR = '';
$X_HEADER_LINE = '';

$notify_method  = 'smtp:[127.0.0.1]:10025';
$forward_method = $notify_method;

$final_virus_destiny      = D_REJECT;
$final_banned_destiny     = D_REJECT;
$final_spam_destiny       = D_REJECT;
$final_bad_header_destiny = D_PASS;

#$sa_debug = 1;
$sa_tag_level_deflt  = -1000.0;
$sa_tag2_level_deflt = 5.0;
$sa_kill_level_deflt = 8.0;

@lookup_sql_dsn =
    ( ['DBI:mysql:database=amavis;host=localhost', 'amavis', 'XXXXXX'] );
 
$sql_select_policy = 'SELECT *,users.id FROM users,policy'.
    ' WHERE (users.policy_id=policy.id) AND (users.email IN (%k))'.
    ' ORDER BY users.priority DESC';

$sql_select_white_black_list = 'SELECT wb FROM wblist'.
    ' WHERE (wblist.rid=?) AND (wblist.email IN (%k))' .
    ' ORDER BY wblist.priority DESC';
 
@av_scanners = (

['ClamAV-clamd',
  \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.ctl"],
  qr/\bOK$/, qr/\bFOUND$/,
  qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],

);

1;  # insure a defined return

--fdj2RfSjLxBAspz7
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="amavisd.conf"

use strict;
use File::Basename;

{ my(@directories) = ( '/usr/share/amavis/conf.d',  '/etc/amavis/conf.d' );  # do *.cf or *.conf files in this directory
  my(@files) = ();

  for my $d (@directories) {
    local(*D);
    opendir(D,$d) or die "Can't open dir $d: $!";
    @files = (@files, grep {-f} map {/^(.*)$/,"$d/$1"} readdir(D));
    closedir(D) or die "Can't close $d: $!";
  }

  for my $f (sort { basename($a) cmp basename($b) } @files) {
    $! = undef;
    defined(do $f) or die($@ ? "Error in $f: $@" : "Error reading $f: $!");
  }
}

#-------------
1;  # insure a defined return

--fdj2RfSjLxBAspz7--