Typo in en_US/howto/public.folder.md.
This commit is contained in:
parent
2615a8cdec
commit
98416d36b9
|
@ -7,7 +7,7 @@ what you need to do is:
|
|||
|
||||
* enable the setting for public folder
|
||||
* choose a preferred directory as public folder
|
||||
* create ACL file to control the access
|
||||
* set proper ACL rules to control the access
|
||||
|
||||
In this tutorial, we will show you how to share a public folder named `TestFolder`.
|
||||
|
||||
|
@ -72,27 +72,31 @@ Important notes:
|
|||
|
||||
Now let's create required folder and our first shared folder `TestFolder`.
|
||||
|
||||
> __Attention__: there's a dot in folder name while creating it, it's
|
||||
> `.TestFolder`, not `TestFolder`. All folders with a prefixed dot will be
|
||||
> considered as an IMAP folder by Dovecot with iRedMail default settings.
|
||||
|
||||
```
|
||||
mkdir -p /var/vmail/public/.TestFolder
|
||||
chown -R vmail:vmail /var/vmail/public
|
||||
chmod -R 0700 /var/vmail/public
|
||||
```
|
||||
|
||||
> Note that there are no `cur/`, `new/` or `tmp/` directories directly under
|
||||
> the `/var/mail/public/`, because the `Public/` namespace isn't a mailbox
|
||||
> itself. (If you create them manually, it does become a selectable mailbox.)
|
||||
!!! note "Notes"
|
||||
|
||||
* There's a dot in folder name while creating it, it's `.TestFolder`, not
|
||||
`TestFolder`. All folders with a prefixed dot will be considered as an
|
||||
IMAP folder by Dovecot with iRedMail default settings.
|
||||
|
||||
* There are no `cur/`, `new/` or `tmp/` directories directly under the
|
||||
`/var/mail/public/` folder, because the `Public/` namespace isn't a
|
||||
mailbox itself. If you create them manually, it does become a selectable
|
||||
mailbox.
|
||||
|
||||
With steps above, if you login to webmail (or other IMAP client) as any mail
|
||||
user hosted on same server, there's no visible public folder at all -- this is
|
||||
correct, because no one has permission to access this folder.
|
||||
correct, because no one has permission to access this folder right now.
|
||||
|
||||
## Manage Access Control with `doveadm`
|
||||
|
||||
Before we set any permission, let's check the access control of this public folder:
|
||||
Before we set any permission, let's check the access control of this public
|
||||
folder first with command `doveadm acl get`:
|
||||
|
||||
```
|
||||
doveadm acl get -A "Public/TestFolder"
|
||||
|
@ -104,15 +108,15 @@ You can see output like below, no access control at all:
|
|||
Username ID Global Rights
|
||||
```
|
||||
|
||||
* With shell command below, we grant `lookup`, `read`, `write`, `insert`,
|
||||
`delete` and `create` (sub-directory) permissions to user
|
||||
`postmaster@test.com` (again, this user is hosted on same server):
|
||||
With shell command below, we grant `lookup`, `read`, `write`, `insert`,
|
||||
`delete` and `create` (sub-directory) permissions to user
|
||||
`postmaster@test.com` (again, this user is hosted on same server):
|
||||
|
||||
```
|
||||
doveadm acl set -A "Public/TestFolder" "user=postmaster@test.com" lookup read write insert delete create
|
||||
```
|
||||
|
||||
Check the ACl with `doveadm` now:
|
||||
Check the ACl with `doveadm` again:
|
||||
|
||||
```
|
||||
# doveadm acl get -A "Public/TestFolder"
|
||||
|
@ -123,8 +127,8 @@ postmaster@a.cn user=postmaster@test.com create delete insert lookup read
|
|||
If you now login to webmail (or other IMAP client) as user `postmaster@test.com`,
|
||||
you can see a new folder `TestFolder`.
|
||||
|
||||
* With shell command below, we grant all users hosted on same server `lookup`,
|
||||
and `read` permissions:
|
||||
With shell command below, we grant all users hosted on same server `lookup`,
|
||||
and `read` permissions:
|
||||
|
||||
```
|
||||
doveadm acl set -A "Public/TestFolder" "anyone" lookup read
|
||||
|
@ -142,24 +146,25 @@ postmaster@a.cn user=postmaster@test.com create delete insert lookup read
|
|||
If you login to webmail (or other IMAP client) as any user hosted on same
|
||||
server, you can see a new folder `TestFolder`.
|
||||
|
||||
* With shell command below we delete access control for user `postmaster@test.com`:
|
||||
With shell command below we delete access control for user `postmaster@test.com`:
|
||||
|
||||
```
|
||||
doveadm acl delete -A "Public/TestFolder" "user=postmaster@test.com"
|
||||
```
|
||||
|
||||
For more details about `doveadm` acl control, please read its [manual page](#references).
|
||||
For more details about ACL control, please read Dovecot tutorials mentioned in
|
||||
[References](#references) below.
|
||||
|
||||
## Manage Access Control manually
|
||||
|
||||
> Notes:
|
||||
>
|
||||
> * if you're running Dovecot-2, it's recommended to manage ACL with `doveadm`
|
||||
> command.
|
||||
> * Dovecot will create file `/var/vmail/public/dovecot-acl-list` automatically,
|
||||
> it lists all mailboxes that have `l` rights assigned. If you manually
|
||||
> add/edit `dovecot-acl` files, you may need to delete the `dovecot-acl-list`
|
||||
> to get the mailboxes visible.
|
||||
!!! note
|
||||
|
||||
* if you're running Dovecot-2, it's recommended to manage ACL with `doveadm`
|
||||
command.
|
||||
* Dovecot will create file `/var/vmail/public/dovecot-acl-list` automatically,
|
||||
it lists all mailboxes that have `l` rights assigned. If you manually
|
||||
add/edit `dovecot-acl` files, you may need to delete the `dovecot-acl-list`
|
||||
to get the mailboxes visible.
|
||||
|
||||
Access permission is controlled in file `dovecot-acl` under each shared folder,
|
||||
let's create it before showing you some examples:
|
||||
|
@ -170,18 +175,20 @@ chown vmail:vmail /var/vmail/public/.TestFolder/dovecot-acl
|
|||
chmod 0700 /var/vmail/public/.TestFolder/dovecot-acl
|
||||
```
|
||||
|
||||
* With shell command below, we grant `lookup` (l), `read` (r), `write` (w),
|
||||
`insert` (i), `delete` (x) and `create sub-directory` (k) permissions to user
|
||||
`postmaster@test.com` (again, this user is hosted on same server):
|
||||
With shell command below, we grant `lookup` (l), `read` (r), `write` (w),
|
||||
`insert` (i), `delete` (x) and `create sub-directory` (k) permissions to user
|
||||
`postmaster@test.com` (again, this user is hosted on same server):
|
||||
|
||||
```
|
||||
echo 'user=postmaster@test.com lrwixk' >> /var/vmail/public/.TestFolder/dovecot-acl
|
||||
```
|
||||
|
||||
* With shell command below, we grant all users `lookup` (l) and `read` (r)
|
||||
permissions:
|
||||
With shell command below, we grant all users `lookup` (l) and `read` (r)
|
||||
permissions:
|
||||
|
||||
> Note: it requires setting `acl_anyone = allow` in Dovecot config file.
|
||||
!!! note "Reminder"
|
||||
|
||||
It requires Dovecot setting `acl_anyone = allow` in `dovecot.conf`.
|
||||
|
||||
```
|
||||
echo 'anyone lr' >> /var/vmail/public/.TestFolder/dovecot-acl
|
||||
|
|
|
@ -19,6 +19,12 @@ h2 { font-size: 36px; padding-top: 24px;}
|
|||
h3 { font-size: 24px; }
|
||||
h4 { font-size: 21px; }
|
||||
h5 { font-size: 18px; }
|
||||
|
||||
h2 code { font-size: 36px; }
|
||||
h3 code { font-size: 24px; }
|
||||
h4 code { font-size: 21px; }
|
||||
h5 code { font-size: 18px; }
|
||||
|
||||
a {
|
||||
color: #0099ff;
|
||||
margin: 0;
|
||||
|
|
|
@ -26,7 +26,7 @@ what you need to do is:</p>
|
|||
<ul>
|
||||
<li>enable the setting for public folder</li>
|
||||
<li>choose a preferred directory as public folder</li>
|
||||
<li>create ACL file to control the access</li>
|
||||
<li>set proper ACL rules to control the access</li>
|
||||
</ul>
|
||||
<p>In this tutorial, we will show you how to share a public folder named <code>TestFolder</code>.</p>
|
||||
<h2 id="enable-public-folder-in-dovecot">Enable public folder in Dovecot</h2>
|
||||
|
@ -81,26 +81,33 @@ please also remove the comment mark in below line in <code>dovecot.conf</code>:<
|
|||
with permission <code>0700</code>.</li>
|
||||
</ul>
|
||||
<p>Now let's create required folder and our first shared folder <code>TestFolder</code>.</p>
|
||||
<blockquote>
|
||||
<p><strong>Attention</strong>: there's a dot in folder name while creating it, it's
|
||||
<code>.TestFolder</code>, not <code>TestFolder</code>. All folders with a prefixed dot will be
|
||||
considered as an IMAP folder by Dovecot with iRedMail default settings.</p>
|
||||
</blockquote>
|
||||
<pre><code>mkdir -p /var/vmail/public/.TestFolder
|
||||
chown -R vmail:vmail /var/vmail/public
|
||||
chmod -R 0700 /var/vmail/public
|
||||
</code></pre>
|
||||
|
||||
<blockquote>
|
||||
<p>Note that there are no <code>cur/</code>, <code>new/</code> or <code>tmp/</code> directories directly under
|
||||
the <code>/var/mail/public/</code>, because the <code>Public/</code> namespace isn't a mailbox
|
||||
itself. (If you create them manually, it does become a selectable mailbox.)</p>
|
||||
</blockquote>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Notes</p>
|
||||
<ul>
|
||||
<li>
|
||||
<p>There's a dot in folder name while creating it, it's <code>.TestFolder</code>, not
|
||||
<code>TestFolder</code>. All folders with a prefixed dot will be considered as an
|
||||
IMAP folder by Dovecot with iRedMail default settings.</p>
|
||||
</li>
|
||||
<li>
|
||||
<p>There are no <code>cur/</code>, <code>new/</code> or <code>tmp/</code> directories directly under the
|
||||
<code>/var/mail/public/</code> folder, because the <code>Public/</code> namespace isn't a
|
||||
mailbox itself. If you create them manually, it does become a selectable
|
||||
mailbox.</p>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
<p>With steps above, if you login to webmail (or other IMAP client) as any mail
|
||||
user hosted on same server, there's no visible public folder at all -- this is
|
||||
correct, because no one has permission to access this folder.</p>
|
||||
correct, because no one has permission to access this folder right now.</p>
|
||||
<h2 id="manage-access-control-with-doveadm">Manage Access Control with <code>doveadm</code></h2>
|
||||
<p>Before we set any permission, let's check the access control of this public folder:</p>
|
||||
<p>Before we set any permission, let's check the access control of this public
|
||||
folder first with command <code>doveadm acl get</code>:</p>
|
||||
<pre><code>doveadm acl get -A "Public/TestFolder"
|
||||
</code></pre>
|
||||
|
||||
|
@ -108,15 +115,13 @@ correct, because no one has permission to access this folder.</p>
|
|||
<pre><code>Username ID Global Rights
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>With shell command below, we grant <code>lookup</code>, <code>read</code>, <code>write</code>, <code>insert</code>,
|
||||
<code>delete</code> and <code>create</code> (sub-directory) permissions to user
|
||||
<code>postmaster@test.com</code> (again, this user is hosted on same server):</li>
|
||||
</ul>
|
||||
<p>With shell command below, we grant <code>lookup</code>, <code>read</code>, <code>write</code>, <code>insert</code>,
|
||||
<code>delete</code> and <code>create</code> (sub-directory) permissions to user
|
||||
<code>postmaster@test.com</code> (again, this user is hosted on same server):</p>
|
||||
<pre><code>doveadm acl set -A "Public/TestFolder" "user=postmaster@test.com" lookup read write insert delete create
|
||||
</code></pre>
|
||||
|
||||
<p>Check the ACl with <code>doveadm</code> now:</p>
|
||||
<p>Check the ACl with <code>doveadm</code> again:</p>
|
||||
<pre><code># doveadm acl get -A "Public/TestFolder"
|
||||
Username ID Global Rights
|
||||
postmaster@a.cn user=postmaster@test.com create delete insert lookup read write
|
||||
|
@ -124,10 +129,8 @@ postmaster@a.cn user=postmaster@test.com create delete insert lookup read
|
|||
|
||||
<p>If you now login to webmail (or other IMAP client) as user <code>postmaster@test.com</code>,
|
||||
you can see a new folder <code>TestFolder</code>.</p>
|
||||
<ul>
|
||||
<li>With shell command below, we grant all users hosted on same server <code>lookup</code>,
|
||||
and <code>read</code> permissions:</li>
|
||||
</ul>
|
||||
<p>With shell command below, we grant all users hosted on same server <code>lookup</code>,
|
||||
and <code>read</code> permissions:</p>
|
||||
<pre><code>doveadm acl set -A "Public/TestFolder" "anyone" lookup read
|
||||
</code></pre>
|
||||
|
||||
|
@ -140,16 +143,15 @@ postmaster@a.cn user=postmaster@test.com create delete insert lookup read
|
|||
|
||||
<p>If you login to webmail (or other IMAP client) as any user hosted on same
|
||||
server, you can see a new folder <code>TestFolder</code>.</p>
|
||||
<ul>
|
||||
<li>With shell command below we delete access control for user <code>postmaster@test.com</code>:</li>
|
||||
</ul>
|
||||
<p>With shell command below we delete access control for user <code>postmaster@test.com</code>:</p>
|
||||
<pre><code>doveadm acl delete -A "Public/TestFolder" "user=postmaster@test.com"
|
||||
</code></pre>
|
||||
|
||||
<p>For more details about <code>doveadm</code> acl control, please read its <a href="#references">manual page</a>.</p>
|
||||
<p>For more details about ACL control, please read Dovecot tutorials mentioned in
|
||||
<a href="#references">References</a> below.</p>
|
||||
<h2 id="manage-access-control-manually">Manage Access Control manually</h2>
|
||||
<blockquote>
|
||||
<p>Notes:</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<ul>
|
||||
<li>if you're running Dovecot-2, it's recommended to manage ACL with <code>doveadm</code>
|
||||
command.</li>
|
||||
|
@ -158,7 +160,7 @@ server, you can see a new folder <code>TestFolder</code>.</p>
|
|||
add/edit <code>dovecot-acl</code> files, you may need to delete the <code>dovecot-acl-list</code>
|
||||
to get the mailboxes visible.</li>
|
||||
</ul>
|
||||
</blockquote>
|
||||
</div>
|
||||
<p>Access permission is controlled in file <code>dovecot-acl</code> under each shared folder,
|
||||
let's create it before showing you some examples:</p>
|
||||
<pre><code>touch /var/vmail/public/.TestFolder/dovecot-acl
|
||||
|
@ -166,21 +168,18 @@ chown vmail:vmail /var/vmail/public/.TestFolder/dovecot-acl
|
|||
chmod 0700 /var/vmail/public/.TestFolder/dovecot-acl
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>With shell command below, we grant <code>lookup</code> (l), <code>read</code> (r), <code>write</code> (w),
|
||||
<code>insert</code> (i), <code>delete</code> (x) and <code>create sub-directory</code> (k) permissions to user
|
||||
<code>postmaster@test.com</code> (again, this user is hosted on same server):</li>
|
||||
</ul>
|
||||
<p>With shell command below, we grant <code>lookup</code> (l), <code>read</code> (r), <code>write</code> (w),
|
||||
<code>insert</code> (i), <code>delete</code> (x) and <code>create sub-directory</code> (k) permissions to user
|
||||
<code>postmaster@test.com</code> (again, this user is hosted on same server):</p>
|
||||
<pre><code>echo 'user=postmaster@test.com lrwixk' >> /var/vmail/public/.TestFolder/dovecot-acl
|
||||
</code></pre>
|
||||
|
||||
<ul>
|
||||
<li>With shell command below, we grant all users <code>lookup</code> (l) and <code>read</code> (r)
|
||||
permissions:</li>
|
||||
</ul>
|
||||
<blockquote>
|
||||
<p>Note: it requires setting <code>acl_anyone = allow</code> in Dovecot config file.</p>
|
||||
</blockquote>
|
||||
<p>With shell command below, we grant all users <code>lookup</code> (l) and <code>read</code> (r)
|
||||
permissions:</p>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Reminder</p>
|
||||
<p>It requires Dovecot setting <code>acl_anyone = allow</code> in <code>dovecot.conf</code>.</p>
|
||||
</div>
|
||||
<pre><code>echo 'anyone lr' >> /var/vmail/public/.TestFolder/dovecot-acl
|
||||
</code></pre>
|
||||
|
||||
|
|
Loading…
Reference in New Issue