Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Clamav problems with amavisd, postfix, spamassin

Posted on 2004-10-08
1
Medium Priority
?
482 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
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

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

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

Introduction We as admins face situation where we need to redirect websites to another. This may be required as a part of an upgrade keeping the old URL but website should be served from new URL. This document would brief you on different ways ca…
This article will show you step-by-step instructions to build your own NTP CentOS server.  The network diagram shows the best practice to setup the NTP server farm for redundancy.  This article also serves as your NTP server documentation.
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.
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
Course of the Month6 days, 4 hours left to enroll

772 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