4

My exim4 don't send any message. The logs says

2011-03-09 15:59:57 1PxKrl-00038i-BT malware acl condition: clamd: ClamAV returned /var/spool/exim4/scan/1PxKrl-00038i-BT: lstat() failed: Permission denied. ERROR

I supose that clamav (running clamd) does'nt have access rights on the mentioned file, but clamav is in the same group as Debian-exim (running exim4). Even changing the folder permissions to a+rwx has no effect.

Any idea where to look for failure reason ?

PeterMmm
  • 895
  • 16
  • 28
  • Clamav shouldn't need to be in the same group as exim. It should be in in its own group (clamav). – BillThor Mar 09 '11 at 16:05
  • clamav is member of both: Debian-exim and clamav. I don't add this to /etc/group so i guess that comes from the install script. I mentioned this, because of posts on other sites regarding this error. – PeterMmm Mar 09 '11 at 16:09

2 Answers2

7

Directory permissions on /var/spool/exim4/scan should be 750, and owned by the exim user and its primary group (on my FreeBSD systems, these are mailnull and mail, respectively).

If your clamav user has Debian-exim as a supplementary group - that is, if Debian-exim is not its primary group, then you need "AllowSupplementaryGroups yes" in your clamd.conf (and clamd must be started by root).

D_Bye
  • 401
  • 2
  • 5
2

I had the same problem on Centos 6.2 running exim4 with clamAV, solved it by adding clam user to the mail group.

# usermod -a -G mail clam
mgorven
  • 30,615
  • 7
  • 79
  • 122