Subversion Repositories configs

Rev

Details | Last modification | View Log | RSS feed

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