use strict; use Errno qw(ENOENT); # Text by Gary V, mr88talent at yahoo dot com; code courtesy Mark Martinec # This amavisd.conf reads in the Debian amavisd-new 2.4.2 configuration files and # is designed to be used on a system where the Debian etch amavisd-new 2.4.2 package # has been removed but the user desires to continue to maintain the Debian style # configuration files. # The assumption is you are replacing the Debian etch packaged amavisd-new 2.4.2 # with a newer (original) version of the amavisd (amavisd-new) executable file # downloaded from http://www.ijs.si/software/amavisd/ # # Once you have replaced the Debian version with the original version please # remember that the Debian package maintainers maintain the Debian version, # not this version. Do not submit bug reports to the Debian team. # In order to use the original version of the amavisd-new executable it is required # that you have a symlink from /etc/amavisd.conf to /etc/amavis/amavisd.conf, e.g.: # ln -s /etc/amavis/amavisd.conf /etc/amavisd.conf # # amavisd must be renamed amavisd-new (/usr/sbin/amavisd-new). One must also # replace or edit the /etc/init.d/amavis initscript. The initscript from the # Debian sarge 20030616p10 package works fine (but /etc/init.d/amavis reload should # not be used - use /etc/init.d/amavis restart). # If you use a version of the Debian packaged amavisd-new newer than 2.4.2 and that version # uses configuration files not listed in the qw() function below, you may edit this to # reflect your environment but do not place any comments within the qw() function. #my(@config_files) = qw( # /usr/share/amavis/conf.d/10-debian_scripts # /usr/share/amavis/conf.d/20-package # /etc/amavis/conf.d/01-debian # /etc/amavis/conf.d/05-domain_id # /etc/amavis/conf.d/05-node_id # /etc/amavis/conf.d/15-av_scanners # /etc/amavis/conf.d/15-content_filter_mode # /etc/amavis/conf.d/20-debian_defaults # /etc/amavis/conf.d/25-amavis_helpers # /etc/amavis/conf.d/30-template_localization # /etc/amavis/conf.d/50-user #); #for my $config_file (@config_files) { # my($msg); # my($errn) = stat($config_file) ? 0 : 0+$!; # symlinks-friendly # if ($errn == ENOENT) { $msg = "does not exist" } # elsif ($errn) { $msg = "is inaccessible: $!" } # elsif (-d _) { $msg = "is a directory" } # elsif (!-f _) { $msg = "is not a regular file" } # elsif ($> && -o _) { $msg = "should not be owned by EUID $>"} # elsif ($> && -w _) { $msg = "is writable by EUID $>, EGID $)" } # if (defined $msg) { die "Config file \"$config_file\" $msg," } # $! = 0; # if (defined(do $config_file)) {} # elsif ($@ ne '') { die "Error in config file \"$config_file\": $@" } # elsif ($! != 0) { die "Error reading config file \"$config_file\": $!" } #} # The statements above are for use with amavisd-new 2.5.1 but should be backward compatible # with older versions of amavisd-new. With amavisd-new 2.5.2 a new method of loading in # custom config files was introduced. If you are using amavisd-new 2.5.2 or newer (and do # not plan on running any older versions) you should comment out the code above and instead # use the safer and cleaner method listed here: # ############################################## my(@conf_files) = qw( /usr/share/amavis/conf.d/10-debian_scripts /usr/share/amavis/conf.d/20-package /etc/amavis/conf.d/01-debian /etc/amavis/conf.d/05-domain_id /etc/amavis/conf.d/05-node_id /etc/amavis/conf.d/15-av_scanners /etc/amavis/conf.d/15-content_filter_mode /etc/amavis/conf.d/20-debian_defaults /etc/amavis/conf.d/25-amavis_helpers /etc/amavis/conf.d/30-template_localization /etc/amavis/conf.d/50-user ); include_config_files(@conf_files); # # Sanesecurity stuff @virus_name_to_spam_score_maps = (new_RE( # the order matters! [ qr'^Sanesecurity\.(Malware|Rogue|Trojan)\.' => undef ],# keep as infected [ qr'^Sanesecurity(\.[^., ]*)*\.' => 0.1 ], [ qr'^Sanesecurity_PhishBar_' => 0 ], [ qr'^Email\.Spam\.Bounce(\.[^., ]*)*\.Sanesecurity\.' => 0 ], [ qr'^(MSRBL-(Images|SPAM)\.)' => 0.1 ], [ qr'^MBL_' => undef ], # keep as infected [ qr'^VX\.Honeypot-SecuriteInfo\.com\.Joke' => 0.1 ], [ qr'^VX\.not-virus_(Hoax|Joke)\..*-SecuriteInfo\.com(\.|\z)' => 0.1 ], [ qr'^Email\.Spam.*-SecuriteInfo\.com(\.|\z)' => 0.1 ], [ qr'-SecuriteInfo\.com(\.|\z)' => undef ], # keep as infected )); # Sanesecurity http://www.sanesecurity.co.uk/ # MSRBL- http://www.msrbl.com/site/contact # MBL http://www.malware.com.br/index.shtml # -SecuriteInfo.com http://clamav.securiteinfo.com/malwares.html ############################################## # # If you like, you may place config items here. This would be useful for items introduced # after version 2.4.2 of amavisd-new. Typically however, on a Debian system, user settings # are stored primarily in /etc/amavis/conf.d/50-user. See amavisd.conf-sample for examples # of config items that can be used. Items placed here will be the last items read into the # configuration so they typically will override previous settings. #---------- Place configuration items below this line ----------- #$log_level = 5; #------------ Do not modify anything below this line ------------- 1;