From ebc0e7c21554d015efa93923aa876d64bac4d44b Mon Sep 17 00:00:00 2001 From: Sergey Poznyakoff Date: Thu, 13 Dec 2007 18:22:11 +0000 Subject: (mf_cfg_param): Add docstrings. git-svn-id: file:///svnroot/mailfromd/trunk@1539 7a8a7f39-df28-0410-adc6-e0d955640f24 --- src/main.c | 94 ++++++++++++++++++++++++++++++++++++++++++++++---------------- 1 file changed, 70 insertions(+), 24 deletions(-) (limited to 'src/main.c') diff --git a/src/main.c b/src/main.c index 121c73b9..23df6e54 100644 --- a/src/main.c +++ b/src/main.c @@ -1536,7 +1536,8 @@ cb_set_variable(mu_debug_t err, void *data, char *arg) mf_error_on_locus(err, _("missing value")); return 1; } - + *p++ = 0; + for (; *p == ' ' || *p == '\t'; p++) if (!*p) { mf_error_on_locus(err, _("missing value")); @@ -1613,31 +1614,76 @@ cb_include_path(mu_debug_t err, void *data, char *arg) /* Keep alphabetical ordering of statements */ struct mu_cfg_param mf_cfg_param[] = { - { "connect-timeout", mu_cfg_callback, NULL, 0, cb_connect_timeout }, - { "debug", mu_cfg_callback, NULL, 0, cb_debug }, - { "ehlo-domain", mu_cfg_callback, NULL, 0, cb_ehlo_domain }, - { "group", mu_cfg_callback, NULL, 0, cb_group }, - { "include-path", mu_cfg_callback, NULL, 0, cb_include_path }, - { "initial-response-timeout", mu_cfg_callback, NULL, 0, - cb_initial_response_timeout }, - { "io-timeout", mu_cfg_callback, NULL, 0, cb_io_timeout }, - { "lock-retry-count", mu_cfg_size, &lock_retry_count_option }, + { "debug", mu_cfg_callback, NULL, 0, cb_debug, + N_("Set Mailfromd debug verbosity level. Argument is a comma-" + "separated list of debug specifications, each of which has the " + "following form:\n" + " [=\n" + "where is the name of a Mailfromd module, and " + "is the desired verbosity level for that module."), + N_("spec: list") }, + { "source-info", mu_cfg_bool, &source_info_option, 0, NULL, + N_("Debug messages include mailfromd source locations.") }, + { "stack-trace", mu_cfg_bool, &stack_trace_option, 0, NULL, + N_("Dump stack traces on runtime errors.") }, + { "connect-timeout", mu_cfg_callback, NULL, 0, cb_connect_timeout, + N_("Set SMTP connect timeout."), + N_("time") }, + { "initial-response-timeout", mu_cfg_callback, NULL, 0, + cb_initial_response_timeout, + N_("Timeout for initial SMTP response."), + N_("time") }, + { "io-timeout", mu_cfg_callback, NULL, 0, cb_io_timeout, + N_("Timeout for SMTP I/O operations."), + N_("time") }, + { "milter-timeout", mu_cfg_callback, NULL, 0, cb_milter_timeout, + N_("Set milter timeout."), + N_("time") }, + { "ehlo-domain", mu_cfg_callback, NULL, 0, cb_ehlo_domain, + N_("Set the domain name for EHLO command.") }, + { "mail-from-address", mu_cfg_callback, NULL, 0, cb_mail_from_address, + N_("Set email address for use in SMTP `MAIL FROM' command. " + "Argument is an email address or a comma-separated list of " + "addresses. Use <> for null address. Other addresses can " + "be given without angle brackets."), + N_("addr") }, + { "group", mu_cfg_callback, NULL, 0, cb_group, + N_("Retain the supplementary group when switching to user " + "privileges") }, + { "user", mu_cfg_string, &user, 0, NULL, + N_("Switch to this user privileges after startup.") }, + { "include-path", mu_cfg_callback, NULL, 0, cb_include_path, + N_("Add directories to the list of directories to be searched for " + "header files. Argument is a comma-separated list of " + "directory names."), + N_("path") }, + { "lock-retry-count", mu_cfg_size, &lock_retry_count_option, 0, NULL, + N_("Retry acquiring DBM file lock this number of times.") }, { "lock-retry-timeout", mu_cfg_callback, NULL, 0, - cb_lock_retry_timeout }, - { "mail-from-address", mu_cfg_callback, NULL, 0, - cb_mail_from_address }, - { "milter-timeout", mu_cfg_callback, NULL, 0, - cb_milter_timeout }, - { "pidfile", mu_cfg_string, &pidfile }, - { "relay-file", mu_cfg_callback, NULL, 0, cb_relay_file }, - { "setvar", mu_cfg_callback, NULL, 0, cb_set_variable }, - { "script-file", mu_cfg_string, &script_file }, - { "source-info", mu_cfg_bool, &source_info_option }, + cb_lock_retry_timeout, + N_("Set the time span between the two DBM locking attempts."), + N_("time") }, + { "pidfile", mu_cfg_string, &pidfile, 0, NULL, + N_("Set file to store PID value in."), + N_("file") }, + { "relay-file", mu_cfg_callback, NULL, 0, cb_relay_file, + N_("Read relayed domains from ."), + N_("file") }, + { "setvar", mu_cfg_callback, NULL, 0, cb_set_variable, + N_("Initialize a mailfromd variable. Argument must be:\n" + " \n" + "where is mailfromd variable name and is a value " + "to be assigned to it.") }, + { "script-file", mu_cfg_string, &script_file, 0, NULL, + N_("Read filter stript from ."), + N_("file") }, /* FIXME: Could have used mu_cfg_ipv4 here, but... */ - { "source-ip", mu_cfg_callback, NULL, 0, cb_source_ip }, - { "stack-trace", mu_cfg_bool, &stack_trace_option }, - { "state-directory", mu_cfg_callback, NULL, 0, cb_state_directory }, - { "user", mu_cfg_string, &user }, + { "source-ip", mu_cfg_callback, NULL, 0, cb_source_ip, + N_("Set source address for TCP connections."), + N_("ip: ipaddr") }, + { "state-directory", mu_cfg_callback, NULL, 0, cb_state_directory, + N_("Set program state directory."), + N_("dir") }, { NULL } }; #endif -- cgit v1.2.1