123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255 |
- <!DOCTYPE html>
- <!--[if IE 8]><html class="no-js lt-ie9" lang="en" > <![endif]-->
- <!--[if gt IE 8]><!--> <html class="no-js" lang="en" > <!--<![endif]-->
- <head>
- <meta charset="utf-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
-
-
- <link rel="shortcut icon" href="../img/favicon.ico">
- <title>First Steps - mailcow: dockerized</title>
- <link href='https://fonts.googleapis.com/css?family=Lato:400,700|Roboto+Slab:400,700|Inconsolata:400,700' rel='stylesheet' type='text/css'>
- <link rel="stylesheet" href="../css/theme.css" type="text/css" />
- <link rel="stylesheet" href="../css/theme_extra.css" type="text/css" />
- <link rel="stylesheet" href="../css/highlight.css">
-
- <script>
- // Current page data
- var mkdocs_page_name = "First Steps";
- var mkdocs_page_input_path = "first_steps.md";
- var mkdocs_page_url = "/first_steps/";
- </script>
-
- <script src="../js/jquery-2.1.1.min.js"></script>
- <script src="../js/modernizr-2.8.3.min.js"></script>
- <script type="text/javascript" src="../js/highlight.pack.js"></script>
-
- </head>
- <body class="wy-body-for-nav" role="document">
- <div class="wy-grid-for-nav">
-
- <nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
- <div class="wy-side-nav-search">
- <a href=".." class="icon icon-home"> mailcow: dockerized</a>
- <div role="search">
- <form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
- <input type="text" name="q" placeholder="Search docs" />
- </form>
- </div>
- </div>
- <div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="main navigation">
- <ul class="current">
-
- <li>
- <li class="toctree-l1 ">
- <a class="" href="..">Overview</a>
-
- </li>
- <li>
-
- <li>
- <li class="toctree-l1 ">
- <a class="" href="../install/">Installation</a>
-
- </li>
- <li>
-
- <li>
- <li class="toctree-l1 current">
- <a class="current" href="./">First Steps</a>
-
- <ul>
-
- <li class="toctree-l3"><a href="#change-default-language">Change default language</a></li>
-
-
- <li class="toctree-l3"><a href="#ssl-and-how-to-use-lets-encrypt">SSL (and: How to use Let's Encrypt)</a></li>
-
- <li><a class="toctree-l4" href="#obtain-multi-san-certificate-by-lets-encrypt">Obtain multi-SAN certificate by Let's Encrypt</a></li>
-
-
- <li class="toctree-l3"><a href="#rspamd-ui-access">Rspamd UI access</a></li>
-
-
- </ul>
-
- </li>
- <li>
-
- <li>
- <li class="toctree-l1 ">
- <a class="" href="../u_and_e/">Usage & Examples</a>
-
- </li>
- <li>
-
- </ul>
- </div>
-
- </nav>
- <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
-
- <nav class="wy-nav-top" role="navigation" aria-label="top navigation">
- <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
- <a href="..">mailcow: dockerized</a>
- </nav>
-
- <div class="wy-nav-content">
- <div class="rst-content">
- <div role="navigation" aria-label="breadcrumbs navigation">
- <ul class="wy-breadcrumbs">
- <li><a href="..">Docs</a> »</li>
-
-
-
- <li>First Steps</li>
- <li class="wy-breadcrumbs-aside">
-
- <a href="https://github.com/andryyy/mailcow-dockerized/edit/master/docs/first_steps.md"
- class="icon icon-github"> Edit on GitHub</a>
-
- </li>
- </ul>
- <hr/>
- </div>
- <div role="main">
- <div class="section">
-
- <h1 id="change-default-language">Change default language</h1>
- <p>Change <code>data/conf/sogo/sogo.conf</code> and replace English by your language.</p>
- <p>Create a file <code>data/web/inc/vars.local.inc.php</code> and add "DEFAULT_LANG" with either "en", "pt", "de" or "nl":</p>
- <pre><code><?php
- $DEFAULT_LANG = "de";
- </code></pre>
- <h1 id="ssl-and-how-to-use-lets-encrypt">SSL (and: How to use Let's Encrypt)</h1>
- <p>mailcow dockerized comes with a snakeoil CA "mailcow" and a server certificate in <code>data/assets/ssl</code>. Please use your own trusted certificates.</p>
- <p>mailcow uses 3 domain names that should be covered by your new certificate:</p>
- <ul>
- <li>${MAILCOW_HOSTNAME}</li>
- <li>autodiscover.<em>example.org</em></li>
- <li>autoconfig.<em>example.org</em></li>
- </ul>
- <h2 id="obtain-multi-san-certificate-by-lets-encrypt">Obtain multi-SAN certificate by Let's Encrypt</h2>
- <p>This is just an example of how to obtain certificates with certbot. There are several methods!</p>
- <ol>
- <li>Get the certbot client:</li>
- </ol>
- <pre><code>wget https://dl.eff.org/certbot-auto -O /usr/local/sbin/certbot && chmod +x /usr/local/sbin/certbot
- </code></pre>
- <ol>
- <li>
- <p>Make sure you set <code>HTTP_BIND=0.0.0.0</code> in <code>mailcow.conf</code> or setup a reverse proxy to enable connections to port 80. If you changed HTTP_BIND, then restart Nginx: <code>docker-compose restart nginx-mailcow</code>.</p>
- </li>
- <li>
- <p>Request the certificate with the webroot method:</p>
- </li>
- </ol>
- <pre><code>cd /path/to/git/clone/mailcow-dockerized
- source mailcow.conf
- certbot certonly \
- --webroot \
- -w ${PWD}/data/web \
- -d ${MAILCOW_HOSTNAME} \
- -d autodiscover.example.org \
- -d autoconfig.example.org \
- --email you@example.org \
- --agree-tos
- </code></pre>
- <ol>
- <li>Create hard links to the full path of the new certificates. Assuming you are still in the mailcow root folder:</li>
- </ol>
- <pre><code>mv data/assets/ssl/cert.{pem,pem.backup}
- mv data/assets/ssl/key.{pem,pem.backup}
- ln $(readlink -f /etc/letsencrypt/live/${MAILCOW_HOSTNAME}/fullchain.pem) data/assets/ssl/cert.pem
- ln $(readlink -f /etc/letsencrypt/live/${MAILCOW_HOSTNAME}/privkey.pem) data/assets/ssl/key.pem
- </code></pre>
- <ol>
- <li>Restart containers which use the certificate:</li>
- </ol>
- <pre><code>docker-compose restart postfix-mailcow dovecot-mailcow nginx-mailcow
- </code></pre>
- <p>When renewing certificates, run the last two steps (link + restart) as post-hook in a script.</p>
- <h1 id="rspamd-ui-access">Rspamd UI access</h1>
- <p>At first you may want to setup Rspamds web interface which provides some useful features and information.</p>
- <ol>
- <li>Generate a Rspamd controller password hash:</li>
- </ol>
- <pre><code>docker-compose exec rspamd-mailcow rspamadm pw
- </code></pre>
- <ol>
- <li>Replace the default hash in <code>data/conf/rspamd/override.d/worker-controller.inc</code> by your newly generated:</li>
- </ol>
- <pre><code>enable_password = "myhash";
- </code></pre>
- <ol>
- <li>Restart rspamd:</li>
- </ol>
- <pre><code>docker-compose restart rspamd-mailcow
- </code></pre>
- <p>Open https://${MAILCOW_HOSTNAME}/rspamd in a browser and login!</p>
-
- </div>
- </div>
- <footer>
-
- <div class="rst-footer-buttons" role="navigation" aria-label="footer navigation">
-
- <a href="../u_and_e/" class="btn btn-neutral float-right" title="Usage & Examples">Next <span class="icon icon-circle-arrow-right"></span></a>
-
-
- <a href="../install/" class="btn btn-neutral" title="Installation"><span class="icon icon-circle-arrow-left"></span> Previous</a>
-
- </div>
-
- <hr/>
- <div role="contentinfo">
- <!-- Copyright etc -->
-
- </div>
- Built with <a href="http://www.mkdocs.org">MkDocs</a> using a <a href="https://github.com/snide/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
- </footer>
-
- </div>
- </div>
- </section>
-
- </div>
- <div class="rst-versions" role="note" style="cursor: pointer">
- <span class="rst-current-version" data-toggle="rst-current-version">
-
- <a href="https://github.com/andryyy/mailcow-dockerized/" class="icon icon-github" style="float: left; color: #fcfcfc"> GitHub</a>
-
-
- <span><a href="../install/" style="color: #fcfcfc;">« Previous</a></span>
-
-
- <span style="margin-left: 15px"><a href="../u_and_e/" style="color: #fcfcfc">Next »</a></span>
-
- </span>
- </div>
- <script src="../js/theme.js"></script>
- </body>
- </html>
|