amavisd-new
amavisd-new is a high-performance and reliable interface between mailer (MTA) and one or more content checkers: virus scanners, and/or Mail::SpamAssassin Perl module. It is written in Perl, ensuring high reliability, portability and maintainability. It talks to MTA via (E)SMTP or LMTP protocols, or by using helper programs. No timing gaps exist in the design, which could cause a mail loss.
About
Some very nice advice by Peer Heinlein on this slides (german)
Peer Heinlein amavisdÂ-new: Schöne Geheimnisse und komische Ideen
Performance Tuning
- Increase of number of amavisd-new childs/forks
Default number of instances 2 => $max_servers=2;
4 Childs/Core * 2 Cores => $max_servers=8;
Debian HOME of user amavis is /var/lib/amavisd-new
mount tmpfs at $TEMPBASE = $HOME/tmp => /var/lib/amavisd-new/tmp/
$max_servers(8) * message_size_limit(10MiB) * Reserve(1,5) => size=128m
Install parallel compressors
1 aptitude install pigz pxz pbzip2
Local/User Configuration
/etc/amavis/conf.d/50-user
1 use strict;
2
3 #
4 # Place your configuration directives here. They will override those in
5 # earlier files.
6 #
7 # See /usr/share/doc/amavisd-new/ for documentation and examples of
8 # the directives you can use in this file
9 #
10
11 ### Maximun number of child processes
12 $max_servers = 8;
13
14 ### Parallel de-/compression
15 $gzip = 'pgiz';
16 $bzip2 = 'pbzip2';
17 $uncompress = ['uncompress', 'pigz -d', 'zcat'];
18
19 ### Actions to be performed on events
20 $final_virus_destiny = D_REJECT;
21
22 ### Header Encoding
23 ## to be used in RFC 2047-encoded header field bodies, e.g. in Subject:
24 $hdr_encoding = 'utf8'; # (default: 'iso-8859-1')
25 ## to be used in notification body text: its encoding and Content-type.charset
26 $bdy_encoding = 'utf8'; # (default: 'iso-8859-1')
27
28
29 #------------ Do not modify anything below this line -------------
30 1; # ensure a defined return
31
amavisd-nanny
Take a look at the load with
amavisd-nanny
1 process-id task-id elapsed in elapsed-bar (dots indicate idle)
2 or state idle or busy
3
4 PID 09302: 0:00:18 .........:........
5 PID 09303: 0:00:18 .........:........
6 PID 09304: 0:00:18 .........:........
7 PID 09305: 0:00:18 .........:........
8 PID 09306: 0:00:18 .........:........
9 PID 09307: 0:00:18 .........:........
10 PID 09308: 0:00:18 .........:........
11 PID 09309: 0:00:18 .........:........
12 ^C
13 exited