Advertisement
Guest User

/etc/amavisd.conf

a guest
Aug 3rd, 2015
509
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 36.62 KB | None | 0 0
  1. use 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. # for more details see documentation in INSTALL, README_FILES/*
  7. # and at http://www.ijs.si/software/amavisd/amavisd-new-docs.html
  8.  
  9.  
  10. # COMMONLY ADJUSTED SETTINGS:
  11.  
  12. # @bypass_virus_checks_maps = (1); # controls running of anti-virus code
  13. # @bypass_spam_checks_maps = (1); # controls running of anti-spam code
  14. # $bypass_decode_parts = 1; # controls running of decoders&dearchivers
  15.  
  16. $max_servers = 2; # num of pre-forked children (2..30 is common), -m
  17. $daemon_user = 'amavis'; # (no default; customary: vscan or amavis), -u
  18. $daemon_group = 'amavis'; # (no default; customary: vscan or amavis), -g
  19.  
  20. $mydomain = 'mydomain.com'; # a convenient default for other settings
  21.  
  22. # $MYHOME = '/var/lib/amavis'; # a convenient default for other settings, -H
  23. $TEMPBASE = "$MYHOME/tmp"; # working directory, needs to exist, -T
  24. $ENV{TMPDIR} = $TEMPBASE; # environment variable TMPDIR, used by SA, etc.
  25. $QUARANTINEDIR = '/var/virusmails'; # -Q
  26. # $quarantine_subdir_levels = 1; # add level of subdirs to disperse quarantine
  27. # $release_format = 'resend'; # 'attach', 'plain', 'resend'
  28. # $report_format = 'arf'; # 'attach', 'plain', 'resend', 'arf'
  29.  
  30. # $daemon_chroot_dir = $MYHOME; # chroot directory or undef, -R
  31.  
  32. # $db_home = "$MYHOME/db"; # dir for bdb nanny/cache/snmp databases, -D
  33. # $helpers_home = "$MYHOME/var"; # working directory for SpamAssassin, -S
  34. # $lock_file = "$MYHOME/var/amavisd.lock"; # -L
  35. # $pid_file = "$MYHOME/var/amavisd.pid"; # -P
  36. #NOTE: create directories $MYHOME/tmp, $MYHOME/var, $MYHOME/db manually
  37.  
  38. $log_level = 0; # verbosity 0..5, -d
  39. $log_recip_templ = undef; # disable by-recipient level-0 log entries
  40. $do_syslog = 1; # log via syslogd (preferred)
  41. $syslog_facility = 'mail'; # Syslog facility as a string
  42. # e.g.: mail, daemon, user, local0, ... local7
  43.  
  44. $enable_db = 1; # enable use of BerkeleyDB/libdb (SNMP and nanny)
  45. # $enable_zmq = 1; # enable use of ZeroMQ (SNMP and nanny)
  46. $nanny_details_level = 2; # nanny verbosity: 1: traditional, 2: detailed
  47. $enable_dkim_verification = 1; # enable DKIM signatures verification
  48. $enable_dkim_signing = 1; # load DKIM signing code, keys defined by dkim_key
  49.  
  50. @local_domains_maps = ( [".$mydomain"] ); # list of all local domains
  51.  
  52. @mynetworks = qw( 127.0.0.0/8 [::1] [FE80::]/10 [FEC0::]/10
  53. 10.0.0.0/8 172.16.0.0/12 192.168.0.0/16 );
  54.  
  55. $unix_socketname = "$MYHOME/amavisd.sock"; # amavisd-release or amavis-milter
  56. # option(s) -p overrides $inet_socket_port and $unix_socketname
  57.  
  58. $inet_socket_port = 10024; # listen on this local TCP port(s)
  59. # $inet_socket_port = [10024,10026]; # listen on multiple TCP ports
  60.  
  61. $policy_bank{'MYNETS'} = { # mail originating from @mynetworks
  62. originating => 1, # is true in MYNETS by default, but let's make it explicit
  63. os_fingerprint_method => undef, # don't query p0f for internal clients
  64. };
  65.  
  66. # it is up to MTA to re-route mail from authenticated roaming users or
  67. # from internal hosts to a dedicated TCP port (such as 10026) for filtering
  68. $interface_policy{'10026'} = 'ORIGINATING';
  69.  
  70. $policy_bank{'ORIGINATING'} = { # mail supposedly originating from our users
  71. originating => 1, # declare that mail was submitted by our smtp client
  72. allow_disclaimers => 1, # enables disclaimer insertion if available
  73. # notify administrator of locally originating malware
  74. virus_admin_maps => ["virusalert\@$mydomain"],
  75. spam_admin_maps => ["virusalert\@$mydomain"],
  76. warnbadhsender => 1,
  77. # forward to a smtpd service providing DKIM signing service
  78. forward_method => 'smtp:[127.0.0.1]:10027',
  79. # force MTA conversion to 7-bit (e.g. before DKIM signing)
  80. smtpd_discard_ehlo_keywords => ['8BITMIME'],
  81. bypass_banned_checks_maps => [1], # allow sending any file names and types
  82. terminate_dsn_on_notify_success => 0, # don't remove NOTIFY=SUCCESS option
  83. };
  84.  
  85. $interface_policy{'SOCK'} = 'AM.PDP-SOCK'; # only applies with $unix_socketname
  86.  
  87. # Use with amavis-release over a socket or with Petr Rehor's amavis-milter.c
  88. # (with amavis-milter.c from this package or old amavis.c client use 'AM.CL'):
  89. $policy_bank{'AM.PDP-SOCK'} = {
  90. protocol => 'AM.PDP',
  91. auth_required_release => 0, # do not require secret_id for amavisd-release
  92. };
  93.  
  94. $sa_tag_level_deflt = 2.0; # add spam info headers if at, or above that level
  95. $sa_tag2_level_deflt = 6.2; # add 'spam detected' headers at that level
  96. $sa_kill_level_deflt = 6.9; # triggers spam evasive actions (e.g. blocks mail)
  97. $sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent
  98. $sa_crediblefrom_dsn_cutoff_level = 18; # likewise, but for a likely valid From
  99. # $sa_quarantine_cutoff_level = 25; # spam level beyond which quarantine is off
  100. $penpals_bonus_score = 8; # (no effect without a @storage_sql_dsn database)
  101. $penpals_threshold_high = $sa_kill_level_deflt; # don't waste time on hi spam
  102. $bounce_killer_score = 100; # spam score points to add for joe-jobbed bounces
  103.  
  104. $sa_mail_body_size_limit = 400*1024; # don't waste time on SA if mail is larger
  105. $sa_local_tests_only = 0; # only tests which do not require internet access?
  106.  
  107. # @lookup_sql_dsn =
  108. # ( ['DBI:mysql:database=mail;host=127.0.0.1;port=3306', 'user1', 'passwd1'],
  109. # ['DBI:mysql:database=mail;host=host2', 'username2', 'password2'],
  110. # ["DBI:SQLite:dbname=$MYHOME/sql/mail_prefs.sqlite", '', ''] );
  111. # @storage_sql_dsn = @lookup_sql_dsn; # none, same, or separate database
  112. # @storage_redis_dsn = ( {server=>'127.0.0.1:6379', db_id=>1} );
  113. # $redis_logging_key = 'amavis-log';
  114. # $redis_logging_queue_size_limit = 300000; # about 250 MB / 100000
  115.  
  116. # $timestamp_fmt_mysql = 1; # if using MySQL *and* msgs.time_iso is TIMESTAMP;
  117. # defaults to 0, which is good for non-MySQL or if msgs.time_iso is CHAR(16)
  118.  
  119. $virus_admin = "bob\@$mydomain"; # notifications recip.
  120.  
  121. $mailfrom_notify_admin = "bob\@$mydomain"; # notifications sender
  122. $mailfrom_notify_recip = "bob\@$mydomain"; # notifications sender
  123. $mailfrom_notify_spamadmin = "bob\@$mydomain"; # notifications sender
  124. $mailfrom_to_quarantine = ''; # null return path; uses original sender if undef
  125.  
  126. @addr_extension_virus_maps = ('virus');
  127. @addr_extension_banned_maps = ('banned');
  128. @addr_extension_spam_maps = ('spam');
  129. @addr_extension_bad_header_maps = ('badh');
  130. # $recipient_delimiter = '+'; # undef disables address extensions altogether
  131. # when enabling addr extensions do also Postfix/main.cf: recipient_delimiter=+
  132.  
  133. $path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';
  134. # $dspam = 'dspam';
  135.  
  136. $MAXLEVELS = 14;
  137. $MAXFILES = 3000;
  138. $MIN_EXPANSION_QUOTA = 100*1024; # bytes (default undef, not enforced)
  139. $MAX_EXPANSION_QUOTA = 500*1024*1024; # bytes (default undef, not enforced)
  140.  
  141. $sa_spam_subject_tag = '***Spam*** ';
  142. $defang_virus = 1; # MIME-wrap passed infected mail
  143. $defang_banned = 1; # MIME-wrap passed mail containing banned name
  144. # for defanging bad headers only turn on certain minor contents categories:
  145. $defang_by_ccat{CC_BADH.",3"} = 1; # NUL or CR character in header
  146. $defang_by_ccat{CC_BADH.",5"} = 1; # header line longer than 998 characters
  147. $defang_by_ccat{CC_BADH.",6"} = 1; # header field syntax error
  148.  
  149.  
  150. # OTHER MORE COMMON SETTINGS (defaults may suffice):
  151.  
  152. $myhostname = 'myhostname.mydomainname.com'; # must be a fully-qualified domain name!
  153.  
  154. # $notify_method = 'smtp:[127.0.0.1]:10025';
  155. # $forward_method = 'smtp:[127.0.0.1]:10025'; # set to undef with milter!
  156.  
  157. # $final_virus_destiny = D_DISCARD;
  158. # $final_banned_destiny = D_DISCARD;
  159. # $final_spam_destiny = D_PASS; #!!! D_DISCARD / D_REJECT
  160. # $final_bad_header_destiny = D_PASS;
  161. # $bad_header_quarantine_method = undef;
  162.  
  163. # $os_fingerprint_method = 'p0f:*:2345'; # to query p0f-analyzer.pl
  164.  
  165. ## hierarchy by which a final setting is chosen:
  166. ## policy bank (based on port or IP address) -> *_by_ccat
  167. ## *_by_ccat (based on mail contents) -> *_maps
  168. ## *_maps (based on recipient address) -> final configuration value
  169.  
  170.  
  171. # SOME OTHER VARIABLES WORTH CONSIDERING (see amavisd.conf-default for all)
  172.  
  173. # $warnbadhsender,
  174. # $warnvirusrecip, $warnbannedrecip, $warnbadhrecip, (or @warn*recip_maps)
  175. #
  176. # @bypass_virus_checks_maps, @bypass_spam_checks_maps,
  177. # @bypass_banned_checks_maps, @bypass_header_checks_maps,
  178. #
  179. # @virus_lovers_maps, @spam_lovers_maps,
  180. # @banned_files_lovers_maps, @bad_header_lovers_maps,
  181. #
  182. # @blacklist_sender_maps, @score_sender_maps,
  183. #
  184. # $clean_quarantine_method, $virus_quarantine_to, $banned_quarantine_to,
  185. # $bad_header_quarantine_to, $spam_quarantine_to,
  186. #
  187. # $defang_bad_header, $defang_undecipherable, $defang_spam
  188.  
  189.  
  190. # REMAINING IMPORTANT VARIABLES ARE LISTED HERE BECAUSE OF LONGER ASSIGNMENTS
  191.  
  192. @keep_decoded_original_maps = (new_RE(
  193. qr'^MAIL$', # let virus scanner see full original message
  194. qr'^MAIL-UNDECIPHERABLE$', # same as ^MAIL$ if mail is undecipherable
  195. qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i,
  196. # qr'^Zip archive data', # don't trust Archive::Zip
  197. ));
  198.  
  199.  
  200. $banned_filename_re = new_RE(
  201.  
  202. ### BLOCKED ANYWHERE
  203. # qr'^UNDECIPHERABLE$', # is or contains any undecipherable components
  204. qr'^\.(exe-ms|dll)$', # banned file(1) types, rudimentary
  205. # qr'^\.(exe|lha|cab|dll)$', # banned file(1) types
  206.  
  207. ### BLOCK THE FOLLOWING, EXCEPT WITHIN UNIX ARCHIVES:
  208. # [ qr'^\.(gz|bz2)$' => 0 ], # allow any in gzip or bzip2
  209. [ qr'^\.(rpm|cpio|tar)$' => 0 ], # allow any in Unix-type archives
  210.  
  211. qr'.\.(pif|scr)$'i, # banned extensions - rudimentary
  212. # qr'^\.zip$', # block zip type
  213.  
  214. ### BLOCK THE FOLLOWING, EXCEPT WITHIN ARCHIVES:
  215. # [ qr'^\.(zip|rar|arc|arj|zoo)$'=> 0 ], # allow any within these archives
  216.  
  217. qr'^application/x-msdownload$'i, # block these MIME types
  218. qr'^application/x-msdos-program$'i,
  219. qr'^application/hta$'i,
  220.  
  221. # qr'^message/partial$'i, # rfc2046 MIME type
  222. # qr'^message/external-body$'i, # rfc2046 MIME type
  223.  
  224. # qr'^(application/x-msmetafile|image/x-wmf)$'i, # Windows Metafile MIME type
  225. # qr'^\.wmf$', # Windows Metafile file(1) type
  226.  
  227. # block certain double extensions in filenames
  228. qr'^(?!cid:).*\.[^./]*[A-Za-z][^./]*\.\s*(exe|vbs|pif|scr|bat|cmd|com|cpl|dll)[.\s]*$'i,
  229.  
  230. # qr'\{[0-9a-f]{8}(-[0-9a-f]{4}){3}-[0-9a-f]{12}\}?'i, # Class ID CLSID, strict
  231. # qr'\{[0-9a-z]{4,}(-[0-9a-z]{4,}){0,7}\}?'i, # Class ID extension CLSID, loose
  232.  
  233. qr'.\.(exe|vbs|pif|scr|cpl)$'i, # banned extension - basic
  234. # qr'.\.(exe|vbs|pif|scr|cpl|bat|cmd|com)$'i, # banned extension - basic+cmd
  235. # qr'.\.(ade|adp|app|bas|bat|chm|cmd|com|cpl|crt|emf|exe|fxp|grp|hlp|hta|
  236. # inf|ini|ins|isp|js|jse|lib|lnk|mda|mdb|mde|mdt|mdw|mdz|msc|msi|
  237. # msp|mst|ocx|ops|pcd|pif|prg|reg|scr|sct|shb|shs|sys|vb|vbe|vbs|vxd|
  238. # wmf|wsc|wsf|wsh)$'ix, # banned extensions - long
  239. # qr'.\.(asd|asf|asx|url|vcs|wmd|wmz)$'i, # consider also
  240. # qr'.\.(ani|cur|ico)$'i, # banned cursors and icons filename
  241. # qr'^\.ani$', # banned animated cursor file(1) type
  242. # qr'.\.(mim|b64|bhx|hqx|xxe|uu|uue)$'i, # banned extension - WinZip vulnerab.
  243. );
  244. # See http://support.microsoft.com/default.aspx?scid=kb;EN-US;q262631
  245. # and http://www.cknow.com/vtutor/vtextensions.htm
  246.  
  247.  
  248. # ENVELOPE SENDER SOFT-WHITELISTING / SOFT-BLACKLISTING
  249.  
  250. @score_sender_maps = ({ # a by-recipient hash lookup table,
  251. # results from all matching recipient tables are summed
  252.  
  253. # ## per-recipient personal tables (NOTE: positive: black, negative: white)
  254. # 'user1@example.com' => [{'bla-mobile.press@example.com' => 10.0}],
  255. # 'user3@example.com' => [{'.ebay.com' => -3.0}],
  256. # 'user4@example.com' => [{'cleargreen@cleargreen.com' => -7.0,
  257. # '.cleargreen.com' => -5.0}],
  258.  
  259. ## site-wide opinions about senders (the '.' matches any recipient)
  260. '.' => [ # the _first_ matching sender determines the score boost
  261.  
  262. new_RE( # regexp-type lookup table, just happens to be all soft-blacklist
  263. [qr'^(bulkmail|offers|cheapbenefits|earnmoney|foryou)@'i => 5.0],
  264. [qr'^(greatcasino|investments|lose_weight_today|market\.alert)@'i=> 5.0],
  265. [qr'^(money2you|MyGreenCard|new\.tld\.registry|opt-out|opt-in)@'i=> 5.0],
  266. [qr'^(optin|saveonlsmoking2002k|specialoffer|specialoffers)@'i => 5.0],
  267. [qr'^(stockalert|stopsnoring|wantsome|workathome|yesitsfree)@'i => 5.0],
  268. [qr'^(your_friend|greatoffers)@'i => 5.0],
  269. [qr'^(inkjetplanet|marketopt|MakeMoney)\d*@'i => 5.0],
  270. ),
  271.  
  272. # read_hash("/var/amavis/sender_scores_sitewide"),
  273.  
  274. { # a hash-type lookup table (associative array)
  275. 'nobody@cert.org' => -3.0,
  276. 'cert-advisory@us-cert.gov' => -3.0,
  277. 'owner-alert@iss.net' => -3.0,
  278. 'slashdot@slashdot.org' => -3.0,
  279. 'securityfocus.com' => -3.0,
  280. 'ntbugtraq@listserv.ntbugtraq.com' => -3.0,
  281. 'security-alerts@linuxsecurity.com' => -3.0,
  282. 'mailman-announce-admin@python.org' => -3.0,
  283. 'amavis-user-admin@lists.sourceforge.net'=> -3.0,
  284. 'amavis-user-bounces@lists.sourceforge.net' => -3.0,
  285. 'spamassassin.apache.org' => -3.0,
  286. 'notification-return@lists.sophos.com' => -3.0,
  287. 'owner-postfix-users@postfix.org' => -3.0,
  288. 'owner-postfix-announce@postfix.org' => -3.0,
  289. 'owner-sendmail-announce@lists.sendmail.org' => -3.0,
  290. 'sendmail-announce-request@lists.sendmail.org' => -3.0,
  291. 'donotreply@sendmail.org' => -3.0,
  292. 'ca+envelope@sendmail.org' => -3.0,
  293. 'noreply@freshmeat.net' => -3.0,
  294. 'owner-technews@postel.acm.org' => -3.0,
  295. 'ietf-123-owner@loki.ietf.org' => -3.0,
  296. 'cvs-commits-list-admin@gnome.org' => -3.0,
  297. 'rt-users-admin@lists.fsck.com' => -3.0,
  298. 'clp-request@comp.nus.edu.sg' => -3.0,
  299. 'surveys-errors@lists.nua.ie' => -3.0,
  300. 'emailnews@genomeweb.com' => -5.0,
  301. 'yahoo-dev-null@yahoo-inc.com' => -3.0,
  302. 'returns.groups.yahoo.com' => -3.0,
  303. 'clusternews@linuxnetworx.com' => -3.0,
  304. lc('lvs-users-admin@LinuxVirtualServer.org') => -3.0,
  305. lc('owner-textbreakingnews@CNNIMAIL12.CNN.COM') => -5.0,
  306.  
  307. # soft-blacklisting (positive score)
  308. 'sender@example.net' => 3.0,
  309. '.example.net' => 1.0,
  310.  
  311. },
  312. ], # end of site-wide tables
  313. });
  314.  
  315.  
  316. @decoders = (
  317. ['mail', \&do_mime_decode],
  318. # [[qw(asc uue hqx ync)], \&do_ascii], # not safe
  319. ['F', \&do_uncompress, ['unfreeze', 'freeze -d', 'melt', 'fcat'] ],
  320. ['Z', \&do_uncompress, ['uncompress', 'gzip -d', 'zcat'] ],
  321. ['gz', \&do_uncompress, 'gzip -d'],
  322. ['gz', \&do_gunzip],
  323. ['bz2', \&do_uncompress, 'bzip2 -d'],
  324. ['xz', \&do_uncompress,
  325. ['xzdec', 'xz -dc', 'unxz -c', 'xzcat'] ],
  326. ['lzma', \&do_uncompress,
  327. ['lzmadec', 'xz -dc --format=lzma',
  328. 'lzma -dc', 'unlzma -c', 'lzcat', 'lzmadec'] ],
  329. ['lrz', \&do_uncompress,
  330. ['lrzip -q -k -d -o -', 'lrzcat -q -k'] ],
  331. ['lzo', \&do_uncompress, 'lzop -d'],
  332. ['lz4', \&do_uncompress, ['lz4c -d'] ],
  333. ['rpm', \&do_uncompress, ['rpm2cpio.pl', 'rpm2cpio'] ],
  334. [['cpio','tar'], \&do_pax_cpio, ['pax', 'gcpio', 'cpio'] ],
  335. # ['/usr/local/heirloom/usr/5bin/pax', 'pax', 'gcpio', 'cpio']
  336. ['deb', \&do_ar, 'ar'],
  337. # ['a', \&do_ar, 'ar'], # unpacking .a seems an overkill
  338. ['rar', \&do_unrar, ['unrar', 'rar'] ],
  339. ['arj', \&do_unarj, ['unarj', 'arj'] ],
  340. ['arc', \&do_arc, ['nomarch', 'arc'] ],
  341. ['zoo', \&do_zoo, ['zoo', 'unzoo'] ],
  342. ['doc', \&do_ole, 'ripole'],
  343. ['cab', \&do_cabextract, 'cabextract'],
  344. ['tnef', \&do_tnef_ext, 'tnef'],
  345. ['tnef', \&do_tnef],
  346. # ['lha', \&do_lha, 'lha'], # not safe, use 7z instead
  347. # ['sit', \&do_unstuff, 'unstuff'], # not safe
  348. [['zip','kmz'], \&do_7zip, ['7za', '7z'] ],
  349. [['zip','kmz'], \&do_unzip],
  350. ['7z', \&do_7zip, ['7zr', '7za', '7z'] ],
  351. [[qw(gz bz2 Z tar)],
  352. \&do_7zip, ['7za', '7z'] ],
  353. [[qw(xz lzma jar cpio arj rar swf lha iso cab deb rpm)],
  354. \&do_7zip, '7z' ],
  355. ['exe', \&do_executable, ['unrar','rar'], 'lha', ['unarj','arj'] ],
  356. );
  357.  
  358.  
  359. @av_scanners = (
  360.  
  361. # ### http://www.sophos.com/
  362. # ['Sophos-SSSP', # SAV Dynamic Interface
  363. # \&ask_daemon, ["{}", 'sssp:/var/run/savdi/sssp.sock'],
  364. # # or: ["{}", 'sssp:[127.0.0.1]:4010'],
  365. # qr/^DONE OK\b/m, qr/^VIRUS\b/m, qr/^VIRUS\s*(\S*)/m ],
  366.  
  367. # ### http://www.clanfield.info/sophie/ (http://www.vanja.com/tools/sophie/)
  368. # ['Sophie',
  369. # \&ask_daemon, ["{}/\n", 'sophie:/var/run/sophie'],
  370. # qr/(?x)^ 0+ ( : | [\000\r\n]* $)/, qr/(?x)^ 1 ( : | [\000\r\n]* $)/,
  371. # qr/(?x)^ [-+]? \d+ : (.*?) [\000\r\n]* $/m ],
  372.  
  373. # ### http://www.csupomona.edu/~henson/www/projects/SAVI-Perl/
  374. # ['Sophos SAVI', \&ask_daemon, ['{}','savi-perl:'] ],
  375.  
  376. # ['Avira SAVAPI',
  377. # \&ask_daemon, ["*", 'savapi:/var/tmp/.savapi3', 'product-id'],
  378. # qr/^(200|210)/m, qr/^(310|420|319)/m,
  379. # qr/^(?:310|420)[,\s]*(?:.* <<< )?(.+?)(?: ; |$)/m ],
  380. # settings for the SAVAPI3.conf: ArchiveScan=1, HeurLevel=2, MailboxScan=1
  381.  
  382. # ### http://www.clamav.net/
  383. ['ClamAV-clamd',
  384. \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.socket"],
  385. qr/\bOK$/m, qr/\bFOUND$/m,
  386. qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
  387. # # NOTE: run clamd under the same user as amavisd - or run it under its own
  388. # # uid such as clamav, add user clamav to the amavis group, and then add
  389. # # AllowSupplementaryGroups to clamd.conf;
  390. # # NOTE: match socket name (LocalSocket) in clamav.conf to the socket name in
  391. # # this entry; when running chrooted one may prefer a socket under $MYHOME.
  392.  
  393. # ### http://www.clamav.net/ and CPAN (memory-hungry! clamd is preferred)
  394. # # note that Mail::ClamAV requires perl to be build with threading!
  395. # ['Mail::ClamAV', \&ask_daemon, ['{}','clamav-perl:'],
  396. # [0], [1], qr/^INFECTED: (.+)/m],
  397.  
  398. # ### http://www.openantivirus.org/
  399. # ['OpenAntiVirus ScannerDaemon (OAV)',
  400. # \&ask_daemon, ["SCAN {}\n", '127.0.0.1:8127'],
  401. # qr/^OK/m, qr/^FOUND: /m, qr/^FOUND: (.+)/m ],
  402.  
  403. # ### http://www.vanja.com/tools/trophie/
  404. # ['Trophie',
  405. # \&ask_daemon, ["{}/\n", 'trophie:/var/run/trophie'],
  406. # qr/(?x)^ 0+ ( : | [\000\r\n]* $)/m, qr/(?x)^ 1 ( : | [\000\r\n]* $)/m,
  407. # qr/(?x)^ [-+]? \d+ : (.*?) [\000\r\n]* $/m ],
  408.  
  409. # ### http://www.grisoft.com/
  410. # ['AVG Anti-Virus',
  411. # \&ask_daemon, ["SCAN {}\n", '127.0.0.1:55555'],
  412. # qr/^200/m, qr/^403/m, qr/^403[- ].*: ([^\r\n]+)/m ],
  413.  
  414. # ### http://www.f-prot.com/
  415. # ['F-Prot fpscand', # F-PROT Antivirus for BSD/Linux/Solaris, version 6
  416. # \&ask_daemon,
  417. # ["SCAN FILE {}/*\n", '127.0.0.1:10200'],
  418. # qr/^(0|8|64) /m,
  419. # qr/^([1235679]|1[01345]) |<[^>:]*(?i)(infected|suspicious|unwanted)/m,
  420. # qr/(?i)<[^>:]*(?:infected|suspicious|unwanted)[^>:]*: ([^>]*)>/m ],
  421.  
  422. # ### http://www.f-prot.com/
  423. # ['F-Prot f-protd', # old version
  424. # \&ask_daemon,
  425. # ["GET {}/*?-dumb%20-archive%20-packed HTTP/1.0\r\n\r\n",
  426. # ['127.0.0.1:10200', '127.0.0.1:10201', '127.0.0.1:10202',
  427. # '127.0.0.1:10203', '127.0.0.1:10204'] ],
  428. # qr/(?i)<summary[^>]*>clean<\/summary>/m,
  429. # qr/(?i)<summary[^>]*>infected<\/summary>/m,
  430. # qr/(?i)<name>(.+)<\/name>/m ],
  431.  
  432. # ### http://www.sald.com/, http://www.dials.ru/english/, http://www.drweb.ru/
  433. # ['DrWebD', \&ask_daemon, # DrWebD 4.31 or later
  434. # [pack('N',1). # DRWEBD_SCAN_CMD
  435. # pack('N',0x00280001). # DONT_CHANGEMAIL, IS_MAIL, RETURN_VIRUSES
  436. # pack('N', # path length
  437. # length("$TEMPBASE/amavis-yyyymmddTHHMMSS-xxxxx/parts/pxxx")).
  438. # '{}/*'. # path
  439. # pack('N',0). # content size
  440. # pack('N',0),
  441. # '/var/drweb/run/drwebd.sock',
  442. # # '/var/amavis/var/run/drwebd.sock', # suitable for chroot
  443. # # '/usr/local/drweb/run/drwebd.sock', # FreeBSD drweb ports default
  444. # # '127.0.0.1:3000', # or over an inet socket
  445. # ],
  446. # qr/\A\x00[\x10\x11][\x00\x10]\x00/sm, # IS_CLEAN,EVAL_KEY; SKIPPED
  447. # qr/\A\x00[\x00\x01][\x00\x10][\x20\x40\x80]/sm,# KNOWN_V,UNKNOWN_V,V._MODIF
  448. # qr/\A.{12}(?:infected with )?([^\x00]+)\x00/sm,
  449. # ],
  450. # # NOTE: If using amavis-milter, change length to:
  451. # # length("$TEMPBASE/amavis-milter-xxxxxxxxxxxxxx/parts/pxxx").
  452.  
  453. ### http://www.kaspersky.com/ (kav4mailservers)
  454. ['KasperskyLab AVP - aveclient',
  455. ['/usr/local/kav/bin/aveclient','/usr/local/share/kav/bin/aveclient',
  456. '/opt/kav/5.5/kav4mailservers/bin/aveclient','aveclient'],
  457. '-p /var/run/aveserver -s {}/*',
  458. [0,3,6,8], qr/\b(INFECTED|SUSPICION|SUSPICIOUS)\b/m,
  459. qr/(?:INFECTED|WARNING|SUSPICION|SUSPICIOUS) (.+)/m,
  460. ],
  461. # NOTE: one may prefer [0],[2,3,4,5], depending on how suspicious,
  462. # currupted or protected archives are to be handled
  463.  
  464. ### http://www.kaspersky.com/
  465. ['KasperskyLab AntiViral Toolkit Pro (AVP)', ['avp'],
  466. '-* -P -B -Y -O- {}', [0,3,6,8], [2,4], # any use for -A -K ?
  467. qr/infected: (.+)/m,
  468. sub {chdir('/opt/AVP') or die "Can't chdir to AVP: $!"},
  469. sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"},
  470. ],
  471.  
  472. ### The kavdaemon and AVPDaemonClient have been removed from Kasperky
  473. ### products and replaced by aveserver and aveclient
  474. ['KasperskyLab AVPDaemonClient',
  475. [ '/opt/AVP/kavdaemon', 'kavdaemon',
  476. '/opt/AVP/AvpDaemonClient', 'AvpDaemonClient',
  477. '/opt/AVP/AvpTeamDream', 'AvpTeamDream',
  478. '/opt/AVP/avpdc', 'avpdc' ],
  479. "-f=$TEMPBASE {}", [0,8], [3,4,5,6], qr/infected: ([^\r\n]+)/m ],
  480. # change the startup-script in /etc/init.d/kavd to:
  481. # DPARMS="-* -Y -dl -f=/var/amavis /var/amavis"
  482. # (or perhaps: DPARMS="-I0 -Y -* /var/amavis" )
  483. # adjusting /var/amavis above to match your $TEMPBASE.
  484. # The '-f=/var/amavis' is needed if not running it as root, so it
  485. # can find, read, and write its pid file, etc., see 'man kavdaemon'.
  486. # defUnix.prf: there must be an entry "*/var/amavis" (or whatever
  487. # directory $TEMPBASE specifies) in the 'Names=' section.
  488. # cd /opt/AVP/DaemonClients; configure; cd Sample; make
  489. # cp AvpDaemonClient /opt/AVP/
  490. # su - vscan -c "${PREFIX}/kavdaemon ${DPARMS}"
  491.  
  492. ### http://www.centralcommand.com/
  493. ['CentralCommand Vexira (new) vascan',
  494. ['vascan','/usr/lib/Vexira/vascan'],
  495. "-a s --timeout=60 --temp=$TEMPBASE -y $QUARANTINEDIR ".
  496. "--log=/var/log/vascan.log {}",
  497. [0,3], [1,2,5],
  498. qr/(?x)^\s* (?:virus|iworm|macro|mutant|sequence|trojan)\ found:\ ( [^\]\s']+ )\ \.\.\.\ /m ],
  499. # Adjust the path of the binary and the virus database as needed.
  500. # 'vascan' does not allow to have the temp directory to be the same as
  501. # the quarantine directory, and the quarantine option can not be disabled.
  502. # If $QUARANTINEDIR is not used, then another directory must be specified
  503. # to appease 'vascan'. Move status 3 to the second list if password
  504. # protected files are to be considered infected.
  505.  
  506. ### http://www.avira.com/
  507. ### old Avira AntiVir 2.x (ex H+BEDV) or old CentralCommand Vexira Antivirus
  508. ['Avira AntiVir', ['antivir','vexira'],
  509. '--allfiles -noboot -nombr -rs -s -z {}', [0], qr/ALERT:|VIRUS:/m,
  510. qr/(?x)^\s* (?: ALERT: \s* (?: \[ | [^']* ' ) |
  511. (?i) VIRUS:\ .*?\ virus\ '?) ( [^\]\s']+ )/m ],
  512. # NOTE: if you only have a demo version, remove -z and add 214, as in:
  513. # '--allfiles -noboot -nombr -rs -s {}', [0,214], qr/ALERT:|VIRUS:/,
  514.  
  515. ### http://www.avira.com/
  516. ### Avira for UNIX 3.x
  517. ['Avira AntiVir', ['avscan'],
  518. '-s --batch --alert-action=none {}', [0,4], qr/(?:ALERT|FUND):/m,
  519. qr/(?:ALERT|FUND): (?:.* <<< )?(.+?)(?: ; |$)/m ],
  520.  
  521. ### http://www.commandsoftware.com/
  522. ['Command AntiVirus for Linux', 'csav',
  523. '-all -archive -packed {}', [50], [51,52,53],
  524. qr/Infection: (.+)/m ],
  525.  
  526. ### http://www.symantec.com/
  527. ['Symantec CarrierScan via Symantec CommandLineScanner',
  528. 'cscmdline', '-a scan -i 1 -v -s 127.0.0.1:7777 {}',
  529. qr/^Files Infected:\s+0$/m, qr/^Infected\b/m,
  530. qr/^(?:Info|Virus Name):\s+(.+)/m ],
  531.  
  532. ### http://www.symantec.com/
  533. ['Symantec AntiVirus Scan Engine',
  534. 'savsecls', '-server 127.0.0.1:7777 -mode scanrepair -details -verbose {}',
  535. [0], qr/^Infected\b/m,
  536. qr/^(?:Info|Virus Name):\s+(.+)/m ],
  537. # NOTE: check options and patterns to see which entry better applies
  538.  
  539. # ### http://www.f-secure.com/products/anti-virus/ version 5.52
  540. # ['F-Secure Antivirus for Linux servers',
  541. # ['/opt/f-secure/fsav/bin/fsav', 'fsav'],
  542. # '--virus-action1=report --archive=yes --auto=yes '.
  543. # '--dumb=yes --list=no --mime=yes {}', [0], [3,4,6,8],
  544. # qr/(?:infection|Infected|Suspected|Riskware): (.+)/m ],
  545. # # NOTE: internal archive handling may be switched off by '--archive=no'
  546. # # to prevent fsav from exiting with status 9 on broken archives
  547.  
  548. ### http://www.f-secure.com/ version 9.14
  549. ['F-Secure Linux Security',
  550. ['/opt/f-secure/fsav/bin/fsav', 'fsav'],
  551. '--virus-action1=report --archive=yes --auto=yes '.
  552. '--list=no --nomimeerr {}', [0], [3,4,6,8],
  553. qr/(?:infection|Infected|Suspected|Riskware): (.+)/m ],
  554. # NOTE: internal archive handling may be switched off by '--archive=no'
  555. # to prevent fsav from exiting with status 9 on broken archives
  556.  
  557. # ### http://www.avast.com/
  558. # ['avast! Antivirus daemon',
  559. # \&ask_daemon, # greets with 220, terminate with QUIT
  560. # ["SCAN {}\015\012QUIT\015\012", '/var/run/avast4/mailscanner.sock'],
  561. # qr/\t\[\+\]/m, qr/\t\[L\]\t/m, qr/\t\[L\]\t[0-9]+\s+([^[ \t\015\012]+)/m ],
  562.  
  563. # ### http://www.avast.com/
  564. # ['avast! Antivirus - Client/Server Version', 'avastlite',
  565. # '-a /var/run/avast4/mailscanner.sock -n {}', [0], [1],
  566. # qr/\t\[L\]\t([^[ \t\015\012]+)/m ],
  567.  
  568. ['CAI InoculateIT', 'inocucmd', # retired product
  569. '-sec -nex {}', [0], [100],
  570. qr/was infected by virus (.+)/m ],
  571. # see: http://www.flatmtn.com/computer/Linux-Antivirus_CAI.html
  572.  
  573. ### http://www3.ca.com/Solutions/Product.asp?ID=156 (ex InoculateIT)
  574. ['CAI eTrust Antivirus', 'etrust-wrapper',
  575. '-arc -nex -spm h {}', [0], [101],
  576. qr/is infected by virus: (.+)/m ],
  577. # NOTE: requires suid wrapper around inocmd32; consider flag: -mod reviewer
  578. # see http://marc.theaimsgroup.com/?l=amavis-user&m=109229779912783
  579.  
  580. ### http://mks.com.pl/english.html
  581. ['MkS_Vir for Linux (beta)', ['mks32','mks'],
  582. '-s {}/*', [0], [1,2],
  583. qr/--[ \t]*(.+)/m ],
  584.  
  585. ### http://mks.com.pl/english.html
  586. ['MkS_Vir daemon', 'mksscan',
  587. '-s -q {}', [0], [1..7],
  588. qr/^... (\S+)/m ],
  589.  
  590. # ### http://www.nod32.com/, version v2.52 (old)
  591. # ['ESET NOD32 for Linux Mail servers',
  592. # ['/opt/eset/nod32/bin/nod32cli', 'nod32cli'],
  593. # '--subdir --files -z --sfx --rtp --adware --unsafe --pattern --heur '.
  594. # '-w -a --action-on-infected=accept --action-on-uncleanable=accept '.
  595. # '--action-on-notscanned=accept {}',
  596. # [0,3], [1,2], qr/virus="([^"]+)"/m ],
  597.  
  598. # ### http://www.eset.com/, version v2.7 (old)
  599. # ['ESET NOD32 Linux Mail Server - command line interface',
  600. # ['/usr/bin/nod32cli', '/opt/eset/nod32/bin/nod32cli', 'nod32cli'],
  601. # '--subdir {}', [0,3], [1,2], qr/virus="([^"]+)"/m ],
  602.  
  603. # ### http://www.eset.com/, version 2.71.12
  604. # ['ESET Software ESETS Command Line Interface',
  605. # ['/usr/bin/esets_cli', 'esets_cli'],
  606. # '--subdir {}', [0], [1,2,3], qr/virus="([^"]+)"/m ],
  607.  
  608. ### http://www.eset.com/, version 3.0
  609. ['ESET Software ESETS Command Line Interface',
  610. ['/usr/bin/esets_cli', 'esets_cli'],
  611. '--subdir {}', [0], [1,2,3],
  612. qr/:\s*action="(?!accepted)[^"]*"\n.*:\s*virus="([^"]*)"/m ],
  613.  
  614. ## http://www.nod32.com/, NOD32LFS version 2.5 and above
  615. ['ESET NOD32 for Linux File servers',
  616. ['/opt/eset/nod32/sbin/nod32','nod32'],
  617. '--files -z --mail --sfx --rtp --adware --unsafe --pattern --heur '.
  618. '-w -a --action=1 -b {}',
  619. [0], [1,10], qr/^object=.*, virus="(.*?)",/m ],
  620.  
  621. # Experimental, based on posting from Rado Dibarbora (Dibo) on 2002-05-31
  622. # ['ESET Software NOD32 Client/Server (NOD32SS)',
  623. # \&ask_daemon2, # greets with 200, persistent, terminate with QUIT
  624. # ["SCAN {}/*\r\n", '127.0.0.1:8448' ],
  625. # qr/^200 File OK/m, qr/^201 /m, qr/^201 (.+)/m ],
  626.  
  627. ### http://www.norman.com/products_nvc.shtml
  628. ['Norman Virus Control v5 / Linux', 'nvcc',
  629. '-c -l:0 -s -u -temp:$TEMPBASE {}', [0,10,11], [1,2,14],
  630. qr/(?i).* virus in .* -> \'(.+)\'/m ],
  631.  
  632. ### http://www.pandasoftware.com/
  633. ['Panda CommandLineSecure 9 for Linux',
  634. ['/opt/pavcl/usr/bin/pavcl','pavcl'],
  635. '-auto -aex -heu -cmp -nbr -nor -nos -eng -nob {}',
  636. qr/Number of files infected[ .]*: 0+(?!\d)/m,
  637. qr/Number of files infected[ .]*: 0*[1-9]/m,
  638. qr/Found virus :\s*(\S+)/m ],
  639. # NOTE: for efficiency, start the Panda in resident mode with 'pavcl -tsr'
  640. # before starting amavisd - the bases are then loaded only once at startup.
  641. # To reload bases in a signature update script:
  642. # /opt/pavcl/usr/bin/pavcl -tsr -ulr; /opt/pavcl/usr/bin/pavcl -tsr
  643. # Please review other options of pavcl, for example:
  644. # -nomalw, -nojoke, -nodial, -nohackt, -nospyw, -nocookies
  645.  
  646. # ### http://www.pandasoftware.com/
  647. # ['Panda Antivirus for Linux', ['pavcl'],
  648. # '-TSR -aut -aex -heu -cmp -nbr -nor -nso -eng {}',
  649. # [0], [0x10, 0x30, 0x50, 0x70, 0x90, 0xB0, 0xD0, 0xF0],
  650. # qr/Found virus :\s*(\S+)/m ],
  651.  
  652. # GeCAD AV technology is acquired by Microsoft; RAV has been discontinued.
  653. # Check your RAV license terms before fiddling with the following two lines!
  654. # ['GeCAD RAV AntiVirus 8', 'ravav',
  655. # '--all --archive --mail {}', [1], [2,3,4,5], qr/Infected: (.+)/m ],
  656. # # NOTE: the command line switches changed with scan engine 8.5 !
  657. # # (btw, assigning stdin to /dev/null causes RAV to fail)
  658.  
  659. ### http://www.nai.com/
  660. ['NAI McAfee AntiVirus (uvscan)', 'uvscan',
  661. '--secure -rv --mime --summary --noboot - {}', [0], [13],
  662. qr/(?x) Found (?:
  663. \ the\ (.+)\ (?:virus|trojan) |
  664. \ (?:virus|trojan)\ or\ variant\ ([^ ]+) |
  665. :\ (.+)\ NOT\ a\ virus)/m,
  666. # sub {$ENV{LD_PRELOAD}='/lib/libc.so.6'},
  667. # sub {delete $ENV{LD_PRELOAD}},
  668. ],
  669. # NOTE1: with RH9: force the dynamic linker to look at /lib/libc.so.6 before
  670. # anything else by setting environment variable LD_PRELOAD=/lib/libc.so.6
  671. # and then clear it when finished to avoid confusing anything else.
  672. # NOTE2: to treat encrypted files as viruses replace the [13] with:
  673. # qr/^\s{5,}(Found|is password-protected|.*(virus|trojan))/
  674.  
  675. ### http://www.virusbuster.hu/en/
  676. ['VirusBuster', ['vbuster', 'vbengcl'],
  677. "{} -ss -i '*' -log=$MYHOME/vbuster.log", [0], [1],
  678. qr/: '(.*)' - Virus/m ],
  679. # VirusBuster Ltd. does not support the daemon version for the workstation
  680. # engine (vbuster-eng-1.12-linux-i386-libc6.tgz) any longer. The names of
  681. # binaries, some parameters AND return codes have changed (from 3 to 1).
  682. # See also the new Vexira entry 'vascan' which is possibly related.
  683.  
  684. # ### http://www.virusbuster.hu/en/
  685. # ['VirusBuster (Client + Daemon)', 'vbengd',
  686. # '-f -log scandir {}', [0], [3],
  687. # qr/Virus found = (.*);/m ],
  688. # # HINT: for an infected file it always returns 3,
  689. # # although the man-page tells a different story
  690.  
  691. ### http://www.cyber.com/
  692. ['CyberSoft VFind', 'vfind',
  693. '--vexit {}/*', [0], [23], qr/##==>>>> VIRUS ID: CVDL (.+)/m,
  694. # sub {$ENV{VSTK_HOME}='/usr/lib/vstk'},
  695. ],
  696.  
  697. ### http://www.avast.com/
  698. ['avast! Antivirus', ['/usr/bin/avastcmd','avastcmd'],
  699. '-a -i -n -t=A {}', [0], [1], qr/\binfected by:\s+([^ \t\n\[\]]+)/m ],
  700.  
  701. ### http://www.ikarus-software.com/
  702. ['Ikarus AntiVirus for Linux', 'ikarus',
  703. '{}', [0], [40], qr/Signature (.+) found/m ],
  704.  
  705. ### http://www.bitdefender.com/
  706. ['BitDefender', 'bdscan', # new version
  707. '--action=ignore --no-list {}', qr/^Infected files\s*:\s*0+(?!\d)/m,
  708. qr/^(?:Infected files|Identified viruses|Suspect files)\s*:\s*0*[1-9]/m,
  709. qr/(?:suspected|infected)\s*:\s*(.*)(?:\033|$)/m ],
  710.  
  711. ### http://www.bitdefender.com/
  712. ['BitDefender', 'bdc', # old version
  713. '--arc --mail {}', qr/^Infected files *:0+(?!\d)/m,
  714. qr/^(?:Infected files|Identified viruses|Suspect files) *:0*[1-9]/m,
  715. qr/(?:suspected|infected): (.*)(?:\033|$)/m ],
  716. # consider also: --all --nowarn --alev=15 --flev=15. The --all argument may
  717. # not apply to your version of bdc, check documentation and see 'bdc --help'
  718.  
  719. ### ArcaVir for Linux and Unix http://www.arcabit.pl/
  720. ['ArcaVir for Linux', ['arcacmd','arcacmd.static'],
  721. '-v 1 -summary 0 -s {}', [0], [1,2],
  722. qr/(?:VIR|WIR):[ \t]*(.+)/m ],
  723.  
  724. # ### a generic SMTP-client interface to a SMTP-based virus scanner
  725. # ['av_smtp', \&ask_av_smtp,
  726. # ['{}', 'smtp:[127.0.0.1]:5525', 'dummy@localhost'],
  727. # qr/^2/, qr/^5/, qr/^\s*(.*?)\s*$/m ],
  728.  
  729. # ['File::Scan', sub {Amavis::AV::ask_av(sub{
  730. # use File::Scan; my($fn)=@_;
  731. # my($f)=File::Scan->new(max_txt_size=>0, max_bin_size=>0);
  732. # my($vname) = $f->scan($fn);
  733. # $f->error ? (2,"Error: ".$f->error)
  734. # : ($vname ne '') ? (1,"$vname FOUND") : (0,"Clean")}, @_) },
  735. # ["{}/*"], [0], [1], qr/^(.*) FOUND$/m ],
  736.  
  737. # ### fully-fledged checker for JPEG marker segments of invalid length
  738. # ['check-jpeg',
  739. # sub { use JpegTester (); Amavis::AV::ask_av(\&JpegTester::test_jpeg, @_) },
  740. # ["{}/*"], undef, [1], qr/^(bad jpeg: .*)$/m ],
  741. # # NOTE: place file JpegTester.pm somewhere where Perl can find it,
  742. # # for example in /usr/local/lib/perl5/site_perl
  743.  
  744. );
  745.  
  746.  
  747. @av_scanners_backup = (
  748.  
  749. ### http://www.clamav.net/ - backs up clamd or Mail::ClamAV
  750. ['ClamAV-clamscan', 'clamscan',
  751. "--stdout --no-summary -r --tempdir=$TEMPBASE {}",
  752. [0], qr/:.*\sFOUND$/m, qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
  753.  
  754. # ### http://www.clamav.net/ - using remote clamd scanner as a backup
  755. # ['ClamAV-clamdscan', 'clamdscan',
  756. # "--stdout --no-summary --config-file=/etc/clamd-client.conf {}",
  757. # [0], qr/:.*\sFOUND$/m, qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
  758.  
  759. # ['ClamAV-clamd-stream',
  760. # \&ask_daemon, ["*", 'clamd:/var/run/clamav/clamd.sock'],
  761. # qr/\bOK$/m, qr/\bFOUND$/m,
  762. # qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
  763.  
  764. ### http://www.f-prot.com/ - backs up F-Prot Daemon, V6
  765. ['F-PROT Antivirus for UNIX', ['fpscan'],
  766. '--report --mount --adware {}', # consider: --applications -s 4 -u 3 -z 10
  767. [0,8,64], [1,2,3, 4+1,4+2,4+3, 8+1,8+2,8+3, 12+1,12+2,12+3],
  768. qr/^\[Found\s+[^\]]*\]\s+<([^ \t(>]*)/m ],
  769.  
  770. ### http://www.f-prot.com/ - backs up F-Prot Daemon (old)
  771. ['FRISK F-Prot Antivirus', ['f-prot','f-prot.sh'],
  772. '-dumb -archive -packed {}', [0,8], [3,6], # or: [0], [3,6,8],
  773. qr/(?:Infection:|security risk named) (.+)|\s+contains\s+(.+)$/m ],
  774.  
  775. ### http://www.trendmicro.com/ - backs up Trophie
  776. ['Trend Micro FileScanner', ['/etc/iscan/vscan','vscan'],
  777. '-za -a {}', [0], qr/Found virus/m, qr/Found virus (.+) in/m ],
  778.  
  779. ### http://www.sald.com/, http://drweb.imshop.de/ - backs up DrWebD
  780. ['drweb - DrWeb Antivirus', # security LHA hole in Dr.Web 4.33 and earlier
  781. ['/usr/local/drweb/drweb', '/opt/drweb/drweb', 'drweb'],
  782. '-path={} -al -go -ot -cn -upn -ok-',
  783. [0,32], [1,9,33], qr' infected (?:with|by)(?: virus)? (.*)$'m ],
  784.  
  785. ### http://www.kaspersky.com/
  786. ['Kaspersky Antivirus v5.5',
  787. ['/opt/kaspersky/kav4fs/bin/kav4fs-kavscanner',
  788. '/opt/kav/5.5/kav4unix/bin/kavscanner',
  789. '/opt/kav/5.5/kav4mailservers/bin/kavscanner', 'kavscanner'],
  790. '-i0 -xn -xp -mn -R -ePASBME {}/*', [0,10,15], [5,20,21,25],
  791. qr/(?:INFECTED|WARNING|SUSPICION|SUSPICIOUS) (.*)/m,
  792. # sub {chdir('/opt/kav/bin') or die "Can't chdir to kav: $!"},
  793. # sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"},
  794. ],
  795.  
  796. ### http://www.sophos.com/
  797. ['Sophos Anti Virus (savscan)', # formerly known as 'sweep'
  798. ['/opt/sophos-av/bin/savscan', 'savscan'], # 'sweep'
  799. '-nb -f -all -rec -ss -sc -archive -cab -mime -oe -tnef '.
  800. '--no-reset-atime {}',
  801. [0,2], qr/Virus .*? found/m,
  802. qr/^>>> Virus(?: fragment)? '?(.*?)'? found/m,
  803. ],
  804. # other options to consider: -idedir=/usr/local/sav
  805. # A name 'sweep' clashes with a name of an audio editor (Debian and FreeBSD).
  806. # Make sure the correct 'sweep' is found in the path if using the old name.
  807.  
  808. # Always succeeds and considers mail clean.
  809. # Potentially useful when all other scanners fail and it is desirable
  810. # to let mail continue to flow with no virus checking (when uncommented).
  811. # ['always-clean', sub {0}],
  812.  
  813. );
  814.  
  815.  
  816. 1; # insure a defined return value
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement