I manage a Debian Squeeze server that uses Exim as the MTA and runs several mailing lists using Mailman. I'd like to set up ClamAV to block viruses that may get posted to a list. I'm having trouble finding documentation online for how to integrate ClamAV with Exim and Mailman (and what configuration is done automatically by the Debian install scripts).
What needs to be done besides installing the appropriate packages to get ClamAV to work with Exim and Mailman lists?
To use clamav in Debian squeeze you need to start by installing the
exim4-daemon-heavy
package instead of the defaultexim4-daemon-light
version, the heavy daemon was compiled with more functionality including the ability to link into clamav. Just do anapt-get install exim4-daemon-heavy
, it won't change much, and pretty safe to run.After you have that enabled you need do a little setup. I am assuming you are using split configs, if not you'll have to translate the below to the correct location within the combined config file.
I usually create a file
/etc/exim4/conf.d/main/04_exim4-config_filter
that looks like this.Then I uncomment the malware config in your
/etc/exim4/conf.d/acl/40_exim4-config_check_data
file.You might also want to block certain types of attachments.
I usually create a file acl to check mime extensions.
/etc/exim4/conf.d/acl/50_exim4-config_check_mime
To enable this acl you have to add a some lines in your
/etc/exim4/conf.d/main/02_exim4-config_options
file.