Hello,
Acutally I run a postfix 2.5.4 and amavisd-new 2.5.4 on a centos 4 box.
We got these error :
/(!!)TROUBLE in check_mail, but must continue (1): main_log_entry
FAILED: Can't use stri
ng ("1") as a HASH ref while "strict refs" in use at /usr/sbin/amavisd
line 3134, <GEN78> line 648.
/In our logs, mails are scanned with no problem but this warning is very
annoying because all of the amavis temporary directories are not
suppressed :
/(!)PRESERVING EVIDENCE in /var/amavis/tmp/amavis-20090629T105243-24158
/
I can't see what is the problem, it seems that it's in
fish_out_ip_from_received function on this line:
/for (grep {defined} (@$fields_ref{qw(from-tcp from from-com)}))/
Here is a sample of amavisd.conf file to help:
/use strict;
$max_servers = 20; # num of pre-forked children (2..15 is
common), -m
$daemon_user = "amavis"; # (no default; customary: vscan or
amavis), -u
$daemon_group = "amavis"; # (no default; customary: vscan or
amavis), -g
$insert_received_line = 0; # don't behave like MTA: don't insert
'Received:' header
$mydomain = 'domain.com'; # a convenient default for other settings
$TEMPBASE = "$MYHOME/tmp"; # working directory, needs to exist, -T
$ENV{TMPDIR} = $TEMPBASE; # environment variable TMPDIR, used by SA, etc.
$QUARANTINEDIR = "/var/virusmails";
$db_home = "$MYHOME/db"; # dir for bdb nanny/cache/snmp databases, -D
$log_level = 2; # verbosity 0..5, -d
$log_recip_templ = undef; # disable by-recipient level-0 log entries
$DO_SYSLOG = 1; # log via syslogd (preferred)
$syslog_facility = 'mail'; # Syslog facility as a string
# e.g.: mail, daemon, user, local0, ... local7
$syslog_priority = 'debug'; # Syslog base (minimal) priority as a string,
$enable_db = 1; # enable use of BerkeleyDB/libdb (SNMP and
nanny)
$enable_global_cache = 1; # enable use of libdb-based cache if
$enable_db=1
$nanny_details_level = 1; # nanny verbosity: 1: traditional, 2: detailed
@lookup_sql_dsn = ( ['DBI:mysql:database=Toto;host=127.0.0.1;port=3306',
'toto', 'toto'] );
$sql_select_policy = 'SELECT IF(do.do_antispam=\'Y\', \'N\',
IF(ut.ut_antis=\'Y\', \'N\', \'Y\')) as bypass_spam_checks,' .
' IF(do.do_antiv=\'Y\', \'N\', IF(ut.ut_antiv=\'Y\', \'N\', \'Y\')) as
bypass_virus_checks,' .
' ut_id as id'.
' FROM utilisateurs ut, domaines do' .
' WHERE ut.do_id=do.do_id AND ut.ut_nomboite =
SUBSTRING_INDEX(%a,\'@\',1) AND do.do_nom = SUBSTRING_INDEX(%a,\'@\',-1)';
$sql_select_white_black_list = undef;
@local_domains_maps = ( [".$mydomain"] ); # list of all local domains
@mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 );
$unix_socketname = "$MYHOME/amavisd.sock";
$inet_socket_port = [10024,10026,10040]; # listen on multiple TCP ports
$interface_policy{'10026'} = 'ARCHIVE-SMTP';
$interface_policy{'10040'} = 'RELAY-SMTP';
# Configuration Amavis en ARCHIVE SMTP
$policy_bank{'ARCHIVE-SMTP'} = {
log_level => 5,
};
$policy_bank{'RELAY-SMTP'} = {
bypass_virus_checks_maps => [ 0 ],
final_virus_destiny => D_DISCARD,
bypass_spam_checks_maps => [ 0 ],
spam_kill_level_maps => [6.2],
spam_dsn_cutoff_level_maps => [15],
final_spam_destiny => D_DISCARD,
final_bad_header_destiny => undef,
};
$policy_bank{'MYNETS'} = { # mail originating from @mynetworks
originating => 1, # is true in MYNETS by default, but let's make it
explicit
os_fingerprint_method => undef, # don't query p0f for internal clients
};
$interface_policy{'SOCK'} = 'AM.PDP-SOCK';
$policy_bank{'AM.PDP-SOCK'} = {
protocol => 'AM.PDP',
auth_required_release => 0, # do not require secret_id for
amavisd-release
};
$sa_tag_level_deflt = undef; # add spam info headers if at, or above
that level
$sa_tag2_level_deflt = 5.0; # add 'spam detected' headers at that level
$sa_kill_level_deflt = 5.0; # triggers spam evasive actions (e.g.
blocks mail)
#$sa_tag2_level_deflt = 6.2; # add 'spam detected' headers at that level
#$sa_kill_level_deflt = 6.2; # triggers spam evasive actions (e.g.
blocks mail)
$sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent
# $sa_quarantine_cutoff_level = 25; # spam level beyond which quarantine
is off
$penpals_bonus_score = 8; # (no effect without a @storage_sql_dsn
database)
$penpals_threshold_high = $sa_kill_level_deflt; # don't waste time on
hi spam
$sa_mail_body_size_limit = 400*1024; # don't waste time on SA if mail is
larger
$sa_local_tests_only = 0; # only tests which do not require internet
access?
$virus_admin = undef;
$mailfrom_notify_admin = "virusale...@$mydomain"; # notifications
sender
$mailfrom_notify_recip = "virusale...@$mydomain"; # notifications
sender
$mailfrom_notify_spamadmin = "spam.poli...@$mydomain"; # notifications
sender
$mailfrom_to_quarantine = ''; # null return path; uses original sender
if undef
@addr_extension_virus_maps = ('virus');
@addr_extension_banned_maps = ('banned');
@addr_extension_spam_maps = ('spam');
@addr_extension_bad_header_maps = ('badh');
$path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';
$MAXLEVELS = 14;
$MAXFILES = 1500;
$MIN_EXPANSION_QUOTA = 100*1024; # bytes (default undef, not
enforced)
$MAX_EXPANSION_QUOTA = 300*1024*1024; # bytes (default undef, not
enforced)
$sa_spam_subject_tag = undef;
$defang_virus = 1; # MIME-wrap passed infected mail
$defang_banned = 1; # MIME-wrap passed mail containing banned name
# for defanging bad headers only turn on certain minor contents categories:
$defang_by_ccat{+CC_BADH.",3"} = 1; # NUL or CR character in header
$defang_by_ccat{+CC_BADH.",5"} = 1; # header line longer than 998
characters
$defang_by_ccat{+CC_BADH.",6"} = 1; # header field syntax error
$final_spam_destiny = D_PASS;
$virus_quarantine_to = undef;
$banned_quarantine_to = undef;
$bad_header_quarantine_to = undef;
$spam_quarantine_to = undef;
@keep_decoded_original_maps = (new_RE(
qr'^MAIL-UNDECIPHERABLE$',
qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i,
));
$banned_filename_re = new_RE(
[ qr'^\.(zip|rar|arc|arj|zoo)$'=> 0 ],
qr'^\.(exe-ms|dll)$',
[ qr'^\.(rpm|cpio|tar)$' => 0 ],
qr'.\.(pif|scr)$'i,
qr'^application/x-msdownload$'i, # block these MIME types
qr'^application/x-msdos-program$'i,
qr'^application/hta$'i,
qr'\.[^./]*[A-Za-z][^./]*\.\s*(exe|vbs|pif|scr|bat|cmd|com|cpl|dll)[.\s]*$'i,
qr'.\.(exe|vbs|pif|scr|cpl)$'i,
);/
Thanks in advance, for your advices.
Sebastien AVELINE.
------------------------------------------------------------------------------
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/