Clamdmail

Version 0.19

October 5, 2006


Configuration Files

/var/qmail/control/maxbouncebytes

This file is read to determine the maximum incoming message size to accept. Messages larger than this size will be rejected with a permanent SMTP failure code. This preserves stock qmail behavior.


Required Environmental Variables

CLAMD_QUEUE

The program called by clamdmail when it wants to passes messages to the queue. This program should behaves like qmail-queue and defaults to that value.

CLAMD_MIME

The program called by clamdmail to decode MIME data. This program should behave like ripmime and defaults to that value. If another program is used the command-line arguments passed to that program can be adjusted in src/clamd-queue.h.

CLAMD_SCANNER

The program called by clamdmail to scan for viruses. This program should behave like clamdscan and defaults to that value. If another program is used the command-line arguments passed to that program can be adjusted in defs.h. If another virus scanner is used it must return non-0 to indicate the presence of a virus and 0 to indicate that a message is clean.

Logging Environmental Variables

LOGLEVEL

This variable determines the amount of data that both clamd-queue and clamd-greylist spit out on stderr during processing. The default value is 1, which logs only errors. Values of 2 and 3 produce other useful information, including the results of greylisting and scanning operations. Values above 4 print runtime configuration information and a value of 8 prints all debugging messages.

Filtering Environmental Variables

CLAMD_FILTER

This program is called by clamdmail just before passing messages into the queue. If this variable is not set, filtering is skipped. Otherwise the incoming message is forwarded to this program's stdin and this program's stdout is then used to replace the message. If you're using something that behaves like spamc it should work fine. If another program is used the command-line arguments passed to that program can be adjusted in src/clamd-queue.h

Greylisting Environmental Variables

CLAMD_GL

This program is called by clamdmail to greylist incoming messages based on the environmental variables set by qmail-smtp. If this variable is not set, greylisting is skipped. This program should behave like the included clamd-greylist, and must return 0 for messages that should be accepted and non-0 for messages that should be greylisted. This program is expected to read the environment for run-time configuration, the environmental variable TCPREMOTEIP for the remote IP address and stdin for the message envelope addresses.