Solved

Clamav problems with amavisd, postfix, spamassin

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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
LINUX backups with VEEAM 8 155
python - find anything after $ question. 9 47
IMAP copying tool 14 45
SSSD - Automatic kerberos ticket initialization 1 15
If you have a server on collocation with the super-fast CPU, that doesn't mean that you get it running at full power. Here is a preamble. When doing inventory of Linux servers, that I'm administering, I've found that some of them are running on l…
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…
Learn how to navigate the file tree with the shell. Use pwd to print the current working directory: Use ls to list a directory's contents: Use cd to change to a new directory: Use wildcards instead of typing out long directory names: Use ../ to move…

749 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