Just to Add to Maxum's post I did the following which ridded me of the dreaded Clam error:
Assumptions:
1. clamd is located in
2. AppAromor profiles are held in
3. MailScanner incoming queue is
Code:
/var/spool/MailScanner/incoming
Obviously you will need to do the following to add clamd to the www-data group so that it can access the directory:
Code:
sudo usermod -a -G www-data clamav
Now edit the profile for clamd:
Code:
sudo nano /etc/apparmor.d/usr.sbin.clamd
Add the Incoming folder to the list of folders
Code:
/var/spool/MailScanner/** rw,
/var/spool/MailScanner/incoming/** rw,
Now to be honest, I dont really need the second line as the ** means files AND directories underneath the current directory but will leave it in there as "it's what worked for me".
After that I reload ALL the Apparmor profiles (it was easier at the time to find that than find how to reload just one).
Code:
sudo /etc/init.d/apparmor reload
After this send yourself a test mail and look at mail.log using:
Code:
tail -f /var/log/mail.log
And watch as clamd does not error.
Hope this helps.
Regards
Drex
Recent comments
8 hours 49 min ago
18 hours 17 min ago
19 hours 6 min ago
22 hours 40 min ago
1 day 3 hours ago
1 day 3 hours ago
1 day 5 hours ago
1 day 15 hours ago
1 day 20 hours ago
1 day 22 hours ago