Amavisd-new is a content filtering service, able to inspect e-mail and send it to antivirus scanners and SPAM detectors, check attachments for banned file types (and signatures, not only by extensions), sign and check for DKIM signatures, etc.

### There's no need to create /var/amavis/{db,var,tmp}, the install script took care### Adjust amavisd.conf file to suit your needs. I configured previously and published through DNS a certificate and the public key used FOR DKIM. The certificate is located in /var/db/dkim, the public key is recorded in DNS.The lookup pard of the database is accessed with a read-only user, the storage part is accessed with a user having write access to the database.### I changed the following parameters in /usr/local/etc/amavisd.conf

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2012-08-14 16:13:54DELIMITER

### amavisd-users for mysqlcat << DELIMITER | mysqlCREATE USER amavisd_lookup@localhost IDENTIFIED BY 'eiNgie6Ataicea';CREATE USER amavisd_storage@localhost IDENTIFIED BY 'uB9ool6kiethie';GRANT SELECT ON amavis.users TO amavisd_lookup;GRANT SELECT ON amavis.mailaddr TO amavisd_lookup;GRANT SELECT ON amavis.wblist TO amavisd_lookup;GRANT SELECT ON amavis.policy TO amavisd_lookup;GRANT SELECT,INSERT,UPDATE ON amavis.maddr TO amavisd_storage;GRANT SELECT,INSERT,UPDATE ON amavis.msgs TO amavisd_storage;GRANT SELECT,INSERT,UPDATE ON amavis.msgrcpt TO amavisd_storage;GRANT SELECT,INSERT,UPDATE ON amavis.quarantine TO amavisd_storage;DELIMITER

### I like keeping logs clean, so I use syslog facility 'local0' to log messages from amavis