Results 1 to 3 of 3

Thread: clamav and freshclam

  1. #1
    maumar is offline Elite Member
    Join Date
    Mar 2007
    Location
    Small village in the center of Italy
    Posts
    348
    Rep Power
    8

    Default clamav and freshclam

    I have following issue with one installation.
    I have implemented a hot/cold stategy to rsync /opt/zimbra to a dr site.
    Every night, when restarting zimbra, due to peering band issues (they have 2 megabits with colt and band generally is not an issue, maybe clamav mirrors have a poor peering with colt in italy), freshclam is not able to refresh clam daily db, clamav does not start, mta does not deliver messages and so on.

    What I would is that when i restart zimbra, only clamv is restarted, freshclam isn't.

    I don't see any valid reason to have them joint, this is a very critical point of failure, mostly for unattended stop/start operations.

    I have changed zmclamdctl to take in count of frashclam delay:
    Code:
    90-        >> ${zimbra_log_directory}/freshclam.log 2>&1 &
    91:    echo "sleeping 300 secs"
    92:    sleep 300
    93-    echo -n "Starting clamd..."
    and loop:
    Code:
    98:    for ((i = 0; i < 120; i++)); do
    99-      checkrunning
    but imho it would better to have another solution, not this ugly patch.

    If all this makes sense, i could file an enhancement bug on bugzilla

    -m

  2. #2
    uxbod's Avatar
    uxbod is offline Moderator
    Join Date
    Nov 2006
    Location
    UK
    Posts
    8,017
    Rep Power
    24

    Default

    Yes please file a RFE.

  3. #3
    maumar is offline Elite Member
    Join Date
    Mar 2007
    Location
    Small village in the center of Italy
    Posts
    348
    Rep Power
    8

    Default

    I have found another smarter solution.
    Very simply, sequence should reverted.
    Instead of starting freshclamav in daemon mode and then clamav:

    Code:
       ${zimbra_home}/clamav/bin/freshclam \
          --config-file=${zimbra_home}/conf/freshclam.conf -d --checks=12 \
            >> ${zimbra_log_directory}/freshclam.log 2>&1 &
    
        echo -n "Starting clamd..."
        ${zimbra_home}/clamav/sbin/clamd \
          --config-file=${zimbra_home}/conf/clamd.conf \
            >> ${zimbra_log_directory}/clamd.log 2>&1 &
    clamad should started before freshclam:

    Code:
        echo -n "Starting clamd..."
        ${zimbra_home}/clamav/sbin/clamd \
          --config-file=${zimbra_home}/conf/clamd.conf \
            >> ${zimbra_log_directory}/clamd.log 2>&1 &
    
       ${zimbra_home}/clamav/bin/freshclam \
          --config-file=${zimbra_home}/conf/freshclam.conf -d --checks=12 \
            >> ${zimbra_log_directory}/freshclam.log 2>&1 &

    this way clamd starts always with a consistent daily.cvd, then freshclam is started and, when it finish to refresh db, if daily.cvd was really refreshed, it will notify clamd to reload itself:

    ~/conf/freshclam.conf
    Code:
    # Send the RELOAD command to clamd.
    # Default: no
    NotifyClamd /opt/zimbra/conf/clamd.conf
    i will file an RFE
    Last edited by maumar; 08-13-2009 at 11:57 PM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] FreshClam would not refresh on cron
    By troublemaker in forum Administrators
    Replies: 6
    Last Post: 04-02-2009, 01:54 PM
  2. [SOLVED] Freshclam not running after upgrade
    By jriddle in forum Installation
    Replies: 5
    Last Post: 10-31-2008, 09:55 AM
  3. zmclamdctl is not running after upgrade
    By Darren in forum Installation
    Replies: 24
    Last Post: 10-10-2008, 09:10 AM
  4. [SOLVED] Howto: Update ClamAV
    By unilogic in forum Administrators
    Replies: 9
    Last Post: 12-12-2007, 05:28 AM
  5. Replies: 2
    Last Post: 03-15-2006, 09:37 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •