Improve description of variables useful in namespace directory statements
Showing
1 changed file
with
54 additions
and
6 deletions
... | @@ -7591,9 +7591,9 @@ be run either as a standalone program or from @file{inetd.conf} file. | ... | @@ -7591,9 +7591,9 @@ be run either as a standalone program or from @file{inetd.conf} file. |
7591 | @cindex IMAP4 namespace | 7591 | @cindex IMAP4 namespace |
7592 | 7592 | ||
7593 | GNU @command{imap4d} supports a notion of @dfn{namespaces} defined | 7593 | GNU @command{imap4d} supports a notion of @dfn{namespaces} defined |
7594 | in RFC 2342. A namespace can be regarded as a list of triplets, | 7594 | in RFC 2342. A namespace can be regarded as a list of entities, |
7595 | defining locations to which the user has certain access rights. Each | 7595 | defining locations to which the user has certain access rights. Each |
7596 | triplet defines the @dfn{prefix}, under which the mailboxes can be | 7596 | entity includes the @dfn{prefix}, under which the mailboxes can be |
7597 | found, @dfn{hierarchy delimiter}, a character used to delimit parts of | 7597 | found, @dfn{hierarchy delimiter}, a character used to delimit parts of |
7598 | a path to a mailbox, and a @dfn{directory} on the file system on the | 7598 | a path to a mailbox, and a @dfn{directory} on the file system on the |
7599 | server, which actually holds the mailboxes. Among these three values, | 7599 | server, which actually holds the mailboxes. Among these three values, |
... | @@ -7679,8 +7679,17 @@ determines their mappings to the server's file system. The @var{pfx} | ... | @@ -7679,8 +7679,17 @@ determines their mappings to the server's file system. The @var{pfx} |
7679 | argument defines the prefix which will be visible to the IMAP client. | 7679 | argument defines the prefix which will be visible to the IMAP client. |
7680 | 7680 | ||
7681 | The @code{directory} statement defines the directory in the file | 7681 | The @code{directory} statement defines the directory in the file |
7682 | system to which @var{pfx} is mapped. Its argument can contain | 7682 | system to which @var{pfx} is mapped. Exactly one @code{directory} |
7683 | references to the following variables(@pxref{Variables}): | 7683 | statement must be present in each @code{prefix} block. The |
7684 | inerpretation of its argument depends on the namespace in which it | ||
7685 | occurs. | ||
7686 | |||
7687 | When used in the @samp{namespace shared} block, the argument to this | ||
7688 | statement is interpreted verbatim, as an absolute pathname. | ||
7689 | |||
7690 | When used in @samp{namespace personal} the argument to | ||
7691 | @code{directory} statement can contain references to the following | ||
7692 | variables (@pxref{Variables}): | ||
7684 | 7693 | ||
7685 | @table @asis | 7694 | @table @asis |
7686 | @item user | 7695 | @item user |
... | @@ -7690,8 +7699,47 @@ Login name of the user. | ... | @@ -7690,8 +7699,47 @@ Login name of the user. |
7690 | Home directory of the user. | 7699 | Home directory of the user. |
7691 | @end table | 7700 | @end table |
7692 | 7701 | ||
7693 | Exactly one @code{directory} statement must be present in each | 7702 | For example, the following statement maps the default personal |
7694 | @code{prefix} block. | 7703 | namespace to the directory @samp{imap} in the user's home directory: |
7704 | |||
7705 | @example | ||
7706 | @group | ||
7707 | namespace personal @{ | ||
7708 | prefix ""; | ||
7709 | directory "$home/imap"; | ||
7710 | @} | ||
7711 | @end group | ||
7712 | @end example | ||
7713 | |||
7714 | If the @samp{directory} statement is used within the @samp{namespace | ||
7715 | other} block, its value can contain the @samp{$user} and | ||
7716 | @samp{$home} variables as well, but their meaning is different. For | ||
7717 | the @samp{other} namespace, the @samp{$user} variable is expanded | ||
7718 | to the part of the actual reference contained between the prefix and | ||
7719 | first hierarchy delimiter (or the end of the reference, if no | ||
7720 | delimiter occurs to the right of the prefix). Correspondingly, | ||
7721 | @samp{$home} expands to the home directory of that user. Consider, | ||
7722 | for example, the following statement: | ||
7723 | |||
7724 | @example | ||
7725 | @group | ||
7726 | namespace other @{ | ||
7727 | prefix "~"; | ||
7728 | directory "/var/imap/$user"; | ||
7729 | @} | ||
7730 | @end group | ||
7731 | @end example | ||
7732 | |||
7733 | If the client issues the following statement: | ||
7734 | |||
7735 | @example | ||
7736 | 1 LIST "~smith" "%" | ||
7737 | @end example | ||
7738 | |||
7739 | @noindent | ||
7740 | then @samp{$user} will expand to the string @samp{smith} and the | ||
7741 | server will look for all mailboxes in the directory | ||
7742 | @file{/var/imap/smith}. | ||
7695 | 7743 | ||
7696 | The @code{delimiter} statement defines the folder hierarchy delimiter | 7744 | The @code{delimiter} statement defines the folder hierarchy delimiter |
7697 | for that prefix. It is optional, the default value being @samp{"/"}. | 7745 | for that prefix. It is optional, the default value being @samp{"/"}. | ... | ... |
-
Please register or sign in to post a comment