Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Contact Us
Online Help
Domain Status
Man Pages

Virtual Servers

Topology Map

Server Agreement
Year 2038

USA Flag



Man Pages

Manual Reference Pages  -  CLAMCOUR (1)


clamcour - Courier filter for ClamAV to scan incoming mail for viruses



filterctl [ start | stop ] clamcour


This manual page briefly documents ClamCour which is a a Courier filter for ClamAV to allow the scanning of incoming mail. In case a virus is found, the mail is rejected. Optionally A MIME-header that reports ClamCour signature is added, a customizable message to recipients can be sent and message can be copied into "quarantine" zone for later check.

Use "filterctl [ start | stop ] clamcour" to activate/deactivate the ClamCour filter.

For more info on how Courier’s courierfilter and filterctl works, see courierfilter(8) or visit <>


ClamCour uses four configuration files which are located in /COURIER_ETC/clamcour (where CLAMCOUR_ETC is Courier’s etc directory). These configuration files are plain text files that can be modified with any text editor. You must run courier restart for any changes to these files to take effect.
  This file contains one line, containing "quarantine zone" path. Following lines will be ignored. If path is not valid, quarantine will be disabled. Please make sure that courier’s user has write and execute rights on the folder. Files will be stored like YYYYNNAAHHMMSS-DXXXXXX, where XXXXXX is a 6-digit number supplied by Courier, YYYYNNAAHHMMSS is the current time of the message, written as year, month, day, hour, minutes and seconds.
  When this empty file is present, infected message will be compressed before quarantine, using BZip2 compression.
  When this empty file is present, infected message will be compressed before quarantine, using GZip compression. If bz2_compression is also present, BZip2 will be used.
  This file contains multiple lines, that define message’s format for destination recipients. First two lines are sender email address and email subject. When a viral attachment is detected, destination recipients will be notified of missing email. There are no limitations in message text, and four tags can be used, that will be replaced with message informations. Each tag must be enclosed within ’%’ character. To write a single ’%’ character, just double it (i.e. ’%%’).
  As default, clamcour won’t scan attachments that are bigger than 1Mb, thus avoiding timeout during receiving big messages. You can change the limit writing a "sizelimit" text file, and specifying maximum dimension in bytes. A value of "0" disables any size limit check.


virmessage tags are:
%host% It will be replaced with SMTP sender server information.
  It will be replaced with sender’s email address.
  It will be replaced with virus signature.
%date% It will be replaced with incoming message’s date.

FIFO command pipe

In 0.3.2 version a new feature was added, a FIFO file where you can remotely control ClamCour. Just echo on it, it’s located in /tmp directory.

Available commands (case-sensitive):
  This command refresh internal ClamAV virus database. It has to be called after a freshclam’s successful update. Just edit your freshclam.conf, and modify ( obviously uncomment :-) ) this line

OnUpdateExecute /bin/echo reloadDB > /tmp/clamcour.fifo

If there are some mails under scanning, database update will be delayed until clamcour gets idle.


ClamCour was written by Tony Sin(x) ’76 <>. Web page:

Original manual page for the Debian distribution was written by Frederik Dannemare <>, for the Debian project. Current manual page was written by Tony Sin(x) ’76 <>

Search for    or go to Top of page |  Section 1 |  Main Index

Tony Sin(x) '76 CLAMCOUR (1) Nov 1, 2006

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.