Commit fa88b179 fa88b1792305f192acb81074635420fc05e25255 by Sergey Poznyakoff

Update documentation. Use the namespace name "personal", instead of "private".

1 parent af06135f
......@@ -33,3 +33,4 @@ m4
mailutils*.tar.*
pathdefs.h
stamp-h1
tmp/
......
GNU mailutils NEWS -- history of user-visible changes. 2017-01-16
GNU mailutils NEWS -- history of user-visible changes. 2017-01-20
Copyright (C) 2002-2017 Free Software Foundation, Inc.
See the end of file for copying conditions.
......@@ -7,6 +7,52 @@ Please send mailutils bug reports to <bug-mailutils@gnu.org>.
Version 3.1.91 (Git)
* configuration syntax
Statements that allow for variable substitution also allow for command
expansion. Commands are invoked the same way as in shell:
$(command [args...])
The following commands are defined:
- localpart X
Treats X as an email address and returns its part preceding
the @-sign. If there is no @-sign, returns X unchanged.
- domainpart X
Treats X as an email address and returns the part following
the @-sign. If there is no @-sign, returns empty string.
- shell CMD [ARGS...]
Runs the shell command CMD with the given arguments. Returns
the standard output from the command. The command is invoked
using "/bin/sh -c" and can contain any valid shell construct.
* imap4d
Namespace configuration completely rewritten. The "namespace" block
statement defines a particular namespaces. Within it, one or more
"prefix" statements define prefixes available in that namespace, along
with their mappings to the server filesystem, hierarchy delimiters etc.
An example of namespace configuration:
namespace personal {
prefix "" {
directory "$home/mailfolder";
}
prefix "#MH:" {
directory "$home/Mail";
delimiter "/";
mailbox-type "mh";
}
}
The following configuration statements have been withdrawn: homedir,
personal-namespace, other-namespace, shared-namespace,
other-mailbox-mode, shared-mailbox-mode.
* mail
** Modifying attachment name and filename
......@@ -24,7 +70,7 @@ description), and file name:
Both options affect only the next `--attach' or `--attach-fd' option.
** Constructing attachments from command line
** Constructing attachments from the command line
The new option `--attach-fd=N' instructs mail to read attachment from
file descriptor N. By default, the attachments created using this
......
......@@ -419,10 +419,12 @@ static struct mu_cfg_param prefix_param[] = {
N_("Directory in the file system") },
{ "delimiter", mu_cfg_callback,
NULL, mu_offsetof (struct namespace_prefix, delim), cb_prefix_delim,
N_("Hierarchy delimiter character") },
N_("Hierarchy delimiter character"),
N_("arg: character") },
{ "mailbox-type", mu_cfg_callback,
NULL, 0, cb_prefix_scheme,
N_("Type of mailboxes residing under this prefix") },
N_("Type of mailboxes residing under this prefix"),
N_("type: string") },
{ NULL }
};
......@@ -524,7 +526,7 @@ namespace_cfg_init (void)
if (mu_create_canned_section ("namespace", &section))
abort ();
section->docstring = N_("Define a namespace");
section->label = "private | other | shared";
section->label = "personal | other | shared";
section->parser = namespace_section_parser;
mu_cfg_section_add_params (section, namespace_param);
}
......@@ -556,29 +558,6 @@ static struct mu_cfg_param imap4d_cfg_param[] = {
{ "namespace", mu_cfg_section },
#if 0
{ "homedir", mu_c_string, &modify_homedir, 0, NULL,
N_("Modify home directory.") },
{ "personal-namespace", MU_CFG_LIST_OF(mu_c_string), &namespace[NS_PRIVATE],
0, NULL,
N_("Set personal namespace.") },
{ "other-namespace", MU_CFG_LIST_OF(mu_c_string), &namespace[NS_OTHER],
0, NULL,
N_("Set other users' namespace.") },
{ "shared-namespace", MU_CFG_LIST_OF(mu_c_string), &namespace[NS_SHARED],
0, NULL,
N_("Set shared namespace.") },
FIXME
{ "other-mailbox-mode", mu_cfg_callback, &mailbox_mode[NS_OTHER], 0,
cb_mailbox_mode,
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_("mode: g(+|=)[wr]+,o(+|=)[wr]+") },
#endif
{ "login-disabled", mu_c_bool, &login_disabled, 0, NULL,
N_("Disable LOGIN command.") },
{ "create-home-dir", mu_c_bool, &create_home_dir, 0, NULL,
......
......@@ -161,7 +161,7 @@ struct imap4d_command
#define ERR_STREAM_CREATE 9
/* Namespace numbers */
#define NS_PRIVATE 0
#define NS_PERSONAL 0
#define NS_OTHER 1
#define NS_SHARED 2
#define NS_MAX 3
......
......@@ -19,7 +19,7 @@
#include <mailutils/assoc.h>
struct namespace namespace[NS_MAX] = {
[NS_PRIVATE] = { "private" },
[NS_PERSONAL] = { "personal" },
[NS_OTHER] = { "other" },
[NS_SHARED] = { "shared" }
};
......@@ -124,7 +124,7 @@ namespace_init (void)
pfx = mu_assoc_get (prefixes, "");
if (pfx)
{
if (pfx->ns != NS_PRIVATE)
if (pfx->ns != NS_PERSONAL)
{
mu_error (_("empty prefix not allowed in the namespace %s"),
namespace[pfx->ns].name);
......@@ -139,7 +139,7 @@ namespace_init (void)
pfx->prefix = mu_strdup ("");
pfx->dir = mu_strdup ("$home");
pfx->delim = '/';
priv = namespace_lookup ("private");
priv = namespace_lookup ("personal");
mu_list_prepend (priv->prefixes, pfx);
rc = mu_assoc_install (prefixes, pfx->prefix, pfx);
if (rc)
......@@ -167,7 +167,7 @@ prefix_translate_name (struct namespace_prefix const *pfx, char const *name,
url = 0;
name += pfxlen;
if (pfx->ns == NS_PRIVATE && strcmp (name, "INBOX") == 0)
if (pfx->ns == NS_PERSONAL && strcmp (name, "INBOX") == 0)
{
tmpl = mu_strdup (auth_data->mailbox);
return tmpl;//FIXME
......@@ -299,7 +299,7 @@ namespace_translate_name (char const *name, int url,
switch (pfx->ns)
{
case NS_PRIVATE:
case NS_PERSONAL:
mu_assoc_install (assoc, "user", auth_data->name);
mu_assoc_install (assoc, "home", real_homedir);
break;
......@@ -423,7 +423,7 @@ imap4d_namespace (struct imap4d_session *session,
io_sendf ("* NAMESPACE ");
print_namespace (NS_PRIVATE);
print_namespace (NS_PERSONAL);
io_sendf (" ");
print_namespace (NS_OTHER);
io_sendf (" ");
......
......@@ -18,7 +18,7 @@ gsasl {
enable off;
}
namespace private {
namespace personal {
prefix "" {
directory "$HOMEDIR";
}
......