can't quite get clamd working properly

Rick Cooper rcooper at dwford.com
Wed Nov 5 13:37:16 GMT 2008


 

 > -----Original Message-----
 > From: mailscanner-bounces at lists.mailscanner.info 
 > [mailto:mailscanner-bounces at lists.mailscanner.info] On 
 > Behalf Of Kate Kleinschafer
 > Sent: Tuesday, November 04, 2008 9:02 PM
 > To: MailScanner discussion
 > Subject: Re: can't quite get clamd working properly
 > 
 > 
 > Jeff Mills wrote:
 > >  
 > >
 > >   
 > >> -----Original Message-----
 > >> From: mailscanner-bounces at lists.mailscanner.info 
 > >> [mailto:mailscanner-bounces at lists.mailscanner.info] On Behalf 
 > >> Of Kate Kleinschafer
 > >> Sent: Wednesday, 5 November 2008 11:09 AM
 > >> To: MailScanner discussion
 > >> Subject: can't quite get clamd working properly
 > >>
 > >> Hi all,
 > >>
 > >> First of thanks to all the people that help on this list. I 
 > >> have got a fair way through troubleshooting this issue using 
 > >> help of various threads.
 > >>
 > >> I am now a bit stuck though - i think it may have to do with 
 > >> permissions.
 > >>
 > >> I installed clamav from dag
 > >>
 > >> In MailScanner.conf
 > >> Run As User = postfix
 > >>
 > >> Virus Scanners = clamd
 > >>
 > >> Clamd Port = 3310
 > >> Clamd Socket = /tmp/clamd.socket
 > >> Clamd Lock File = # /var/lock/subsys/clamd Clamd Use Threads = yes
 > >>
 > >>
 > >> in clamd.conf
 > >> DatabaseDirectory /var/clamav
 > >> LocalSocket /tmp/clamd.socket
 > >> User postfix
 > >>
 > >> I made the user postfix becuase I run MailScanner as postfix 
 > >> (Don't know if this change is correct)
 > >>
 > >> Permissions:
 > >> /tmp/clamd.socket 777 postfix:postfix
 > >>
 > >> I am getting the error Cannot find Socket (/tmp/clamd) Exiting!
 > >>
 > >> Any suggestions how I can fix this? I am unsure where it is 
 > >> getting the /tmp/clamd from as it is set as /tmp/clamd.socket 
 > >> in MailScanner.conf and clamd.conf
 > >>
 > >> I have done a service clamd stop then start and a 
 > MailScanner reload
 > >>
 > >> Thanks
 > >> Kate
 > >>     
 > >
 > > I run postfix/mailscanner also and my clamav user is clamav.
 > > It does not need to be the postfix user.
 > >
 > > My socket setup is:
 > >
 > > LocalSocket /var/run/clamav/clamd.sock
 > >
 > > However, I'm using TCP via 127.0.0.1
 > > The port config in your setup, I believe, does not mean 
 > anything if you
 > > are using local socket as opposed to TCP (TCPSocket 3310).
 > >   
 > If it runs as user clamav it can't access the queue file 
 > that is why I 
 > changed it to postfix.
 > Any suggestions on the Cannot find Socket error?

That error is tripped when MailScanner cannot find the socket file, or
access the socket file. The value in parenthesis is the value in the
MailScanner.conf file. Double check that you either do not have two
MailScanner.conf files and it's not defined twice. The default value for the
socket is 127.0.0.1 so it's not getting it from the default and it won't
make up a file name on it's own so MailScanner is getting that value from
somewhere and MailScanner is looking for /tmp/clamd not /tmp/clamd.socket or
/var/run/clamav/clamd.sock depending upon which LocalSocket value you have
posted above is correct.

Rick


--
This message has been scanned for viruses and
dangerous content by MailScanner, and is
believed to be clean.




More information about the MailScanner mailing list