#sample amavisd.conf at redkurawa.com use strict; $mydomain = 'redkurawa.com'; # (no useful default) $daemon_user = 'clamav'; # (no default; customary: vscan or amavis) $daemon_group = 'clamav'; # (no default; customary: vscan or amavis) $TEMPBASE = $MYHOME; # (must be set if other config vars use is) $ENV{TMPDIR} = $TEMPBASE; # wise, but usually not necessary $max_servers = 2; # number of pre-forked children (default 2) $max_requests = 10; # retire a child after that many accepts (default 10) $child_timeout=5*60; # abort child if it does not complete each task in n sec # (default: 8*60 seconds) @bypass_spam_checks_acl = qw( . ); # uncomment to DISABLE anti-spam code @local_domains_acl = ( ".$mydomain" ); # $mydomain and its subdomains # (does not apply to sendmail/milter) # (default is true) # (default is undef, i.e. disabled) # (usual setting is $MYHOME/amavisd.sock) $inet_socket_port = 10024; # accept SMTP on this local TCP port # (default is undef, i.e. disabled) # (default is '127.0.0.1') @inet_acl = qw( 127.0.0.1 ); # allow SMTP access only from localhost IP # (default is qw( 127.0.0.1 ) ) $DO_SYSLOG = 1; # (defaults to false) $LOGFILE = "$MYHOME/amavis.log"; # (defaults to empty, no log) $log_level = 2; # (defaults to 0) $log_templ = '[? %#V |[? %#F |[?%#D|Not-Delivered|Passed]|BANNED name/type (%F)]|INFECTED (%V)], # <%o> -> [<%R>|,][? %i ||, quarantine %i], Message-ID: %m, Hits: %c'; $final_virus_destiny = D_BOUNCE; # (defaults to D_BOUNCE) $final_banned_destiny = D_BOUNCE; # (defaults to D_BOUNCE) $final_spam_destiny = D_REJECT; # (defaults to D_REJECT) $final_bad_header_destiny = D_PASS; # (defaults to D_PASS), D_BOUNCE suggested $viruses_that_fake_sender_re = new_RE( qr'nimda|hybris|klez|bugbear|yaha|braid|sobig|fizzer|palyh|peido|holar'i, qr'tanatos|lentin|bridex|mimail|trojan\.dropper'i, ); $virus_admin = "virusalert\@$mydomain"; $mailfrom_notify_admin = "virusalert\@$mydomain"; $mailfrom_notify_recip = "virusalert\@$mydomain"; $mailfrom_notify_spamadmin = "spam.police\@$mydomain"; $mailfrom_to_quarantine = undef; # original sender if undef, or set explicitly # (default is undef) $QUARANTINEDIR = '/var/virusmails'; $virus_quarantine_to = 'virus-quarantine'; # traditional local quarantine $spam_quarantine_to = 'spam-quarantine'; $X_HEADER_TAG = 'X-Virus-Scanned'; # (default: undef) $X_HEADER_LINE = "by amavisd-new at $mydomain"; $remove_existing_x_scanned_headers = 0; # leave existing X-Virus-Scanned alone # (defaults to false) $remove_existing_spam_headers = 1; # remove existing spam headers if # spam scanning is enabled (default) $keep_decoded_original_re = new_RE( qr'^(ASCII|text|uuencoded|xxencoded|binhex)'i, ); $banned_filename_re = new_RE( qr'\.[a-zA-Z][a-zA-Z0-9]{0,3}\.(vbs|pif|scr|bat|com|exe|dll)$'i, # double extension ); $sql_select_white_black_list = undef; # undef disables SQL white/blacklisting $recipient_delimiter = '+'; # (default is '+') $localpart_is_case_sensitive = 0; # (default is false) $blacklist_sender_re = new_RE( qr'^(bulkmail|offers|cheapbenefits|earnmoney|foryou|greatcasino)@'i, qr'^(investments|lose_weight_today|market.alert|money2you|MyGreenCard)@'i, qr'^(new\.tld\.registry|opt-out|opt-in|optin|saveonlsmoking2002k)@'i, qr'^(specialoffer|specialoffers|stockalert|stopsnoring|wantsome)@'i, qr'^(workathome|yesitsfree|your_friend|greatoffers)@'i, qr'^(inkjetplanet|marketopt|MakeMoney)\d*@'i, ); map { $whitelist_sender{lc($_)}=1 } (qw( [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] [email protected] returns.groups.yahoo.com )); $MAXLEVELS = 14; # (default is undef, no limit) $MAXFILES = 1500; # (default is undef, no limit) $MIN_EXPANSION_QUOTA = 100*1024; # bytes (default undef, not enforced) $MAX_EXPANSION_QUOTA = 300*1024*1024; # bytes (default undef, not enforced) $MIN_EXPANSION_FACTOR = 5; # times original mail size (must be specified) $MAX_EXPANSION_FACTOR = 500; # times original mail size (must be specified) $path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin'; $file = 'file'; # file(1) utility; use 3.41 or later to avoid vulnerability $gzip = 'gzip'; $bzip2 = 'bzip2'; $lzop = 'lzop'; $uncompress = ['uncompress', 'gzip -d', 'zcat']; $unfreeze = ['unfreeze', 'freeze -d', 'melt', 'fcat']; $arc = ['nomarch', 'arc']; $unarj = ['arj', 'unarj']; # both can extract, same options $unrar = ['rar', 'unrar']; # both can extract, same options $zoo = 'zoo'; $lha = 'lha'; $cpio = 'cpio'; # comment out if cpio does not support GNU options $sa_local_tests_only = 1; # (default: false) $sa_mail_body_size_limit = 64*1024; # don't waste time on SA if mail is larger $sa_tag_level_deflt = 3.0; # add spam info headers if at, or above that level $sa_tag2_level_deflt = 6.3; # add 'spam detected' headers at that level $sa_kill_level_deflt = $sa_tag2_level_deflt; # triggers spam evasive actions @av_scanners = ( ['Clam Antivirus-clamd', \&ask_daemon, ["CONTSCAN {}\n", '/var/amavis/clamd'], qr/\bOK$/, qr/\bFOUND$/, qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ], ); @av_scanners_backup = ( ### http://clamav.elektrapro.com/ ['Clam Antivirus - clamscan', 'clamscan', '--stdout --disable-summary -r {}', [0], [1], qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ], ); 1; # insure a defined return