summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog39
-rw-r--r--dotlock/dotlock.c15
-rw-r--r--imap4d/imap4d.c38
-rw-r--r--include/mailutils/cfg.h5
-rw-r--r--include/mailutils/libargp.h2
-rw-r--r--libargp/cmdline.h1
-rw-r--r--libargp/muinit.c28
-rw-r--r--libargp/tls.c2
-rw-r--r--libcfg/auth.c12
-rw-r--r--libcfg/common.c71
-rw-r--r--libcfg/gsasl.c4
-rw-r--r--libcfg/ldap.c42
-rw-r--r--libcfg/pam.c4
-rw-r--r--libcfg/radius.c15
-rw-r--r--libcfg/sieve.c16
-rw-r--r--libcfg/sql.c44
-rw-r--r--libcfg/tls.c15
-rw-r--r--libcfg/virtdomain.c5
-rw-r--r--maidag/maidag.c60
-rw-r--r--mail.local/main.c39
-rw-r--r--mail.remote/mail.remote.c14
-rw-r--r--mailbox/cfg_format.c79
-rw-r--r--mailbox/cfg_lexer.c10
-rw-r--r--mimeview/mimeview.c19
-rw-r--r--movemail/movemail.c9
-rw-r--r--po/POTFILES.in8
-rw-r--r--pop3d/pop3d.c31
-rw-r--r--pop3d/pop3d.h4
-rw-r--r--readmsg/readmsg.c25
-rw-r--r--sieve/sieve.c37
30 files changed, 530 insertions, 163 deletions
diff --git a/ChangeLog b/ChangeLog
index cde8b3c79..dc61b8a3e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,9 +1,46 @@
2007-12-04 Sergey Poznyakoff <gray@gnu.org.ua>
+ II. Extend --config-help output. Each configuration parameter
+ has a docstring which is displayed as a comment before it.
+ A docstring is also added to the configuration group structure,
+ for use in future.
+
+ * include/mailutils/cfg.h (struct mu_cfg_param): New members
+ `docstring' and `argname'.
+ (struct mu_cfg_section): New member `docstring'.
+ (mu_cfg_format_docstring): New function.
+ * include/mailutils/libargp.h (mu_help_config_mode): New
+ declaration.
+ * libargp/cmdline.h (mu_help_config_mode): Remove.
+ * libargp/muinit.c (mu_app_init): Better format the initial
+ comment.
+ * mailbox/cfg_format.c (mu_cfg_data_type_string): Use NLS.
+ (mu_cfg_format_docstring): New function.
+ (format_param,format_section): Use mu_cfg_format_docstring.
+ * mailbox/cfg_lexer.c (mu_config_create_container): Initialize
+ allocated memory chunk with zeros.
+ (dup_container): Duplicate docstring.
+ (mu_build_container): Document include statement.
+
+ * dotlock/dotlock.c, imap4d/imap4d.c, libargp/tls.c,
+ libcfg/auth.c, libcfg/common.c, libcfg/gsasl.c, libcfg/ldap.c,
+ libcfg/pam.c, libcfg/radius.c, libcfg/sieve.c, libcfg/sql.c,
+ libcfg/tls.c, libcfg/virtdomain.c, maidag/maidag.c,
+ mail.local/main.c, mail.remote/mail.remote.c, mimeview/mimeview.c,
+ movemail/movemail.c, pop3d/pop3d.c, readmsg/readmsg.c,
+ sieve/sieve.c: Document configuration file statements.
+
+ * pop3d/pop3d.h (expire): Change type to unsigned int.
+
+ * po/POTFILES.in: Add missing files.
+
+ I. Implement --config-help option, which displays configuration
+ file statements understood by the given program.
+
* imap4d/imap4d.h: Include xalloc.h
* frm/common.c, imap4d/imap4d.c: Shut compiler warnings.
* include/mailutils/cfg.h (mu_cfg_format_tree): Rename to
- mu_cfg_format_parse_tree
+ mu_cfg_format_parse_tree.
(mu_cfg_format_container,mu_format_config_tree): New functions.
(mu_parse_config_tree): New prototype.
(mu_cfg_tree_create_node): Change signature (const char* instead
diff --git a/dotlock/dotlock.c b/dotlock/dotlock.c
index c38282f57..0c77a92f6 100644
--- a/dotlock/dotlock.c
+++ b/dotlock/dotlock.c
@@ -105,8 +105,10 @@ parse_opt (int key, char *arg, struct argp_state *state)
break;
case ARGP_KEY_NO_ARGS:
- argp_error (state, _("FILE must be specified"));
-
+ if (!mu_help_config_mode)
+ argp_error (state, _("FILE must be specified"));
+ return ARGP_ERR_UNKNOWN;
+
case ARGP_KEY_INIT:
mu_argp_node_list_init (&lst);
break;
@@ -123,9 +125,12 @@ parse_opt (int key, char *arg, struct argp_state *state)
struct mu_cfg_param dotlock_cfg_param[] = {
- { "force", mu_cfg_time, &force },
- { "retry", mu_cfg_int, &retries },
- { "debug", mu_cfg_bool, &debug },
+ { "force", mu_cfg_time, &force, NULL,
+ N_("Forcibly break an existing lock older than the specified time.") },
+ { "retry", mu_cfg_int, &retries, NULL,
+ N_("Number of times to retry acquiring the lock.") },
+ { "debug", mu_cfg_bool, &debug, NULL,
+ N_("Print details of failure reasons to stderr.") },
{ NULL }
};
diff --git a/imap4d/imap4d.c b/imap4d/imap4d.c
index 48df98a1b..5f1f16218 100644
--- a/imap4d/imap4d.c
+++ b/imap4d/imap4d.c
@@ -272,16 +272,34 @@ cb_preauth (mu_debug_t debug, void *data, char *arg)
}
static struct mu_cfg_param imap4d_cfg_param[] = {
- { "other-namespace", mu_cfg_callback, NULL, cb_other },
- { "shared-namespace", mu_cfg_callback, NULL, cb_shared },
- { "login-disabled", mu_cfg_int, &login_disabled },
- { "create-home-dir", mu_cfg_bool, &create_home_dir },
- { "home-dir-mode", mu_cfg_callback, NULL, cb_mode },
- { "tls-required", mu_cfg_int, &tls_required },
- { "preauth", mu_cfg_callback, NULL, cb_preauth },
- { "preauth-only", mu_cfg_bool, &preauth_only },
- { "ident-keyfile", mu_cfg_string, &ident_keyfile },
- { "ident-entrypt-only", mu_cfg_bool, &ident_encrypt_only },
+ { "other-namespace", mu_cfg_callback, NULL, cb_other,
+ N_("Set other users' namespace. Argument is a colon-separated list "
+ "of directories comprising the namespace.") },
+ { "shared-namespace", mu_cfg_callback, NULL, cb_shared,
+ N_("Set shared namespace. Argument is a colon-separated list "
+ "of directories comprising the namespace.") },
+ { "login-disabled", mu_cfg_int, &login_disabled, NULL,
+ N_("Disable LOGIN command.") },
+ { "create-home-dir", mu_cfg_bool, &create_home_dir, NULL,
+ N_("If true, create non-existing user home directories.") },
+ { "home-dir-mode", mu_cfg_callback, NULL, cb_mode,
+ N_("File mode for creating user home directories (octal)."),
+ N_("mode") },
+ { "tls-required", mu_cfg_int, &tls_required, NULL,
+ N_("Always require STARTTLS before entering authentication phase.") },
+ { "preauth", mu_cfg_callback, NULL, cb_preauth,
+ N_("Configure PREAUTH mode. MODE is one of:\n"
+ " prog:///<full-program-name: string>\n"
+ " ident[://:<port: string-or-number>]\n"
+ " stdio"),
+ N_("MODE") },
+ { "preauth-only", mu_cfg_bool, &preauth_only, NULL,
+ N_("Use only preauth mode. If unable to setup it, disconnect "
+ "immediately.") },
+ { "ident-keyfile", mu_cfg_string, &ident_keyfile, NULL,
+ N_("Name of DES keyfile for decoding ecrypted ident responses.") },
+ { "ident-entrypt-only", mu_cfg_bool, &ident_encrypt_only, NULL,
+ N_("Use only ecrypted ident responses.") },
{ NULL }
};
diff --git a/include/mailutils/cfg.h b/include/mailutils/cfg.h
index 1c55a4fa7..cc3be9a11 100644
--- a/include/mailutils/cfg.h
+++ b/include/mailutils/cfg.h
@@ -129,6 +129,8 @@ struct mu_cfg_param
enum mu_cfg_param_data_type type;
void *data;
mu_cfg_callback_t callback;
+ const char *docstring;
+ const char *argname;
};
enum mu_cfg_section_stage
@@ -150,6 +152,7 @@ struct mu_cfg_section
void *data;
mu_list_t /* of mu_cfg_cont/mu_cfg_section */ subsec;
mu_list_t /* of mu_cfg_cont/mu_cfg_param */ param;
+ char *docstring;
};
enum mu_cfg_cont_type
@@ -209,6 +212,8 @@ int mu_cfg_parse_boolean (const char *str, int *res);
extern int mu_cfg_parser_verbose;
+void mu_cfg_format_docstring (mu_stream_t stream, const char *docstring,
+ int level);
void mu_cfg_format_parse_tree (mu_stream_t stream, struct mu_cfg_tree *tree);
void mu_cfg_format_container (mu_stream_t stream, struct mu_cfg_cont *cont);
void mu_format_config_tree (mu_stream_t stream, const char *progname,
diff --git a/include/mailutils/libargp.h b/include/mailutils/libargp.h
index 6374fea90..8344d0f6a 100644
--- a/include/mailutils/libargp.h
+++ b/include/mailutils/libargp.h
@@ -42,6 +42,8 @@ struct mu_cmdline_capa
struct argp_child *child;
};
+extern int mu_help_config_mode;
+
extern struct mu_cmdline_capa mu_common_cmdline;
extern struct mu_cmdline_capa mu_logging_cmdline;
extern struct mu_cmdline_capa mu_license_cmdline;
diff --git a/libargp/cmdline.h b/libargp/cmdline.h
index 5023f37f6..bfaf74b42 100644
--- a/libargp/cmdline.h
+++ b/libargp/cmdline.h
@@ -20,4 +20,3 @@
#include "mailutils/libargp.h"
extern struct mu_cfg_tree *mu_argp_tree;
-extern int mu_help_config_mode;
diff --git a/libargp/muinit.c b/libargp/muinit.c
index cea56fb79..db7de77e1 100644
--- a/libargp/muinit.c
+++ b/libargp/muinit.c
@@ -81,22 +81,28 @@ mu_app_init (struct argp *myargp, const char **capa,
if (mu_help_config_mode)
{
+ char *comment;
char *canonical_name = get_canonical_name ();
mu_stream_t stream;
mu_stdio_stream_create (&stream, stdout,
MU_STREAM_NO_CHECK|MU_STREAM_NO_CLOSE);
mu_stream_open (stream);
- mu_stream_sequential_printf (stream,
- "# Configuration file structure for %s utility.\n",
- mu_program_name);
- mu_stream_sequential_printf (stream,
- "# For use in global configuration file (%s), enclose it\n"
- "# in `program %s { ... };'\n",
- MU_CONFIG_FILE,
- mu_program_name);
- mu_stream_sequential_printf (stream,
- "# For more information, use `info %s'.\n",
- canonical_name);
+ asprintf (&comment,
+ "Configuration file structure for %s utility.",
+ mu_program_name);
+ mu_cfg_format_docstring (stream, comment, 0);
+ free (comment);
+ asprintf (&comment,
+ "For use in global configuration file (%s), enclose it "
+ "in `program %s { ... };",
+ MU_CONFIG_FILE,
+ mu_program_name);
+ mu_cfg_format_docstring (stream, comment, 0);
+ free (comment);
+ asprintf (&comment, "For more information, use `info %s'.",
+ canonical_name);
+ mu_cfg_format_docstring (stream, comment, 0);
+ free (comment);
mu_format_config_tree (stream, mu_program_name, cfg_param, 0);
mu_stream_destroy (&stream, NULL);
diff --git a/libargp/tls.c b/libargp/tls.c
index f9e74c378..17cff9c2e 100644
--- a/libargp/tls.c
+++ b/libargp/tls.c
@@ -31,7 +31,7 @@ enum {
static struct argp_option _tls_argp_options[] = {
{"ssl-cert", OPT_SSL_CERT, N_("FILE"), OPTION_HIDDEN,
- N_("Specify SSL certificate file"), 0},
+ N_("Specify SSL certificate filep"), 0},
{"ssl-key", OPT_SSL_KEY, N_("FILE"), OPTION_HIDDEN,
N_("Specify SSL certificate key"), },
{"ssl-cafile", OPT_SSL_CAFILE, N_("FILE"), OPTION_HIDDEN,
diff --git a/libcfg/auth.c b/libcfg/auth.c
index 432385088..4374fe4b6 100644
--- a/libcfg/auth.c
+++ b/libcfg/auth.c
@@ -50,8 +50,16 @@ cb_authorization (mu_debug_t err, void *data, char *arg)
}
static struct mu_cfg_param mu_auth_param[] = {
- { "authentication", mu_cfg_callback, NULL, cb_authentication },
- { "authorization", mu_cfg_callback, NULL, cb_authorization },
+ { "authentication", mu_cfg_callback, NULL, cb_authentication,
+ N_("Set a list of modules for authentication. Modlist is a "
+ "colon-separated list of module names or a word `clear' to "
+ "clear the previously set up values."),
+ N_("modlist") },
+ { "authorization", mu_cfg_callback, NULL, cb_authorization,
+ N_("Set a list of modules for authorization. Modlist is a "
+ "colon-separated list of module names or a word `clear' to "
+ "clear the previously set up values."),
+ N_("modlist") },
{ NULL }
};
diff --git a/libcfg/common.c b/libcfg/common.c
index da575fd26..5b409441f 100644
--- a/libcfg/common.c
+++ b/libcfg/common.c
@@ -40,8 +40,11 @@ static struct mu_gocs_debug debug_settings;
/* ************************************************************************* */
static struct mu_cfg_param mu_mailbox_param[] = {
- { "mail-spool", mu_cfg_string, &mailbox_settings.mail_spool },
- { "mailbox-type", mu_cfg_string, &mailbox_settings.mailbox_type },
+ { "mail-spool", mu_cfg_string, &mailbox_settings.mail_spool, NULL,
+ N_("Use specified URL as a mailspool directory."),
+ N_("url") },
+ { "mailbox-type", mu_cfg_string, &mailbox_settings.mailbox_type, NULL,
+ N_("Default mailbox type."), N_("protocol") },
{ NULL }
};
@@ -53,11 +56,19 @@ DCL_CFG_CAPA (mailbox);
/* ************************************************************************* */
static struct mu_cfg_param mu_locking_param[] = {
- { "flags", mu_cfg_string, &locking_settings.lock_flags },
- { "retry-timeout", mu_cfg_ulong, &locking_settings.lock_retry_timeout },
- { "retry-count", mu_cfg_ulong, &locking_settings.lock_retry_count },
- { "expire-timeout", mu_cfg_ulong, &locking_settings.lock_expire_timeout },
- { "external-locker", mu_cfg_string, &locking_settings.external_locker },
+ /* FIXME: Flags are superfluous. */
+ { "flags", mu_cfg_string, &locking_settings.lock_flags, NULL,
+ N_("Default locker flags (E=external, R=retry, T=time, P=pid).") },
+ { "retry-timeout", mu_cfg_ulong, &locking_settings.lock_retry_timeout, NULL,
+ N_("Set timeout for acquiring the lock.") },
+ { "retry-count", mu_cfg_ulong, &locking_settings.lock_retry_count, NULL,
+ N_("Set the maximum number of times to retry acquiring the lock.") },
+ { "expire-timeout", mu_cfg_ulong, &locking_settings.lock_expire_timeout,
+ NULL,
+ N_("Expire locks older than this amount of time.") },
+ { "external-locker", mu_cfg_string, &locking_settings.external_locker, NULL,
+ N_("Use external locker program."),
+ N_("prog") },
{ NULL, }
};
@@ -69,8 +80,13 @@ DCL_CFG_CAPA (locking);
/* ************************************************************************* */
static struct mu_cfg_param mu_address_param[] = {
- { "email-addr", mu_cfg_string, &address_settings.address },
- { "email-domain", mu_cfg_string, &address_settings.domain },
+ { "email-addr", mu_cfg_string, &address_settings.address, NULL,
+ N_("Set the current user email address (default is "
+ "loginname@defaultdomain)."),
+ N_("email") },
+ { "email-domain", mu_cfg_string, &address_settings.domain, NULL,
+ N_("Set e-mail domain for unqualified user names (default is this host)"),
+ N_("domain") },
{ NULL }
};
@@ -82,7 +98,9 @@ DCL_CFG_CAPA (address);
/* ************************************************************************* */
static struct mu_cfg_param mu_mailer_param[] = {
- { "url", mu_cfg_string, &mailer_settings.mailer },
+ { "url", mu_cfg_string, &mailer_settings.mailer, NULL,
+ N_("Use this URL as the default mailer"),
+ N_("url") },
{ NULL }
};
@@ -107,7 +125,10 @@ cb_facility (mu_debug_t debug, void *data, char *arg)
}
static struct mu_cfg_param mu_logging_param[] = {
- { "facility", mu_cfg_callback, NULL, cb_facility },
+ { "facility", mu_cfg_callback, NULL, cb_facility,
+ N_("Set syslog facility. Arg is one of the following: user, daemon, "
+ "auth, authpriv, mail, cron, local0 through local7 (case-insensitive), "
+ "or a facility number.") },
{ NULL }
};
@@ -135,12 +156,20 @@ _cb_daemon_mode (mu_debug_t debug, void *data, char *arg)
}
static struct mu_cfg_param mu_daemon_param[] = {
- { "max-children", mu_cfg_ulong, &daemon_settings.maxchildren },
- { "mode", mu_cfg_callback, NULL, _cb_daemon_mode },
- { "transcript", mu_cfg_bool, &daemon_settings.transcript },
- { "pidfile", mu_cfg_string, &daemon_settings.pidfile },
- { "port", mu_cfg_ushort, &daemon_settings.port },
- { "timeout", mu_cfg_ulong, &daemon_settings.timeout },
+ { "max-children", mu_cfg_ulong, &daemon_settings.maxchildren, NULL,
+ N_("Maximum number of children processes to run simultaneously.") },
+ { "mode", mu_cfg_callback, NULL, _cb_daemon_mode,
+ N_("Set daemon mode (either inetd (or interactive) or daemon)."),
+ N_("mode") },
+ { "transcript", mu_cfg_bool, &daemon_settings.transcript, NULL,
+ N_("Log the session transcript.") },
+ { "pidfile", mu_cfg_string, &daemon_settings.pidfile, NULL,
+ N_("Store PID of the master process in this file."),
+ N_("file") },
+ { "port", mu_cfg_ushort, &daemon_settings.port, NULL,
+ N_("Listen on the specified port number.") },
+ { "timeout", mu_cfg_ulong, &daemon_settings.timeout, NULL,
+ N_("Set idle timeout.") },
{ NULL }
};
@@ -203,8 +232,12 @@ cb_debug_level (mu_debug_t debug, void *data, char *arg)
}
static struct mu_cfg_param mu_debug_param[] = {
- { "level", mu_cfg_callback, NULL, &cb_debug_level },
- { "line-info", mu_cfg_bool, &debug_settings.line_info },
+ { "level", mu_cfg_callback, NULL, &cb_debug_level,
+ N_("Set Mailutils debugging level. Argument is a colon-separated list "
+ "of debugging specifications in the form:\n"
+ " <object: string>[[:]=<level: number>].") },
+ { "line-info", mu_cfg_bool, &debug_settings.line_info, NULL,
+ N_("Prefix debug messages with Mailutils source locations.") },
{ NULL }
};
diff --git a/libcfg/gsasl.c b/libcfg/gsasl.c
index e45f8595a..c04bb8561 100644
--- a/libcfg/gsasl.c
+++ b/libcfg/gsasl.c
@@ -25,7 +25,9 @@
static struct mu_gsasl_module_data gsasl_settings;
static struct mu_cfg_param mu_gsasl_param[] = {
- { "cram-passwd", mu_cfg_string, &gsasl_settings.cram_md5_pwd },
+ { "cram-passwd", mu_cfg_string, &gsasl_settings.cram_md5_pwd, NULL,
+ N_("Name of GSASL password file."),
+ N_("file") },
{ NULL }
};
diff --git a/libcfg/ldap.c b/libcfg/ldap.c
index c0a29fb2b..544bc8e2a 100644
--- a/libcfg/ldap.c
+++ b/libcfg/ldap.c
@@ -37,16 +37,38 @@ cb_field_map (mu_debug_t debug, void *data, char *arg)
}
static struct mu_cfg_param mu_ldap_param[] = {
- { "enable", mu_cfg_bool, &ldap_settings.enable },
- { "url", mu_cfg_string, &ldap_settings.url },
- { "base", mu_cfg_string, &ldap_settings.base },
- { "binddn", mu_cfg_string, &ldap_settings.binddn },
- { "passwd", mu_cfg_string, &ldap_settings.passwd },
- { "tls", mu_cfg_bool, &ldap_settings.tls },
- { "debug", mu_cfg_int, &ldap_settings.debug },
- { "field-map", mu_cfg_callback, NULL, cb_field_map },
- { "getpwnam", mu_cfg_string, &ldap_settings.getpwnam_filter },
- { "getpwuid", mu_cfg_string, &ldap_settings.getpwuid_filter },
+ { "enable", mu_cfg_bool, &ldap_settings.enable, NULL,
+ N_("Enable LDAP lookups.") },
+ { "url", mu_cfg_string, &ldap_settings.url, NULL,
+ N_("Set URL of the LDAP server."),
+ N_("url") },
+ { "base", mu_cfg_string, &ldap_settings.base, NULL,
+ N_("Base DN for LDAP lookups."),
+ N_("dn") },
+ { "binddn", mu_cfg_string, &ldap_settings.binddn, NULL,
+ N_("DN for accessing LDAP database."),
+ N_("dn") },
+ { "passwd", mu_cfg_string, &ldap_settings.passwd, NULL,
+ N_("Password for use with binddn.") },
+ { "tls", mu_cfg_bool, &ldap_settings.tls, NULL,
+ N_("Use TLS encryption.") },
+ { "debug", mu_cfg_int, &ldap_settings.debug, NULL,
+ N_("Set LDAP debugging level.") },
+ { "field-map", mu_cfg_callback, NULL, cb_field_map,
+ N_("Set a field-map for parsing LDAP replies. The map is a "
+ "column-separated list of definitions. Each definition has the "
+ "following form:\n"
+ " <name: string>=<attr: string>\n"
+ "where <name> is one of the following: name, passwd, uid, gid, "
+ "gecos, dir, shell, mailbox, quota, and <attr> is the name of "
+ "the correspondind LDAP attribute."),
+ N_("map") },
+ { "getpwnam", mu_cfg_string, &ldap_settings.getpwnam_filter, NULL,
+ N_("LDAP filter to use for getpwnam requests."),
+ N_("filter") },
+ { "getpwuid", mu_cfg_string, &ldap_settings.getpwuid_filter, NULL,
+ N_("LDAP filter to use for getpwuid requests."),
+ N_("filter") },
{ NULL }
};
diff --git a/libcfg/pam.c b/libcfg/pam.c
index 02d38ee9e..54d2ab37f 100644
--- a/libcfg/pam.c
+++ b/libcfg/pam.c
@@ -24,7 +24,9 @@
static char *pam_settings;
static struct mu_cfg_param mu_pam_param[] = {
- { "service", mu_cfg_string, &pam_settings },
+ { "service", mu_cfg_string, &pam_settings, NULL,
+ N_("Set PAM service name."),
+ N_("name") },
{ NULL }
};
diff --git a/libcfg/radius.c b/libcfg/radius.c
index 4b5e7b109..716db701d 100644
--- a/libcfg/radius.c
+++ b/libcfg/radius.c
@@ -25,10 +25,17 @@
static struct mu_radius_module_data radius_settings;
static struct mu_cfg_param mu_radius_param[] = {
- { "auth-request", mu_cfg_string, &radius_settings.auth_request },
- { "getpwnam-request", mu_cfg_string, &radius_settings.getpwnam_request },
- { "getpwuid-request", mu_cfg_string, &radius_settings.getpwuid_request },
- { "directory", mu_cfg_string, &radius_settings.config_dir },
+ { "auth", mu_cfg_string, &radius_settings.auth_request, NULL,
+ N_("Radius request for authorization."),
+ N_("request") },
+ { "getpwnam", mu_cfg_string, &radius_settings.getpwnam_request, NULL,
+ N_("Radius request for getpwnam."),
+ N_("request") },
+ { "getpwuid", mu_cfg_string, &radius_settings.getpwuid_request, NULL,
+ N_("Radius request for getpwuid."),
+ N_("request") },
+ { "directory", mu_cfg_string, &radius_settings.config_dir, NULL,
+ N_("Set radius configuration directory.") },
{ NULL }
};
diff --git a/libcfg/sieve.c b/libcfg/sieve.c
index 9a3c9c743..e53f5b2bf 100644
--- a/libcfg/sieve.c
+++ b/libcfg/sieve.c
@@ -92,10 +92,18 @@ cb_library_path (mu_debug_t debug, void *data, char *arg)
}
static struct mu_cfg_param mu_sieve_param[] = {
- { "clear-library-path", mu_cfg_callback, NULL, cb_clear_library_path },
- { "clear-include-path", mu_cfg_callback, NULL, cb_clear_include_path },
- { "library-path", mu_cfg_callback, NULL, cb_library_path },
- { "include-path", mu_cfg_callback, NULL, cb_include_path },
+ { "clear-library-path", mu_cfg_callback, NULL, cb_clear_library_path,
+ N_("Clear library search path.") },
+ { "clear-include-path", mu_cfg_callback, NULL, cb_clear_include_path,
+ N_("Clear include search path.") },
+ { "library-path", mu_cfg_callback, NULL, cb_library_path,
+ N_("Add directories to the library search path. Argument is a "
+ "comma-separated list of directories."),
+ N_("list") },
+ { "include-path", mu_cfg_callback, NULL, cb_include_path,
+ N_("Add directories to the include search path. Argument is a "
+ "comma-separated list of directories."),
+ N_("list") },
{ NULL }
};
diff --git a/libcfg/sql.c b/libcfg/sql.c
index c6ddf6f67..0f6861731 100644
--- a/libcfg/sql.c
+++ b/libcfg/sql.c
@@ -50,17 +50,39 @@ cb_field_map (mu_debug_t debug, void *data, char *arg)
}
static struct mu_cfg_param mu_sql_param[] = {
- { "interface", mu_cfg_string, &sql_settings.interface },
- { "getwpnam", mu_cfg_string, &sql_settings.getpwnam_query },
- { "getpwuid", mu_cfg_string, &sql_settings.getpwuid_query },
- { "getpass", mu_cfg_string, &sql_settings.getpass_query },
- { "host", mu_cfg_string, &sql_settings.host },
- { "user", mu_cfg_string, &sql_settings.user },
- { "passwd", mu_cfg_string, &sql_settings.passwd },
- { "db", mu_cfg_string, &sql_settings.db },
- { "port", mu_cfg_int, &sql_settings.port },
- { "password-type", mu_cfg_callback, NULL, cb_password_type },
- { "field-map", mu_cfg_callback, NULL, cb_field_map },
+ { "interface", mu_cfg_string, &sql_settings.interface, NULL,
+ N_("Set SQL interface to use (one of: mysql, odbc, or postgres).") },
+ { "getwpnam", mu_cfg_string, &sql_settings.getpwnam_query, NULL,
+ N_("SQL query to use for getpwnam requests."),
+ N_("query") },
+ { "getpwuid", mu_cfg_string, &sql_settings.getpwuid_query, NULL,
+ N_("SQL query to use for getpwuid requests."),
+ N_("query") },
+ { "getpass", mu_cfg_string, &sql_settings.getpass_query, NULL,
+ N_("SQL query returning the user's password."),
+ N_("query") },
+ { "host", mu_cfg_string, &sql_settings.host, NULL,
+ N_("SQL server host name.") },
+ { "user", mu_cfg_string, &sql_settings.user, NULL,
+ N_("SQL user name.") },
+ { "passwd", mu_cfg_string, &sql_settings.passwd, NULL,
+ N_("Password for the SQL user.") },
+ { "port", mu_cfg_int, &sql_settings.port, NULL,
+ N_("SQL server port.") },
+ { "db", mu_cfg_string, &sql_settings.db, NULL,
+ N_("Database name.") },
+ { "password-type", mu_cfg_callback, NULL, cb_password_type,
+ N_("Type of password returned by getpass query (one of: plain, hash, "
+ "scrambled).") },
+ { "field-map", mu_cfg_callback, NULL, cb_field_map,
+ N_("Set a field-map for parsing SQL replies. The map is a "
+ "column-separated list of definitions. Each definition has the "
+ "following form:\n"
+ " <name: string>=<column: string>\n"
+ "where <name> is one of the following: name, passwd, uid, gid, "
+ "gecos, dir, shell, mailbox, quota, and <column> is the name of "
+ "the corresponding SQL column."),
+ N_("map") },
{ NULL }
};
diff --git a/libcfg/tls.c b/libcfg/tls.c
index 4055c7999..8f28e81f7 100644
--- a/libcfg/tls.c
+++ b/libcfg/tls.c
@@ -25,10 +25,17 @@
static struct mu_tls_module_config tls_settings;
static struct mu_cfg_param mu_tls_param[] = {
- { "tls", mu_cfg_bool, &tls_settings.client_enable },
- { "ssl-cert", mu_cfg_string, &tls_settings.ssl_cert },
- { "ssl-key", mu_cfg_string, &tls_settings.ssl_key },
- { "ssl-cafile", mu_cfg_string, &tls_settings.ssl_cafile },
+ { "tls", mu_cfg_bool, &tls_settings.client_enable, NULL,
+ N_("Enable client TLS encryption.") },
+ { "ssl-cert", mu_cfg_string, &tls_settings.ssl_cert, NULL,
+ N_("Specify SSL certificate file."),
+ N_("file") },
+ { "ssl-key", mu_cfg_string, &tls_settings.ssl_key, NULL,
+ N_("Specify SSL certificate key file."),
+ N_("file") },
+ { "ssl-cafile", mu_cfg_string, &tls_settings.ssl_cafile, NULL,
+ N_("Specify trusted CAs file."),
+ N_("file") },
{ NULL }
};
diff --git a/libcfg/virtdomain.c b/libcfg/virtdomain.c
index 6662b1c08..5270137c9 100644
--- a/libcfg/virtdomain.c
+++ b/libcfg/virtdomain.c
@@ -24,7 +24,10 @@
static struct mu_gocs_virtual virtdomain_settings;
static struct mu_cfg_param mu_virtdomain_param[] = {
- { "passwd-dir", mu_cfg_string, &virtdomain_settings },
+ { "passwd-dir", mu_cfg_string, &virtdomain_settings, NULL,
+ N_("Name of the directory where virtual domain password files are "
+ "located."),
+ N_("dir") },
{ NULL }
};
diff --git a/maidag/maidag.c b/maidag/maidag.c
index 84b319c8c..f05c21683 100644
--- a/maidag/maidag.c
+++ b/maidag/maidag.c
@@ -66,7 +66,7 @@ N_("Debug flags are:\n\
t - sieve trace (MU_SIEVE_DEBUG_TRACE)\n\
i - sieve instructions trace (MU_SIEVE_DEBUG_INSTR)\n\
l - sieve action logs\n\
- 0-9 - Set mail.local debugging level\n");
+ 0-9 - Set maidag debugging level\n");
static char args_doc[] = N_("[recipient...]");
@@ -237,26 +237,58 @@ cb_debug (mu_debug_t debug, void *data, char *arg)
}
struct mu_cfg_param maidag_cfg_param[] = {
- { "exit-multiple-delivery-success", mu_cfg_bool, &multiple_delivery },
- { "exit-quota-tempfail", mu_cfg_bool, &ex_quota_tempfail },
+ { "exit-multiple-delivery-success", mu_cfg_bool, &multiple_delivery, NULL,
+ N_("In case of multiple delivery, exit with code 0 if at least one "
+ "delivery succeeded.") },
+ { "exit-quota-tempfail", mu_cfg_bool, &ex_quota_tempfail, NULL,
+ N_("Indicate temporary failure if the recipient is over his mail quota.")
+ },
#ifdef USE_DBM
- { "quota-db", mu_cfg_string, &quotadbname },
+ { "quota-db", mu_cfg_string, &quotadbname, NULL,
+ N_("Name of DBM quota database file."),
+ N_("file") },
#endif
#ifdef USE_SQL
- { "quota-query", mu_cfg_string, &quota_query },
+ { "quota-query", mu_cfg_string, &quota_query, NULL,
+ N_("SQL query to retrieve mailbox quota. This is deprecated, use "
+ "sql { ... } instead."),
+ N_("query") },
#endif
- { "sieve-filter", mu_cfg_string, &sieve_pattern },
- { "message-id-header", mu_cfg_string, &message_id_header },
+ { "sieve-filter", mu_cfg_string, &sieve_pattern, NULL,
+ N_("File name or name pattern for Sieve filter file."),
+ N_("file-or-pattern") },
+ { "message-id-header", mu_cfg_string, &message_id_header, NULL,
+ N_("When logging Sieve actions, identify messages by the value of "
+ "this header."),
+ N_("name") },
#ifdef WITH_GUILE
- { "guile-filter", mu_cfg_string, &progfile_pattern },
+ { "guile-filter", mu_cfg_string, &progfile_pattern, NULL,
+ N_("File name or name pattern for Guile filter file."),
+ N_("file-or-pattern") },
#endif
- { "debug", mu_cfg_callback, NULL, cb_debug },
- { "stderr", mu_cfg_bool, &log_to_stderr },
+ { "debug", mu_cfg_callback, NULL, cb_debug,
+ N_("Set maidag debug level. Debug level consists of one or more "
+ "of the following letters:\n"
+ " g - guimb stack traces\n"
+ " t - sieve trace (MU_SIEVE_DEBUG_TRACE)\n"
+ " i - sieve instructions trace (MU_SIEVE_DEBUG_INSTR)\n"
+ " l - sieve action logs\n") },
+ { "stderr", mu_cfg_bool, &log_to_stderr, NULL,
+ N_("Log to stderr instead of syslog.") },
/* LMTP support */
- { "lmtp", mu_cfg_bool, &lmtp_mode },
- { "group", mu_cfg_string, &lmtp_group },
- { "listen", mu_cfg_string, &lmtp_url_string },
- { "reuse-address", mu_cfg_bool, &reuse_lmtp_address },
+ { "lmtp", mu_cfg_bool, &lmtp_mode, NULL,
+ N_("Run in LMTP mode.") },
+ { "group", mu_cfg_string, &lmtp_group, NULL,
+ N_("In LMTP mode, change to this group after startup.") },
+ { "listen", mu_cfg_string, &lmtp_url_string, NULL,
+ N_("In LMTP mode, listen on the given URL. Valid URLs are:\n"
+ " tcp://<address: string>:<port: number> (note that port is "
+ "mandatory)\n"
+ " file://<socket-file-name>\n"
+ "or socket://<socket-file-name>"),
+ N_("url") },
+ { "reuse-address", mu_cfg_bool, &reuse_lmtp_address, NULL,
+ N_("Reuse existing address (LMTP mode). Default is \"yes\".") },
{ NULL }
};
diff --git a/mail.local/main.c b/mail.local/main.c
index 6d6698b82..7199d5b7a 100644
--- a/mail.local/main.c
+++ b/mail.local/main.c
@@ -255,21 +255,42 @@ cb_debug (mu_debug_t debug, void *data, char *arg)