Bug 932166 - miscellaneous issues with clamav and spamassassin on fresh install
Summary: miscellaneous issues with clamav and spamassassin on fresh install
Status: RESOLVED DUPLICATE of bug 1071932
Alias: None
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: YaST2 (show other bugs)
Version: Current
Hardware: x86-64 openSUSE 13.2
: P5 - None : Normal (vote)
Target Milestone: ---
Assignee: Peter Varkoly
QA Contact: Jiri Srain
URL:
Whiteboard:
Keywords:
Depends on: 932165
Blocks:
  Show dependency treegraph
 
Reported: 2015-05-24 23:11 UTC by Andrew Beames
Modified: 2019-06-05 15:03 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andrew Beames 2015-05-24 23:11:49 UTC
I am using openSUSE Tumbleweed on a reasonably fresh install.
I configured "mail server" through YaST2 and selected:
   [x] Enable virus scanning (AMaVIS)
   [x] Enable DKIM signing for outgoing mails

On completion I checked the running services and found an error in /var/log/mail as follows:

amavis[5656]: (!!)TROUBLE in pre_loop_hook: config: no rules were found!  Do you need to run 'sa-update'?
amavis[5656]: (!)_DIE: Suicide () TROUBLE in pre_loop_hook: config: no rules were found!  Do you need to run 'sa-update'?

and

clamd[8194]: Can't open file or directory

and

postfix/qmgr[12738]: warning: connect to transport private/amavis: Connection refused

and

amavis[14603]: (14603-01) (!)connect to /var/run/clamav/clamd-socket failed, attempt #1: Can't connect to a UNIX socket /var/run/clamav/clamd-socket: No such file or directory

and

amavis[14603]: (14603-01) (!)ClamAV-clamscan av-scanner FAILED: /usr/bin/clamscan unexpected exit 2, output="LibClamAV Error: cli_loaddbdir(): No supported database files found in /var/lib/clamav\nERROR: Can't open file or directory" at (eval 99) line 900.


Here is what I did to fix the errors:

(1) directory /var/run/clamav did not exist, so I created it
mkdir /var/run/clamav
chown vscan.vscan /var/run/clamav

(2) directory /var/lib/clamav was empty
an internet search suggested I should use the commands:
freshclam -v
sa-update

(3) freshclam -v 
worked ok, however, sa-update did not exist on my system.

Therefore...

(4) I installed the package "spamassassin" through YaST2 "software management" and then ran the command.

(5) sa-update

Note that a huge number of installs were triggered off by my selecting 
   [x] Enable virus scanning (AMaVIS)
in the first instance, but I assume that this one was missed. e.g. the package "perl-Mail-SpamAssassin" was already installed.

I also noted that in /etc/sysconfig/spamd the option "SPAM_SA_UPDATE" was set to "no", which I changed to "yes"

This may be a personal preference but internet consensus suggested it was a good thing to do.

Having made all these changes, I restarted the services and got a better outcome.

This suggests to me that the YaST2 configuration driven by the setting of
   [x] Enable virus scanning (AMaVIS)

requires all of those steps to be included in order to get the services running for the first time, and in the case of SPAM_SA_UPDATE=yes, keep it up-to-date.
Comment 1 Eric Bischoff 2016-11-08 14:45:16 UTC
On SLE12 SP0, I can reproduce the

      Can't connect to a UNIX socket /var/run/clamav/clamd-socket:
      No such file or directory

problem, which prevents clamd service from starting. If I create /var/run/clamav/ and give it to user vscan, then the service can start.

Strangely enough, I reproduced it only on SLE12 SP0. No such problem apparently on openSUSE versions or on SLE12 SP1 and SP2, not even on SLE11. This makes me think it was a transient problem with packaging.

Hope it helps.
Comment 2 Peter Varkoly 2019-06-05 15:03:03 UTC
Duplicate

*** This bug has been marked as a duplicate of bug 1071932 ***