From 216e32d823baa33dd3e302201197860db52ce7a4 Mon Sep 17 00:00:00 2001 From: Stef Walter Date: Thu, 16 Sep 2004 17:57:09 +0000 Subject: - Put in comments for adding options. --- src/clamsmtpd.c | 22 ++++++++++++++++++---- 1 file changed, 18 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/clamsmtpd.c b/src/clamsmtpd.c index 9f35165..1d10adf 100644 --- a/src/clamsmtpd.c +++ b/src/clamsmtpd.c @@ -99,6 +99,23 @@ clctx_t; #define CLAM_DISCONNECT "END\n" #define DEFAULT_CONFIG CONF_PREFIX "/clamsmtpd.conf" +#define DEFAULT_CLAMAV "/var/run/clamav/clamd" +#define DEFAULT_HEADER "X-Virus-Scanned: ClamAV using ClamSMTP" + +/* ----------------------------------------------------------------------- + * CONFIGURATION OPTIONS + * + * - Be sure your option is relevant to this file. Certain options + * should go into smtppass.c + * - Add field to clstate_t structure (above) + * - Add default (above) and set in main (below). Required options + * are difficult to implement under the current structure. It's + * better to have a sane default. + * - Add config keyword (below) + * - Parsing and validation of option in cb_parse_option (below) + * - Document in the sample doc/clamsmtpd.conf + * - Document in doc/clamsmtpd.conf.5 + */ #define CFG_CLAMADDR "ClamAddress" #define CFG_HEADER "ScanHeader" @@ -107,9 +124,6 @@ clctx_t; #define CFG_QUARANTINE "Quarantine" #define CFG_DEBUGFILES "DebugFiles" -#define DEFAULT_CLAMAV "/var/run/clamav/clamd" -#define DEFAULT_HEADER "X-Virus-Scanned: ClamAV using ClamSMTP" - /* ----------------------------------------------------------------------- * GLOBALS */ @@ -144,7 +158,7 @@ int main(int argc, char* argv[]) int r; char* t; - /* Setup some defaults */ + /* Configuration defaults */ memset(&g_clstate, 0, sizeof(g_clstate)); g_clstate.header = DEFAULT_HEADER; g_clstate.directory = _PATH_TMP; -- cgit v1.2.3