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