Commit ca496753 ca4967534b748731eef2f050b7c832e2604a35b2 by Sergey Poznyakoff

Minor changes

1 parent 3a91a69b
......@@ -102,15 +102,23 @@ libmu_auth module. It is declared as follows:
@smallexample
@group
struct mu_auth_module @{
char *name; /* Module name */
struct argp *argp; /* Corresponding argp structure */
mu_auth_fp authenticate; /* Authentication function ... */
void *authenticate_data; /* ... and its specific data */
mu_auth_fp auth_by_name; /* Get user info by user name */
void *auth_by_name_data; /* ... and its specific data */
mu_auth_fp auth_by_uid; /* Get user info by user id */
void *auth_by_uid_data; /* ... and its specific data */
struct mu_auth_module
@{
/* Module name */
char *name;
/* Pointers to functions for each mode */
mu_auth_fp handler[MU_AUTH_MODE_COUNT];
/* Corresponding data pointers */
void *data[MU_AUTH_MODE_COUNT];
/* Describes command line options for that module */
struct mu_option *opt;
/* Configuration parameters for that module */
struct mu_cfg_param *cfg;
/* Configuration section parser */
mu_cfg_section_fp parser;
/* Function to commit the changes */
mu_cli_capa_commit_fp commit;
@};
@end group
@end smallexample
......@@ -271,8 +279,6 @@ main (int argc, char **argv)
state = STATE_NONAUTH; /* Starting state in non-auth. */
MU_AUTH_REGISTER_ALL_MODULES ();
mu_argp_parse (&argp, &argc, &argv, 0, imap4d_capa,
NULL, &daemon_param);
@dots{}
@end group
@end smallexample
......
......@@ -7435,18 +7435,12 @@ Enable support for mailers.
Link in the support for Sieve mail filtering language.
@item dbm
Link in the support for DBM databases (libmu_dbm library).
@item compat
Provide a compatibility layer for Mailutils 2.x.
@item auth
Link in the Mailutils authentication library.
@item guile
Provide Guile language bindings.
@item python
Provide Python language bindings.
@item cfg
Link in the Mailutils configuration library.
@item argp
Link in the library for command line parsing.
@end table
@node mailutils query
......
......@@ -364,7 +364,9 @@ static struct mu_cfg_param imap4d_srv_param[] = {
#ifdef WITH_TLS
{ "tls", mu_cfg_callback,
NULL, mu_offsetof (struct imap4d_srv_config, tls_mode), cb_tls,
N_("Kind of TLS encryption to use for this server") },
N_("Kind of TLS encryption to use for this server"),
/* TRANSLATORS: translate only arg:, the rest are keywords */
N_("arg: false|true|ondemand|stls|requred|connection") },
#endif
{ NULL }
};
......@@ -396,33 +398,38 @@ static struct mu_cfg_param imap4d_cfg_param[] = {
N_("Set shared namespace.") },
{ "other-mailbox-mode", mu_cfg_callback, &mailbox_mode[NS_OTHER], 0,
cb_mailbox_mode,
N_("File mode for mailboxes in other namespace.") },
N_("File mode for mailboxes in other namespace."),
N_("mode: g(+|=)[wr]+,o(+|=)[wr]+") },
{ "shared-mailbox-mode", mu_cfg_callback, &mailbox_mode[NS_SHARED], 0,
cb_mailbox_mode,
N_("File mode for mailboxes in shared namespace.") },
N_("File mode for mailboxes in shared namespace."),
N_("mode: g(+|=)[wr]+,o(+|=)[wr]+") },
{ "login-disabled", mu_c_bool, &login_disabled, 0, NULL,
N_("Disable LOGIN command.") },
{ "create-home-dir", mu_c_bool, &create_home_dir, 0, NULL,
N_("If true, create non-existing user home directories.") },
{ "home-dir-mode", mu_cfg_callback, NULL, 0, cb_mode,
N_("File mode for creating user home directories (octal)."),
N_("mode") },
N_("File mode for creating user home directories."),
N_("mode: octal") },
{ "retain-groups", mu_cfg_callback, &user_retain_groups, 0, cb_group,
N_("Retain these supplementary groups when switching to user privileges"),
N_("groups: list of string") },
#ifdef WITH_TLS
{ "tls", mu_cfg_callback, &tls_mode, 0, cb_tls,
N_("Kind of TLS encryption to use") },
N_("Kind of TLS encryption to use"),
/* TRANSLATORS: translate only arg:, the rest are keywords */
N_("arg: false|true|ondemand|stls|requred|connection") },
{ "tls-required", mu_cfg_callback, &tls_mode, 0, cb_tls_required,
N_("Always require STLS before entering authentication phase.\n"
"Deprecated, use \"tls required\" instead.") },
"Deprecated, use \"tls required\" instead."),
N_("arg: bool") },
#endif
{ "preauth", mu_cfg_callback, NULL, 0, cb_preauth,
N_("Configure PREAUTH mode. MODE is one of:\n"
N_("Configure PREAUTH mode. <value> is one of:\n"
" prog:///<full-program-name: string>\n"
" ident[://:<port: string-or-number>]\n"
" stdio"),
N_("mode") },
N_("mode: value") },
{ "preauth-only", mu_c_bool, &preauth_only, 0, NULL,
N_("Use only preauth mode. If unable to setup it, disconnect "
"immediately.") },
......
......@@ -221,15 +221,16 @@ static struct mu_cfg_param acl_param[] = {
N_("addr: IP") },
{ "exec", mu_cfg_callback, NULL, 0, cb_exec,
N_("Execute supplied program if a connection from this IP address is "
"requested. Arguments are:\n"
" <addr: IP> <program: string>\n"
"Following macros are expanded in <program> before executing:\n"
"requested.\n\n"
"The following macros are expanded in <program> before executing:\n"
" address - Source IP address\n"
" port - Source port number\n") },
" port - Source port number\n"),
N_("addr: IP> <program: string") },
{ "ifexec", mu_cfg_callback, NULL, 0, cb_ifexec,
N_("If a connection from this IP address is requested, execute supplied "
"program and allow or deny the connection depending on its exit code. "
"See `exec' for a description of its arguments.") },
"See `exec' for a description of its arguments."),
N_("addr: IP> <program: string") },
{ NULL }
};
......
......@@ -79,12 +79,14 @@ static struct mu_cfg_param logging_cfg[] = {
{ "severity", mu_cfg_callback, NULL, 0, cb_severity,
N_("Output only messages with a severity equal to or greater than "
"this one."),
N_("arg: string")},
/* TRANSLATORS: Translate only arg:, rest are keywords */
N_("arg: debug|info|notice|warning|error|crit|alert|emerg")},
{ "facility", mu_cfg_callback, NULL, 0, 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."),
N_("arg: string") },
/* TRANSLATORS: Translate only arg: and <number>, rest are keywords */
N_("arg: auth|authpriv|mail|local0-local7|<number>") },
{ "session-id", mu_c_bool, &mu_log_session_id, 0, NULL,
N_("Log session ID") },
{ "tag", mu_c_string, &mu_log_tag, 0, NULL,
......
......@@ -895,8 +895,9 @@ static struct mu_cfg_param dot_server_cfg_param[] = {
N_("Maximum number of children processes to run simultaneously.") },
{ "mode", mu_cfg_callback,
NULL, mu_offsetof (struct _mu_m_server,mode), _cb_daemon_mode,
N_("Set daemon mode (either inetd (or interactive) or daemon)."),
N_("mode") },
N_("Set operation mode."),
/* TRANSLATORS: Words to the right of : are keywords. */
N_("mode: inetd|interactive|daemom") },
{ "foreground", mu_c_bool,
NULL, mu_offsetof (struct _mu_m_server, foreground), NULL,
N_("Run in foreground.") },
......@@ -906,7 +907,8 @@ static struct mu_cfg_param dot_server_cfg_param[] = {
N_("file") },
{ "port", mu_cfg_callback,
NULL, mu_offsetof (struct _mu_m_server, hints), _cb_port,
N_("Default port number.") },
N_("Default port number."),
N_("arg: port number or service name") },
{ "timeout", mu_c_time,
NULL, mu_offsetof (struct _mu_m_server,timeout), NULL,
N_("Set idle timeout.") },
......@@ -953,7 +955,8 @@ _cb_backlog (void *data, mu_config_value_t *val)
static struct mu_cfg_param server_tcp_param[] = {
{ "backlog", mu_cfg_callback,
NULL, mu_offsetof (struct mu_srv_config, tcpsrv), _cb_backlog,
N_("Size of the queue of pending connections") },
N_("Size of the queue of pending connections"),
N_("number") },
{ NULL }
};
......
......@@ -106,7 +106,7 @@ static struct mu_cfg_param mu_ldap_param[] = {
"where <name> is one of the following: name, passwd, uid, gid, "
"gecos, dir, shell, mailbox, quota, and <attr> is the name of "
"the corresponding LDAP attribute."),
N_("map") },
N_("map: definition") },
{ "getpwnam", mu_c_string, &ldap_param.getpwnam_filter, 0, NULL,
N_("LDAP filter to use for getpwnam requests."),
N_("filter") },
......
......@@ -191,7 +191,8 @@ static struct mu_cfg_param mu_radius_param[] = {
N_("Radius request for getpwuid."),
N_("request: string") },
{ "directory", mu_cfg_callback, NULL, 0, cb_config_dir,
N_("Set radius configuration directory.") },
N_("Set radius configuration directory."),
N_("dir: string") },
{ NULL }
};
......
......@@ -103,6 +103,7 @@ static struct mu_cfg_param mu_sql_param[] = {
{ "interface", mu_cfg_callback, &mu_sql_module_config.interface, 0,
cb_interface,
N_("Set SQL interface to use."),
/* TRANSLATORS: Words to the right of : are keywords - do not translate */
N_("iface: mysql|odbc|postgres") },
{ "getpwnam", mu_c_string, &mu_sql_module_config.getpwnam_query, 0, NULL,
N_("SQL query to use for getpwnam requests."),
......@@ -124,8 +125,9 @@ static struct mu_cfg_param mu_sql_param[] = {
{ "db", mu_c_string, &mu_sql_module_config.db, 0, NULL,
N_("Database name.") },
{ "password-type", mu_cfg_callback, NULL, 0, cb_password_type,
N_("Type of password returned by getpass query (one of: plain, hash, "
"scrambled).") },
N_("Type of password returned by getpass query."),
/* TRANSLATORS: Words to the right of : are keywords - do not translate */
N_("arg: plain|hash|scrambled") },
{ "positional", mu_c_bool, &mu_sql_module_config.positional, 0, NULL,
N_("Use positional (v1.0 compatible) field interface.") },
{ "field-map", mu_cfg_callback, NULL, 0, cb_field_map,
......@@ -136,7 +138,7 @@ static struct mu_cfg_param mu_sql_param[] = {
"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") },
N_("map: definition") },
{ NULL }
};
......
......@@ -142,21 +142,23 @@ cb_library_path_prefix (void *data, mu_config_value_t *val)
static struct mu_cfg_param mu_sieve_param[] = {
{ "clear-library-path", mu_cfg_callback, NULL, 0, cb_clear_library_path,
N_("Clear library search path.") },
N_("Clear library search path."),
N_("arg: directory list") },
{ "clear-include-path", mu_cfg_callback, NULL, 0, cb_clear_include_path,
N_("Clear include search path.") },
N_("Clear include search path."),
N_("arg: directory list") },
{ "library-path", mu_cfg_callback, NULL, 0, cb_library_path,
N_("Add directories to the library search path. Argument is a "
"colon-separated list of directories."),
N_("list") },
N_("arg: directory list") },
{ "library-path-prefix", mu_cfg_callback, NULL, 0, cb_library_path_prefix,
N_("Add directories to the beginning of the library search path. "
"Argument is a colon-separated list of directories."),
N_("list") },
N_("arg: directory list") },
{ "include-path", mu_cfg_callback, NULL, 0, cb_include_path,
N_("Add directories to the include search path. Argument is a "
"colon-separated list of directories."),
N_("list") },
N_("arg: directory list") },
{ NULL }
};
......
......@@ -372,9 +372,12 @@ cb_script_pattern (void *data, mu_config_value_t *val)
struct mu_cfg_param filter_cfg_param[] = {
{ "language", mu_cfg_callback, NULL, 0, cb_script_language,
N_("Set script language.") },
N_("Set script language."),
/* TRANSLATORS: words to the right of : are keywords - do not translate */
N_("arg: python|guile") },
{ "pattern", mu_cfg_callback, NULL, 0, cb_script_pattern,
N_("Set script pattern.") },
N_("Set script pattern."),
N_("arg: glob") },
{ NULL }
};
......@@ -419,7 +422,8 @@ cb_listen (void *data, mu_config_value_t *val)
struct mu_cfg_param maidag_cfg_param[] = {
{ "delivery-mode", mu_cfg_callback, NULL, 0, cb_delivery_mode,
N_("Set delivery mode"),
N_("mode: {mda | url | lmtp}") },
/* TRANSLATORS: words to the right of : are keywords - do not translate */
N_("mode: mda|url|lmtp") },
{ "exit-multiple-delivery-success", mu_c_bool, &multiple_delivery, 0, NULL,
N_("In case of multiple delivery, exit with code 0 if at least one "
"delivery succeeded.") },
......@@ -447,9 +451,11 @@ struct mu_cfg_param maidag_cfg_param[] = {
" g - guile 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") },
" l - sieve action logs\n"),
N_("arg: string") },
{ "stderr", mu_cfg_callback, NULL, 0, cb_stderr,
N_("Log to stderr instead of syslog.") },
N_("Log to stderr instead of syslog."),
N_("arg: bool") },
{ "forward-file", mu_c_string, &forward_file, 0, NULL,
N_("Process forward file.") },
{ "forward-file-checks", mu_cfg_callback, NULL, 0, cb_forward_file_checks,
......@@ -467,7 +473,7 @@ struct mu_cfg_param maidag_cfg_param[] = {
"mandatory)\n"
" file://<socket-file-name>\n"
"or socket://<socket-file-name>"),
N_("url") },
N_("url: string") },
{ "reuse-address", mu_c_bool, &reuse_lmtp_address, 0, NULL,
N_("Reuse existing address (LMTP mode). Default is \"yes\".") },
{ "filter", mu_cfg_section, NULL, 0, NULL,
......
......@@ -130,7 +130,7 @@ cb_debug (void *data, mu_config_value_t *val)
struct mu_cfg_param mimeview_cfg_param[] = {
{ "debug", mu_cfg_callback, NULL, 0, cb_debug,
N_("Set debug verbosity level."),
N_("flags") },
N_("flags: string") },
{ "mimetypes", mu_c_string, &mimetypes_config, 0, NULL,
N_("Use this mime.types file."),
N_("file") },
......
......@@ -365,7 +365,8 @@ struct mu_cfg_param movemail_cfg_param[] = {
" delete - delete this one and to the next message\n"
" count - count this message as processed\n"
"Each keyword can be prefixed with \"no\" to reverse its meaning\n"
"Setting onerror=abort reverts to the default behavior.") },
"Setting onerror=abort reverts to the default behavior."),
N_("arg: list") },
{ NULL }
};
......
......@@ -234,7 +234,9 @@ static struct mu_cfg_param pop3d_srv_param[] = {
#ifdef WITH_TLS
{ "tls", mu_cfg_callback,
NULL, mu_offsetof (struct pop3d_srv_config, tls_mode), cb_tls,
N_("Kind of TLS encryption to use for this server") },
N_("Kind of TLS encryption to use for this server"),
/* TRANSLATORS: words to the right of : are keywords - do not translate */
N_("arg: false|true|ondemand|stls|requred|connection") },
#endif
{ NULL }
};
......@@ -252,7 +254,8 @@ static struct mu_cfg_param pop3d_cfg_param[] = {
{ "apop-database-file", mu_c_string, &apop_database_name, 0, NULL,
N_("set APOP database file name or URL") },
{ "apop-database-owner", mu_cfg_callback, NULL, 0, cb_apop_database_owner,
N_("Name or UID of the APOP database owner") },
N_("Name or UID of the APOP database owner"),
N_("arg: string") },
{ "apop-database-safety", mu_cfg_callback, NULL, 0, cb_apop_safety_checks,
N_("Configure safety checks for APOP database files. Argument is a list or "
"sequence of check names optionally prefixed with '+' to enable or "
......@@ -271,10 +274,13 @@ static struct mu_cfg_param pop3d_cfg_param[] = {
#ifdef WITH_TLS
{ "tls", mu_cfg_callback, &tls_mode, 0, cb_tls,
N_("Kind of TLS encryption to use") },
N_("Kind of TLS encryption to use"),
/* TRANSLATORS: words to the right of : are keywords - do not translate */
N_("arg: false|true|ondemand|stls|requred|connection") },
{ "tls-required", mu_cfg_callback, &tls_mode, 0, cb_tls_required,
N_("Always require STLS before entering authentication phase.\n"
"Deprecated, use \"tls required\" instead.") },
"Deprecated, use \"tls required\" instead."),
N_("arg: bool") },
#endif
#ifdef ENABLE_LOGIN_DELAY
{ "login-delay", mu_c_time, &login_delay, 0, NULL,
......@@ -284,11 +290,11 @@ static struct mu_cfg_param pop3d_cfg_param[] = {
#endif
{ "bulletin-source", mu_cfg_callback, NULL, 0, cb_bulletin_source,
N_("Get bulletins from the specified mailbox."),
N_("url") },
N_("url: string") },
#ifdef ENABLE_DBM
{ "bulletin-db", mu_cfg_callback, NULL, 0, cb_bulletin_db,
N_("Set the bulletin database file name."),
N_("file") },
N_("file: string") },
#endif
{ "output-buffer-size", mu_c_size, &pop3d_output_bufsize, 0, NULL,
N_("Size of the output buffer.") },
......
......@@ -222,13 +222,15 @@ static struct mu_cfg_param sieve_cfg_param[] = {
" T - mailutils traces (sieve.trace9)\n"
" P - network protocols (sieve.prot)\n"
" t - sieve trace (MU_SIEVE_DEBUG_TRACE)\n"
" i - sieve instructions trace (MU_SIEVE_DEBUG_INSTR).") },
" i - sieve instructions trace (MU_SIEVE_DEBUG_INSTR)."),
N_("arg: string") },
{ "verbose", mu_c_bool, &verbose, 0, NULL,
N_("Log all executed actions.") },
{ "line-info", mu_c_bool, &sieve_print_locus, 0, NULL,
N_("Print source locations along with action logs (default).") },
{ "email", mu_cfg_callback, NULL, 0, cb_email,
N_("Set user email address.") },
N_("Set user email address."),
N_("arg: string") },
{ NULL }
};
......