1use strict; 2 3# a minimalistic configuration file for amavisd-new with all necessary settings 4# 5# see amavisd.conf-default for a list of all variables with their defaults; 6# see amavisd.conf-sample for a traditional-style commented file; 7# for more details see documentation in INSTALL, README_FILES/* 8# and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html 9 10 11# COMMONLY ADJUSTED SETTINGS: 12 13# @bypass_virus_checks_maps = (1); # uncomment to DISABLE anti-virus code 14# @bypass_spam_checks_maps = (1); # uncomment to DISABLE anti-spam code 15 16$max_servers = 2; # number of pre-forked children (2..15 is common) 17$daemon_user = 'vscan'; # (no default; customary: vscan or amavis) 18$daemon_group = 'vscan'; # (no default; customary: vscan or amavis) 19 20$mydomain = 'example.com'; # a convenient default for other settings 21 22$MYHOME = '/var/amavis'; # a convenient default for other settings 23$TEMPBASE = "$MYHOME/tmp"; # working directory, needs to be created manually 24$ENV{TMPDIR} = $TEMPBASE; # environment variable TMPDIR 25$QUARANTINEDIR = '/var/virusmails'; 26 27# $daemon_chroot_dir = $MYHOME; # chroot directory or undef 28 29# $db_home = "$MYHOME/db"; 30# $helpers_home = "$MYHOME/var"; # prefer $MYHOME clean and owned by root? 31# $pid_file = "$MYHOME/var/amavisd.pid"; 32# $lock_file = "$MYHOME/var/amavisd.lock"; 33#NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually 34 35@local_domains_maps = ( [".$mydomain"] ); 36# @mynetworks = qw( 127.0.0.0/8 ::1 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 ); 37 38$log_level = 0; # verbosity 0..5 39$log_recip_templ = undef; # disable by-recipient level-0 log entries 40$DO_SYSLOG = 1; # log via syslogd (preferred) 41$SYSLOG_LEVEL = 'mail.debug'; 42 43$enable_db = 1; # enable use of BerkeleyDB/libdb (SNMP and nanny) 44$enable_global_cache = 1; # enable use of libdb-based cache if $enable_db=1 45 46$inet_socket_port = 10024; # listen on this local TCP port(s) (see $protocol) 47# $unix_socketname = "$MYHOME/amavisd.sock"; # when using sendmail milter 48 49$sa_tag_level_deflt = 2.0; # add spam info headers if at, or above that level 50$sa_tag2_level_deflt = 6.31; # add 'spam detected' headers at that level 51$sa_kill_level_deflt = 6.31; # triggers spam evasive actions 52$sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent 53 54$sa_mail_body_size_limit = 200*1024; # don't waste time on SA if mail is larger 55$sa_local_tests_only = 0; # only tests which do not require internet access? 56$sa_auto_whitelist = 1; # turn on AWL in SA 2.63 or older (irrelevant 57 # for SA 3.0, cf option is 'use_auto_whitelist') 58 59# @lookup_sql_dsn = 60# ( ['DBI:mysql:database=mail;host=127.0.0.1;port=3306', 'user1', 'passwd1'], 61# ['DBI:mysql:database=mail;host=host2', 'username2', 'password2'] ); 62 63$virus_admin = "virusalert\@$mydomain"; # notifications recip. 64 65$mailfrom_notify_admin = "virusalert\@$mydomain"; # notifications sender 66$mailfrom_notify_recip = "virusalert\@$mydomain"; # notifications sender 67$mailfrom_notify_spamadmin = "spam.police\@$mydomain"; # notifications sender 68$mailfrom_to_quarantine = ''; # null return path; uses original sender if undef 69 70@addr_extension_virus_maps = ('virus'); 71@addr_extension_spam_maps = ('spam'); 72@addr_extension_banned_maps = ('banned'); 73@addr_extension_bad_header_maps = ('badh'); 74# $recipient_delimiter = '+'; # undef disables address extensions altogether 75# when enabling addr extensions do also Postfix/main.cf: recipient_delimiter=+ 76 77$path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin'; 78$file = 'file'; # file(1) utility; use recent versions 79$gzip = 'gzip'; 80$bzip2 = 'bzip2'; 81$lzop = 'lzop'; 82$rpm2cpio = ['rpm2cpio.pl','rpm2cpio']; 83$cabextract = 'cabextract'; 84$uncompress = ['uncompress', 'gzip -d', 'zcat']; 85$unfreeze = ['unfreeze', 'freeze -d', 'melt', 'fcat']; 86$arc = ['nomarch', 'arc']; 87$unarj = ['arj', 'unarj']; 88$unrar = ['rar', 'unrar']; 89$zoo = 'zoo'; 90$lha = 'lha'; 91$pax = 'pax'; 92$cpio = ['gcpio','cpio']; 93$ar = 'ar'; 94$ripole = 'ripole'; 95$dspam = 'dspam'; 96 97$MAXLEVELS = 14; 98$MAXFILES = 1500; 99$MIN_EXPANSION_QUOTA = 100*1024; # bytes (default undef, not enforced) 100$MAX_EXPANSION_QUOTA = 300*1024*1024; # bytes (default undef, not enforced) 101 102$sa_spam_subject_tag = '***SPAM*** '; 103$defang_virus = 1; # MIME-wrap passed infected mail 104$defang_banned = 1; # MIME-wrap passed mail containing banned name 105 106 107# OTHER MORE COMMON SETTINGS (defaults may suffice): 108 109# $myhostname = 'host.example.com'; # must be a fully-qualified domain name! 110 111# $notify_method = 'smtp:[127.0.0.1]:10025'; 112# $forward_method = 'smtp:[127.0.0.1]:10025'; # set to undef with milter! 113 114# $final_virus_destiny = D_DISCARD; 115# $final_banned_destiny = D_BOUNCE; 116# $final_spam_destiny = D_BOUNCE; 117# $final_bad_header_destiny = D_PASS; 118 119 120# SOME OTHER VARIABLES WORTH CONSIDERING (see amavisd.conf-default for all) 121 122# $warnbadhsender, 123# $warnvirusrecip, $warnbannedrecip, $warnbadhrecip, (or @warn*recip_maps) 124# 125# @bypass_virus_checks_maps, @bypass_spam_checks_maps, 126# @bypass_banned_checks_maps, @bypass_header_checks_maps, 127# 128# @virus_lovers_maps, @spam_lovers_maps, 129# @banned_files_lovers_maps, @bad_header_lovers_maps, 130# 131# @blacklist_sender_maps, @score_sender_maps, 132# 133# $virus_quarantine_to, $banned_quarantine_to, 134# $bad_header_quarantine_to, $spam_quarantine_to, 135# 136# $defang_bad_header, $defang_undecipherable, $defang_spam 137 138 139# REMAINING IMPORTANT VARIABLES ARE LISTED HERE BECAUSE OF LONGER ASSIGNMENTS 140 141@viruses_that_fake_sender_maps = (new_RE( 142# [qr'\bEICAR\b'i => 0], # av test pattern name 143# [qr'^(WM97|OF97|Joke\.)'i => 0], # adjust names to match your AV scanner 144 [qr/.*/ => 1], # true for everything else 145)); 146 147@keep_decoded_original_maps = (new_RE( 148# qr'^MAIL$', # retain full original message for virus checking (can be slow) 149 qr'^MAIL-UNDECIPHERABLE$', # recheck full mail if it contains undecipherables 150 qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i, 151# qr'^Zip archive data', # don't trust Archive::Zip 152)); 153 154 155# for $banned_namepath_re, a new-style of banned table, see amavisd.conf-sample 156 157$banned_filename_re = new_RE( 158# qr'^UNDECIPHERABLE$', # is or contains any undecipherable components 159 160 # block certain double extensions anywhere in the base name 161 qr'\.[^./]*\.(exe|vbs|pif|scr|bat|cmd|com|cpl|dll)\.?$'i, 162 163# qr'[{}]', # curly braces in names (serve as Class ID extensions - CLSID) 164 165 qr'^application/x-msdownload$'i, # block these MIME types 166 qr'^application/x-msdos-program$'i, 167 qr'^application/hta$'i, 168 169# qr'^message/partial$'i, qr'^message/external-body$'i, # rfc2046 MIME types 170 171# [ qr'^\.(Z|gz|bz2)$' => 0 ], # allow any in Unix-compressed 172 [ qr'^\.(rpm|cpio|tar)$' => 0 ], # allow any in Unix-type archives 173# [ qr'^\.(zip|rar|arc|arj|zoo)$'=> 0 ], # allow any within such archives 174 175 qr'.\.(exe|vbs|pif|scr|bat|cmd|com|cpl)$'i, # banned extension - basic 176# qr'.\.(ade|adp|app|bas|bat|chm|cmd|com|cpl|crt|emf|exe|fxp|grp|hlp|hta| 177# inf|ins|isp|js|jse|lnk|mda|mdb|mde|mdw|mdt|mdz|msc|msi|msp|mst| 178# ops|pcd|pif|prg|reg|scr|sct|shb|shs|vb|vbe|vbs| 179# wmf|wsc|wsf|wsh)$'ix, # banned ext - long 180 181# qr'.\.(mim|b64|bhx|hqx|xxe|uu|uue)$'i, # banned extension - WinZip vulnerab. 182 183 qr'^\.(exe-ms)$', # banned file(1) types 184# qr'^\.(exe|lha|tnef|cab|dll)$', # banned file(1) types 185); 186# See http://support.microsoft.com/default.aspx?scid=kb;EN-US;q262631 187# and http://www.cknow.com/vtutor/vtextensions.htm 188 189 190# ENVELOPE SENDER SOFT-WHITELISTING / SOFT-BLACKLISTING 191 192@score_sender_maps = ({ # a by-recipient hash lookup table, 193 # results from all matching recipient tables are summed 194 195# ## per-recipient personal tables (NOTE: positive: black, negative: white) 196# 'user1@example.com' => [{'bla-mobile.press@example.com' => 10.0}], 197# 'user3@example.com' => [{'.ebay.com' => -3.0}], 198# 'user4@example.com' => [{'cleargreen@cleargreen.com' => -7.0, 199# '.cleargreen.com' => -5.0}], 200 201 ## site-wide opinions about senders (the '.' matches any recipient) 202 '.' => [ # the _first_ matching sender determines the score boost 203 204 new_RE( # regexp-type lookup table, just happens to be all soft-blacklist 205 [qr'^(bulkmail|offers|cheapbenefits|earnmoney|foryou)@'i => 5.0], 206 [qr'^(greatcasino|investments|lose_weight_today|market\.alert)@'i=> 5.0], 207 [qr'^(money2you|MyGreenCard|new\.tld\.registry|opt-out|opt-in)@'i=> 5.0], 208 [qr'^(optin|saveonlsmoking2002k|specialoffer|specialoffers)@'i => 5.0], 209 [qr'^(stockalert|stopsnoring|wantsome|workathome|yesitsfree)@'i => 5.0], 210 [qr'^(your_friend|greatoffers)@'i => 5.0], 211 [qr'^(inkjetplanet|marketopt|MakeMoney)\d*@'i => 5.0], 212 ), 213 214# read_hash("/var/amavis/sender_scores_sitewide"), 215 216 { # a hash-type lookup table (associative array) 217 'nobody@cert.org' => -3.0, 218 'cert-advisory@us-cert.gov' => -3.0, 219 'owner-alert@iss.net' => -3.0, 220 'slashdot@slashdot.org' => -3.0, 221 'bugtraq@securityfocus.com' => -3.0, 222 'ntbugtraq@listserv.ntbugtraq.com' => -3.0, 223 'security-alerts@linuxsecurity.com' => -3.0, 224 'mailman-announce-admin@python.org' => -3.0, 225 'amavis-user-admin@lists.sourceforge.net'=> -3.0, 226 'notification-return@lists.sophos.com' => -3.0, 227 'owner-postfix-users@postfix.org' => -3.0, 228 'owner-postfix-announce@postfix.org' => -3.0, 229 'owner-sendmail-announce@lists.sendmail.org' => -3.0, 230 'sendmail-announce-request@lists.sendmail.org' => -3.0, 231 'donotreply@sendmail.org' => -3.0, 232 'ca+envelope@sendmail.org' => -3.0, 233 'noreply@freshmeat.net' => -3.0, 234 'owner-technews@postel.acm.org' => -3.0, 235 'ietf-123-owner@loki.ietf.org' => -3.0, 236 'cvs-commits-list-admin@gnome.org' => -3.0, 237 'rt-users-admin@lists.fsck.com' => -3.0, 238 'clp-request@comp.nus.edu.sg' => -3.0, 239 'surveys-errors@lists.nua.ie' => -3.0, 240 'emailnews@genomeweb.com' => -5.0, 241 'yahoo-dev-null@yahoo-inc.com' => -3.0, 242 'returns.groups.yahoo.com' => -3.0, 243 'clusternews@linuxnetworx.com' => -3.0, 244 lc('lvs-users-admin@LinuxVirtualServer.org') => -3.0, 245 lc('owner-textbreakingnews@CNNIMAIL12.CNN.COM') => -5.0, 246 247 # soft-blacklisting (positive score) 248 'sender@example.net' => 3.0, 249 '.example.net' => 1.0, 250 251 }, 252 ], # end of site-wide tables 253}); 254 255 256@av_scanners = ( 257 258# ### http://www.vanja.com/tools/sophie/ 259# ['Sophie', 260# \&ask_daemon, ["{}/\n", '/var/run/sophie'], 261# qr/(?x)^ 0+ ( : | [\000\r\n]* $)/, qr/(?x)^ 1 ( : | [\000\r\n]* $)/, 262# qr/(?x)^ [-+]? \d+ : (.*?) [\000\r\n]* $/ ], 263 264# ### http://www.csupomona.edu/~henson/www/projects/SAVI-Perl/ 265# ['Sophos SAVI', \&sophos_savi ], 266 267# ### http://www.clamav.net/ 268# ['ClamAV-clamd', 269# \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd"], 270# qr/\bOK$/, qr/\bFOUND$/, 271# qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ], 272# # NOTE: the easiest is to run clamd under the same user as amavisd; match the 273# # socket name (LocalSocket) in clamav.conf to the socket name in this entry 274# # When running chrooted one may prefer: ["CONTSCAN {}\n","$MYHOME/clamd"], 275 276# ### http://www.clamav.net/ and CPAN (memory-hungry! clamd is preferred) 277# ['Mail::ClamAV', \&ask_clamav, "*", [0], [1], qr/^INFECTED: (.+)/], 278 279# ### http://www.openantivirus.org/ 280# ['OpenAntiVirus ScannerDaemon (OAV)', 281# \&ask_daemon, ["SCAN {}\n", '127.0.0.1:8127'], 282# qr/^OK/, qr/^FOUND: /, qr/^FOUND: (.+)/ ], 283 284# ### http://www.vanja.com/tools/trophie/ 285# ['Trophie', 286# \&ask_daemon, ["{}/\n", '/var/run/trophie'], 287# qr/(?x)^ 0+ ( : | [\000\r\n]* $)/, qr/(?x)^ 1 ( : | [\000\r\n]* $)/, 288# qr/(?x)^ [-+]? \d+ : (.*?) [\000\r\n]* $/ ], 289 290# ### http://www.grisoft.com/ 291# ['AVG Anti-Virus', 292# \&ask_daemon, ["SCAN {}\n", '127.0.0.1:55555'], 293# qr/^200/, qr/^403/, qr/^403 .*?: ([^\r\n]+)/ ], 294 295# ### http://www.f-prot.com/ 296# ['FRISK F-Prot Daemon', 297# \&ask_daemon, 298# ["GET {}/*?-dumb%20-archive%20-packed HTTP/1.0\r\n\r\n", 299# ['127.0.0.1:10200','127.0.0.1:10201','127.0.0.1:10202', 300# '127.0.0.1:10203','127.0.0.1:10204'] ], 301# qr/(?i)<summary[^>]*>clean<\/summary>/, 302# qr/(?i)<summary[^>]*>infected<\/summary>/, 303# qr/(?i)<name>(.+)<\/name>/ ], 304 305# ### http://www.sald.com/, http://www.dials.ru/english/, http://www.drweb.ru/ 306# ['DrWebD', \&ask_daemon, # DrWebD 4.31 or later 307# [pack('N',1). # DRWEBD_SCAN_CMD 308# pack('N',0x00280001). # DONT_CHANGEMAIL, IS_MAIL, RETURN_VIRUSES 309# pack('N', # path length 310# length("$TEMPBASE/amavis-yyyymmddTHHMMSS-xxxxx/parts/pxxx")). 311# '{}/*'. # path 312# pack('N',0). # content size 313# pack('N',0), 314# '/var/drweb/run/drwebd.sock', 315# # '/var/amavis/var/run/drwebd.sock', # suitable for chroot 316# # '/usr/local/drweb/run/drwebd.sock', # FreeBSD drweb ports default 317# # '127.0.0.1:3000', # or over an inet socket 318# ], 319# qr/\A\x00[\x10\x11][\x00\x10]\x00/s, # IS_CLEAN,EVAL_KEY; SKIPPED 320# qr/\A\x00[\x00\x01][\x00\x10][\x20\x40\x80]/s, # KNOWN_V,UNKNOWN_V,V._MODIF 321# qr/\A.{12}(?:infected with )?([^\x00]+)\x00/s, 322# ], 323# # NOTE: If using amavis-milter, change length to: 324# # length("$TEMPBASE/amavis-milter-xxxxxxxxxxxxxx/parts/pxxx"). 325 326 ### http://www.kaspersky.com/ (in the 'file server version') 327 ['KasperskyLab AVP - aveclient', 328 ['/usr/local/kav/bin/aveclient','/usr/local/share/kav/bin/aveclient', 329 '/opt/kav/bin/aveclient','aveclient'], 330 '-p /var/run/aveserver -s {}/*', [0,3,6,8], qr/\b(INFECTED|SUSPICION)\b/, 331 qr/(?:INFECTED|SUSPICION) (.+)/, 332 ], 333 334 ### http://www.kaspersky.com/ 335 ['KasperskyLab AntiViral Toolkit Pro (AVP)', ['avp'], 336 '-* -P -B -Y -O- {}', [0,3,6,8], [2,4], # any use for -A -K ? 337 qr/infected: (.+)/, 338 sub {chdir('/opt/AVP') or die "Can't chdir to AVP: $!"}, 339 sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"}, 340 ], 341 342 ### The kavdaemon and AVPDaemonClient have been removed from Kasperky 343 ### products and replaced by aveserver and aveclient 344 ['KasperskyLab AVPDaemonClient', 345 [ '/opt/AVP/kavdaemon', 'kavdaemon', 346 '/opt/AVP/AvpDaemonClient', 'AvpDaemonClient', 347 '/opt/AVP/AvpTeamDream', 'AvpTeamDream', 348 '/opt/AVP/avpdc', 'avpdc' ], 349 "-f=$TEMPBASE {}", [0,8], [3,4,5,6], qr/infected: ([^\r\n]+)/ ], 350 # change the startup-script in /etc/init.d/kavd to: 351 # DPARMS="-* -Y -dl -f=/var/amavis /var/amavis" 352 # (or perhaps: DPARMS="-I0 -Y -* /var/amavis" ) 353 # adjusting /var/amavis above to match your $TEMPBASE. 354 # The '-f=/var/amavis' is needed if not running it as root, so it 355 # can find, read, and write its pid file, etc., see 'man kavdaemon'. 356 # defUnix.prf: there must be an entry "*/var/amavis" (or whatever 357 # directory $TEMPBASE specifies) in the 'Names=' section. 358 # cd /opt/AVP/DaemonClients; configure; cd Sample; make 359 # cp AvpDaemonClient /opt/AVP/ 360 # su - vscan -c "${PREFIX}/kavdaemon ${DPARMS}" 361 362 ### http://www.hbedv.com/ or http://www.centralcommand.com/ 363 ['H+BEDV AntiVir or CentralCommand Vexira Antivirus', 364 ['antivir','vexira'], 365 '--allfiles -noboot -nombr -rs -s -z {}', [0], qr/ALERT:|VIRUS:/, 366 qr/(?x)^\s* (?: ALERT: \s* (?: \[ | [^']* ' ) | 367 (?i) VIRUS:\ .*?\ virus\ '?) ( [^\]\s']+ )/ ], 368 # NOTE: if you only have a demo version, remove -z and add 214, as in: 369 # '--allfiles -noboot -nombr -rs -s {}', [0,214], qr/ALERT:|VIRUS:/, 370 # According to the documentations, the new version of Vexira has 371 # reasonable defaults, one may consider: "--timeout=60 --temp=$TEMPBASE {}" 372 373 ### http://www.commandsoftware.com/ 374 ['Command AntiVirus for Linux', 'csav', 375 '-all -archive -packed {}', [50], [51,52,53], 376 qr/Infection: (.+)/ ], 377 378 ### http://www.symantec.com/ 379 ['Symantec CarrierScan via Symantec CommandLineScanner', 380 'cscmdline', '-a scan -i 1 -v -s 127.0.0.1:7777 {}', 381 qr/^Files Infected:\s+0$/, qr/^Infected\b/, 382 qr/^(?:Info|Virus Name):\s+(.+)/ ], 383 384 ### http://www.symantec.com/ 385 ['Symantec AntiVirus Scan Engine', 386 'savsecls', '-server 127.0.0.1:7777 -mode scanrepair -details -verbose {}', 387 [0], qr/^Infected\b/, 388 qr/^(?:Info|Virus Name):\s+(.+)/ ], 389 # NOTE: check options and patterns to see which entry better applies 390 391 ### http://www.f-secure.com/products/anti-virus/ 392 ['F-Secure Antivirus', 'fsav', 393 '--dumb --mime --archive {}', [0], [3,8], 394 qr/(?:infection|Infected|Suspected): (.+)/ ], 395 396 ['CAI InoculateIT', 'inocucmd', # retired product 397 '-sec -nex {}', [0], [100], 398 qr/was infected by virus (.+)/ ], 399 # see: http://www.flatmtn.com/computer/Linux-Antivirus_CAI.html 400 401 ### http://www3.ca.com/Solutions/Product.asp?ID=156 (ex InoculateIT) 402 ['CAI eTrust Antivirus', 'etrust-wrapper', 403 '-arc -nex -spm h {}', [0], [101], 404 qr/is infected by virus: (.+)/ ], 405 # NOTE: requires suid wrapper around inocmd32; consider flag: -mod reviewer 406 # see http://marc.theaimsgroup.com/?l=amavis-user&m=109229779912783 407 408 ### http://mks.com.pl/english.html 409 ['MkS_Vir for Linux (beta)', ['mks32','mks'], 410 '-s {}/*', [0], [1,2], 411 qr/--[ \t]*(.+)/ ], 412 413 ### http://mks.com.pl/english.html 414 ['MkS_Vir daemon', 'mksscan', 415 '-s -q {}', [0], [1..7], 416 qr/^... (\S+)/ ], 417 418 ### http://www.nod32.com/ 419 ['ESET Software NOD32', 'nod32', 420 '--arch --mail {}', [0], [1,10], qr/^object=.*, virus="(.*?)",/ ], 421 # with old versions use: 422 # '-all -subdir+ {}', [0], [1,2], 423 # qr/^.+? - (.+?)\s*(?:backdoor|joke|trojan|virus|worm)/ ], 424 425 ### http://www.nod32.com/ 426 ['ESET Software NOD32 - Client/Server Version', 'nod32cli', 427 '-a -r -d recurse --heur standard {}', [0], [10,11], 428 qr/^\S+\s+infected:\s+(.+)/ ], 429 430# Experimental, based on posting from Rado Dibarbora (Dibo) on 2002-05-31 431# ['ESET Software NOD32 Client/Server (NOD32SS)', 432# \&ask_daemon2, # greets with 200, persistent, terminate with QUIT 433# ["SCAN {}/*\r\n", '127.0.0.1:8448' ], 434# qr/^200 File OK/, qr/^201 /, qr/^201 (.+)/ ], 435 436 ### http://www.norman.com/products_nvc.shtml 437 ['Norman Virus Control v5 / Linux', 'nvcc', 438 '-c -l:0 -s -u -temp:$TEMPBASE {}', [0,10,11], [1,2,14], 439 qr/(?i).* virus in .* -> \'(.+)\'/ ], 440 441 ### http://www.pandasoftware.com/ 442 ['Panda Antivirus for Linux', ['pavcl'], 443 '-aut -aex -heu -cmp -nbr -nor -nso -eng {}', 444 qr/Number of files infected[ .]*: 0+(?!\d)/, 445 qr/Number of files infected[ .]*: 0*[1-9]/, 446 qr/Found virus :\s*(\S+)/ ], 447 448# ### http://www.pandasoftware.com/ 449# ['Panda Antivirus for Linux', ['pavcl'], 450# '-TSR -aut -aex -heu -cmp -nbr -nor -nso -eng {}', 451# [0], [0x10, 0x30, 0x50, 0x70, 0x90, 0xB0, 0xD0, 0xF0], 452# qr/Found virus :\s*(\S+)/ ], 453 454# GeCAD AV technology is acquired by Microsoft; RAV has been discontinued. 455# Check your RAV license terms before fiddling with the following two lines! 456# ['GeCAD RAV AntiVirus 8', 'ravav', 457# '--all --archive --mail {}', [1], [2,3,4,5], qr/Infected: (.+)/ ], 458# # NOTE: the command line switches changed with scan engine 8.5 ! 459# # (btw, assigning stdin to /dev/null causes RAV to fail) 460 461 ### http://www.nai.com/ 462 ['NAI McAfee AntiVirus (uvscan)', 'uvscan', 463 '--secure -rv --mime --summary --noboot - {}', [0], [13], 464 qr/(?x) Found (?: 465 \ the\ (.+)\ (?:virus|trojan) | 466 \ (?:virus|trojan)\ or\ variant\ ([^ ]+) | 467 :\ (.+)\ NOT\ a\ virus)/, 468 # sub {$ENV{LD_PRELOAD}='/lib/libc.so.6'}, 469 # sub {delete $ENV{LD_PRELOAD}}, 470 ], 471 # NOTE1: with RH9: force the dynamic linker to look at /lib/libc.so.6 before 472 # anything else by setting environment variable LD_PRELOAD=/lib/libc.so.6 473 # and then clear it when finished to avoid confusing anything else. 474 # NOTE2: to treat encrypted files as viruses replace the [13] with: 475 # qr/^\s{5,}(Found|is password-protected|.*(virus|trojan))/ 476 477 ### http://www.virusbuster.hu/en/ 478 ['VirusBuster', ['vbuster', 'vbengcl'], 479 # VirusBuster Ltd. does not support the daemon version for the workstation 480 # engine (vbuster-eng-1.12-linux-i386-libc6.tgz) any longer. The names of 481 # binaries, some parameters AND return codes have changed (from 3 to 1). 482 "{} -ss -i '*' -log=$MYHOME/vbuster.log", [0], [1], 483 qr/: '(.*)' - Virus/ ], 484 485# ### http://www.virusbuster.hu/en/ 486# ['VirusBuster (Client + Daemon)', 'vbengd', 487# # HINT: for an infected file it always returns 3, 488# # although the man-page tells a different story 489# '-f -log scandir {}', [0], [3], 490# qr/Virus found = (.*);/ ], 491 492 ### http://www.cyber.com/ 493 ['CyberSoft VFind', 'vfind', 494 '--vexit {}/*', [0], [23], qr/##==>>>> VIRUS ID: CVDL (.+)/, 495 # sub {$ENV{VSTK_HOME}='/usr/lib/vstk'}, 496 ], 497 498 ### http://www.ikarus-software.com/ 499 ['Ikarus AntiVirus for Linux', 'ikarus', 500 '{}', [0], [40], qr/Signature (.+) found/ ], 501 502 ### http://www.bitdefender.com/ 503 ['BitDefender', 'bdc', 504 '--all --arc --mail {}', qr/^Infected files *:0+(?!\d)/, 505 qr/^(?:Infected files|Identified viruses|Suspect files) *:0*[1-9]/, 506 qr/(?:suspected|infected): (.*)(?:\033|$)/ ], 507 508# ['File::Scan', sub {Amavis::AV::ask_av(sub{ 509# use File::Scan; my($fn)=@_; 510# my($f)=File::Scan->new(max_txt_size=>0, max_bin_size=>0); 511# my($vname) = $f->scan($fn); 512# $f->error ? (2,"Error: ".$f->error) 513# : ($vname ne '') ? (1,"$vname FOUND") : (0,"Clean")}, @_) }, 514# ["{}/*"], [0], [1], qr/^(.*) FOUND$/ ], 515 516# ### example: fully-fledged checker for JPEG marker segments of invalid length 517# ['check-jpeg', 518# sub { use JpegTester (); Amavis::AV::ask_av(\&JpegTester::test_jpeg, @_) }, 519# ["{}/*"], undef, [1], qr/^(bad jpeg: .*)$/ ], 520# # NOTE: place file JpegTester.pm somewhere where Perl can find it, 521# # for example in /usr/local/lib/perl5/site_perl 522 523); 524 525 526@av_scanners_backup = ( 527 528 ### http://www.clamav.net/ - backs up clamd or Mail::ClamAV 529 ['ClamAV-clamscan', 'clamscan', 530 "--stdout --disable-summary -r --tempdir=$TEMPBASE {}", [0], [1], 531 qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ], 532 533 ### http://www.f-prot.com/ - backs up F-Prot Daemon 534 ['FRISK F-Prot Antivirus', ['f-prot','f-prot.sh'], 535 '-dumb -archive -packed {}', [0,8], [3,6], 536 qr/Infection: (.+)/ ], 537 538 ### http://www.trendmicro.com/ - backs up Trophie 539 ['Trend Micro FileScanner', ['/etc/iscan/vscan','vscan'], 540 '-za -a {}', [0], qr/Found virus/, qr/Found virus (.+) in/ ], 541 542 ### http://www.sald.com/, http://drweb.imshop.de/ - backs up DrWebD 543 ['drweb - DrWeb Antivirus', 544 ['/usr/local/drweb/drweb', '/opt/drweb/drweb', 'drweb'], 545 '-path={} -al -go -ot -cn -upn -ok-', 546 [0,32], [1,9,33], qr' infected (?:with|by)(?: virus)? (.*)$'], 547 548 ['KasperskyLab kavscanner', ['/opt/kav/bin/kavscanner','kavscanner'], 549 '-i1 -xp {}', [0,10,15], [5,20,21,25], 550 qr/(?:CURED|INFECTED|CUREFAILED|WARNING|SUSPICION) (.*)/ , 551 sub {chdir('/opt/kav/bin') or die "Can't chdir to kav: $!"}, 552 sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"}, 553 ], 554 555# Commented out because the name 'sweep' clashes with Debian and FreeBSD 556# package/port of an audio editor. Make sure the correct 'sweep' is found 557# in the path when enabling. 558# 559# ### http://www.sophos.com/ - backs up Sophie or SAVI-Perl 560# ['Sophos Anti Virus (sweep)', 'sweep', 561# '-nb -f -all -rec -ss -sc -archive -cab -tnef --no-reset-atime {}', 562# [0,2], qr/Virus .*? found/, 563# qr/^>>> Virus(?: fragment)? '?(.*?)'? found/, 564# ], 565# # other options to consider: -mime -oe -idedir=/usr/local/sav 566 567# always succeeds (uncomment to consider mail clean if all other scanners fail) 568# ['always-clean', sub {0}], 569 570); 571 572 5731; # insure a defined return 574