While working today on setting Amavisd-new,Clamav and spamassasin in Ubuntu 12.04 LTS,I got the below given error.
Jul 23 12:20:47 mail postfix/qmgr[18020]: 0D1AF61F95: from=
Jul 23 12:20:48 mail amavis[18032]: (18032-02) (!)run_av (ClamAV-clamd) FAILED – unexpected , output=”/var/lib/amavis/tmp/amavis-20130723T122047-18032-utKqe6rf/parts: lstat() failed: Permission denied. ERRORn”
Jul 23 12:20:48 mail amavis[18032]: (18032-02) (!)ClamAV-clamd av-scanner FAILED: CODE(0x2286dd0) unexpected , output=”/var/lib/amavis/tmp/amavis-20130723T122047-18032-utKqe6rf/parts: lstat() failed: Permission denied. ERRORn” at (eval 112) line 899.
Jul 23 12:20:48 mail amavis[18032]: (18032-02) (!)WARN: all primary virus scanners failed, considering backups
To solve this issue follow these steps
Step 1: Add the clamav user in amavis group
# usermod -a -G amavis clamav
Step 2: Now check the group of amavis and clamav users
# id amavis
uid=110(amavis) gid=113(amavis) groups=113(amavis)
# id clamav
uid=109(clamav) gid=112(clamav) groups=112(clamav),113(amavis)
Step3 : Restart the clamav-daemon, amavis and postfix service
/etc/init.d/clamav-daemon restart /etc/init.d/amavis restart /etc/init.d/postfix restart
Now resend the email and check the mail log
Nice, thanks for the quick and easy fix!
Thanks a mill. That works. 🙂
Thanks for feedback Stefan,
Positive comments always help other readers too.
Warm Regards
Sharad