|View ProfilePhotosQik VideoBlogRandomThingsMusingsTech NotesRecipesGraffiti BookPhotography TipsMy CalendarStoreWB Calculator|
ClamAV Email Checking on a Shared Host
2008-08-13 09:33:13Return to Tech Notes
Article originally from: http://jhcore.com/2007/03/10/clamav-email-checking-on-a-shared-host/
Note: If you add a ~/.procmailrc file to DreamHost, you will likely be unable to use the DreamHost Control Panel’s Junk Filtering. Therefore, it is recommended that you check out this excellent SpamAssassin guide and the Dreamhost wiki. Note that I have installed everything in a ~/packages folder, which the previously mentioned guide does not do, so you should adjust accordingly. I also installed a more recent version of SpamAssassin than the previous guide (3.1.8 vs 3.1.0).
The –disable-clamav flag allows the package to be installed without a special user for clamav.
Modify Your Environment Variables
In your ~/.bash_profile, add the
At the console enter:
Set up ClamAV
In ~/packages/etc/clamd.conf, comment out the line “Example”.
ClamAssassin is a wrapper for ClamAV for use in procmail.
The –disable-clamdscan flag forces ClamAssassin to use clamscan rather than clamd (you don’t have to open any ports for a daemon). The –enable-subject-rewrite[=message] flag prepends an alert[=message] to the subject line of the email.
Add an entry to ~/.procmailrc to call ClamAssassin and move the email if a virus is found
# Scan for virii with clamassassin
Update with FreshClam in your crontab
Add this line, to update the virus definitions at 1 AM everyday:
0 1 * * * /home/your username/packages/bin/freshclam
(Optional) Clean up the install dir