mirror of
https://github.com/docker-mailserver/docker-mailserver.git
synced 2025-08-04 10:05:00 +02:00
deploy: a0ee472501
This commit is contained in:
parent
07afd2c901
commit
4d20a99272
46 changed files with 847 additions and 862 deletions
|
@ -6,7 +6,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
<meta name="description" content="A fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) using Docker.">
|
||||
<meta name="description" content="A fullstack but simple mail-server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) using Docker.">
|
||||
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
<link rel="canonical" href="https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/override-defaults/dovecot/">
|
||||
|
||||
<link rel="icon" href="../../../../assets/logo/favicon-32x32.png">
|
||||
<meta name="generator" content="mkdocs-1.2.2, mkdocs-material-7.2.6">
|
||||
<meta name="generator" content="mkdocs-1.2.2, mkdocs-material-7.2.8">
|
||||
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../../../../assets/stylesheets/main.802231af.min.css">
|
||||
<link rel="stylesheet" href="../../../../assets/stylesheets/main.92558b1b.min.css">
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../../../../assets/stylesheets/palette.3f5d1f46.min.css">
|
||||
|
@ -1084,7 +1084,7 @@
|
|||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../../examples/tutorials/mailserver-behind-proxy/" class="md-nav__link">
|
||||
Mailserver behind Proxy
|
||||
Mail-Server behind a Proxy
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
@ -1135,7 +1135,7 @@
|
|||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../../examples/uses-cases/forward-only-mailserver-with-ldap-authentication/" class="md-nav__link">
|
||||
Forward-Only Mailserver with LDAP
|
||||
Forward-Only Mail-Server with LDAP
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
@ -1352,10 +1352,10 @@
|
|||
<h1>Dovecot</h1>
|
||||
|
||||
<h2 id="add-configuration"><a class="toclink" href="#add-configuration">Add Configuration</a></h2>
|
||||
<p>The Dovecot default configuration can easily be extended providing a <code>config/dovecot.cf</code> file.
|
||||
<p>The Dovecot default configuration can easily be extended providing a <code>docker-data/dms/config/dovecot.cf</code> file.
|
||||
<a href="https://wiki.dovecot.org">Dovecot documentation</a> remains the best place to find configuration options.</p>
|
||||
<p>Your <code>docker-mailserver</code> folder should look like this example:</p>
|
||||
<div class="highlight"><pre><span></span><code>├── config
|
||||
<div class="highlight"><pre><span></span><code>├── docker-data/dms/config
|
||||
│ ├── dovecot.cf
|
||||
│ ├── postfix-accounts.cf
|
||||
│ └── postfix-virtual.cf
|
||||
|
@ -1366,15 +1366,18 @@
|
|||
<div class="highlight"><pre><span></span><code><span class="na">mail_max_userip_connections</span> <span class="o">=</span> <span class="s">100</span>
|
||||
</code></pre></div>
|
||||
<p>Another important option is the <code>default_process_limit</code> (defaults to <code>100</code>). If high-security mode is enabled you'll need to make sure this count is higher than the maximum number of users that can be logged in simultaneously.</p>
|
||||
<p>This limit is quickly reached if users connect to the mail server with multiple end devices.</p>
|
||||
<p>This limit is quickly reached if users connect to the <code>docker-mailserver</code> with multiple end devices.</p>
|
||||
<h2 id="override-configuration"><a class="toclink" href="#override-configuration">Override Configuration</a></h2>
|
||||
<p>For major configuration changes it’s best to override the dovecot configuration files. For each configuration file you want to override, add a list entry under the <code>volumes</code> key.</p>
|
||||
<p>You will need to first obtain the configuration from the running container: <code>mkdir -p ./config/dovecot && docker cp mailserver:/etc/dovecot/conf.d/10-master.conf ./config/dovecot/10-master.conf</code></p>
|
||||
<div class="highlight"><pre><span></span><code><span class="nt">services</span><span class="p">:</span>
|
||||
<span class="nt">mailserver</span><span class="p">:</span>
|
||||
<span class="nt">volumes</span><span class="p">:</span>
|
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">maildata:/var/mail</span>
|
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">./config/dovecot/10-master.conf:/etc/dovecot/conf.d/10-master.conf</span>
|
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">./docker-data/dms/mail-data/:/var/mail/</span>
|
||||
<span class="p p-Indicator">-</span> <span class="l l-Scalar l-Scalar-Plain">./docker-data/dms/config/dovecot/10-master.conf:/etc/dovecot/conf.d/10-master.conf</span>
|
||||
</code></pre></div>
|
||||
<p>You will first need to obtain the configuration from the running container (<em>where <code>mailserver</code> is the container name</em>):</p>
|
||||
<div class="highlight"><pre><span></span><code>mkdir -p ./docker-data/dms/config/dovecot
|
||||
docker cp mailserver:/etc/dovecot/conf.d/10-master.conf ./docker-data/dms/config/dovecot/10-master.conf
|
||||
</code></pre></div>
|
||||
<h2 id="debugging"><a class="toclink" href="#debugging">Debugging</a></h2>
|
||||
<p>To debug your dovecot configuration you can use:</p>
|
||||
|
@ -1384,9 +1387,9 @@
|
|||
</ul>
|
||||
<div class="admonition note">
|
||||
<p class="admonition-title">Note</p>
|
||||
<p><a href="https://github.com/docker-mailserver/docker-mailserver/blob/master/setup.sh"><code>setup.sh</code></a> is included in the <code>docker-mailserver</code> repository. Make sure to grap the one matching your image version.</p>
|
||||
<p><a href="https://github.com/docker-mailserver/docker-mailserver/blob/master/setup.sh"><code>setup.sh</code></a> is included in the <code>docker-mailserver</code> repository. Make sure to use the one matching your image version release.</p>
|
||||
</div>
|
||||
<p>The <code>config/dovecot.cf</code> is copied internally to <code>/etc/dovecot/local.conf</code>. To check this file run:</p>
|
||||
<p>The file <code>docker-data/dms/config/dovecot.cf</code> is copied internally to <code>/etc/dovecot/local.conf</code>. To verify the file content, run:</p>
|
||||
<div class="highlight"><pre><span></span><code>docker <span class="nb">exec</span> -it mailserver cat /etc/dovecot/local.conf
|
||||
</code></pre></div>
|
||||
|
||||
|
@ -1470,10 +1473,10 @@
|
|||
<div class="md-dialog" data-md-component="dialog">
|
||||
<div class="md-dialog__inner md-typeset"></div>
|
||||
</div>
|
||||
<script id="__config" type="application/json">{"base": "../../../..", "features": ["navigation.tabs", "navigation.top", "navigation.expand", "navigation.instant"], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "../../../../assets/javascripts/workers/search.409db549.min.js", "version": {"provider": "mike"}}</script>
|
||||
<script id="__config" type="application/json">{"base": "../../../..", "features": ["navigation.tabs", "navigation.top", "navigation.expand", "navigation.instant"], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "../../../../assets/javascripts/workers/search.94ec81fe.min.js", "version": {"provider": "mike"}}</script>
|
||||
|
||||
|
||||
<script src="../../../../assets/javascripts/bundle.756773cc.min.js"></script>
|
||||
<script src="../../../../assets/javascripts/bundle.48dfec6c.min.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
<meta name="description" content="A fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) using Docker.">
|
||||
<meta name="description" content="A fullstack but simple mail-server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) using Docker.">
|
||||
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
<link rel="canonical" href="https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/override-defaults/postfix/">
|
||||
|
||||
<link rel="icon" href="../../../../assets/logo/favicon-32x32.png">
|
||||
<meta name="generator" content="mkdocs-1.2.2, mkdocs-material-7.2.6">
|
||||
<meta name="generator" content="mkdocs-1.2.2, mkdocs-material-7.2.8">
|
||||
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../../../../assets/stylesheets/main.802231af.min.css">
|
||||
<link rel="stylesheet" href="../../../../assets/stylesheets/main.92558b1b.min.css">
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../../../../assets/stylesheets/palette.3f5d1f46.min.css">
|
||||
|
@ -1037,7 +1037,7 @@
|
|||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../../examples/tutorials/mailserver-behind-proxy/" class="md-nav__link">
|
||||
Mailserver behind Proxy
|
||||
Mail-Server behind a Proxy
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
@ -1088,7 +1088,7 @@
|
|||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../../examples/uses-cases/forward-only-mailserver-with-ldap-authentication/" class="md-nav__link">
|
||||
Forward-Only Mailserver with LDAP
|
||||
Forward-Only Mail-Server with LDAP
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
@ -1260,7 +1260,7 @@
|
|||
|
||||
<h1>Postfix</h1>
|
||||
|
||||
<p>The Postfix default configuration can easily be extended by providing a <code>config/postfix-main.cf</code> in postfix format.
|
||||
<p>The Postfix default configuration can easily be extended by providing a <code>docker-data/dms/config/postfix-main.cf</code> in postfix format.
|
||||
This can also be used to add configuration that is not in our default configuration.</p>
|
||||
<p>For example, one common use of this file is for increasing the default maximum message size:</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="c1"># increase maximum message size</span>
|
||||
|
@ -1272,7 +1272,7 @@ This can also be used to add configuration that is not in our default configurat
|
|||
<p><a href="http://www.postfix.org/documentation.html">Postfix documentation</a> remains the best place to find configuration options.</p>
|
||||
</div>
|
||||
<p>Each line in the provided file will be loaded into postfix.</p>
|
||||
<p>In the same way it is possible to add a custom <code>config/postfix-master.cf</code> file that will override the standard <code>master.cf</code>. Each line in the file will be passed to <code>postconf -P</code>. The expected format is <code><service_name>/<type>/<parameter></code>, for example:</p>
|
||||
<p>In the same way it is possible to add a custom <code>docker-data/dms/config/postfix-master.cf</code> file that will override the standard <code>master.cf</code>. Each line in the file will be passed to <code>postconf -P</code>. The expected format is <code><service_name>/<type>/<parameter></code>, for example:</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="na">submission/inet/smtpd_reject_unlisted_recipient</span><span class="o">=</span><span class="s">no</span>
|
||||
</code></pre></div>
|
||||
<p>Run <code>postconf -P</code> in the container without arguments to see the active master options.</p>
|
||||
|
@ -1362,10 +1362,10 @@ This can also be used to add configuration that is not in our default configurat
|
|||
<div class="md-dialog" data-md-component="dialog">
|
||||
<div class="md-dialog__inner md-typeset"></div>
|
||||
</div>
|
||||
<script id="__config" type="application/json">{"base": "../../../..", "features": ["navigation.tabs", "navigation.top", "navigation.expand", "navigation.instant"], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "../../../../assets/javascripts/workers/search.409db549.min.js", "version": {"provider": "mike"}}</script>
|
||||
<script id="__config" type="application/json">{"base": "../../../..", "features": ["navigation.tabs", "navigation.top", "navigation.expand", "navigation.instant"], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "../../../../assets/javascripts/workers/search.94ec81fe.min.js", "version": {"provider": "mike"}}</script>
|
||||
|
||||
|
||||
<script src="../../../../assets/javascripts/bundle.756773cc.min.js"></script>
|
||||
<script src="../../../../assets/javascripts/bundle.48dfec6c.min.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
|
|
@ -6,7 +6,7 @@
|
|||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
|
||||
<meta name="description" content="A fullstack but simple mail server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) using Docker.">
|
||||
<meta name="description" content="A fullstack but simple mail-server (SMTP, IMAP, LDAP, Antispam, Antivirus, etc.) using Docker.">
|
||||
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@
|
|||
<link rel="canonical" href="https://docker-mailserver.github.io/docker-mailserver/edge/config/advanced/override-defaults/user-patches/">
|
||||
|
||||
<link rel="icon" href="../../../../assets/logo/favicon-32x32.png">
|
||||
<meta name="generator" content="mkdocs-1.2.2, mkdocs-material-7.2.6">
|
||||
<meta name="generator" content="mkdocs-1.2.2, mkdocs-material-7.2.8">
|
||||
|
||||
|
||||
|
||||
|
@ -24,7 +24,7 @@
|
|||
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../../../../assets/stylesheets/main.802231af.min.css">
|
||||
<link rel="stylesheet" href="../../../../assets/stylesheets/main.92558b1b.min.css">
|
||||
|
||||
|
||||
<link rel="stylesheet" href="../../../../assets/stylesheets/palette.3f5d1f46.min.css">
|
||||
|
@ -1037,7 +1037,7 @@
|
|||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../../examples/tutorials/mailserver-behind-proxy/" class="md-nav__link">
|
||||
Mailserver behind Proxy
|
||||
Mail-Server behind a Proxy
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
@ -1088,7 +1088,7 @@
|
|||
|
||||
<li class="md-nav__item">
|
||||
<a href="../../../../examples/uses-cases/forward-only-mailserver-with-ldap-authentication/" class="md-nav__link">
|
||||
Forward-Only Mailserver with LDAP
|
||||
Forward-Only Mail-Server with LDAP
|
||||
</a>
|
||||
</li>
|
||||
|
||||
|
@ -1261,17 +1261,17 @@
|
|||
<h1>Modifications via Script</h1>
|
||||
|
||||
<p>If you'd like to change, patch or alter files or behavior of <code>docker-mailserver</code>, you can use a script.</p>
|
||||
<p>In case you cloned this repository, you can copy the file <code>user-patches.sh.dist</code> under <code>config/</code> with <code class="highlight">cp config/user-patches.sh.dist config/user-patches.sh</code> in order to create the <code>user-patches.sh</code> script. In case you are managing your directory structure yourself, create a <code>config/</code> directory and the <code>user-patches.sh</code> file yourself.</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="c1"># 1. Either create the config/ directory yourself</span>
|
||||
<span class="c1"># or let docker-mailserver create it on initial</span>
|
||||
<span class="c1"># startup</span>
|
||||
~/somewhere $ mkdir config <span class="o">&&</span> <span class="nb">cd</span> config
|
||||
<p>In case you cloned this repository, you can copy the file <a href="https://github.com/docker-mailserver/docker-mailserver/blob/master/config/user-patches.sh.dist"><code>user-patches.sh.dist</code> (<em>under <code>config/</code></em>)</a> with <code class="highlight">cp config/user-patches.sh.dist docker-data/dms/config/user-patches.sh</code> in order to create the <code>user-patches.sh</code> script.</p>
|
||||
<p>If you are managing your directory structure yourself, create a <code>docker-data/dms/config/</code> directory and add the <code>user-patches.sh</code> file yourself.</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="c1"># 1. Either create the docker-data/dms/config/ directory yourself</span>
|
||||
<span class="c1"># or let docker-mailserver create it on initial startup</span>
|
||||
/tmp $ mkdir -p docker-data/dms/config/ <span class="o">&&</span> <span class="nb">cd</span> docker-data/dms/config/
|
||||
|
||||
<span class="c1"># 2. Create the user-patches.sh and edit it</span>
|
||||
~/somewhere/config $ touch user-patches.sh
|
||||
~/somewhere/config $ vi user-patches.sh
|
||||
<span class="c1"># 2. Create the user-patches.sh file and edit it</span>
|
||||
/tmp/docker-data/dms/config $ touch user-patches.sh
|
||||
/tmp/docker-data/dms/config $ nano user-patches.sh
|
||||
</code></pre></div>
|
||||
<p>The contents could look like this</p>
|
||||
<p>The contents could look like this:</p>
|
||||
<div class="highlight"><pre><span></span><code><span class="ch">#! /bin/bash</span>
|
||||
|
||||
cat >/etc/amavis/conf.d/50-user << <span class="s2">"END"</span>
|
||||
|
@ -1283,8 +1283,6 @@ use strict<span class="p">;</span>
|
|||
<span class="c1">#------------ Do not modify anything below this line -------------</span>
|
||||
<span class="m">1</span><span class="p">;</span> <span class="c1"># ensure a defined return</span>
|
||||
END
|
||||
|
||||
...
|
||||
</code></pre></div>
|
||||
<p>And you're done. The user patches script runs right before starting daemons. That means, all the other configuration is in place, so the script can make final adjustments.</p>
|
||||
<div class="admonition note">
|
||||
|
@ -1372,10 +1370,10 @@ END
|
|||
<div class="md-dialog" data-md-component="dialog">
|
||||
<div class="md-dialog__inner md-typeset"></div>
|
||||
</div>
|
||||
<script id="__config" type="application/json">{"base": "../../../..", "features": ["navigation.tabs", "navigation.top", "navigation.expand", "navigation.instant"], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "../../../../assets/javascripts/workers/search.409db549.min.js", "version": {"provider": "mike"}}</script>
|
||||
<script id="__config" type="application/json">{"base": "../../../..", "features": ["navigation.tabs", "navigation.top", "navigation.expand", "navigation.instant"], "translations": {"clipboard.copy": "Copy to clipboard", "clipboard.copied": "Copied to clipboard", "search.config.lang": "en", "search.config.pipeline": "trimmer, stopWordFilter", "search.config.separator": "[\\s\\-]+", "search.placeholder": "Search", "search.result.placeholder": "Type to start searching", "search.result.none": "No matching documents", "search.result.one": "1 matching document", "search.result.other": "# matching documents", "search.result.more.one": "1 more on this page", "search.result.more.other": "# more on this page", "search.result.term.missing": "Missing", "select.version.title": "Select version"}, "search": "../../../../assets/javascripts/workers/search.94ec81fe.min.js", "version": {"provider": "mike"}}</script>
|
||||
|
||||
|
||||
<script src="../../../../assets/javascripts/bundle.756773cc.min.js"></script>
|
||||
<script src="../../../../assets/javascripts/bundle.48dfec6c.min.js"></script>
|
||||
|
||||
|
||||
</body>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue