Subversion Repositories configs

Rev

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