Does SpamAssassin filter email-borne viruses as well as spam?

No. SpamAssassin is focussed on identifying spam, and not viruses. The mechanism of scanning for viruses is different, and software tailored for virus scanning is much much better at this task. You may be interested in ClamAV, a GPL virus scanner. There is a third-party plugin for SpamAssassin to call ClamAV and add a score based upon its result (see CustomPlugins).

Alternatively, an easy way to use the ClamAV daemon with procmail is to add this to your procmailrc file:

# Scan for viruses
VIRUS=|clamdscan --no-summary --stdout -

* VIRUS ?? ^.*: \/.* FOUND
| formail -b -f -t -I "X-Clamav-Status: Yes, $MATCH"

| formail -b -f -t -I "X-Clamav-Status: No"

This will add "X-Clamav-status: yes" to any message that's found to have a virus. Since "clamdscan" uses the daemon, you'll need to enable ScanMail, ScanArchive and StreamSaveToDisk in clamav.conf

  • No labels