Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
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.
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/
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:
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.
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
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.