Subversion Repositories configs

Rev

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