Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Clamav problems with amavisd, postfix, spamassin

Posted on 2004-10-08
1
Medium Priority
?
471 Views
Last Modified: 2007-12-19
Hello

Im running Redhat 9 with postfix, amavisd, clamav and spamassassin installed.

I keep getting errors in the maillog which are displayed below.

Oct  8 11:07:45 linuxmail amavis[3762]: (03762-06) ClamAV-clamd: Can't connect to UNIX socket /usr/local/sbin/clamd: Connection refused, retrying (2)
Oct  8 11:07:45 linuxmail amavis[3756]: (03756-07) ClamAV-clamd: Can't connect to UNIX socket /usr/local/sbin/clamd: Connection refused, retrying (2)
Oct  8 11:07:51 linuxmail amavis[3762]: (03762-06) ClamAV-clamd av-scanner FAILED: Too many retries to talk to /usr/local/sbin/clamd (Can't connect to UNIX socket /usr/local/sbin/clamd: Connection refused) at (eval 34) line 243.
Oct  8 11:07:51 linuxmail amavis[3762]: (03762-06) WARN: all primary virus scanners failed, considering backups
Oct  8 11:07:51 linuxmail amavis[3756]: (03756-07) ClamAV-clamd av-scanner FAILED: Too many retries to talk to /usr/local/sbin/clamd (Can't connect to UNIX socket /usr/local/sbin/clamd: Connection refused) at (eval 34) line 243.
Oct  8 11:07:51 linuxmail amavis[3756]: (03756-07) WARN: all primary virus scanners failed, considering backups
Oct  8 11:07:52 linuxmail amavis[3762]: (03762-06) TROUBLE in check_mail: virus_scan FAILED: Not an ARRAY reference at (eval 35) line 124.

I have tried everything i can to try and get it working. Ive set the LocalSocket in both the avamisd.conf and clamd.conf and ClamAV is also running with the amavis user account.

Can anyone help? im going mad here and ive exhaulsted google.

Thanks

DAN
0
Comment
Question by:DClayden
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
1 Comment
 
LVL 3

Accepted Solution

by:
TRobertson earned 1000 total points
ID: 12259779
Are you using something like the following?

@av_scanners = (
 #### http://www.clamav.net/
 ['Clam Antivirus-clamd',
   \&ask_daemon, ["CONTSCAN {}\n", '/var/amavisd/clamd.sock'],
   qr/\bOK$/, qr/\bFOUND$/,
   qr/^.*?: (?!Infected Archive)(.*) FOUND$/ ],
# # NOTE: run clamd under the same user as amavisd,
# # match the socket name in clamav.conf to the socket name in this entry
);

Make sure that you have /var/amavisd/clamd.sock and that the permissions are correct on it.  ls -l /var/amavisd/clamd.sock

And clamav.conf
# Path to the local socket. The daemon doesn't change the mode of the
# created file (portability reasons). You may want to create it in a directory
# which is only accessible for a user running daemon.
LocalSocket /var/amavisd/clamd.sock

Do ps aux | grep clamd to make sure its running and under what username.
0

Featured Post

Survive A High-Traffic Event with Percona

Your application or website rely on your database to deliver information about products and services to your customers. You can’t afford to have your database lose performance, lose availability or become unresponsive – even for just a few minutes.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Fine Tune your automatic Updates for Ubuntu / Debian
In part one, we reviewed the prerequisites required for installing SQL Server vNext. In this part we will explore how to install Microsoft's SQL Server on Ubuntu 16.04.
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
Suggested Courses

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question