LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 11-01-2012, 08:05 AM   #1
RLH1919
Member
 
Registered: Dec 2007
Location: Charleston, South Carolina USA
Distribution: Slackware 13 Ubuntu RHEL 5
Posts: 50

Rep: Reputation: 15
Sendmail + Clamav Milter permissions error


I am trying to configure clamav-milter to scan incoming mail on my server.
I am running Slackware 13.37, Clamav version 97.5, and Sendmail version 8.14.4.
The error I get when I restart sendmail is:
Starting sendmail MTA daemon: /usr/sbin/sendmail -L sm-mta -bd -q25m
451 4.0.0 /etc/mail/sendmail.cf: line 1706: Xclamav-milter: local socket name /var/run/clamav/clamav-milter.socket unsafe: Group writable directory
Starting sendmail MSP queue runner: /usr/sbin/sendmail -L sm-msp-queue -Ac -q25m

Clamav starts but is not scanning my incoming mail, has no information saying so in header of emails.

My sendmail.cf line 1706 reads:

Xclamav-milter, S=local:/var/run/clamav/clamav-milter.socket, F=, T=S:4m;R:4m

I have tried changing the permissions on /var/run/clamav directory and it's contents to smmsp being the group, clamav is the owner but no luck.
Here are the current permissions for /var/run/clamav:

srwxrwx--- 1 clamav smmsp 0 Aug 29 08:23 clamav-milter.socket=
-rw-rw-r-- 1 clamav clamav 5 Nov 1 08:51 clamd.pid
srw-rw---- 1 clamav clamav 0 Nov 1 08:51 clamd.socket=
-rw-rw---- 1 clamav clamav 5 Nov 1 08:51 freshclam.pid
for the clamav folder it is:

drwxrwx--x 2 clamav clamav 4096 Nov 1 08:51 clamav/

any help would be greatly appreciated, thank you.
 
Old 11-01-2012, 10:31 AM   #2
RLH1919
Member
 
Registered: Dec 2007
Location: Charleston, South Carolina USA
Distribution: Slackware 13 Ubuntu RHEL 5
Posts: 50

Original Poster
Rep: Reputation: 15
Well I didn't have clamav-milter enabled in the /etc/rc.d/rc.clamav file so I am not getting any permissions errors now.
I am still unable to start clamav-milter and when I start clamav I get the error message:

Starting clamd daemon: /usr/sbin/clamd .
Starting freshclam daemon: /usr/bin/freshclam -d -l /var/log/freshclam.log .
Starting clamav-milter daemon: /usr/sbin/clamav-milter -dblo --max-children=2 local:/var/run/clamav/clmilter.sock /usr/sbin/clamav-milter: illegal option -- d
ERROR: Unknown option passed
ERROR: Can't parse command line options
 
Old 11-02-2012, 06:56 AM   #3
RLH1919
Member
 
Registered: Dec 2007
Location: Charleston, South Carolina USA
Distribution: Slackware 13 Ubuntu RHEL 5
Posts: 50

Original Poster
Rep: Reputation: 15
I can manually start clamav-milter and it runs without error and is successfully catching test virus emails and quarantine's it. I just can't figure out how to get rc.clamav to start it.
I thought clamd was supposed to start the clamav-milter. Not sure how to get it all to start automatically, any ideas?
I have also tried changing options in clamav-milter actions to quarantine. By looking at the man pages it suggest
-Q --quarantine=EMAILADDRESS or I could use -U --quarantine.dir=DIR
I have tried adding this in the clamav-milter.conf and it just errors out on me and clamav-milter will not start.
I guess the switches are for command line options and not the clamav-milter.conf?
If anybody has any ideas on how to specify quarantine location? Thanks.
 
Old 11-02-2012, 11:31 AM   #4
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Rep: Reputation: 78
Just remove everything what is after /usr/sbin/clamav-milter in /etc/rc.d/rc.clamav. Everything what is there is (or should be) already configured in /etc/clamav-milter.conf.
As for the automatic start-up for clamav you need to change your /etc/rc.d/rc.M - add right before the sendmail part this:
Code:
# Clamav start
if [ -x /etc/rc.d/rc.clamav ]; then
  . /etc/rc.d/rc.clamav start
fi

# Start the sendmail daemon:
if [ -x /etc/rc.d/rc.sendmail ]; then
  . /etc/rc.d/rc.sendmail start
fi
(note that the sendmail part is already there)
 
Old 11-06-2012, 08:43 AM   #5
RLH1919
Member
 
Registered: Dec 2007
Location: Charleston, South Carolina USA
Distribution: Slackware 13 Ubuntu RHEL 5
Posts: 50

Original Poster
Rep: Reputation: 15
Thanks hua that fixed the problem, appreciate your help.
 
Old 11-06-2012, 09:15 AM   #6
hua
Member
 
Registered: Oct 2006
Location: Slovak Republic
Distribution: Slackware 14.2, current
Posts: 461

Rep: Reputation: 78
Quote:
Originally Posted by RLH1919 View Post
Thanks hua that fixed the problem, appreciate your help.
You are welcome.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mimedefang clamav vs clamav-milter digitolx Linux - Server 0 10-20-2010 03:45 PM
Database error - clamav-milter is stopping m2azer Linux - Server 2 12-16-2007 08:48 PM
Clamav-Milter Issues (messages not being processed) jon3k Linux - Server 0 08-28-2006 05:31 PM
Problem with amavis-milter + sendmail + clamav bhaveshvv109 Linux - General 0 06-21-2006 07:56 AM
Amavisd-new: Interface to Sendmail milter + ClamAV cyberjames Slackware 0 02-07-2005 01:41 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:49 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration