1

Currently running Postfix, Amavis, Spamassassin, and ClamAV spam filter which sends to on site Exchange server. Running on Ubuntu Server 16.04 CLI. Everything works and sends mail to Exchange server no problem, Spamassassin and Amavis work and pickup/block spam. But I can't get Clam to scan for viruses in the e-mail coming through postfix, I see nothing in mail.log about it scanning. The EICAR test file and ClamAV test files go right through the filter.

The only thing related to clam in syslog is: (!)ClamAV-clamd: All attempts (1) failed connecting to /var/run/clamav/clamd.ctl, retrying (2).

I can post logs if needed.

rets34
  • 11

1 Answers1

0

From the official wikipages for clamav to set clamav up we have two modes:

  1. Manual mode and is setup and used accordingly

    • Install:

      sudo apt install clamav clamtk
      
    • Usage:

      sudo clamscan [options] [target file or directory]
      
  2. Daemon mode and is setup and used accordingly

    • Install:

      sudo apt install clamav-daemon
      
    • Usage:

      sudo clamdscan [options] [target file or directory]
      

Information from wiki

Run ClamAV as a Daemon

Install clamav-daemon. You can then use clamdscan where you would previously have used clamscan. Lots of programs, especially e-mail servers, can connect to a ClamAV daemon. This speeds up virus scanning as the program is always in memory.

The clamav-daemon package creates a 'clamav' user; in order to allow ClamAV to scan system files, such as your mail spool, you can add clamav to the group that owns the files.

Let ClamAV listen for Incoming Scans

There are cases where you may want ClamAV daemon to act as a scanner for other systems, so you don't have to run everything locally on the system.

To do this, you simply have to modify the clamd.conf file and add TCPSocket PORTNUMBER and TCPAddr IPADDRESS arguments to the clamd.conf file and reload the daemon. The daemon will then accept connections to it via the IP address and Port combination you specify.

Check to find if Clamscan is running

Look for it in the processt list, or use this handy shortcut: ps ax | grep [c]lamd

George Udosen
  • 37,534