This commit is contained in:
github-actions[bot] 2023-04-10 13:37:03 +00:00
parent 0eeb91b632
commit b6afb50e7c
25 changed files with 136 additions and 136 deletions

View file

@ -1559,7 +1559,7 @@
<p>This was originally a community contributed guide. Please let us know via a Github Issue if you're having any difficulty following the guide so that we can update it.</p>
</div>
<p>This guide is focused on only using <a href="../../../config/security/understanding-the-ports/">SMTP ports (not POP3 and IMAP)</a> with the intent to relay mail received from another service to an external email address (eg: <code>user@gmail.com</code>). It is not intended for mailbox storage of real users.</p>
<p>In this setup <code>docker-mailserver</code> is not intended to receive email from the outside world, so no anti-spam or anti-virus software is needed, making the service lighter to run.</p>
<p>In this setup DMS is not intended to receive email from the outside world, so no anti-spam or anti-virus software is needed, making the service lighter to run.</p>
<div class="admonition tip">
<p class="admonition-title"><code>setup</code></p>
<p>The <code>setup</code> command used below is to be <a href="../../../usage/#get-up-and-running">run inside the container</a>.</p>
@ -1625,7 +1625,7 @@ ufw<span class="w"> </span>allow<span class="w"> </span><span class="m">465</spa
@ IN A 10.11.12.13
mail IN A 10.11.12.13
; mail-server for example.com
; mail server for example.com
@ IN MX 10 mail.example.com.
; Add SPF record
@ -1647,7 +1647,7 @@ mail IN A 10.11.12.13
<p>Get an SSL certificate, <a href="../../../config/security/ssl/#lets-encrypt-recommended">we have a guide for you here</a> (<em>Let's Encrypt</em> is a popular service to get free SSL certificates).</p>
</li>
<li>
<p>Start <code>docker-mailserver</code> and check the terminal output for any errors: <code>docker-compose up</code>.</p>
<p>Start DMS and check the terminal output for any errors: <code>docker-compose up</code>.</p>
</li>
<li>
<p>Create email accounts and aliases:</p>

View file

@ -1408,7 +1408,7 @@
<h1>Blog Posts</h1>
<p>This site lists blog entries that write about the project. If you blogged about <code>docker-mailserver</code> let us know so we can add it here!</p>
<p>This site lists blog entries that write about the project. If you blogged about DMS let us know so we can add it here!</p>
<ul>
<li><a href="https://lowtek.ca/roo/2021/installing-docker-mailserver/">Installing docker-mailserver</a> by <a href="https://github.com/andrewlow">@andrewlow</a></li>
<li><a href="https://www.ifthenel.se/self-hosted-mail-server/">Self hosted mail-server</a> by <a href="https://github.com/matrixes">@matrixes</a></li>

View file

@ -25,7 +25,7 @@
<title>Tutorials | Mail-Server behind a Proxy - Docker Mailserver</title>
<title>Tutorials | Mail Server behind a Proxy - Docker Mailserver</title>
@ -79,7 +79,7 @@
<div data-md-component="skip">
<a href="#using-docker-mailserver-behind-a-proxy" class="md-skip">
<a href="#using-dms-behind-a-proxy" class="md-skip">
Skip to content
</a>
@ -115,7 +115,7 @@
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Tutorials | Mail-Server behind a Proxy
Tutorials | Mail Server behind a Proxy
</span>
</div>
@ -1162,11 +1162,11 @@
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#using-docker-mailserver-behind-a-proxy" class="md-nav__link">
Using docker-mailserver behind a Proxy
<a href="#using-dms-behind-a-proxy" class="md-nav__link">
Using DMS behind a Proxy
</a>
<nav class="md-nav" aria-label="Using docker-mailserver behind a Proxy">
<nav class="md-nav" aria-label="Using DMS behind a Proxy">
<ul class="md-nav__list">
<li class="md-nav__item">
@ -1458,11 +1458,11 @@
<ul class="md-nav__list" data-md-component="toc" data-md-scrollfix>
<li class="md-nav__item">
<a href="#using-docker-mailserver-behind-a-proxy" class="md-nav__link">
Using docker-mailserver behind a Proxy
<a href="#using-dms-behind-a-proxy" class="md-nav__link">
Using DMS behind a Proxy
</a>
<nav class="md-nav" aria-label="Using docker-mailserver behind a Proxy">
<nav class="md-nav" aria-label="Using DMS behind a Proxy">
<ul class="md-nav__list">
<li class="md-nav__item">
@ -1511,7 +1511,7 @@
<h1>Mailserver behind Proxy</h1>
<h2 id="using-docker-mailserver-behind-a-proxy"><a class="toclink" href="#using-docker-mailserver-behind-a-proxy">Using <code>docker-mailserver</code> behind a Proxy</a></h2>
<h2 id="using-dms-behind-a-proxy"><a class="toclink" href="#using-dms-behind-a-proxy">Using DMS behind a Proxy</a></h2>
<h3 id="information"><a class="toclink" href="#information">Information</a></h3>
<p>If you are hiding your container behind a proxy service you might have discovered that the proxied requests from now on contain the proxy IP as the request origin. Whilst this behavior is technical correct it produces certain problems on the containers behind the proxy as they cannot distinguish the real origin of the requests anymore.</p>
<p>To solve this problem on TCP connections we can make use of the <a href="https://www.haproxy.org/download/1.8/doc/proxy-protocol.txt">proxy protocol</a>. Compared to other workarounds that exist (<code>X-Forwarded-For</code> which only works for HTTP requests or <code>Tproxy</code> that requires you to recompile your kernel) the proxy protocol:</p>
@ -1551,7 +1551,7 @@
<span class="w"> </span><span class="p p-Indicator">-</span><span class="w"> </span><span class="s">&quot;4190:4190&quot;</span>
<span class="p p-Indicator">[</span><span class="nv">...</span><span class="p p-Indicator">]</span>
</code></pre></div>
<p>Truncated list of necessary labels on the <code>docker-mailserver</code> container:</p>
<p>Truncated list of necessary labels on the DMS container:</p>
<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>

View file

@ -25,7 +25,7 @@
<title>Use Cases | Forward-Only Mail-Server with LDAP - Docker Mailserver</title>
<title>Use Cases | Forward-Only Mail Server with LDAP - Docker Mailserver</title>
@ -115,7 +115,7 @@
<div class="md-header__topic" data-md-component="header-topic">
<span class="md-ellipsis">
Use Cases | Forward-Only Mail-Server with LDAP
Use Cases | Forward-Only Mail Server with LDAP
</span>
</div>
@ -1241,7 +1241,7 @@
<li class="md-nav__item">
<a href="#building-a-forward-only-mail-server" class="md-nav__link">
Building a Forward-Only Mail-Server
Building a Forward-Only Mail Server
</a>
</li>
@ -1439,7 +1439,7 @@
<li class="md-nav__item">
<a href="#building-a-forward-only-mail-server" class="md-nav__link">
Building a Forward-Only Mail-Server
Building a Forward-Only Mail Server
</a>
</li>
@ -1471,8 +1471,8 @@
<h1>Forward-Only Mail-Server with LDAP</h1>
<h2 id="building-a-forward-only-mail-server"><a class="toclink" href="#building-a-forward-only-mail-server">Building a Forward-Only Mail-Server</a></h2>
<p>A <strong>forward-only</strong> mail-server does not have any local mailboxes. Instead, it has only aliases that forward emails to external email accounts (for example to a Gmail account). You can also send email from the localhost (the computer where <code>docker-mailserver</code> is installed), using as sender any of the alias addresses.</p>
<h2 id="building-a-forward-only-mail-server"><a class="toclink" href="#building-a-forward-only-mail-server">Building a Forward-Only Mail Server</a></h2>
<p>A <strong>forward-only</strong> mail server does not have any local mailboxes. Instead, it has only aliases that forward emails to external email accounts (for example to a Gmail account). You can also send email from the localhost (the computer where DMS is installed), using as sender any of the alias addresses.</p>
<p>The important settings for this setup (on <code>mailserver.env</code>) are these:</p>
<div class="highlight"><pre><span></span><code><span class="na">PERMIT_DOCKER</span><span class="o">=</span><span class="s">host</span>
<span class="na">ENABLE_POP3</span><span class="o">=</span>
@ -1486,7 +1486,7 @@
<div class="highlight"><pre><span></span><code>./setup.sh<span class="w"> </span><span class="nb">alias</span><span class="w"> </span>add<span class="w"> </span>&lt;alias-address&gt;<span class="w"> </span>&lt;external-email-account&gt;
</code></pre></div>
<h2 id="authenticating-with-ldap"><a class="toclink" href="#authenticating-with-ldap">Authenticating with LDAP</a></h2>
<p>If you want to send emails from outside the mail-server you have to authenticate somehow (with a username and password). One way of doing it is described in <a href="https://github.com/docker-mailserver/docker-mailserver/issues/1247">this discussion</a>. However if there are many user accounts, it is better to use authentication with LDAP. The settings for this on <code>mailserver.env</code> are:</p>
<p>If you want to send emails from outside the mail server you have to authenticate somehow (with a username and password). One way of doing it is described in <a href="https://github.com/docker-mailserver/docker-mailserver/issues/1247">this discussion</a>. However if there are many user accounts, it is better to use authentication with LDAP. The settings for this on <code>mailserver.env</code> are:</p>
<div class="highlight"><pre><span></span><code><span class="na">ENABLE_LDAP</span><span class="o">=</span><span class="s">1 # with the :edge tag, use ACCOUNT_PROVISIONER</span>
<span class="na">ACCOUNT_PROVISIONER</span><span class="o">=</span><span class="s">LDAP</span>
<span class="na">LDAP_START_TLS</span><span class="o">=</span><span class="s">yes</span>
@ -1513,7 +1513,7 @@
<span class="na">userPassword</span><span class="o">:</span><span class="w"> </span><span class="s">{SSHA}abcdefghi123456789</span>
<span class="na">email</span><span class="o">:</span><span class="w"> </span><span class="s">external-account@gmail.com</span>
</code></pre></div>
<p>This structure is different from what is expected/assumed from the configuration scripts of <code>docker-mailserver</code>, so it doesn't work just by using the <code>LDAP_QUERY_FILTER_...</code> settings. Instead, I had to use a custom configuration (<a href="../../../config/advanced/override-defaults/user-patches/">via <code>user-patches.sh</code></a>). I created the script <code>docker-data/dms/config/user-patches.sh</code>, with content like this:</p>
<p>This structure is different from what is expected/assumed from the configuration scripts of DMS, so it doesn't work just by using the <code>LDAP_QUERY_FILTER_...</code> settings. Instead, I had to use a custom configuration (<a href="../../../config/advanced/override-defaults/user-patches/">via <code>user-patches.sh</code></a>). I created the script <code>docker-data/dms/config/user-patches.sh</code>, with content like this:</p>
<div class="highlight"><pre><span></span><code><span class="ch">#!/bin/bash</span>
rm<span class="w"> </span>-f<span class="w"> </span>/etc/postfix/<span class="o">{</span>ldap-groups.cf,ldap-domains.cf<span class="o">}</span>
@ -1548,11 +1548,11 @@ postfix<span class="w"> </span>reload
<p>You see that besides <code>query_filter</code>, I had to customize as well <code>result_attribute</code> and <code>result_format</code>.</p>
<div class="admonition note">
<p class="admonition-title">See also</p>
<p>For more details about using LDAP see: <a href="https://www.vennedey.net/resources/2-LDAP-managed-mail-server-with-Postfix-and-Dovecot-for-multiple-domains">LDAP managed mail-server with Postfix and Dovecot for multiple domains</a></p>
<p>For more details about using LDAP see: <a href="https://www.vennedey.net/resources/2-LDAP-managed-mail-server-with-Postfix-and-Dovecot-for-multiple-domains">LDAP managed mail server with Postfix and Dovecot for multiple domains</a></p>
</div>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Another solution that serves as a forward-only mail-server is <a href="https://gitlab.com/docker-scripts/postfix">this</a>.</p>
<p>Another solution that serves as a forward-only mail server is <a href="https://gitlab.com/docker-scripts/postfix">this</a>.</p>
</div>