Version 0.19

October 5, 2006


Clamdmail assumes that you have a working qmail, ripmime, clamav, and if used, spamassassin and clamd-greylist installation. In general, similar programs could be substituted for any one of these, but specific instructions are not provided for any other installations.

Thanks to the wonder of autotools:

	make install (as root)

This will install clamd-queue and clamd-greylist (if built) into the sbin directory setup in the configure step (default: /usr/local/sbin).

Configure Options

Configure takes the usual path options as well as these clamdmail-specific options:

--sbindir=/var/qmail/bin (default=/usr/local/sbin)
You probably want to set this option to put clamd-queue in the same folder as qmail-queue.
--with-qcontrol=PATH (default=/var/qmail/control)
The path to the qmail control files. Unless you installed qmail somewhere funny, or want to use a different set of configuration files for clamdmail than qmail, the default should be fine.
--with-spool-dir=PATH (default=/var/qmail/queue/clamd)
This path is used as the root for spooling incoming files and for storing individual files after MIME decoding. For each incoming message a new folder is created in under this path. I like to keep all my mail files on the same path, but you might like to put the clamdmail spool on another disk or path.
--with-postgres=PATH (default=auto)
If configure can find libpq and the required headers on your system it will build and install clamd-greylist for use in greylisting. If you'd like to prevent clamd-greylist from being built and intalled, specify this path as "no". Otherwise specify the path under which libpq installed, or let configure try to guess for you.

Runtime Options

You'll probably want to provide clamdmail with some environmental variables -- see README for specifics. If you're using tcprules you can simply add environmental variables to your SMTP rules file. Otherwise export them in the script you use to launch your SMTP server.


Please note that you must either specify a valid PATH environmental variable or specify the ripmime, clamav, spamassassin, qmail-queue, and clamd-greylist programs by their full name for clamdmail. If you'd like clamdmail to use full paths by default simply modify src/init.h with the correct paths for your programs and recompile.

Alternate Queue

If you have the qmail alternate queue patch installed, be sure to tell call clamd-queue rather than qmail-queue. You can do this by passing qmail-smtpd the environmental variable:


If you don't have the alternate queue patch installed, first move these files:

	mv qmail-queue qmail-queue.real
	mv clamd-queue qmail-queue

Then pass clamdmail the environmental variable: