clmilter_watch has been renamed to milter_watch

You will be redirected to http://www.itg.uiuc.edu/itg_software/milter_watch/ in 5 seconds.

clmilter_watch

clmilter_watch tests the functionality of clamav-milter, a Sendmail Milter for the ClamAV open source virus scanner.

Documentation:

Running clmilter_watch -h will give the following basic information:
Synopsis:
      clmilter_watch [-q] [-d] [-t timeout] [-s socket] [-L lockfile] [-A]
        
        -h           This help screen
        -q           Quiet mode (don't print status)
        -d           Debug mode (lots of ugly information)
        -t timeout   Seconds to wait for milter response (default: 15)
        -s socket    Path to clamav-milter socket or TCP port
        -L lockfile  Path to clamav-milter lockfile (use /dev/null to disable)
        -A           Allow viruses through if header added
    
    Returns 0 if clamav-milter should be restarted
            1 if clamav-milter working, or administratively shut down
    
    Recommended cronjob:
    */15 * * * * root clmilter_watch -q && /etc/init.d/clamav-milter condrestart
In addition, the following notes may be useful:
  • clmilter_watch has been tested to work with clamav-milter versions 0.83 through 0.86.2. Because it takes the part of the sendmail side of the connection, it is expected that clmilter_watch will work with all versions of clamav-milter.
  • The default timeout is 15 seconds. Most systems will return in under a second, but it's possible that a heavily-loaded system could take longer, and you might want to increase this. The minimum value for this parameter is 1.
  • The -s option should point to the clamav-milter socket (default: /var/run/clamav/clmilter.sock). If you use a TCP socket, you can give the port number here, and it will connect to that port on localhost. (You can easily modify the script if you need to connect to a port on another machine.) You can find out where your socket file is by looking in your sendmail.mc or sendmail.cf file. This is the problem if it terminates with Couldn't open socket.
  • Some systems use a lockfile to record whether a daemon is running. This script checks the presence of that lockfile (default: /var/lock/subsys/clamav-milter) to avoid testing if clamav-milter was administratively shut down. If you don't want to use this, you can give -L/dev/null as an option.

Contact:

Please send bug reports or feature requests (preferably in the form of patches) to Damian Menscher at menscher@uiuc.edu. If you are seeking help, please include as much system information as possible, along with the output of clmilter_watch -d.

License:

This software is distributed under the University of Illinois/NCSA Open Source License.

Download:

Save to to a file and chmod +x it. The defaults should work well for a RedHat-like system.

Version 0.4: clmilter_watch-0.4 -- test false positives; add flag to allow viruses through

Version 0.3: clmilter_watch-0.3 -- handle stale socket

Version 0.2: clmilter_watch-0.2 -- code cleanup and public release

Version 0.1: Not publicly released -- initial hack

Proposed changes:

Tell me if there's interest in any of this:

  • Add an option to allow the TCP socket to be on a different machine
  • Change the defaults (I'm open to suggestions)