Update documentation. Use the namespace name "personal", instead of "private".
Showing
7 changed files
with
62 additions
and
36 deletions
1 | GNU mailutils NEWS -- history of user-visible changes. 2017-01-16 | 1 | GNU mailutils NEWS -- history of user-visible changes. 2017-01-20 |
2 | Copyright (C) 2002-2017 Free Software Foundation, Inc. | 2 | Copyright (C) 2002-2017 Free Software Foundation, Inc. |
3 | See the end of file for copying conditions. | 3 | See the end of file for copying conditions. |
4 | 4 | ||
... | @@ -7,6 +7,52 @@ Please send mailutils bug reports to <bug-mailutils@gnu.org>. | ... | @@ -7,6 +7,52 @@ Please send mailutils bug reports to <bug-mailutils@gnu.org>. |
7 | 7 | ||
8 | Version 3.1.91 (Git) | 8 | Version 3.1.91 (Git) |
9 | 9 | ||
10 | * configuration syntax | ||
11 | |||
12 | Statements that allow for variable substitution also allow for command | ||
13 | expansion. Commands are invoked the same way as in shell: | ||
14 | |||
15 | $(command [args...]) | ||
16 | |||
17 | The following commands are defined: | ||
18 | |||
19 | - localpart X | ||
20 | Treats X as an email address and returns its part preceding | ||
21 | the @-sign. If there is no @-sign, returns X unchanged. | ||
22 | |||
23 | - domainpart X | ||
24 | Treats X as an email address and returns the part following | ||
25 | the @-sign. If there is no @-sign, returns empty string. | ||
26 | |||
27 | - shell CMD [ARGS...] | ||
28 | Runs the shell command CMD with the given arguments. Returns | ||
29 | the standard output from the command. The command is invoked | ||
30 | using "/bin/sh -c" and can contain any valid shell construct. | ||
31 | |||
32 | * imap4d | ||
33 | |||
34 | Namespace configuration completely rewritten. The "namespace" block | ||
35 | statement defines a particular namespaces. Within it, one or more | ||
36 | "prefix" statements define prefixes available in that namespace, along | ||
37 | with their mappings to the server filesystem, hierarchy delimiters etc. | ||
38 | |||
39 | An example of namespace configuration: | ||
40 | |||
41 | namespace personal { | ||
42 | prefix "" { | ||
43 | directory "$home/mailfolder"; | ||
44 | } | ||
45 | prefix "#MH:" { | ||
46 | directory "$home/Mail"; | ||
47 | delimiter "/"; | ||
48 | mailbox-type "mh"; | ||
49 | } | ||
50 | } | ||
51 | |||
52 | The following configuration statements have been withdrawn: homedir, | ||
53 | personal-namespace, other-namespace, shared-namespace, | ||
54 | other-mailbox-mode, shared-mailbox-mode. | ||
55 | |||
10 | 56 | ||
11 | 57 | ||
12 | ** Modifying attachment name and filename | 58 | ** Modifying attachment name and filename |
... | @@ -24,7 +70,7 @@ description), and file name: | ... | @@ -24,7 +70,7 @@ description), and file name: |
24 | 70 | ||
25 | Both options affect only the next `--attach' or `--attach-fd' option. | 71 | Both options affect only the next `--attach' or `--attach-fd' option. |
26 | 72 | ||
27 | ** Constructing attachments from command line | 73 | ** Constructing attachments from the command line |
28 | 74 | ||
29 | The new option `--attach-fd=N' instructs mail to read attachment from | 75 | The new option `--attach-fd=N' instructs mail to read attachment from |
30 | file descriptor N. By default, the attachments created using this | 76 | file descriptor N. By default, the attachments created using this | ... | ... |
This diff is collapsed.
Click to expand it.
... | @@ -419,10 +419,12 @@ static struct mu_cfg_param prefix_param[] = { | ... | @@ -419,10 +419,12 @@ static struct mu_cfg_param prefix_param[] = { |
419 | N_("Directory in the file system") }, | 419 | N_("Directory in the file system") }, |
420 | { "delimiter", mu_cfg_callback, | 420 | { "delimiter", mu_cfg_callback, |
421 | NULL, mu_offsetof (struct namespace_prefix, delim), cb_prefix_delim, | 421 | NULL, mu_offsetof (struct namespace_prefix, delim), cb_prefix_delim, |
422 | N_("Hierarchy delimiter character") }, | 422 | N_("Hierarchy delimiter character"), |
423 | N_("arg: character") }, | ||
423 | { "mailbox-type", mu_cfg_callback, | 424 | { "mailbox-type", mu_cfg_callback, |
424 | NULL, 0, cb_prefix_scheme, | 425 | NULL, 0, cb_prefix_scheme, |
425 | N_("Type of mailboxes residing under this prefix") }, | 426 | N_("Type of mailboxes residing under this prefix"), |
427 | N_("type: string") }, | ||
426 | { NULL } | 428 | { NULL } |
427 | }; | 429 | }; |
428 | 430 | ||
... | @@ -524,7 +526,7 @@ namespace_cfg_init (void) | ... | @@ -524,7 +526,7 @@ namespace_cfg_init (void) |
524 | if (mu_create_canned_section ("namespace", §ion)) | 526 | if (mu_create_canned_section ("namespace", §ion)) |
525 | abort (); | 527 | abort (); |
526 | section->docstring = N_("Define a namespace"); | 528 | section->docstring = N_("Define a namespace"); |
527 | section->label = "private | other | shared"; | 529 | section->label = "personal | other | shared"; |
528 | section->parser = namespace_section_parser; | 530 | section->parser = namespace_section_parser; |
529 | mu_cfg_section_add_params (section, namespace_param); | 531 | mu_cfg_section_add_params (section, namespace_param); |
530 | } | 532 | } |
... | @@ -556,29 +558,6 @@ static struct mu_cfg_param imap4d_cfg_param[] = { | ... | @@ -556,29 +558,6 @@ static struct mu_cfg_param imap4d_cfg_param[] = { |
556 | 558 | ||
557 | { "namespace", mu_cfg_section }, | 559 | { "namespace", mu_cfg_section }, |
558 | 560 | ||
559 | #if 0 | ||
560 | { "homedir", mu_c_string, &modify_homedir, 0, NULL, | ||
561 | N_("Modify home directory.") }, | ||
562 | |||
563 | { "personal-namespace", MU_CFG_LIST_OF(mu_c_string), &namespace[NS_PRIVATE], | ||
564 | 0, NULL, | ||
565 | N_("Set personal namespace.") }, | ||
566 | { "other-namespace", MU_CFG_LIST_OF(mu_c_string), &namespace[NS_OTHER], | ||
567 | 0, NULL, | ||
568 | N_("Set other users' namespace.") }, | ||
569 | { "shared-namespace", MU_CFG_LIST_OF(mu_c_string), &namespace[NS_SHARED], | ||
570 | 0, NULL, | ||
571 | N_("Set shared namespace.") }, | ||
572 | FIXME | ||
573 | { "other-mailbox-mode", mu_cfg_callback, &mailbox_mode[NS_OTHER], 0, | ||
574 | cb_mailbox_mode, | ||
575 | N_("File mode for mailboxes in other namespace."), | ||
576 | N_("mode: g(+|=)[wr]+,o(+|=)[wr]+") }, | ||
577 | { "shared-mailbox-mode", mu_cfg_callback, &mailbox_mode[NS_SHARED], 0, | ||
578 | cb_mailbox_mode, | ||
579 | N_("File mode for mailboxes in shared namespace."), | ||
580 | N_("mode: g(+|=)[wr]+,o(+|=)[wr]+") }, | ||
581 | #endif | ||
582 | { "login-disabled", mu_c_bool, &login_disabled, 0, NULL, | 561 | { "login-disabled", mu_c_bool, &login_disabled, 0, NULL, |
583 | N_("Disable LOGIN command.") }, | 562 | N_("Disable LOGIN command.") }, |
584 | { "create-home-dir", mu_c_bool, &create_home_dir, 0, NULL, | 563 | { "create-home-dir", mu_c_bool, &create_home_dir, 0, NULL, | ... | ... |
... | @@ -161,7 +161,7 @@ struct imap4d_command | ... | @@ -161,7 +161,7 @@ struct imap4d_command |
161 | #define ERR_STREAM_CREATE 9 | 161 | #define ERR_STREAM_CREATE 9 |
162 | 162 | ||
163 | /* Namespace numbers */ | 163 | /* Namespace numbers */ |
164 | #define NS_PRIVATE 0 | 164 | #define NS_PERSONAL 0 |
165 | #define NS_OTHER 1 | 165 | #define NS_OTHER 1 |
166 | #define NS_SHARED 2 | 166 | #define NS_SHARED 2 |
167 | #define NS_MAX 3 | 167 | #define NS_MAX 3 | ... | ... |
... | @@ -19,7 +19,7 @@ | ... | @@ -19,7 +19,7 @@ |
19 | #include <mailutils/assoc.h> | 19 | #include <mailutils/assoc.h> |
20 | 20 | ||
21 | struct namespace namespace[NS_MAX] = { | 21 | struct namespace namespace[NS_MAX] = { |
22 | [NS_PRIVATE] = { "private" }, | 22 | [NS_PERSONAL] = { "personal" }, |
23 | [NS_OTHER] = { "other" }, | 23 | [NS_OTHER] = { "other" }, |
24 | [NS_SHARED] = { "shared" } | 24 | [NS_SHARED] = { "shared" } |
25 | }; | 25 | }; |
... | @@ -124,7 +124,7 @@ namespace_init (void) | ... | @@ -124,7 +124,7 @@ namespace_init (void) |
124 | pfx = mu_assoc_get (prefixes, ""); | 124 | pfx = mu_assoc_get (prefixes, ""); |
125 | if (pfx) | 125 | if (pfx) |
126 | { | 126 | { |
127 | if (pfx->ns != NS_PRIVATE) | 127 | if (pfx->ns != NS_PERSONAL) |
128 | { | 128 | { |
129 | mu_error (_("empty prefix not allowed in the namespace %s"), | 129 | mu_error (_("empty prefix not allowed in the namespace %s"), |
130 | namespace[pfx->ns].name); | 130 | namespace[pfx->ns].name); |
... | @@ -139,7 +139,7 @@ namespace_init (void) | ... | @@ -139,7 +139,7 @@ namespace_init (void) |
139 | pfx->prefix = mu_strdup (""); | 139 | pfx->prefix = mu_strdup (""); |
140 | pfx->dir = mu_strdup ("$home"); | 140 | pfx->dir = mu_strdup ("$home"); |
141 | pfx->delim = '/'; | 141 | pfx->delim = '/'; |
142 | priv = namespace_lookup ("private"); | 142 | priv = namespace_lookup ("personal"); |
143 | mu_list_prepend (priv->prefixes, pfx); | 143 | mu_list_prepend (priv->prefixes, pfx); |
144 | rc = mu_assoc_install (prefixes, pfx->prefix, pfx); | 144 | rc = mu_assoc_install (prefixes, pfx->prefix, pfx); |
145 | if (rc) | 145 | if (rc) |
... | @@ -167,7 +167,7 @@ prefix_translate_name (struct namespace_prefix const *pfx, char const *name, | ... | @@ -167,7 +167,7 @@ prefix_translate_name (struct namespace_prefix const *pfx, char const *name, |
167 | url = 0; | 167 | url = 0; |
168 | name += pfxlen; | 168 | name += pfxlen; |
169 | 169 | ||
170 | if (pfx->ns == NS_PRIVATE && strcmp (name, "INBOX") == 0) | 170 | if (pfx->ns == NS_PERSONAL && strcmp (name, "INBOX") == 0) |
171 | { | 171 | { |
172 | tmpl = mu_strdup (auth_data->mailbox); | 172 | tmpl = mu_strdup (auth_data->mailbox); |
173 | return tmpl;//FIXME | 173 | return tmpl;//FIXME |
... | @@ -299,7 +299,7 @@ namespace_translate_name (char const *name, int url, | ... | @@ -299,7 +299,7 @@ namespace_translate_name (char const *name, int url, |
299 | 299 | ||
300 | switch (pfx->ns) | 300 | switch (pfx->ns) |
301 | { | 301 | { |
302 | case NS_PRIVATE: | 302 | case NS_PERSONAL: |
303 | mu_assoc_install (assoc, "user", auth_data->name); | 303 | mu_assoc_install (assoc, "user", auth_data->name); |
304 | mu_assoc_install (assoc, "home", real_homedir); | 304 | mu_assoc_install (assoc, "home", real_homedir); |
305 | break; | 305 | break; |
... | @@ -423,7 +423,7 @@ imap4d_namespace (struct imap4d_session *session, | ... | @@ -423,7 +423,7 @@ imap4d_namespace (struct imap4d_session *session, |
423 | 423 | ||
424 | io_sendf ("* NAMESPACE "); | 424 | io_sendf ("* NAMESPACE "); |
425 | 425 | ||
426 | print_namespace (NS_PRIVATE); | 426 | print_namespace (NS_PERSONAL); |
427 | io_sendf (" "); | 427 | io_sendf (" "); |
428 | print_namespace (NS_OTHER); | 428 | print_namespace (NS_OTHER); |
429 | io_sendf (" "); | 429 | io_sendf (" "); | ... | ... |
-
Please register or sign in to post a comment