help centre
For more info visit status.atmail.com

How can we help?


Search our knowledge base for answers to
common questions and latest updates.



My activities New request

Follow

Auto-run ClamAV if found inactive

Stewart -

PROBLEM
My ClamAV is not always running.

ENVIRONMENT

  • On-Premise Server + WebMail Installations: Version 6.0 > Current Version

CAUSE
ClamAV, at times, fails and puts mail delivery and the processing of emails in the spool to a stop. This can be avoided by using ClamAV with supervise, a Unix tool that comes with the daemontools (http://cr.yp.to/daemontools.html) package, which basically checks if a service is running, then re-runs it if found inactive.
Implementing supervise with ClamAV is pretty straightforward. Just go through the following steps:

RESOLUTION

  1. Download daemontools (http://cr.yp.to/daemontools/daemontools-0.76.tar.gz), and install it on your server
  2. Add the following to your /etc/inittab file:
    SV:123456:respawn:/command/svscanboot
  3. Create the ClamAV supervise log directory:
    % mkdir /usr/local/atmail/av/supervise/log
  4. Create a file (with 755 permissions) called /usr/local/atmail/av/supervise/run, and place the following inside it:
    #!/bin/sh 
    /usr/local/atmail/av/sbin/clamd
  5. Create a file (with 755 permissions) called /usr/local/atmail/av/supervise/log/run, and place the following inside it:
    #!/bin/sh
    exec setuidgid root multilog s100000 n20 ./clamd
  6. Link the ClamAV supervice directory to the /service directory:
    % ln -s /usr/local/atmail/av/supervise/ /service/clamd
  7. Run svstat for ClamAV:
    % svstat clamd
    This should then have ClamAV run alongside supervise, and auto-regenerate if found inactive.
Have more questions? Submit a request

Comments


Contact our support team


+61 (7) 5357 6605       support@atmail.com