Configure Amavisd-new
Configure amavisd.confcd /usr/local/etc
cp amavisd.conf-default amavisd.conf
pico amavisd.conf
## edit or uncomment these line below :
$max_servers = 2; # num of pre-forked children (2..30 is common), -m
$daemon_user = 'vscan'; # (no default; customary: vscan or amavis), -u
$daemon_group = 'vscan'; # (no default; customary: vscan or amavis), -g
$mydomain = 'server.postfixrocks.org'; # a convenient default for other settings
@av_scanners = (
## uncomment these line below :
['ClamAV-clamd',
\&ask_daemon, ["CONTSCAN \n", "/var/run/clamav/clamd.sock"],
qr/\bOK$/, qr/\bFOUND$/,
qr/^.*?: (?!Infected Archive)(.*) FOUND$/m ],
## leave all default config untouch.
Debug amavisd
/usr/local/sbin/amavisd debug
.....
## you need to make sure 3 module loaded ##
/usr/local/sbin/amavisd[17650]: ANTI-VIRUS code loaded
/usr/local/sbin/amavisd[17650]: ANTI-SPAM code loaded
/usr/local/sbin/amavisd[17650]: ANTI-SPAM-SA code loaded
.....
If everything goes well we can start amavisd without debug option.