This commit is contained in:
github-actions[bot] 2023-04-09 09:43:14 +00:00
parent f5e1487a16
commit 115aef7384
7 changed files with 43 additions and 87 deletions

View file

@ -2152,11 +2152,19 @@ find<span class="w"> </span><span class="s2">&quot;</span><span class="si">${</s
<li>From: <code>mydestination = $myhostname, localhost.$mydomain, localhost</code></li>
<li>To: <code>mydestination = localhost.$mydomain, localhost</code></li>
</ul>
<p>Add the latter line to <code>docker-data/dms/config/postfix-main.cf</code>. If that doesn't work, make sure that <code>OVERRIDE_HOSTNAME</code> is blank in your <code>mailserver.env</code> file (see <a href="https://github.com/docker-mailserver/docker-mailserver/issues/1731#issuecomment-753968425">#1731</a>). Without these changes there will be warnings in the logs like:</p>
<p>Add the latter line to <code>docker-data/dms/config/postfix-main.cf</code>. If that doesn't work, make sure that <a href="https://github.com/docker-mailserver/docker-mailserver/issues/1731#issuecomment-753968425"><code>OVERRIDE_HOSTNAME</code> is blank in your <code>mailserver.env</code> file</a>. Without these changes there will be warnings in the logs like:</p>
<div class="highlight"><pre><span></span><code><span class="go">warning: do not list domain example.com in BOTH mydestination and virtual_mailbox_domains</span>
</code></pre></div>
<p>Plus of course mail delivery fails.</p>
<p>Also you need to define <code>hostname: example.com</code> in your docker-compose.yml and don't sepecify the <code>domainname:</code> at all.</p>
<p>Also you need to define <code>hostname: example.com</code> in your <code>docker-compose.yml</code>.</p>
<div class="admonition tip">
<p class="admonition-title">You might not want a bare domain</p>
<p>We encourage you to consider using a subdomain where possible.</p>
<ul>
<li>There are <a href="https://github.com/docker-mailserver/docker-mailserver/issues/3048#issuecomment-1432358353">benefits</a> to preferring a subdomain.</li>
<li>A bare domain is not required to have <code>user@example.com</code>, that is distinct from your hostname which is identified by a DNS MX record.</li>
</ul>
</div>
<h3 id="how-can-i-configure-a-catch-all"><a class="toclink" href="#how-can-i-configure-a-catch-all">How can I configure a catch-all?</a></h3>
<p>Considering you want to redirect all incoming e-mails for the domain <code>example.com</code> to <code>user1@example.com</code>, add the following line to <code>docker-data/dms/config/postfix-virtual.cf</code>:</p>
<div class="highlight"><pre><span></span><code><span class="na">@example.com user1@example.com</span>
@ -2341,9 +2349,7 @@ chmod<span class="w"> </span><span class="m">0644</span><span class="w"> </span>
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">./docker-data/dms/cron/sa-learn:/etc/cron.d/sa-learn</span>
</code></pre></div>
<p>Or with <a href="https://docs.docker.com/engine/swarm/configs/">Docker Swarm</a>:</p>
<div class="highlight"><pre><span></span><code><span class="nt">version</span><span class="p">:</span><span class="w"> </span><span class="s">&#39;3.8&#39;</span>
<span class="nt">services</span><span class="p">:</span>
<div class="highlight"><pre><span></span><code><span class="nt">services</span><span class="p">:</span>
<span class="w"> </span><span class="nt">mailserver</span><span class="p">:</span>
<span class="w"> </span><span class="nt">image</span><span class="p">:</span><span class="w"> </span><span class="l l-Scalar l-Scalar-Plain">ghcr.io/docker-mailserver/docker-mailserver:latest</span>
<span class="w"> </span><span class="c1"># ...</span>