Me again,
I'm still building my new mail server and I'm struggling getting clamav and exim to talk to each other.
I've installed:
clamav-server-0.98.7-1.el7.x86_64 clamav-lib-0.98.7-1.el7.x86_64 clamav-0.98.7-1.el7.x86_64 clamav-milter-0.98.7-1.el7.x86_64 clamav-data-0.98.7-1.el7.noarch clamav-update-0.98.7-1.el7.x86_64 clamav-milter-systemd-0.98.7-1.el7.noarch clamav-filesystem-0.98.7-1.el7.noarch exim-mon-4.84-4.el7.x86_64 exim-4.84-4.el7.x86_64 exim-greylist-4.84-4.el7.x86_64 exim-pgsql-4.84-4.el7.x86_64 spamassassin-3.4.0-1.el7.x86_64
I configured EXIM and Spamassassin. I started the services
exim spamassassin clamav-milter
In EXIM I configured
av_scanner = clamd:/var/run/clamd.exim/clamd.sock spamd_address = 127.0.0.1 783
However when I tried to send a test email it failed saying
2015-08-24 22:45:13 1ZTzY6-0002f1-OL malware acl condition: clamd: unable to connect to UNIX socket (/var/run/clamd.exim/clamd.sock): No such file or directory 2015-08-24 22:45:13 1ZTzY6-0002f1-OL H=eddie.ringways.co.uk (gary.ringways.co.uk) [10.1.1.115] F=gary@ringways.co.uk temporarily rejected after DATA
I've checked and clamd.sock doesn't exist. Nor does /etc/clam.conf. /etc/clam.d is empty
Results from Google seem to come up with conflicting solutions, but most seem to want to use amavisd which I don't.
Are there anywhere simple instructions on just using clamav and EXIM on Centos 7?
[root@ollie2 ~]# find / -iname clamd.sock [root@ollie2 ~]# systemctl list-unit-files --type=service [.....] clamav-milter.service enabled exim.service enabled spamassassin.service enabled [.....] [root@ollie2 ~]# ps ax|grep cla[m] [root@ollie2 ~]#
Starting / restarting the clamav service does not generate any errors but the process doesn't run
Looking at the unit file
/etc/systemd/system/multi-user.target.wants/clamav-milter.service
it is expecting a config file of
/etc/mail/clamav-milter.conf
so I've edited that file to comment out the 'example' line. In here it defines the socket as
/var/run/clamav-milter/clamav-milter.socket
However, after saving this file the service still fails to start and the socket still doesn't exist
On Tuesday 25 August 2015 14:19:36 Mihamina Rakotomandimby wrote:
On 08/25/2015 04:16 PM, Gary Stainburn wrote:
connect to UNIX socket (/var/run/clamd.exim/clamd.sock): No such file
If you try to locate that file, do you find it somewhere? When you list services (units) and grep with clamav, do you find some?
CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos
On 08/25/2015 04:36 PM, Gary Stainburn wrote:
so I've edited that file to comment out the 'example' line. In here it defines the socket as
/var/run/clamav-milter/clamav-milter.socket
However, after saving this file the service still fails to start and the socket still doesn't exist
Does the directory /var/run/clamav-milter/ exist and is it traversable and writable by the clamav user is running as? Socket creation mostly doesnt include recursive operation (creating the directory)
On Tuesday 25 August 2015 14:44:55 Mihamina Rakotomandimby wrote:
Does the directory /var/run/clamav-milter/ exist and is it traversable and writable by the clamav user is running as? Socket creation mostly doesnt include recursive operation (creating the directory)
It looks like I'm barking up the wrong tree here. When I run the command in the terminal I get
[root@ollie2 clamav-milter]# /usr/sbin/clamav-milter -c /etc/mail/clamav-milter.conf --nofork=yes ERROR: No ClamdSocket specified ERROR: Failed to init the socket pool [root@ollie2 clamav-milter]#
It looks like I don't need clamav-milter as it seems to be wanting access to the clamd socket in exactly the same way as EXIM, i.e., EXIM wants to talk directly to clamd and not clamav-milter. The latter seems to be an interface for sendmail.
I'm now looking at getting the clamd service running. I installed
clamav-server-sysvinit-0.98.7-1.el7.noarch clamav-server-systemd-0.98.7-1.el7.noarch
which I expected to give the the systemd unit file as well as the old init scripts. However I can't see either. I also still don't have a
/etc/clamd.conf
The story so far:
Even though I've got clamav-server-systemd installed I can't find any units etc to enable me to control clamd via systemctl.
When I ran clamd in a terminal it complained that it couldn't find /etc/clamd.conf which made sense as it didn't exist.
I copied /etc/clam.d/exim.conf from a F21 system to /etc/clamd.conf on this server. I then created /var/log/clamd.exim and /var/run/clamd.exim and re-ran clamd. It then ran, and worked fine with EXIM.
I've obviously missed something as I'm certain that the RPM maintainers who provided all of the clam RPM's don't expect anyone to do this every time.
In order to get this working I'm going to copy the unit file
/etc/systemd/system/multi-user.target.wants/clamav-milter.service
to create clamd.service and will then have a working system. However, I would love to know what I *should* have done to get this working.
BTW, I've just received two lovely emails from a scantily clad young lady who wants to get to know me better. I don't know if that email address is subscribed to this list, or just web crawling, but just in case, here are the details
Julie Anna julie70309 at loverhearts.com