Solved

Clamav problems with amavisd, postfix, spamassin

Posted on 2004-10-08
1
428 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 250 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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
route 2 traffic streams on single NIC 6 48
How can you tell your public IP address without a browser? 9 61
Bash script - Exit out of choice loop 2 26
linux SFTP 8 41
I am a long time windows user and for me it is normal to have spaces in directory and file names. Changing to Linux I found myself frustrated when I moved my windows data over to my new Linux computer. The problem occurs when at the command line.…
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…
Learn several ways to interact with files and get file information from the bash shell. ls lists the contents of a directory: Using the -a flag displays hidden files: Using the -l flag formats the output in a long list: The file command gives us mor…
Connecting to an Amazon Linux EC2 Instance from Windows Using PuTTY.

785 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