Skip to content

Instantly share code, notes, and snippets.

@wokka1
Last active August 29, 2015 14:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save wokka1/ac95c9d8cccfcaab91f4 to your computer and use it in GitHub Desktop.
Save wokka1/ac95c9d8cccfcaab91f4 to your computer and use it in GitHub Desktop.
amavis 50-user
root@alpha:/etc/amavis/conf.d# more 50-user
use strict;
#
# Place your configuration directives here. They will override those in
# earlier files.
#
# See /usr/share/doc/amavisd-new/ for documentation and examples of
# the directives you can use in this file
#
@bypass_virus_checks_maps = (
\%bypass_virus_checks, \@bypass_virus_checks_acl, \$bypass_virus_checks_re);
@bypass_spam_checks_maps = (
\%bypass_spam_checks, \@bypass_spam_checks_acl, \$bypass_spam_checks_re);
#
# Database connection settings
#
@lookup_sql_dsn =
( ['DBI:mysql:database=dbispconfig;host=127.0.0.1;port=3306', 'ispconfig', '22070989c76fd54b21ef925bca887551'] );
# @storage_sql_dsn = @lookup_sql_dsn; # none, same, or separate database
#$sql_select_policy = 'SELECT "Y" as local FROM mail_domain WHERE CONCAT("@",domain) IN (%k)';
# $banned_files_quarantine_method = 'sql';
# $spam_quarantine_method = 'sql';
#
# SQL Select statements
#
$sql_select_policy =
'SELECT *,spamfilter_users.id'.
' FROM spamfilter_users LEFT JOIN spamfilter_policy ON spamfilter_users.policy_id=spamfilter_policy.id'.
' WHERE spamfilter_users.email IN (%k) ORDER BY spamfilter_users.priority DESC';
$sql_select_white_black_list = 'SELECT wb FROM spamfilter_wblist'.
' WHERE (spamfilter_wblist.rid=?) AND (spamfilter_wblist.email IN (%k))' .
' ORDER BY spamfilter_wblist.priority DESC';
#
# Quarantine settings
#
$final_virus_destiny = D_BOUNCE;
$final_spam_destiny = D_DISCARD;
$final_banned_destiny = D_BOUNCE;
$final_bad_header_destiny = D_PASS;
# Default settings, we st this very high to not filter aut emails accidently
$sa_spam_subject_tag = '***SPAM*** ';
$sa_tag_level_deflt = 10.0; # add spam info headers if at, or above that level
$sa_tag2_level_deflt = 20.0; # add 'spam detected' headers at that level
$sa_kill_level_deflt = 30.0; # triggers spam evasive actions
$sa_dsn_cutoff_level = 100; # spam level beyond which a DSN is not sent
#
# Disable spam and virus notifications for the admin user.
# Can be overridden by the policies in mysql
#
$virus_admin = undef;
$spam_admin = undef;
#
# Enable Logging
#
$DO_SYSLOG = 1;
$LOGFILE = "/var/log/amavis.log"; # (defaults to empty, no log)
# Set the log_level to 5 for debugging
$log_level = 5; # (defaults to 0)
#------------ Do not modify anything below this line -------------
1; # insure a defined return
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment