3 # Configuration file for amavisd-new
4 # Defaults modified for the Debian amavisd-new package
5 # $Id: amavisd.conf,v 1.27.2.2 2004/11/18 23:27:55 hmh Exp $
7 # This software is licensed under the GNU General Public License (GPL).
8 # See comments at the start of amavisd-new for the whole license text.
11 # Section I - Essential daemon and MTA settings
12 # Section II - MTA specific
13 # Section III - Logging
14 # Section IV - Notifications/DSN, BOUNCE/REJECT/DROP/PASS destiny, quarantine
15 # Section V - Per-recipient and per-sender handling, whitelisting, etc.
16 # Section VI - Resource limits
17 # Section VII - External programs, virus scanners, SpamAssassin
18 # Section VIII - Debugging
21 # This file is a normal Perl code, interpreted by Perl itself.
22 # - make sure this file (or directory where it resides) is NOT WRITABLE
23 # by mere mortals (not even vscan/amavis; best to make it owned by root),
24 # otherwise it represents a severe security risk!
25 # - for values which are interpreted as booleans, it is recommended
26 # to use 1 for true, undef for false.
27 # THIS IS DIFFERENT FROM OLD AMAVIS VERSIONS where "no" also meant false,
28 # now it means true, like any nonempty string does!
29 # - Perl syntax applies. Most notably: strings in "" may include variables
30 # (which start with $ or @); to include characters @ and $ in double
31 # quoted strings, precede them by a backslash; in single-quoted strings
32 # the $ and @ lose their special meaning, so it is usually easier to use
33 # single quoted strings (or qw operator) for e-mail addresses.
34 # Still, in both cases a backslash needs to be doubled.
35 # - variables with names starting with a '@' are lists, the values assigned
36 # to them should be lists as well, e.g. ('one@foo', $mydomain, "three");
37 # note the comma-separation and parenthesis. If strings in the list
38 # do not contain spaces nor variables, a Perl operator qw() may be used
39 # as a shorthand to split its argument on whitespace and produce a list
40 # of strings, e.g. qw( one@foo example.com three ); Note that the argument
41 # to qw is quoted implicitly and no variable interpretation is done within
42 # (no '$' variable evaluations). The #-initiated comments can NOT be used
43 # within a string. In other words, $ and # lose their special meaning
44 # within a qw argument, just like within '...' strings.
45 # - all e-mail addresses in this file and as used internally by the daemon
46 # are in their raw (rfc2821-unquoted and non-bracketed) form, i.e.
47 # Bob "Funny" Dude@example.com, not: "Bob \"Funny\" Dude"@example.com
48 # and not <"Bob \"Funny\" Dude"@example.com>; also: '' and not '<>'.
49 # - the term 'default value' in examples below refers to the value of a
50 # variable pre-assigned to it by the program; any explicit assignment
51 # to a variable in this configuration file overrides the default value;
55 # Section I - Essential daemon and MTA settings
58 # $MYHOME serves as a quick default for some other configuration settings.
59 # More refined control is available with each individual setting further down.
60 # $MYHOME is not used directly by the program. No trailing slash!
61 $MYHOME = '/var/lib/amavis'; # (default is '/var/amavis')
63 # $mydomain serves as a quick default for some other configuration settings.
64 # More refined control is available with each individual setting further down.
65 # $mydomain is never used directly by the program.
66 $mydomain = '_CN_DOMAIN_'; # (no useful default)
68 # $myhostname = 'host.example.com'; # fqdn of this host, default by uname(3)
70 # Set the user and group to which the daemon will change if started as root
71 # (otherwise just keeps the UID unchanged, and these settings have no effect):
72 $daemon_user = 'amavis'; # (no default (undef))
73 $daemon_group = 'amavis'; # (no default (undef))
75 # Runtime working directory (cwd), and a place where
76 # temporary directories for unpacking mail are created.
77 # if you change this, you might want to modify the cleanup()
78 # function in /etc/init.d/amavisd-new
79 # (no trailing slash, may be a scratch file system)
80 $TEMPBASE = $MYHOME; # (must be set if other config vars use is)
81 #$TEMPBASE = "$MYHOME/tmp"; # prefer to keep home dir /var/amavis clean?
83 # $helpers_home sets environment variable HOME, and is passed as option
84 # 'home_dir_for_helpers' to Mail::SpamAssassin::new. It should be a directory
85 # on a normal persistent file system, not a scratch or temporary file system
86 #$helpers_home = $MYHOME; # (defaults to $MYHOME)
88 # Run the daemon in the specified chroot jail if nonempty:
89 #$daemon_chroot_dir = $MYHOME; # (default is undef, meaning: do not chroot)
91 $pid_file = "/var/run/amavis/amavisd.pid"; # (default: "$MYHOME/amavisd.pid")
92 $lock_file = "/var/run/amavis/amavisd.lock"; # (default: "$MYHOME/amavisd.lock")
94 # set environment variables if you want (no defaults):
95 $ENV{TMPDIR} = $TEMPBASE; # wise to set TMPDIR, but not obligatory
99 # MTA SETTINGS, UNCOMMENT AS APPROPRIATE,
100 # both $forward_method and $notify_method default to 'smtp:127.0.0.1:10025'
102 # POSTFIX, or SENDMAIL in dual-MTA setup, or EXIM V4
103 # (set host and port number as required; host can be specified
104 # as IP address or DNS name (A or CNAME, but MX is ignored)
105 $forward_method = 'smtp:127.0.0.1:10025'; # where to forward checked mail
106 $notify_method = $forward_method; # where to submit notifications
108 # NOTE: The defaults (above) are good for Postfix or dual-sendmail. You MUST
109 # uncomment the appropriate settings below if using other setups!
111 # SENDMAIL MILTER, using amavis-milter.c helper program:
112 # SEE amavisd-new-milter package docs FOR DEBIAN INSTRUCTIONS
113 #$forward_method = undef; # no explicit forwarding, sendmail does it by itself
114 # milter; option -odd is needed to avoid deadlocks
115 #$notify_method = 'pipe:flags=q argv=/usr/sbin/sendmail -Ac -i -odd -f ${sender} -- ${recipient}';
116 # just a thought: can we use use -Am instead of -odd ?
118 # SENDMAIL (old non-milter setup, as relay):
119 #$forward_method = 'pipe:flags=q argv=/usr/sbin/sendmail -C/etc/sendmail.orig.cf -i -f ${sender} -- ${recipient}';
120 #$notify_method = $forward_method;
122 # SENDMAIL (old non-milter setup, amavis.c calls local delivery agent):
123 #$forward_method = undef; # no explicit forwarding, amavis.c will call LDA
124 #$notify_method = 'pipe:flags=q argv=/usr/sbin/sendmail -Ac -i -f ${sender} -- ${recipient}';
126 # EXIM v3 (not recommended with v4 or later, which can use SMTP setup instead):
127 #$forward_method = 'pipe:flags=q argv=/usr/sbin/exim -oMr scanned-ok -i -f ${sender} -- ${recipient}';
128 #$notify_method = $forward_method;
130 # prefer to collect mail for forwarding as BSMTP files?
131 #$forward_method = "bsmtp:$MYHOME/out-%i-%n.bsmtp";
132 #$notify_method = $forward_method;
135 # Net::Server pre-forking settings
136 # You may want $max_servers to match the width of your MTA pipe
137 # feeding amavisd, e.g. with Postfix the 'Max procs' field in the
138 # master.cf file, like the '2' in the: smtp-amavis unix - - n - 2 smtp
140 $max_servers = 2; # number of pre-forked children (default 2)
141 $max_requests = 10; # retire a child after that many accepts (default 10)
143 $child_timeout=5*60; # abort child if it does not complete each task in n sec
144 # (default: 8*60 seconds)
146 # Check also the settings of @av_scanners at the end if you want to use
147 # virus scanners. If not, you may want to delete the whole long assignment
148 # to the variable @av_scanners, which will also remove the virus checking
149 # code (e.g. if you only want to do spam scanning).
151 # Here is a QUICK WAY to completely DISABLE some sections of code
152 # that WE DO NOT WANT (it won't even be compiled-in).
153 # For more refined controls leave the following two lines commented out,
154 # and see further down what these two lookup lists really mean.
156 # @bypass_virus_checks_acl = qw( . ); # uncomment to DISABLE anti-virus code
157 # @bypass_spam_checks_acl = qw( . ); # uncomment to DISABLE anti-spam code
159 # Any setting can be changed with a new assignment, so make sure
160 # you do not unintentionally override these settings further down!
162 # Lookup list of local domains (see README.lookups for syntax details)
165 # For backwards compatibility the variable names @local_domains (old) and
166 # @local_domains_acl (new) are synonyms. For consistency with other lookups
167 # the name @local_domains_acl is now preferred. It also makes it more
168 # obviously distinct from the new %local_domains hash lookup table.
170 # local_domains* lookup tables are used in deciding whether a recipient
171 # is local or not, or in other words, if the message is outgoing or not.
172 # This affects inserting spam-related headers for local recipients,
173 # limiting recipient virus notifications (if enabled) to local recipients,
174 # in deciding if address extension may be appended, and in SQL lookups
175 # for non-fqdn addresses. Set it up correctly if you need features
176 # that rely on this setting (or just leave empty otherwise).
178 # With Postfix (2.0) a quick reminder on what local domains normally are:
179 # a union of domains specified in: $mydestination, $virtual_alias_domains,
180 # $virtual_mailbox_domains, and $relay_domains.
182 #@local_domains_acl = ( ".$mydomain" ); # $mydomain and its subdomains
183 # @local_domains_acl = ( ".$mydomain", "my.other.domain" );
184 # @local_domains_acl = qw(); # default is empty, no recipient treated as local
185 # @local_domains_acl = qw( .example.com );
186 # @local_domains_acl = qw( .example.com !host.sub.example.net .sub.example.net );
187 @local_domains_acl = ( "$mydomain", ".$mydomain" );
189 # or alternatively(A), using a Perl hash lookup table, which may be assigned
190 # directly, or read from a file, one domain per line; comments and empty lines
191 # are ignored, a dot before a domain name implies its subdomains:
193 #read_hash(\%local_domains, '/etc/amavis/local_domains');
195 #or alternatively(B), using a list of regular expressions:
196 # $local_domains_re = new_RE( qr'[@.]example\.com$'i );
198 # see README.lookups for syntax and semantics
202 # Section II - MTA specific (defaults should be ok)
205 # if $relayhost_is_client is true, the IP address in $notify_method and
206 # $forward_method is dynamically overridden with SMTP client peer address
207 # (if available), which makes it possible for several hosts to share one
208 # daemon. The static port number is also overridden, and is dynamically
209 # calculated as being one above the incoming SMTP/LMTP session port number.
211 # These are logged at level 3, so enable logging until you know you got it
213 $relayhost_is_client = 0; # (defaults to false)
215 $insert_received_line = 1; # behave like MTA: insert 'Received:' header
216 # (does not apply to sendmail/milter)
217 # (default is true (1) )
219 # AMAVIS-CLIENT PROTOCOL INPUT SETTINGS (e.g. with sendmail milter)
220 # (used with amavis helper clients like amavis-milter.c and amavis.c,
221 # NOT needed for Postfix and Exim or dual-sendmail - keep it undefined.)
222 $unix_socketname = "/var/lib/amavis/amavisd.sock"; # amavis helper protocol socket
223 #$unix_socketname = undef; # disable listening on a unix socket
224 # (default is undef, i.e. disabled)
226 # Do we receive quoted or raw addresses from the helper program?
227 # (does not apply to SMTP; defaults to true)
228 #$gets_addr_in_quoted_form = 1; # "Bob \"Funny\" Dude"@example.com
229 #$gets_addr_in_quoted_form = 0; # Bob "Funny" Dude@example.com
233 # SMTP SERVER (INPUT) PROTOCOL SETTINGS (e.g. with Postfix, Exim v4, ...)
234 # (used when MTA is configured to pass mail to amavisd via SMTP or LMTP)
235 $inet_socket_port = 10024; # accept SMTP on this local TCP port
236 # (default is undef, i.e. disabled)
237 # multiple ports may be provided: $inet_socket_port = [10024, 10026, 10028];
239 # SMTP SERVER (INPUT) access control
240 # - do not allow free access to the amavisd SMTP port !!!
242 # when MTA is at the same host, use the following (one or the other or both):
243 $inet_socket_bind = '127.0.0.1'; # limit socket bind to loopback interface
244 # (default is '127.0.0.1')
245 #@inet_acl = qw( 127.0.0.1 ); # allow SMTP access only from localhost IP
246 # (default is qw( 127.0.0.1 ) )
248 # when MTA (one or more) is on a different host, use the following:
249 # @inet_acl = qw(127/8 10.1.0.1 10.1.0.2); # adjust the list as appropriate
250 # $inet_socket_bind = undef; # bind to all IP interfaces if undef
253 # @inet_acl = qw( 127/8 10/8 172.16/12 192.168/16 );
254 # permit only SMTP access from loopback and rfc1918 private address space
257 # @inet_acl = qw( !192.168.1.12 172.16.3.3 !172.16.3/255.255.255.0
258 # 127.0.0.1 10/8 172.16/12 192.168/16 );
259 # matches loopback and rfc1918 private address space except host 192.168.1.12
260 # and net 172.16.3/24 (but host 172.16.3.3 within 172.16.3/24 still matches)
263 # @inet_acl = qw( 127/8
264 # !172.16.3.0 !172.16.3.127 172.16.3.0/25
265 # !172.16.3.128 !172.16.3.255 172.16.3.128/25 );
266 # matches loopback and both halves of the 172.16.3/24 C-class,
267 # split into two subnets, except all four broadcast addresses
270 # See README.lookups for details on specifying access control lists.
274 # Section III - Logging
277 # true (e.g. 1) => syslog; false (e.g. 0) => logging to file
278 $DO_SYSLOG = 1; # (defaults to false)
279 #$SYSLOG_LEVEL = 'user.info'; # (facility.priority, default 'mail.info')
281 # Log file (if not using syslog)
282 $LOGFILE = "/var/log/amavis.log"; # (defaults to empty, no log)
284 #NOTE: levels are not strictly observed and are somewhat arbitrary
285 # 0: startup/exit/failure messages, viruses detected
286 # 1: args passed from client, some more interesting messages
287 # 2: virus scanner output, timing
290 # 5: more debug details
291 #$log_level = 2; # (defaults to 0)
293 # Customizable template for the most interesting log file entry (e.g. with
294 # $log_level=0) (take care to properly quote Perl special characters like '\')
295 # For a list of available macros see README.customize .
297 # only log infected messages (useful with log level 0):
298 # $log_templ = '[? %#V |[? %#F ||banned filename ([%F|,])]|infected ([%V|,])]#
299 # [? %#V |[? %#F ||, from=[?%o|(?)|<%o>], to=[<%R>|,][? %i ||, quarantine %i]]#
300 # |, from=[?%o|(?)|<%o>], to=[<%R>|,][? %i ||, quarantine %i]]';
302 # log both infected and noninfected messages (default):
303 $log_templ = '[? %#V |[? %#F |[?%#D|Not-Delivered|Passed]|BANNED name/type (%F)]|INFECTED (%V)], #
304 [?%o|(?)|<%o>] -> [<%R>|,][? %i ||, quarantine %i], Message-ID: %m, Hits: %c';
308 # Section IV - Notifications/DSN, BOUNCE/REJECT/DROP/PASS destiny, quarantine
311 # Select notifications text encoding when Unicode-aware Perl is converting
312 # text from internal character representation to external encoding (charset
313 # in MIME terminology). Used as argument to Perl Encode::encode subroutine.
315 # to be used in RFC 2047-encoded header field bodies, e.g. in Subject:
316 #$hdr_encoding = 'iso-8859-1'; # (default: 'iso-8859-1')
318 # to be used in notification body text: its encoding and Content-type.charset
319 #$bdy_encoding = 'iso-8859-1'; # (default: 'iso-8859-1')
321 # Default template texts for notifications may be overruled by directly
322 # assigning new text to template variables, or by reading template text
323 # from files. A second argument may be specified in a call to read_text(),
324 # specifying character encoding layer to be used when reading from the
325 # external file, e.g. 'utf8', 'iso-8859-1', or often just $bdy_encoding.
326 # Text will be converted to internal character representation by Perl 5.8.0
327 # or later; second argument is ignored otherwise. See PerlIO::encoding,
328 # Encode::PerlIO and perluniintro man pages.
330 # $notify_sender_templ = read_text('/var/amavis/notify_sender.txt');
331 # $notify_virus_sender_templ= read_text('/var/amavis/notify_virus_sender.txt');
332 # $notify_virus_admin_templ = read_text('/var/amavis/notify_virus_admin.txt');
333 # $notify_virus_recips_templ= read_text('/var/amavis/notify_virus_recips.txt');
334 # $notify_spam_sender_templ = read_text('/var/amavis/notify_spam_sender.txt');
335 # $notify_spam_admin_templ = read_text('/var/amavis/notify_spam_admin.txt');
337 # If notification template files are collectively available in some directory,
338 # use read_l10n_templates which calls read_text for each known template.
340 # read_l10n_templates('/etc/amavis/en_US');
342 # Debian available locales: en_US, pt_BR, de_DE, it_IT
343 read_l10n_templates('en_US', '/etc/amavis');
346 # Here is an overall picture (sequence of events) of how pieces fit together
347 # (only virus controls are shown, spam controls work the same way):
349 # bypass_virus_checks? ==> PASS
350 # no viruses? ==> PASS
351 # log virus if $log_templ is nonempty
352 # quarantine if $virus_quarantine_to is nonempty
353 # notify admin if $virus_admin (lookup) nonempty
354 # notify recips if $warnvirusrecip and (recipient is local or $warn_offsite)
355 # add address extensions if adding extensions is enabled and virus will pass
356 # send (non-)delivery notifications
357 # to sender if DSN needed (BOUNCE or ($warn_virus_sender and D_PASS))
358 # virus_lovers or final_destiny==D_PASS ==> PASS
359 # DISCARD (2xx) or REJECT (5xx) (depending on final_*_destiny)
361 # Equivalent flow diagram applies for spam checks.
362 # If a virus is detected, spam checking is skipped entirely.
364 # The following symbolic constants can be used in *destiny settings:
366 # D_PASS mail will pass to recipients, regardless of bad contents;
368 # D_DISCARD mail will not be delivered to its recipients, sender will NOT be
369 # notified. Effectively we lose mail (but will be quarantined
370 # unless disabled). Losing mail is not decent for a mailer,
371 # but might be desired.
373 # D_BOUNCE mail will not be delivered to its recipients, a non-delivery
374 # notification (bounce) will be sent to the sender by amavisd-new;
375 # Exception: bounce (DSN) will not be sent if a virus name matches
376 # $viruses_that_fake_sender_re, or to messages from mailing lists
377 # (Precedence: bulk|list|junk);
379 # D_REJECT mail will not be delivered to its recipients, sender should
380 # preferably get a reject, e.g. SMTP permanent reject response
381 # (e.g. with milter), or non-delivery notification from MTA
382 # (e.g. Postfix). If this is not possible (e.g. different recipients
383 # have different tolerances to bad mail contents and not using LMTP)
384 # amavisd-new sends a bounce by itself (same as D_BOUNCE).
387 # D_REJECT and D_BOUNCE are similar, the difference is in who is responsible
388 # for informing the sender about non-delivery, and how informative
389 # the notification can be (amavisd-new knows more than MTA);
390 # With D_REJECT, MTA may reject original SMTP, or send DSN (delivery status
391 # notification, colloquially called 'bounce') - depending on MTA;
392 # Best suited for sendmail milter, especially for spam.
393 # With D_BOUNCE, amavisd-new (not MTA) sends DSN (can better explain the
394 # reason for mail non-delivery, but unable to reject the original
395 # SMTP session). Best suited to reporting viruses, and for Postfix
396 # and other dual-MTA setups, which can't reject original client SMTP
397 # session, as the mail has already been enqueued.
399 $final_virus_destiny = D_DISCARD; # (defaults to D_BOUNCE)
400 $final_banned_destiny = D_REJECT; # (defaults to D_BOUNCE)
401 $final_spam_destiny = D_REJECT; # (defaults to D_REJECT)
402 $final_bad_header_destiny = D_PASS; # (defaults to D_PASS), D_BOUNCE suggested
404 # Alternatives to consider for spam:
405 # - use D_PASS if clients will do filtering based on inserted mail headers;
406 # - use D_DISCARD, if kill_level is set safely high;
407 # - use D_BOUNCE instead of D_REJECT if not using milter;
409 # D_BOUNCE is preferred for viruses, but consider:
410 # - use D_DISCARD to avoid bothering the rest of the network, it is hopeless
411 # to try to keep up with the viruses that faker the envelope sender anyway,
412 # and bouncing only increases the network cost of viruses for everyone
413 # - use D_PASS (or virus_lovers) and $warnvirussender=1 to deliver viruses;
414 # - use D_REJECT instead of D_BOUNCE if using milter and under heavy
417 # Don't bother to set both D_DISCARD and $warn*sender=1, it will get mapped
420 # The separation of *_destiny values into D_BOUNCE, D_REJECT, D_DISCARD
421 # and D_PASS made settings $warnvirussender and $warnspamsender only still
422 # useful with D_PASS.
424 # The following $warn*sender settings are ONLY used when mail is
425 # actually passed to recipients ($final_*_destiny=D_PASS, or *_lovers*).
426 # Bounces or rejects produce non-delivery status notification anyway.
428 # Notify virus sender?
429 #$warnvirussender = 1; # (defaults to false (undef))
431 # Notify spam sender?
432 #$warnspamsender = 1; # (defaults to false (undef))
434 # Notify sender of banned files?
435 #$warnbannedsender = 1; # (defaults to false (undef))
437 # Notify sender of syntactically invalid header containing non-ASCII characters?
438 #$warnbadhsender = 1; # (defaults to false (undef))
440 # Notify virus (or banned files) RECIPIENT?
441 # (not very useful, but some policies demand it)
442 #$warnvirusrecip = 1; # (defaults to false (undef))
443 #$warnbannedrecip = 1; # (defaults to false (undef))
445 # Notify also non-local virus/banned recipients if $warn*recip is true?
446 # (including those not matching local_domains*)
447 #$warn_offsite = 1; # (defaults to false (undef), i.e. only notify locals)
450 # Treat envelope sender address as unreliable and don't send sender
451 # notification / bounces if name(s) of detected virus(es) match the list.
452 # Note that virus names are supplied by external virus scanner(s) and are
453 # not standardized, so virus names may need to be adjusted.
454 # See README.lookups for syntax, check also README.policy-on-notifications
456 $viruses_that_fake_sender_re = new_RE(
457 qr'nimda|hybris|klez|bugbear|yaha|braid|sobig|fizzer|palyh|peido|holar'i,
458 qr'tanatos|lentin|bridex|mimail|trojan\.dropper|dumaru|parite|spaces'i,
459 qr'dloader|galil|gibe|swen|netwatch|bics|sbrowse|sober|rox|val(hal)?la'i,
460 qr'frethem|sircam|be?agle|tanx|mydoom|novarg|shimg|netsky|somefool|moodown'i,
461 qr'@mm|@MM', # mass mailing viruses as labeled by f-prot and uvscan
462 qr'Worm'i, # worms as labeled by ClamAV, Kaspersky, etc
463 [qr'^(EICAR|Joke\.|Junk\.)'i => 0],
464 [qr'^(WM97|OF97|W95/CIH-|JS/Fort)'i => 0],
465 [qr/.*/ => 1], # true by default (remove or comment-out if undesired)
468 # where to send ADMIN VIRUS NOTIFICATIONS (should be a fully qualified address)
469 # - the administrator address may be a simple fixed e-mail address (a scalar),
470 # or may depend on the SENDER address (e.g. its domain), in which case
471 # a ref to a hash table can be specified (specify lower-cased keys,
472 # dot is a catchall, see README.lookups).
474 # Empty or undef lookup disables virus admin notifications.
476 # $virus_admin = undef; # do not send virus admin notifications (default)
477 # $virus_admin = {'not.example.com' => '', '.' => 'virusalert@example.com'};
478 # $virus_admin = 'virus-admin@example.com';
479 #$virus_admin = "postmaster\@$mydomain"; # due to D_DISCARD default
480 $virus_admin = "virusalert\@$mydomain"; # due to D_DISCARD default
482 # equivalent to $virus_admin, but for spam admin notifications:
483 # $spam_admin = "spamalert\@$mydomain";
484 # $spam_admin = undef; # do not send spam admin notifications (default)
485 # $spam_admin = {'not.example.com' => '', '.' => 'spamalert@example.com'};
487 #advanced example, using a hash lookup table:
489 # 'baduser@sub1.example.com' => 'HisBoss@sub1.example.com',
490 # '.sub1.example.com' => 'virusalert@sub1.example.com',
491 # '.sub2.example.com' => '', # don't send admin notifications
492 # 'a.sub3.example.com' => 'abuse@sub3.example.com',
493 # '.sub3.example.com' => 'virusalert@sub3.example.com',
494 # '.example.com' => 'noc@example.com', # catchall for our virus senders
495 # '.' => 'virusalert@hq.example.com', # catchall for the rest
499 # whom notification reports are sent from (ENVELOPE SENDER);
500 # may be a null reverse path, or a fully qualified address:
501 # (admin and recip sender addresses default to $mailfrom
502 # for compatibility, which in turn defaults to undef (empty) )
503 # If using strings in double quotes, don't forget to quote @, i.e. \@
505 $mailfrom_notify_admin = "virusalert\@$mydomain";
506 $mailfrom_notify_recip = "virusalert\@$mydomain";
507 $mailfrom_notify_spamadmin = "spamalert\@$mydomain";
509 # 'From' HEADER FIELD for sender and admin notifications.
510 # This should be a replyable address, see rfc1894. Not to be confused
511 # with $mailfrom_notify_sender, which is the envelope return address
512 # and should be empty (null reverse path) according to rfc2821.
514 # The syntax of the 'From' header field is specified in rfc2822, section
515 # '3.4. Address Specification'. Note in particular that display-name must be
516 # a quoted-string if it contains any special characters like spaces and dots.
518 # $hdrfrom_notify_sender = "amavisd-new <postmaster\@$mydomain>";
519 # $hdrfrom_notify_sender = 'amavisd-new <postmaster@example.com>';
520 # $hdrfrom_notify_sender = '"Content-Filter Master" <postmaster@example.com>';
521 # (defaults to: "amavisd-new <postmaster\@$myhostname>")
522 # $hdrfrom_notify_admin = $mailfrom_notify_admin;
523 # (defaults to: $mailfrom_notify_admin)
524 # $hdrfrom_notify_spamadmin = $mailfrom_notify_spamadmin;
525 # (defaults to: $mailfrom_notify_spamadmin)
527 # whom quarantined messages appear to be sent from (envelope sender);
528 # keeps original sender if undef, or set it explicitly, default is undef
529 $mailfrom_to_quarantine = ''; # override sender address with null return path
532 # Location to put infected mail into: (applies to 'local:' quarantine method)
533 # empty for not quarantining, may be a file (mailbox),
534 # or a directory (no trailing slash)
535 # (the default value is undef, meaning no quarantine)
537 $QUARANTINEDIR = '/var/lib/amavis/virusmails';
539 #$virus_quarantine_method = "local:virus-%i-%n"; # default
540 #$spam_quarantine_method = "local:spam-%b-%i-%n"; # default
542 #use the new 'bsmtp:' method as an alternative to the default 'local:'
543 #$virus_quarantine_method = "bsmtp:$QUARANTINEDIR/virus-%i-%n.bsmtp";
544 #$spam_quarantine_method = "bsmtp:$QUARANTINEDIR/spam-%b-%i-%n.bsmtp";
546 # When using the 'local:' quarantine method (default), the following applies:
548 # A finer control of quarantining is available through variable
549 # $virus_quarantine_to/$spam_quarantine_to. It may be a simple scalar string,
550 # or a ref to a hash lookup table, or a regexp lookup table object,
551 # which makes possible to set up per-recipient quarantine addresses.
553 # The value of scalar $virus_quarantine_to/$spam_quarantine_to (or a
554 # per-recipient lookup result from the hash table %$virus_quarantine_to)
555 # is/are interpreted as follows:
558 # empty or undef disables quarantine;
561 # a string NOT containing an '@';
562 # amavisd will behave as a local delivery agent (LDA) and will quarantine
563 # viruses to local files according to hash %local_delivery_aliases (pseudo
564 # aliases map) - see subroutine mail_to_local_mailbox() for details.
565 # Some of the predefined aliases are 'virus-quarantine' and 'spam-quarantine'.
566 # Setting $virus_quarantine_to ($spam_quarantine_to) to this string will:
568 # * if $QUARANTINEDIR is a directory, each quarantined virus will go
569 # to a separate file in the $QUARANTINEDIR directory (traditional
570 # amavis style, similar to maildir mailbox format);
572 # * otherwise $QUARANTINEDIR is treated as a file name of a Unix-style
573 # mailbox. All quarantined messages will be appended to this file.
574 # Amavisd child process must obtain an exclusive lock on the file during
575 # delivery, so this may be less efficient than using individual files
576 # or forwarding to MTA, and it may not work across NFS or other non-local
577 # file systems (but may be handy for pickup of quarantined files via IMAP
581 # any email address (must contain '@').
582 # The e-mail messages to be quarantined will be handed to MTA
583 # for delivery to the specified address. If a recipient address local to MTA
584 # is desired, you may leave the domain part empty, e.g. 'infected@', but the
585 # '@' character must nevertheless be included to distinguish it from variant 2.
587 # This method enables more refined delivery control made available by MTA
588 # (e.g. its aliases file, other local delivery agents, dealing with
589 # privileges and file locking when delivering to user's mailbox, nonlocal
590 # delivery and forwarding, fan-out lists). Make sure the mail-to-be-quarantined
591 # will not be handed back to amavisd for checking, as this will cause a loop
592 # (hopefully broken at some stage)! If this can be assured, notifications
593 # will benefit too from not being unnecessarily virus-scanned.
595 # By default this is safe to do with Postfix and Exim v4 and dual-sendmail
596 # setup, but probably not safe with sendmail milter interface without
599 # (the default value is undef, meaning no quarantine)
601 $virus_quarantine_to = 'virus-quarantine'; # traditional local quarantine
602 #$virus_quarantine_to = 'infected@'; # forward to MTA for delivery
603 #$virus_quarantine_to = "virus-quarantine\@$mydomain"; # similar
604 #$virus_quarantine_to = 'virus-quarantine@example.com'; # similar
605 #$virus_quarantine_to = undef; # no quarantine
607 #$virus_quarantine_to = new_RE( # per-recip multiple quarantines
608 # [qr'^user@example\.com$'i => 'infected@'],
609 # [qr'^(.*)@example\.com$'i => 'virus-${1}@example.com'],
610 # [qr'^(.*)(@[^@])?$'i => 'virus-${1}${2}'],
611 # [qr/.*/ => 'virus-quarantine'] );
614 # (the default value is undef, meaning no quarantine)
616 $spam_quarantine_to = 'spam-quarantine';
617 #$spam_quarantine_to = "spam-quarantine\@$mydomain";
618 #$spam_quarantine_to = new_RE( # per-recip multiple quarantines
619 # [qr'^(.*)@example\.com$'i => 'spam-${1}@example.com'],
620 # [qr/.*/ => 'spam-quarantine'] );
622 # In addition to per-recip quarantine, a by-sender lookup is possible. It is
623 # similar to $spam_quarantine_to, but the lookup key is the sender address:
624 #$spam_quarantine_bysender_to = undef; # dflt: no by-sender spam quarantine
627 # Add X-Virus-Scanned header field to mail?
628 $X_HEADER_TAG = 'X-Virus-Scanned'; # (default: undef)
629 # Leave empty to add no header # (default: undef)
630 $X_HEADER_LINE = "by $myversion (Debian) at $mydomain";
632 # a string to prepend to Subject (for local recipients only) if mail could
633 # not be decoded or checked entirely, e.g. due to password-protected archives
634 $undecipherable_subject_tag = '***UNCHECKED*** '; # undef disables it
636 $remove_existing_x_scanned_headers = 0; # leave existing X-Virus-Scanned alone
637 #$remove_existing_x_scanned_headers= 1; # remove existing headers
638 # (defaults to false)
639 #$remove_existing_spam_headers = 0; # leave existing X-Spam* headers alone
640 $remove_existing_spam_headers = 1; # remove existing spam headers if
641 # spam scanning is enabled (default)
643 # set $bypass_decode_parts to true if you only do spam scanning, or if you
644 # have a good virus scanner that can deal with compression and recursively
645 # unpacking archives by itself, and save amavisd the trouble.
646 # Disabling decoding also causes banned_files checking to only see
647 # MIME names and MIME content types, not the content classification types
648 # as provided by the file(1) utility.
649 # It is a double-edged sword, make sure you know what you are doing!
651 #$bypass_decode_parts = 1; # (defaults to false)
653 # don't trust this file type or corresponding unpacker for this file type,
654 # keep both the original and the unpacked file for a virus checker to see
655 # (lookup key is what file(1) utility returned):
657 $keep_decoded_original_re = new_RE(
658 # qr'^MAIL$', # retain full original message for virus checking (can be slow)
659 qr'^MAIL-UNDECIPHERABLE$', # retain full mail if it contains undecipherables
660 qr'^(ASCII(?! cpio)|text|uuencoded|xxencoded|binhex)'i,
661 # qr'^Zip archive data',
664 # Checking for banned MIME types and names. If any mail part matches,
665 # the whole mail is rejected, much like the way viruses are handled.
666 # A list in object $banned_filename_re can be defined to provide a list
667 # of Perl regular expressions to be matched against each part's:
669 # * Content-Type value (both declared and effective mime-type),
670 # including the possible security risk content types
671 # message/partial and message/external-body, as specified by rfc2046;
673 # * declared (i.e. recommended) file names as specified by MIME subfields
674 # Content-Disposition.filename and Content-Type.name, both in their
675 # raw (encoded) form and in rfc2047-decoded form if applicable;
677 # * file content type as guessed by 'file' utility, both the raw
678 # result from 'file', as well as short type name, classified
679 # into names such as .asc, .txt, .html, .doc, .jpg, .pdf,
680 # .zip, .exe, ... - see subroutine determine_file_types().
681 # This step is done only if $bypass_decode_parts is not true.
683 # * leave $banned_filename_re undefined to disable these checks
684 # (giving an empty list to new_RE() will also always return false)
686 $banned_filename_re = new_RE(
687 # qr'^UNDECIPHERABLE$', # is or contains any undecipherable components
688 qr'\.[^.]*\.(exe|vbs|pif|scr|bat|cmd|com|dll)$'i, # some double extensions
689 qr'[{}]', # curly braces in names (serve as Class ID extensions - CLSID)
690 # qr'.\.(exe|vbs|pif|scr|bat|cmd|com)$'i, # banned extension - basic
691 # qr'.\.(ade|adp|bas|bat|chm|cmd|com|cpl|crt|exe|hlp|hta|inf|ins|isp|js|
692 # jse|lnk|mdb|mde|msc|msi|msp|mst|pcd|pif|reg|scr|sct|shs|shb|vb|
693 # vbe|vbs|wsc|wsf|wsh)$'ix, # banned extension - long
694 # qr'.\.(mim|b64|bhx|hqx|xxe|uu|uue)$'i, # banned extension - WinZip vulnerab.
695 # qr'^\.(zip|lha|tnef|cab)$'i, # banned file(1) types
696 # qr'^\.exe$'i, # banned file(1) types
697 # qr'^application/x-msdownload$'i, # banned MIME types
698 # qr'^application/x-msdos-program$'i,
699 qr'^message/partial$'i, # rfc2046. this one is deadly for Outcrook
700 # qr'^message/external-body$'i, # block rfc2046
702 # See http://support.microsoft.com/default.aspx?scid=kb;EN-US;q262631
703 # and http://www.cknow.com/vtutor/vtextensions.htm
705 # A little trick: a pattern qr'\.exe$' matches both a short type name '.exe',
706 # as well as any file name which happens to end with .exe. If only matching
707 # a file name is desired, but not the short name, a pattern qr'.\.exe$'i
708 # or similar may be used, which requires that at least one character precedes
709 # the '.exe', and so it will never match short file types, which always start
714 # Section V - Per-recipient and per-sender handling, whitelisting, etc.
717 # %virus_lovers, @virus_lovers_acl and $virus_lovers_re lookup tables:
718 # (these should be considered policy options, they do not disable checks,
719 # see bypass*checks for that!)
721 # Exclude certain RECIPIENTS from virus filtering by adding their lower-cased
722 # envelope e-mail address (or domain only) to the hash %virus_lovers, or to
723 # the access list @virus_lovers_acl - see README.lookups and examples.
724 # Make sure the appropriate form (e.g. external/internal) of address
725 # is used in case of virtual domains, or when mapping external to internal
726 # addresses, etc. - this is MTA-specific.
728 # Notifications would still be generated however (see the overall
729 # picture above), and infected mail (if passed) gets additional header:
730 # X-AMaViS-Alert: INFECTED, message contains virus: ...
731 # (header not inserted with milter interface!)
733 # NOTE (milter interface only): in case of multiple recipients,
734 # it is only possible to drop or accept the message in its entirety - for all
735 # recipients. If all of them are virus lovers, we'll accept mail, but if
736 # at least one recipient is not a virus lover, we'll discard the message.
739 # %bypass_virus_checks, @bypass_virus_checks_acl and $bypass_virus_checks_re
741 # (this is mainly a time-saving option, unlike virus_lovers* !)
743 # Similar in concept to %virus_lovers, a hash %bypass_virus_checks,
744 # access list @bypass_virus_checks_acl and regexp list $bypass_virus_checks_re
745 # are used to skip entirely the decoding, unpacking and virus checking,
746 # but only if ALL recipients match the lookup.
748 # %bypass_virus_checks/@bypass_virus_checks_acl/$bypass_virus_checks_re
749 # do NOT GUARANTEE the message will NOT be checked for viruses - this may
750 # still happen when there is more than one recipient for a message, and
751 # not all of them match these lookup tables. To guarantee virus delivery,
752 # a recipient must also match %virus_lovers/@virus_lovers_acl lookups
753 # (but see milter limitations above),
755 # NOTE: it would not be clever to base virus checks on SENDER address,
756 # since there are no guarantees that it is genuine. Many viruses
757 # and spam messages fake sender address. To achieve selective filtering
758 # based on the source of the mail (e.g. IP address, MTA port number, ...),
759 # use mechanisms provided by MTA if available.
762 # Similar to lookup tables controlling virus checking, there exist
763 # spam scanning, banned names/types, and headers_checks control counterparts:
764 # %spam_lovers, @spam_lovers_acl, $spam_lovers_re
765 # %banned_files_lovers, @banned_files_lovers_acl, $banned_files_lovers_re
766 # %bad_header_lovers, @bad_header_lovers_acl, $bad_header_lovers_re
768 # %bypass_spam_checks/@bypass_spam_checks_acl/$bypass_spam_checks_re
769 # %bypass_banned_checks/@bypass_banned_checks_acl/$bypass_banned_checks_re
770 # %bypass_header_checks/@bypass_header_checks_acl/$bypass_header_checks_re
771 # See README.lookups for details about the syntax.
773 # The following example disables spam checking altogether,
774 # since it matches any recipient e-mail address (any address
775 # is a subdomain of the top-level root DNS domain):
776 # @bypass_spam_checks_acl = qw( . );
778 # @bypass_header_checks_acl = qw( user@example.com );
779 # @bad_header_lovers_acl = qw( user@example.com );
782 # See README.lookups for further detail, and examples below.
784 # $virus_lovers{lc("postmaster\@$mydomain")} = 1;
785 # $virus_lovers{lc('postmaster@example.com')} = 1;
786 # $virus_lovers{lc('abuse@example.com')} = 1;
787 # $virus_lovers{lc('some.user@')} = 1; # this recipient, regardless of domain
788 # $virus_lovers{lc('boss@example.com')} = 0; # never, even if domain matches
789 # $virus_lovers{lc('example.com')} = 1; # this domain, but not its subdomains
790 # $virus_lovers{lc('.example.com')}= 1; # this domain, including its subdomains
792 # @virus_lovers_acl = qw( me@lab.xxx.com !lab.xxx.com .xxx.com yyy.org );
794 # $bypass_virus_checks{lc('some.user2@butnot.example.com')} = 1;
795 # @bypass_virus_checks_acl = qw( some.ddd !butnot.example.com .example.com );
797 # @virus_lovers_acl = qw( postmaster@example.com );
798 # $virus_lovers_re = new_RE( qr'^(helpdesk|postmaster)@example\.com$'i );
800 # $spam_lovers{lc("postmaster\@$mydomain")} = 1;
801 # $spam_lovers{lc('postmaster@example.com')} = 1;
802 # $spam_lovers{lc('abuse@example.com')} = 1;
803 # @spam_lovers_acl = qw( !.example.com );
804 # $spam_lovers_re = new_RE( qr'^user@example\.com$'i );
806 # don't run spam check for these RECIPIENT domains:
807 # @bypass_spam_checks_acl = qw( d1.com .d2.com a.d3.com );
808 # or the other way around (bypass check for all BUT these):
809 # @bypass_spam_checks_acl = qw( !d1.com !.d2.com !a.d3.com . );
810 # a practical application: don't check outgoing mail for spam:
811 # @bypass_spam_checks_acl = ( "!.$mydomain", "." );
812 # (a downside of which is that such mail will not count as ham in SA bayes db)
815 # Where to find SQL server(s) and database to support SQL lookups?
816 # A list of triples: (dsn,user,passw). (dsn = data source name)
817 # More than one entry may be specified for multiple (backup) SQL servers.
818 # See 'man DBI', 'man DBD::mysql', 'man DBD::Pg', ... for details.
819 # When chroot-ed, accessing SQL server over inet socket may be more convenient.
822 # ( ['DBI:mysql:database=mail;host=127.0.0.1;port=3306', 'user1', 'passwd1'],
823 # ['DBI:mysql:database=mail;host=host2', 'username2', 'password2'] );
825 # ('mail' in the example is the database name, choose what you like)
826 # With PostgreSQL the dsn (first element of the triple) may look like:
827 # 'DBI:Pg:host=host1;dbname=mail'
829 # The SQL select clause to fetch per-recipient policy settings.
830 # The %k will be replaced by a comma-separated list of query addresses
831 # (e.g. full address, domain only, catchall). Use ORDER, if there
832 # is a chance that multiple records will match - the first match wins.
833 # If field names are not unique (e.g. 'id'), the later field overwrites the
834 # earlier in a hash returned by lookup, which is why we use '*,users.id'.
835 # $sql_select_policy = 'SELECT *,users.id FROM users,policy'.
836 # ' WHERE (users.policy_id=policy.id) AND (users.email IN (%k))'.
837 # ' ORDER BY users.priority DESC';
839 # The SQL select clause to check sender in per-recipient whitelist/blacklist
840 # The first SELECT argument '?' will be users.id from recipient SQL lookup,
841 # the %k will be sender addresses (e.g. full address, domain only, catchall).
842 # $sql_select_white_black_list = 'SELECT wb FROM wblist,mailaddr'.
843 # ' WHERE (wblist.rid=?) AND (wblist.sid=mailaddr.id)'.
844 # ' AND (mailaddr.email IN (%k))'.
845 # ' ORDER BY mailaddr.priority DESC';
847 $sql_select_white_black_list = undef; # undef disables SQL white/blacklisting
850 # If you decide to pass viruses (or spam) to certain recipients using the
851 # above lookup tables or using $final_virus_destiny=D_PASS, you can set
852 # the variable $addr_extension_virus ($addr_extension_spam) to some
853 # string, and the recipient address will have this string appended
854 # as an address extension to the local-part of the address. This extension
855 # can be used by final local delivery agent to place such mail in different
856 # folders. Leave these two variables undefined or empty strings to prevent
857 # appending address extensions. Setting has no effect on recipient which will
858 # not be receiving viruses/spam. Recipients who do not match lookup tables
859 # local_domains* are not affected.
861 # LDAs usually default to stripping away address extension if no special
862 # handling is specified, so having this option enabled normally does no harm,
863 # provided the $recipients_delimiter matches the setting on the final
866 # $addr_extension_virus = 'virus'; # (default is undef, same as empty)
867 # $addr_extension_spam = 'spam'; # (default is undef, same as empty)
868 # $addr_extension_banned = 'banned'; # (default is undef, same as empty)
871 # Delimiter between local part of the recipient address and address extension
872 # (which can optionally be added, see variables $addr_extension_virus and
873 # $addr_extension_spam). E.g. recipient address <user@example.com> gets changed
874 # to <user+virus@example.com>.
876 # Delimiter should match equivalent (final) MTA delimiter setting.
877 # (e.g. for Postfix add 'recipient_delimiter = +' to main.cf)
878 # Setting it to an empty string or to undef disables this feature
879 # regardless of $addr_extension_virus and $addr_extension_spam settings.
881 $recipient_delimiter = '+'; # (default is '+')
883 # true: replace extension; false: append extension
884 $replace_existing_extension = 1; # (default is false)
886 # Affects matching of localpart of e-mail addresses (left of '@')
887 # in lookups: true = case sensitive, false = case insensitive
888 $localpart_is_case_sensitive = 0; # (default is false)
891 # ENVELOPE SENDER WHITELISTING / BLACKLISTING - GLOBAL (RECIPIENT-INDEPENDENT)
892 # (affects spam checking only, has no effect on virus and other checks)
894 # WHITELISTING: use ENVELOPE SENDER lookups to ENSURE DELIVERY from whitelisted
895 # senders even if the message would be recognized as spam. Effectively, for
896 # the specified senders, message recipients temporarily become 'spam_lovers'.
897 # To avoid surprises, whitelisted sender also suppresses inserting/editing
898 # the tag2-level header fields (X-Spam-*, Subject), appending spam address
899 # extension, and quarantining.
901 # BLACKLISTING: messages from specified SENDERS are DECLARED SPAM.
902 # Effectively, for messages from blacklisted senders, spam level
903 # is artificially pushed high, and the normal spam processing applies,
904 # resulting in 'X-Spam-Flag: YES', high 'X-Spam-Level' bar and other usual
905 # reactions to spam, including possible rejection. If the message nevertheless
906 # still passes (e.g. for spam loving recipients), it is tagged as BLACKLISTED
907 # in the 'X-Spam-Status' header field, but the reported spam value and
908 # set of tests in this report header field (if available from SpamAssassin,
909 # which may have not been called) is not adjusted.
911 # A sender may be both white- and blacklisted at the same time, settings
912 # are independent. For example, being both white- and blacklisted, message
913 # is delivered to recipients, but is not tagged as spam (X-Spam-Flag: No;
914 # X-Spam-Status: No, ...), but the reported spam level (if computed) may
915 # still indicate high spam score.
917 # If ALL recipients of the message either white- or blacklist the sender,
918 # spam scanning (calling the SpamAssassin) is bypassed, saving on time.
920 # The following variables (lookup tables) are available, with the semantics
921 # and syntax as specified in README.lookups:
923 # %whitelist_sender, @whitelist_sender_acl, $whitelist_sender_re
924 # %blacklist_sender, @blacklist_sender_acl, $blacklist_sender_re
929 # @whitelist_sender_acl = qw( .example.com );
931 # @whitelist_sender_acl = ( ".$mydomain" ); # $mydomain and its subdomains
932 # NOTE: This is not a reliable way of turning off spam checks for
933 # locally-originating mail, as sender address can easily be faked.
934 # To reliably avoid spam-scanning outgoing mail,
935 # use @bypass_spam_checks_acl .
938 # $whitelist_sender_re = new_RE(
939 # qr'^postmaster@.*\bexample\.com$'i,
940 # qr'owner-[^@]*@'i, qr'-request@'i,
941 # qr'\.example\.com$'i );
943 $blacklist_sender_re = new_RE(
944 qr'^(bulkmail|offers|cheapbenefits|earnmoney|foryou|greatcasino)@'i,
945 qr'^(investments|lose_weight_today|market\.alert|money2you|MyGreenCard)@'i,
946 qr'^(new\.tld\.registry|opt-out|opt-in|optin|saveonl|smoking2002k)@'i,
947 qr'^(specialoffer|specialoffers|stockalert|stopsnoring|wantsome)@'i,
948 qr'^(workathome|yesitsfree|your_friend|greatoffers)@'i,
949 qr'^(inkjetplanet|marketopt|MakeMoney)\d*@'i,
952 #HASH lookup variant:
953 # NOTE: Perl operator qw splits its argument string by whitespace
954 # and produces a list. This means that addresses can not contain
955 # whitespace, and there is no provision for comments within the string.
956 # You can use the normal Perl list syntax if you have special requirements,
957 # e.g. map {...} ('one user@bla', '.second.com'), or use read_hash to read
958 # addresses from a file.
961 # a hash lookup table can be read from a file,
962 # one address per line, comments and empty lines are permitted:
964 # read_hash(\%whitelist_sender, '/var/amavis/whitelist_sender');
965 read_hash(\%whitelist_sender, "$MYHOME/whitelist_sender");
966 read_hash(\%blacklist_sender, "$MYHOME/blacklist_sender");
968 # ... or set directly:
969 map { $whitelist_sender{lc($_)}=1 } (qw(
972 slashdot@slashdot.org
973 bugtraq@securityfocus.com
974 NTBUGTRAQ@LISTSERV.NTBUGTRAQ.COM
975 security-alerts@linuxsecurity.com
976 amavis-user-admin@lists.sourceforge.net
977 razor-users-admin@lists.sourceforge.net
978 notification-return@lists.sophos.com
979 mailman-announce-admin@python.org
980 zope-announce-admin@zope.org
981 owner-postfix-users@postfix.org
982 owner-postfix-announce@postfix.org
983 owner-sendmail-announce@lists.sendmail.org
984 sendmail-announce-request@lists.sendmail.org
985 ca+envelope@sendmail.org
986 owner-technews@postel.ACM.ORG
987 lvs-users-admin@LinuxVirtualServer.org
988 ietf-123-owner@loki.ietf.org
989 cvs-commits-list-admin@gnome.org
990 rt-users-admin@lists.fsck.com
991 owner-announce@mnogosearch.org
992 owner-hackers@ntp.org
994 clp-request@comp.nus.edu.sg
995 surveys-errors@lists.nua.ie
996 emailNews@genomeweb.com
997 owner-textbreakingnews@CNNIMAIL12.CNN.COM
998 yahoo-dev-null@yahoo-inc.com
1002 # ENVELOPE SENDER WHITELISTING / BLACKLISTING - PER-RECIPIENT
1004 # The same semantics as for global white/blacklisting applies, but this
1005 # time each recipient (or its domain, or subdomain, ...) can be given
1006 # an individual lookup table for matching senders. The per-recipient lookups
1007 # override the global lookups, which serve as a fallback default.
1009 # Specify a two-level lookup table: the key for the outer table is recipient,
1010 # and the result should be an inner lookup table (hash or ACL or RE),
1011 # where the key used will be the sender.
1013 #$per_recip_blacklist_sender_lookup_tables = {
1014 # 'user1@my.example.com'=>new_RE(qr'^(inkjetplanet|marketopt|MakeMoney)\d*@'i),
1015 # 'user2@my.example.com'=>[qw( spammer@d1.example,org .d2.example,org )],
1017 #$per_recip_whitelist_sender_lookup_tables = {
1018 # 'user@my.example.com' => [qw( friend@example.org .other.example.org )],
1019 # '.my1.example.com' => [qw( !foe.other.example,org .other.example,org )],
1020 # '.my2.example.com' => read_hash('/var/amavis/my2-wl.dat'),
1021 # 'abuse@' => { 'postmaster@'=>1,
1022 # 'cert-advisory-owner@cert.org'=>1, 'owner-alert@iss.net'=>1 },
1027 # Section VI - Resource limits
1030 # Sanity limit to the number of allowed recipients per SMTP transaction
1031 # $smtpd_recipient_limit = 1000; # (default is 1000)
1034 # Resource limits to protect unpackers, decompressors and virus scanners
1035 # against mail bombs (e.g. 42.zip)
1037 # Maximum recursion level for extraction/decoding (0 or undef disables limit)
1038 $MAXLEVELS = 14; # (default is undef, no limit)
1040 # Maximum number of extracted files (0 or undef disables the limit)
1041 $MAXFILES = 1500; # (default is undef, no limit)
1043 # For the cumulative total of all decoded mail parts we set max storage size
1044 # to defend against mail bombs. Even though parts may be deleted (replaced
1045 # by decoded text) during decoding, the size they occupied is _not_ returned
1046 # to the quota pool.
1048 # Parameters to storage quota formula for unpacking/decoding/decompressing
1050 # quota = max($MIN_EXPANSION_QUOTA,
1051 # $mail_size*$MIN_EXPANSION_FACTOR,
1052 # min($MAX_EXPANSION_QUOTA, $mail_size*$MAX_EXPANSION_FACTOR))
1053 # In plain words (later condition overrules previous ones):
1054 # allow MAX_EXPANSION_FACTOR times initial mail size,
1055 # but not more than MAX_EXPANSION_QUOTA,
1056 # but not less than MIN_EXPANSION_FACTOR times initial mail size,
1057 # but never less than MIN_EXPANSION_QUOTA
1059 $MIN_EXPANSION_QUOTA = 100*1024; # bytes (default undef, not enforced)
1060 $MAX_EXPANSION_QUOTA = 300*1024*1024; # bytes (default undef, not enforced)
1061 $MIN_EXPANSION_FACTOR = 5; # times original mail size (must be specified)
1062 $MAX_EXPANSION_FACTOR = 500; # times original mail size (must be specified)
1066 # Section VII - External programs, virus scanners
1069 # Specify a path string, which is a colon-separated string of directories
1070 # (no trailing slashes!) to be assigned to the environment variable PATH
1071 # and to serve for locating external programs below.
1073 # NOTE: if $daemon_chroot_dir is nonempty, the directories will be
1074 # relative to the chroot directory specified;
1076 $path = '/usr/local/sbin:/usr/local/bin:/usr/sbin:/sbin:/usr/bin:/bin';
1078 # Specify one string or a search list of strings (first match wins).
1079 # The string (or: each string in a list) may be an absolute path,
1080 # or just a program name, to be located via $path;
1081 # Empty string or undef (=default) disables the use of that external program.
1082 # Optionally command arguments may be specified - only the first substring
1083 # up to the whitespace is used for file searching.
1085 $file = 'file'; # file(1) utility; use 3.41 or later to avoid vulnerability
1090 $uncompress = ['uncompress', 'gzip -d', 'zcat'];
1091 $unfreeze = ['unfreeze', 'freeze -d', 'melt', 'fcat'];
1092 $arc = ['nomarch', 'arc'];
1093 $unarj = ['arj', 'unarj']; # both can extract, arj is recommended
1094 $unrar = ['rar', 'unrar']; # both can extract, same options
1097 $cpio = 'cpio'; # comment out if cpio does not support GNU options
1100 # SpamAssassin settings
1102 # $sa_local_tests_only is passed to Mail::SpamAssassin::new as a value
1103 # of the option local_tests_only. See Mail::SpamAssassin man page.
1104 # If set to 1, SA tests are restricted to local tests only, i.e. no tests
1105 # that require internet access will be performed.
1107 #$sa_local_tests_only = 1; # (default: false)
1108 $sa_auto_whitelist = 1; # turn on AWL (default: false)
1110 # Timout for SpamAssassin. This is only used if spamassassin does NOT
1111 # override it (which it often does if sa_local_tests_only is not true)
1112 $sa_timeout = 30; # timeout in seconds for a call to SpamAssassin
1113 # (default is 30 seconds, undef disables it)
1115 # AWL (auto whitelisting), requires spamassassin 2.44 or better
1116 # $sa_auto_whitelist = 1; # defaults to undef
1118 $sa_mail_body_size_limit = 150*1024; # don't waste time on SA is mail is larger
1119 # (less than 1% of spam is > 64k)
1120 # default: undef, no limitations
1122 # default values, can be overridden by more specific lookups, e.g. SQL
1123 $sa_tag_level_deflt = 3.0; # add spam info headers if at, or above that level
1124 $sa_tag2_level_deflt = 6.3; # add 'spam detected' headers at that level
1125 $sa_kill_level_deflt = $sa_tag2_level_deflt; # triggers spam evasive actions
1126 # at or above that level: bounce/reject/drop,
1127 # quarantine, and adding mail address extension
1129 $sa_dsn_cutoff_level = 10; # spam level beyond which a DSN is not sent,
1130 # effectively turning D_BOUNCE into D_DISCARD;
1131 # undef disables this feature and is a default;
1134 # The $sa_tag_level_deflt, $sa_tag2_level_deflt and $sa_kill_level_deflt
1135 # may also be hashrefs to hash lookup tables, to make static per-recipient
1136 # settings possible without having to resort to SQL or LDAP lookups.
1138 # a quick reference:
1139 # tag_level controls adding the X-Spam-Status and X-Spam-Level headers,
1140 # tag2_level controls adding 'X-Spam-Flag: YES', and editing Subject,
1141 # kill_level controls 'evasive actions' (reject, quarantine, extensions);
1142 # it only makes sense to maintain the relationship:
1143 # tag_level <= tag2_level <= kill_level < $sa_dsn_cutoff_level
1145 # string to prepend to Subject header field when message exceeds tag2 level
1146 $sa_spam_subject_tag = '***SPAM*** '; # (defaults to undef, disabled)
1147 # (only seen when spam is not to be rejected
1148 # and recipient is in local_domains*)
1150 #$sa_spam_modifies_subj = 1; # may be a ref to a lookup table, default is true
1151 # Example: modify Subject for all local recipients except user@example.com
1152 #$sa_spam_modifies_subj = [qw( !user@example.com . )];
1154 # stop anti-virus scanning when the first scanner detects a virus?
1155 $first_infected_stops_scan = 1; # default is false, all scanners are called
1157 # @av_scanners is a list of n-tuples, where fields semantics is:
1158 # 1. av scanner plain name, to be used in log and reports;
1159 # 2. scanner program name; this string will be submitted to subroutine
1160 # find_external_programs(), which will try to find the full program
1161 # path name; if program is not found, this scanner is disabled.
1162 # Besides a simple string (full program path name or just the basename
1163 # to be looked for in PATH), this may be an array ref of alternative
1164 # program names or full paths - the first match in the list will be used;
1165 # As a special case for more complex scanners, this field may be
1166 # a subroutine reference, and the whole n-tuple is passed to it as args.
1167 # 3. command arguments to be given to the scanner program;
1168 # a substring {} will be replaced by the directory name to be scanned,
1169 # i.e. "$tempdir/parts", a "*" will be replaced by file names of parts;
1170 # 4. an array ref of av scanner exit status values, or a regexp (to be
1171 # matched against scanner output), indicating NO VIRUSES found;
1172 # 5. an array ref of av scanner exit status values, or a regexp (to be
1173 # matched against scanner output), indicating VIRUSES WERE FOUND;
1174 # Note: the virus match prevails over a 'not found' match, so it is safe
1175 # even if the no. 4. matches for viruses too;
1176 # 6. a regexp (to be matched against scanner output), returning a list
1177 # of virus names found.
1178 # 7. and 8.: (optional) subroutines to be executed before and after scanner
1179 # (e.g. to set environment or current directory);
1180 # see examples for these at KasperskyLab AVP and Sophos sweep.
1184 # - NOT DEFINING @av_scanners (e.g. setting it to empty list, or deleting the
1185 # whole assignment) TURNS OFF LOADING AND COMPILING OF THE ANTIVIRUS CODE
1186 # (which can be handy if all you want to do is spam scanning);
1188 # - the order matters: although _all_ available entries from the list are
1189 # always tried regardless of their verdict, scanners are run in the order
1190 # specified: the report from the first one detecting a virus will be used
1191 # (providing virus names and scanner output); REARRANGE THE ORDER TO WILL;
1193 # - it doesn't hurt to keep an unused command line scanner entry in the list
1194 # if the program can not be found; the path search is only performed once
1195 # during the program startup;
1197 # COROLLARY: to disable a scanner that _does_ exist on your system,
1198 # comment out its entry or use undef or '' as its program name/path
1199 # (second parameter). An example where this is almost a must: disable
1200 # Sophos 'sweep' if you have its daemonized version Sophie or SAVI-Perl
1201 # (same for Trophie/vscan, and clamd/clamscan), or if another unrelated
1202 # program happens to have a name matching one of the entries ('sweep'
1203 # again comes to mind);
1205 # - it DOES HURT to keep unwanted entries which use INTERNAL SUBROUTINES
1206 # for interfacing (where the second parameter starts with \&).
1207 # Keeping such entry and not having a corresponding virus scanner daemon
1208 # causes an unnecessary connection attempt (which eventually times out,
1209 # but it wastes precious time). For this reason the daemonized entries
1210 # are commented in the distribution - just remove the '#' where needed.
1212 # CERT list of av resources: http://www.cert.org/other_sources/viruses.html
1216 # ### http://www.vanja.com/tools/sophie/
1218 # \&ask_daemon, ["{}/\n", '/var/run/sophie'],
1219 # qr/(?x)^ 0+ ( : | [\000\r\n]* $)/, qr/(?x)^ 1 ( : | [\000\r\n]* $)/,
1220 # qr/(?x)^ [-+]? \d+ : (.*?) [\000\r\n]* $/ ],
1222 # ### http://www.csupomona.edu/~henson/www/projects/SAVI-Perl/
1223 ['Sophos SAVI', \&sophos_savi ],
1225 ### http://www.clamav.net/
1226 ['Clam Antivirus-clamd',
1227 \&ask_daemon, ["CONTSCAN {}\n", "/var/run/clamav/clamd.ctl"],
1228 qr/\bOK$/, qr/\bFOUND$/,
1229 qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
1230 # NOTE: run clamd under the same user as amavisd; match the socket
1231 # name (LocalSocket) in clamav.conf to the socket name in this entry
1232 # When running chrooted one may prefer: ["CONTSCAN {}\n","$MYHOME/clamd"],
1234 # ### http://www.openantivirus.org/
1235 # ['OpenAntiVirus ScannerDaemon (OAV)',
1236 # \&ask_daemon, ["SCAN {}\n", '127.0.0.1:8127'],
1237 # qr/^OK/, qr/^FOUND: /, qr/^FOUND: (.+)/ ],
1239 # ### http://www.vanja.com/tools/trophie/
1241 # \&ask_daemon, ["{}/\n", '/var/run/trophie'],
1242 # qr/(?x)^ 0+ ( : | [\000\r\n]* $)/, qr/(?x)^ 1 ( : | [\000\r\n]* $)/,
1243 # qr/(?x)^ [-+]? \d+ : (.*?) [\000\r\n]* $/ ],
1245 # ### http://www.grisoft.com/
1246 # ['AVG Anti-Virus',
1247 # \&ask_daemon, ["SCAN {}\n", '127.0.0.1:55555'],
1248 # qr/^200/, qr/^403/, qr/^403 .*?: (.+)/ ],
1250 # ### http://www.f-prot.com/
1251 # ['FRISK F-Prot Daemon',
1253 # ["GET {}/*?-dumb%20-archive%20-packed HTTP/1.0\r\n\r\n",
1254 # ['127.0.0.1:10200','127.0.0.1:10201','127.0.0.1:10202',
1255 # '127.0.0.1:10203','127.0.0.1:10204'] ],
1256 # qr/(?i)<summary[^>]*>clean<\/summary>/,
1257 # qr/(?i)<summary[^>]*>infected<\/summary>/,
1258 # qr/(?i)<name>(.+)<\/name>/ ],
1260 ['KasperskyLab AVP - aveclient',
1261 ['/usr/local/kav/bin/aveclient','/usr/local/share/kav/bin/aveclient',
1262 '/opt/kav/bin/aveclient','aveclient'],
1263 '-p /var/run/aveserver -s {}/*', [0,3,6,8], qr/\b(INFECTED|SUSPICION)\b/,
1264 qr/(?:INFECTED|SUSPICION) (.+)/,
1267 ['KasperskyLab AntiViral Toolkit Pro (AVP)', ['avp'],
1268 '-* -P -B -Y -O- {}', [0,8,16,24], [2,3,4,5,6, 18,19,20,21,22],
1270 sub {chdir('/opt/AVP') or die "Can't chdir to AVP: $!"},
1271 sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"},
1274 ### The kavdaemon and AVPDaemonClient have been removed from Kasperky
1275 ### products and replaced by aveserver and aveclient
1276 ['KasperskyLab AVPDaemonClient',
1277 [ '/opt/AVP/kavdaemon', 'kavdaemon',
1278 '/opt/AVP/AvpDaemonClient', 'AvpDaemonClient',
1279 '/opt/AVP/AvpTeamDream', 'AvpTeamDream',
1280 '/opt/AVP/avpdc', 'avpdc' ],
1281 "-f=$TEMPBASE {}", [0,8,16,24], [2,3,4,5,6, 18,19,20,21,22],
1282 qr/infected: ([^\r\n]+)/ ],
1283 # change the startup-script in /etc/init.d/kavd to:
1284 # DPARMS="-* -Y -dl -f=/var/amavis /var/amavis"
1285 # (or perhaps: DPARMS="-I0 -Y -* /var/amavis" )
1286 # adjusting /var/amavis above to match your $TEMPBASE.
1287 # The '-f=/var/amavis' is needed if not running it as root, so it
1288 # can find, read, and write its pid file, etc., see 'man kavdaemon'.
1289 # defUnix.prf: there must be an entry "*/var/amavis" (or whatever
1290 # directory $TEMPBASE specifies) in the 'Names=' section.
1291 # cd /opt/AVP/DaemonClients; configure; cd Sample; make
1292 # cp AvpDaemonClient /opt/AVP/
1293 # su - vscan -c "${PREFIX}/kavdaemon ${DPARMS}"
1295 ### http://www.hbedv.com/ or http://www.centralcommand.com/
1296 ['H+BEDV AntiVir or CentralCommand Vexira Antivirus',
1297 ['antivir','vexira'],
1298 '--allfiles -noboot -nombr -rs -s -z {}', [0], qr/ALERT:|VIRUS:/,
1299 qr/(?x)^\s* (?: ALERT: \s* (?: \[ | [^']* ' ) |
1300 (?i) VIRUS:\ .*?\ virus\ '?) ( [^\]\s']+ )/ ],
1301 # NOTE: if you only have a demo version, remove -z and add 214, as in:
1302 # '--allfiles -noboot -nombr -rs -s {}', [0,214], qr/ALERT:|VIRUS:/,
1304 ### http://www.commandsoftware.com/
1305 ['Command AntiVirus for Linux', 'csav',
1306 '-all -archive -packed {}', [50], [51,52,53],
1307 qr/Infection: (.+)/ ],
1309 ### http://www.symantec.com/
1310 ['Symantec CarrierScan via Symantec CommandLineScanner',
1311 'cscmdline', '-a scan -i 1 -v -s 127.0.0.1:7777 {}',
1312 qr/^Files Infected:\s+0$/, qr/^Infected\b/,
1313 qr/^(?:Info|Virus Name):\s+(.+)/ ],
1315 ### http://www.symantec.com/
1316 ['Symantec AntiVirus Scan Engine',
1317 'savsecls', '-server 127.0.0.1:7777 -mode scanrepair -details -verbose {}',
1318 [0], qr/^Infected\b/,
1319 qr/^(?:Info|Virus Name):\s+(.+)/ ],
1320 # NOTE: check options and patterns to see which entry better applies
1322 ### http://www.sald.com/, http://drweb.imshop.de/
1323 ['drweb - DrWeb Antivirus',
1324 ['/usr/local/drweb/drweb', '/opt/drweb/drweb', 'drweb'],
1325 '-path={} -al -go -ot -cn -upn -ok-',
1326 [0,32], [1,33], qr' infected (?:with|by)(?: virus)? (.*)$'],
1328 # ### http://www.sald.com/, http://www.dials.ru/english/, http://www.drweb.ru/
1329 # ['DrWebD', \&ask_daemon, # DrWebD 4.31 or later
1330 # [pack('N',1). # DRWEBD_SCAN_CMD
1331 # pack('N',0x00280001). # DONT_CHANGEMAIL, IS_MAIL, RETURN_VIRUSES
1332 # pack('N', # path length
1333 # length("$TEMPBASE/amavis-yyyymmddTHHMMSS-xxxxx/parts/part-xxxxx")).
1335 # pack('N',0). # content size
1337 # '/var/drweb/run/drwebd.sock',
1338 # # '/var/amavis/var/run/drwebd.sock', # suitable for chroot
1339 # # '/usr/local/drweb/run/drwebd.sock', # FreeBSD drweb ports default
1340 # # '127.0.0.1:3000', # or over an inet socket
1342 # qr/\A\x00(\x10|\x11)\x00\x00/s, # IS_CLEAN, EVAL_KEY
1343 # qr/\A\x00(\x00|\x01)\x00(\x20|\x40|\x80)/s, # KNOWN_V, UNKNOWN_V, V._MODIF
1344 # qr/\A.{12}(?:infected with )?([^\x00]+)\x00/s,
1346 # # NOTE: If you are using amavis-milter, change length to:
1347 # # length("$TEMPBASE/amavis-milter-xxxxxxxxxxxxxx/parts/part-xxxxx").
1349 ### http://www.f-secure.com/products/anti-virus/
1350 ['F-Secure Antivirus', 'fsav',
1351 '--dumb --mime --archive {}', [0], [3,8],
1352 qr/(?:infection|Infected|Suspected): (.+)/ ],
1354 ['CAI InoculateIT', 'inocucmd',
1355 '-sec -nex {}', [0], [100],
1356 qr/was infected by virus (.+)/ ],
1358 ['MkS_Vir for Linux (beta)', ['mks32','mks'],
1359 '-s {}/*', [0], [1,2], # any use for options: -a -c ?
1362 ### http://www.nod32.com/
1363 ['ESET Software NOD32', 'nod32',
1364 '-all -subdir+ {}', [0], [1,2],
1365 qr/^.+? - (.+?)\s*(?:backdoor|joke|trojan|virus|worm)/ ],
1367 ### http://www.nod32.com/
1368 ['ESET Software NOD32 - Client/Server Version', 'nod32cli',
1369 '-a -r -d recurse --heur standard {}', [0], [10,11],
1370 qr/^\S+\s+infected:\s+(.+)/ ],
1372 ### http://www.norman.com/products_nvc.shtml
1373 ['Norman Virus Control v5 / Linux', 'nvcc',
1374 '-c -l:0 -s -u {}', [0], [1],
1375 qr/(?i).* virus in .* -> \'(.+)\'/ ],
1377 ### http://www.pandasoftware.com/
1378 ['Panda Antivirus for Linux', ['pavcl'],
1379 '-aut -aex -heu -cmp -nbr -nor -nso -eng {}',
1380 qr/Number of files infected[ .]*: 0(?!\d)/,
1381 qr/Number of files infected[ .]*: 0*[1-9]/,
1382 qr/Found virus :\s*(\S+)/ ],
1384 # GeCAD AV technology is acquired by Microsoft; RAV has been discontinued.
1385 # Check your RAV license terms before fiddling with the following two lines!
1386 # ['GeCAD RAV AntiVirus 8', 'ravav',
1387 # '--all --archive --mail {}', [1], [2,3,4,5], qr/Infected: (.+)/ ],
1388 # # NOTE: the command line switches changed with scan engine 8.5 !
1389 # # (btw, assigning stdin to /dev/null causes RAV to fail)
1391 ### http://www.nai.com/
1392 ['NAI McAfee AntiVirus (uvscan)', 'uvscan',
1393 '--secure -rv --mime --summary --noboot - {}', [0], [13],
1395 \ the\ (.+)\ (?:virus|trojan) |
1396 \ (?:virus|trojan)\ or\ variant\ ([^ ]+) |
1397 :\ (.+)\ NOT\ a\ virus)/,
1398 # sub {$ENV{LD_PRELOAD}='/lib/libc.so.6'},
1399 # sub {delete $ENV{LD_PRELOAD}},
1401 # NOTE1: with RH9: force the dynamic linker to look at /lib/libc.so.6 before
1402 # anything else by setting environment variable LD_PRELOAD=/lib/libc.so.6
1403 # and then clear it when finished to avoid confusing anything else.
1404 # NOTE2: to treat encrypted files as viruses replace the [13] with:
1405 # qr/^\s{5,}(Found|is password-protected|.*(virus|trojan))/
1407 ### http://www.virusbuster.hu/en/
1408 ['VirusBuster', ['vbuster', 'vbengcl'],
1409 # VirusBuster Ltd. does not support the daemon version for the workstation
1410 # engine (vbuster-eng-1.12-linux-i386-libc6.tgz) any longer. The names of
1411 # binaries, some parameters AND return codes (from 3 to 1) changed.
1412 "{} -ss -i '*' -log=$MYHOME/vbuster.log", [0], [1],
1413 qr/: '(.*)' - Virus/ ],
1415 # ### http://www.virusbuster.hu/en/
1416 # ['VirusBuster (Client + Daemon)', 'vbengd',
1417 # # HINT: for an infected file it returns always 3,
1418 # # although the man-page tells a different story
1419 # '-f -log scandir {}', [0], [3],
1420 # qr/Virus found = (.*);/ ],
1422 ### http://www.cyber.com/
1423 ['CyberSoft VFind', 'vfind',
1424 '--vexit {}/*', [0], [23], qr/##==>>>> VIRUS ID: CVDL (.+)/,
1425 # sub {$ENV{VSTK_HOME}='/usr/lib/vstk'},
1428 ### http://www.ikarus-software.com/
1429 ['Ikarus AntiVirus for Linux', 'ikarus',
1430 '{}', [0], [40], qr/Signature (.+) found/ ],
1432 ### http://www.bitdefender.com/
1433 ['BitDefender', 'bdc',
1434 '--all --arc --mail {}', qr/^Infected files *:0(?!\d)/,
1435 qr/^(?:Infected files|Identified viruses|Suspect files) *:0*[1-9]/,
1436 qr/(?:suspected|infected): (.*)(?:\033|$)/ ],
1439 # If no virus scanners from the @av_scanners list produce 'clean' nor
1440 # 'infected' status (e.g. they all fail to run or the list is empty),
1441 # then _all_ scanners from the @av_scanners_backup list are tried.
1442 # When there are both daemonized and command-line scanners available,
1443 # it is customary to place slower command-line scanners in the
1444 # @av_scanners_backup list. The default choice is somewhat arbitrary,
1445 # move entries from one list to another as desired.
1447 @av_scanners_backup = (
1449 ### http://www.clamav.net/
1450 ['Clam Antivirus - clamscan', 'clamscan',
1451 "--stdout --no-summary -r --tempdir=$TEMPBASE {}", [0], [1],
1452 qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
1454 ### http://www.f-prot.com/
1455 ['FRISK F-Prot Antivirus', ['f-prot','f-prot.sh'],
1456 '-dumb -archive -packed {}', [0,8], [3,6],
1457 qr/Infection: (.+)/ ],
1459 ### http://www.trendmicro.com/
1460 ['Trend Micro FileScanner', ['/etc/iscan/vscan','vscan'],
1461 '-za -a {}', [0], qr/Found virus/, qr/Found virus (.+) in/ ],
1463 ['KasperskyLab kavscanner', ['/opt/kav/bin/kavscanner','kavscanner'],
1464 '-i1 -xp {}', [0,10,15], [5,20,21,25],
1465 qr/(?:CURED|INFECTED|CUREFAILED|WARNING|SUSPICION) (.*)/ ,
1466 sub {chdir('/opt/kav/bin') or die "Can't chdir to kav: $!"},
1467 sub {chdir($TEMPBASE) or die "Can't chdir back to $TEMPBASE $!"},
1470 # Commented out because the name 'sweep' clashes with the Debian package of
1471 # the same name. Make sure the correct sweep is found in the path when enabling
1473 # ### http://www.sophos.com/
1474 # ['Sophos Anti Virus (sweep)', 'sweep',
1475 # '-nb -f -all -rec -ss -sc -archive -cab -tnef --no-reset-atime {}',
1476 # [0,2], qr/Virus .*? found/,
1477 # qr/^>>> Virus(?: fragment)? '?(.*?)'? found/,
1479 # # other options to consider: -mime -oe -idedir=/usr/local/sav
1481 # always succeeds (uncomment to consider mail clean if all other scanners fail)
1482 ['always-clean', sub {0}],
1488 # Section VIII - Debugging
1491 # The most useful debugging tool is to run amavisd-new non-detached
1492 # from a terminal window:
1495 # Some more refined approaches:
1497 # If sender matches ACL, turn log level fully up, just for this one message,
1498 # and preserve temporary directory
1499 #@debug_sender_acl = ( "test-sender\@$mydomain" );
1500 #@debug_sender_acl = qw( debug@example.com );
1502 # May be useful along with @debug_sender_acl:
1503 # Prevent all decoded originals being deleted (replaced by decoded part)
1504 #$keep_decoded_original_re = new_RE( qr/.*/ );
1506 # Turn on SpamAssassin debugging (output to STDERR, use with 'amavisd debug')
1507 #$sa_debug = 1; # defaults to false
1510 1; # insure a defined return