Skip to content
Toggle navigation
Toggle navigation
This project
Loading...
Sign in
John McEleney
/
mailutils
Go to a project
Toggle navigation
Toggle navigation pinning
Projects
Groups
Snippets
Help
Project
Activity
Repository
Pipelines
Graphs
Issues
0
Merge Requests
0
Wiki
Network
Create a new issue
Builds
Commits
Issue Boards
Files
Commits
Network
Compare
Branches
Tags
Commit
fa88b179
...
fa88b1792305f192acb81074635420fc05e25255
authored
2017-01-20 15:39:09 +0200
by
Sergey Poznyakoff
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Update documentation. Use the namespace name "personal", instead of "private".
1 parent
af06135f
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
62 additions
and
36 deletions
.gitignore
NEWS
doc/texinfo/programs.texi
imap4d/imap4d.c
imap4d/imap4d.h
imap4d/namespace.c
imap4d/tests/atlocal.in
.gitignore
View file @
fa88b17
...
...
@@ -33,3 +33,4 @@ m4
mailutils*.tar.*
pathdefs.h
stamp-h1
tmp/
...
...
NEWS
View file @
fa88b17
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
...
...
doc/texinfo/programs.texi
View file @
fa88b17
This diff is collapsed.
Click to expand it.
imap4d/imap4d.c
View file @
fa88b17
...
...
@@ -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
=
"p
rivate
| other | shared"
;
section
->
label
=
"p
ersonal
| 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
,
...
...
imap4d/imap4d.h
View file @
fa88b17
...
...
@@ -161,7 +161,7 @@ struct imap4d_command
#define ERR_STREAM_CREATE 9
/* Namespace numbers */
#define NS_P
RIVATE
0
#define NS_P
ERSONAL
0
#define NS_OTHER 1
#define NS_SHARED 2
#define NS_MAX 3
...
...
imap4d/namespace.c
View file @
fa88b17
...
...
@@ -19,7 +19,7 @@
#include <mailutils/assoc.h>
struct
namespace
namespace
[
NS_MAX
]
=
{
[
NS_P
RIVATE
]
=
{
"private
"
},
[
NS_P
ERSONAL
]
=
{
"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_P
RIVATE
)
if
(
pfx
->
ns
!=
NS_P
ERSONAL
)
{
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
(
"p
rivate
"
);
priv
=
namespace_lookup
(
"p
ersonal
"
);
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_P
RIVATE
&&
strcmp
(
name
,
"INBOX"
)
==
0
)
if
(
pfx
->
ns
==
NS_P
ERSONAL
&&
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_P
RIVATE
:
case
NS_P
ERSONAL
:
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_P
RIVATE
);
print_namespace
(
NS_P
ERSONAL
);
io_sendf
(
" "
);
print_namespace
(
NS_OTHER
);
io_sendf
(
" "
);
...
...
imap4d/tests/atlocal.in
View file @
fa88b17
...
...
@@ -18,7 +18,7 @@ gsasl {
enable off;
}
namespace p
rivate
{
namespace p
ersonal
{
prefix "" {
directory "$HOMEDIR";
}
...
...
Please
register
or
sign in
to post a comment