mailcow-dockerized-docs/search/search_index.json

1 Zeile
Kein EOL
925 KiB
JSON

{"config":{"lang":["en"],"separator":"[\\s\\-,:!=\\[\\]()\"/]+|(?!\\b)(?=[A-Z][a-z])|\\.(?!\\d)|&[lg]t;","pipeline":["stopWordFilter"]},"docs":[{"location":"","title":"\ud83d\udc2e + \ud83d\udc0b = \ud83d\udc95","text":""},{"location":"#help-mailcow","title":"Help mailcow","text":"<p>Please consider a support contract for a small monthly fee at Servercow EN to support further development. We support you while you support us. :)</p> <p>If you are super awesome and would like to support without a contract, you can get a SAL license that confirms your awesomeness (a flexible one-time payment) at Servercow EN.</p>"},{"location":"#get-support","title":"Get support","text":"<p>There are two ways to achieve support for your mailcow installation.</p>"},{"location":"#commercial-support","title":"Commercial support","text":"<p>For professional and prioritized commercial support you can sign a basic support subscription at Servercow EN. For custom inquiries or questions please contact us at info@servercow.de instead.</p> <p>Furthermore we do also provide a fully featured and managed mailcow here. This way we take care about the technical magic underneath and you can enjoy your whole mail experience in a hassle-free way.</p>"},{"location":"#community-support-and-chat","title":"Community support and chat","text":"<p>The other alternative is our free community-support on our various channels below. Please notice, that this support is driven by our awesome community around mailcow. This kind of support is best-effort, voluntary and there is no guarantee for anything.</p> <ul> <li> <p>Our mailcow community @ community.mailcow.email</p> </li> <li> <p>Telegram (Support) @ t.me/mailcow.</p> </li> <li> <p>Telegram (Off-Topic) @ t.me/mailcowOfftopic.</p> </li> <li> <p>Twitter @mailcow_email</p> </li> </ul> <p>Telegram desktop clients are available for multiple platforms. You can search the groups history for keywords.</p> <p>For bug tracking, feature requests and code contributions only:</p> <ul> <li>GitHub @ mailcow/mailcow-dockerized</li> </ul>"},{"location":"#demos","title":"Demos","text":"<p>Since September 2022 we\u00b4re providing two seperate Demo instances: </p> <ul> <li>demo.mailcow.email is the classic Demo based on the stable releases.</li> <li>nightly-demo.mailcow.email is the new nightly demo based on unreleased testing features. (So especially interesting for those who have no possibility to create a test instance themselves.)</li> </ul> <p>Use the following credentials to login on both demos:</p> <ul> <li>Administrator: admin / moohoo</li> <li>Domain-Administrator: department / moohoo</li> <li>Mailbox: demo@440044.xyz / moohoo</li> </ul> <p>Success</p> <p>The demo instances get the latest updates directly after releases from GitHub. Fully automatic, without any downtime!</p>"},{"location":"#overview","title":"Overview","text":"<p>The integrated mailcow UI allows administrative work on your mail server instance as well as separated domain administrator and mailbox user access:</p> <ul> <li>DKIM and ARC support</li> <li>Black- and whitelists per domain and per user</li> <li>Spam score management per-user (reject spam, mark spam, greylist)</li> <li>Allow mailbox users to create temporary spam aliases</li> <li>Prepend mail tags to subject or move mail to sub folder (per-user)</li> <li>Allow mailbox users to toggle incoming and outgoing TLS enforcement</li> <li>Allow users to reset SOGo ActiveSync device caches</li> <li>imapsync to migrate or pull remote mailboxes regularly</li> <li>TFA: Yubikey OTP and U2F USB (Google Chrome and derivatives only), TOTP</li> <li>Add domains, mailboxes, aliases, domain aliases and SOGo resources</li> <li>Add whitelisted hosts to forward mail to mailcow</li> <li>Fail2ban-like integration</li> <li>Quarantine system</li> <li>Antivirus scanning incl. macro scanning in office documents</li> <li>Integrated basic monitoring</li> <li>A lot more...</li> </ul> <p>mailcow: dockerized comes with multiple containers linked in one bridged network. Each container represents a single application.</p> <ul> <li>ACME</li> <li>ClamAV (optional)</li> <li>Dovecot</li> <li>MariaDB</li> <li>Memcached</li> <li>Netfilter (Fail2ban-like integration by @mkuron)</li> <li>Nginx</li> <li>Oletools via Olefy</li> <li>PHP</li> <li>Postfix</li> <li>Redis</li> <li>Rspamd</li> <li>SOGo</li> <li>Solr (optional)</li> <li>Unbound</li> <li>A Watchdog to provide basic monitoring</li> </ul> <p>Warning</p> <p>Mails are stored compressed and encrypted. The key pair can be found in crypt-vol-1. Be sure to backup this volume!</p> <p>Docker volumes to keep dynamic data - take care of them!</p> <ul> <li>clamd-db-vol-1</li> <li>crypt-vol-1</li> <li>mysql-socket-vol-1</li> <li>mysql-vol-1</li> <li>postfix-vol-1</li> <li>redis-vol-1</li> <li>rspamd-vol-1</li> <li>sogo-userdata-backup-vol-1</li> <li>sogo-web-vol-1</li> <li>solr-vol-1</li> <li>vmail-index-vol-1</li> <li>vmail-vol-1</li> </ul>"},{"location":"backup_restore/b_n_r-accidental_deletion/","title":"Recover accidentally deleted data","text":"<p>So you deleted a mailbox and have no backups, he?</p> <p>If you noticed your mistake within a few hours, you can probably recover the users data.</p>"},{"location":"backup_restore/b_n_r-accidental_deletion/#sogo","title":"SOGo","text":"<p>We automatically create daily backups (24h interval starting from running up -d) in <code>/var/lib/docker/volumes/mailcowdockerized_sogo-userdata-backup-vol-1/_data/</code>.</p> <p>Make sure the user you want to restore exists in your mailcow. Re-create them if they are missing.</p> <p>Copy the file named after the user you want to restore to <code>__MAILCOW_DIRECTORY__/data/conf/sogo</code>.</p> <p>1. Copy the backup: <code>cp /var/lib/docker/volumes/mailcowdockerized_sogo-userdata-backup-vol-1/_data/restoreme@example.org __MAILCOW_DIRECTORY__/data/conf/sogo</code></p> <p>2. Run <code>docker compose exec -u sogo sogo-mailcow sogo-tool restore -F ALL /etc/sogo restoreme@example.org</code></p> <p>Run <code>sogo-tool</code> without parameters to check for possible restore options.</p> <p>3. Delete the copied backup by running <code>rm __MAILCOW_DIRECTORY__/data/conf/sogo</code></p> <p>4. Restart SOGo and Memcached: <code>docker compose restart sogo-mailcow memcached-mailcow</code></p>"},{"location":"backup_restore/b_n_r-accidental_deletion/#mail","title":"Mail","text":"<p>In case of an accidental deletion of a mailbox, you will be able to recover for (by default) 5 days. This depends on the <code>MAILDIR_GC_TIME</code> parameter in <code>mailcow.conf</code>.</p> <p>A deleted mailbox is copied in its encrypted form to <code>/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/_garbage</code>.</p> <p>The folder inside <code>_garbage</code> follows the structure <code>[timestamp]_[domain_sanitized][user_sanitized]</code>, for example <code>1629109708_exampleorgtest</code> in case of test@example.org deleted on 1629109708.</p> <p>To restore make sure you are actually restoring to the same mailcow it was deleted from or you use the same encryption keys in <code>crypt-vol-1</code>.</p> <p>Make sure the user you want to restore exists in your mailcow. Re-create them if they are missing.</p> <p>Copy the folders from <code>/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/_garbage/[timestamp]_[domain_sanitized][user_sanitized]</code> back to <code>/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/[domain]/[user]</code> and resync the folder and recalc the quota:</p> <pre><code>docker compose exec dovecot-mailcow doveadm force-resync -u restoreme@example.net '*'\ndocker compose exec dovecot-mailcow doveadm quota recalc -u restoreme@example.net\n</code></pre>"},{"location":"backup_restore/b_n_r-backup/","title":"Backup","text":""},{"location":"backup_restore/b_n_r-backup/#backup","title":"Backup","text":""},{"location":"backup_restore/b_n_r-backup/#manual","title":"Manual","text":"<p>You can use the provided script <code>helper-scripts/backup_and_restore.sh</code> to backup mailcow automatically.</p> <p>Please do not copy this script to another location.</p> <p>To run a backup, write \"backup\" as first parameter and either one or more components to backup as following parameters. You can also use \"all\" as second parameter to backup all components. Append <code>--delete-days n</code> to delete backups older than n days.</p> <pre><code># Syntax:\n# ./helper-scripts/backup_and_restore.sh backup (vmail|crypt|redis|rspamd|postfix|mysql|all|--delete-days)\n\n# Backup all, delete backups older than 3 days\n./helper-scripts/backup_and_restore.sh backup all --delete-days 3\n\n# Backup vmail, crypt and mysql data, delete backups older than 30 days\n./helper-scripts/backup_and_restore.sh backup vmail crypt mysql --delete-days 30\n\n# Backup vmail\n./helper-scripts/backup_and_restore.sh backup vmail\n</code></pre>"},{"location":"backup_restore/b_n_r-backup/#variables-for-backuprestore-script","title":"Variables for backup/restore script","text":""},{"location":"backup_restore/b_n_r-backup/#multithreading","title":"Multithreading","text":"<p>With the 2022-10 update it is possible to run the script with multithreading support. This can be used for backups as well as for restores.</p> <p>To start the backup/restore with multithreading you have to add <code>THREADS</code> as an environment variable in front of the command to execute the script.</p> <p><pre><code>THREADS=14 /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all\n</code></pre> The number after the <code>=</code> character indicates the number of threads. Please keep your core count -2 to leave enough CPU power for mailcow itself.</p>"},{"location":"backup_restore/b_n_r-backup/#backup-path","title":"Backup path","text":"<p>The script will ask you for a backup location. Inside of this location it will create folders in the format \"mailcow_DATE\". You should not rename those folders to not break the restore process.</p> <p>To run a backup unattended, define MAILCOW_BACKUP_LOCATION as environment variable before starting the script:</p> <pre><code>MAILCOW_BACKUP_LOCATION=/opt/backup /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all\n</code></pre> <p>Tip<p>Both variables mentioned above can also be combined! Ex: <pre><code>MAILCOW_BACKUP_LOCATION=/opt/backup THREADS=14 /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all\n</code></pre></p> </p>"},{"location":"backup_restore/b_n_r-backup/#cronjob","title":"Cronjob","text":"<p>You can run the backup script regularly via cronjob. Make sure <code>BACKUP_LOCATION</code> exists:</p> <pre><code>PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n5 4 * * * cd /opt/mailcow-dockerized/; MAILCOW_BACKUP_LOCATION=/mnt/mailcow_backups /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup mysql crypt redis --delete-days 3\n</code></pre> <p>Per default cron sends the full result of each backup operation by email. If you want cron to only mail on error (non-zero exit code) you may want to use the following snippet. Pathes need to be modified according to your setup (this script is a user contribution).</p> <p>This following script may be placed in <code>/etc/cron.daily/mailcow-backup</code> - do not forget to mark it as executable via <code>chmod +x</code>:</p> <pre><code>#!/bin/sh\n\n# Backup mailcow data\n# https://mailcow.github.io/mailcow-dockerized-docs/backup_restore/b_n_r-backup/\n\nset -e\n\nOUT=\"$(mktemp)\"\nexport MAILCOW_BACKUP_LOCATION=\"/opt/backup\"\nSCRIPT=\"/opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh\"\nPARAMETERS=\"backup all\"\nOPTIONS=\"--delete-days 30\"\n\n# run command\nset +e\n\"${SCRIPT}\" ${PARAMETERS} ${OPTIONS} 2&gt;&amp;1 &gt; \"$OUT\"\nRESULT=$?\n\nif [ $RESULT -ne 0 ]\n then\n echo \"${SCRIPT} ${PARAMETERS} ${OPTIONS} encounters an error:\"\n echo \"RESULT=$RESULT\"\n echo \"STDOUT / STDERR:\"\n cat \"$OUT\"\nfi\n</code></pre>"},{"location":"backup_restore/b_n_r-backup/#backup-strategy-with-rsync-and-mailcow-backup-script","title":"Backup strategy with rsync and mailcow backup script","text":"<p>Create the destination directory for mailcows helper script: <pre><code>mkdir -p /external_share/backups/backup_script\n</code></pre></p> <p>Create cronjobs: <pre><code>PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n25 1 * * * rsync -aH --delete /opt/mailcow-dockerized /external_share/backups/mailcow-dockerized\n40 2 * * * rsync -aH --delete /var/lib/docker/volumes /external_share/backups/var_lib_docker_volumes\n5 4 * * * cd /opt/mailcow-dockerized/; BACKUP_LOCATION=/external_share/backups/backup_script /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup mysql crypt redis --delete-days 3\n# If you want to, use the acl util to backup permissions of some/all folders/files: getfacl -Rn /path\n</code></pre></p> <p>On the destination (in this case <code>/external_share/backups</code>) you may want to have snapshot capabilities (ZFS, Btrfs etc.). Snapshot daily and keep for n days for a consistent backup. Do not rsync to a Samba share, you need to keep the correct permissions!</p> <p>To restore you'd simply need to run rsync the other way round and restart Docker to re-read the volumes. Run <code>docker compose pull</code> and <code>docker compose up -d</code>.</p> <p>If you are lucky Redis and MariaDB can automatically fix the inconsistent databases (if they are inconsistent). In case of a corrupted database you'd need to use the helper script to restore the inconsistent elements. If a restore fails, try to extract the backups and copy the files back manually. Keep the file permissions!</p>"},{"location":"backup_restore/b_n_r-backup_restore-maildir/","title":"Maildir","text":""},{"location":"backup_restore/b_n_r-backup_restore-maildir/#backup","title":"Backup","text":"<p>This line backups the vmail directory to a file backup_vmail.tar.gz in the mailcow root directory: <pre><code>cd /path/to/mailcow-dockerized\ndocker run --rm -i -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination \"/var/vmail\" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:stretch-slim tar cvfz /backup/backup_vmail.tar.gz /vmail\n</code></pre></p> <p>You can change the path by adjusting ${PWD} (which equals to the current directory) to any path you have write-access to. Set the filename <code>backup_vmail.tar.gz</code> to any custom name, but leave the path as it is. Example: <code>[...] tar cvfz /backup/my_own_filename_.tar.gz</code></p>"},{"location":"backup_restore/b_n_r-backup_restore-maildir/#restore","title":"Restore","text":"<pre><code>cd /path/to/mailcow-dockerized\ndocker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination \"/var/vmail\" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:stretch-slim tar xvfz /backup/backup_vmail.tar.gz\n</code></pre>"},{"location":"backup_restore/b_n_r-backup_restore-mysql/","title":"MySQL (mysqldump)","text":""},{"location":"backup_restore/b_n_r-backup_restore-mysql/#backup","title":"Backup","text":"<pre><code>cd /path/to/mailcow-dockerized\nsource mailcow.conf\nDATE=$(date +\"%Y%m%d_%H%M%S\")\ndocker compose exec -T mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} &gt; backup_${DBNAME}_${DATE}.sql\n</code></pre>"},{"location":"backup_restore/b_n_r-backup_restore-mysql/#restore","title":"Restore","text":"<p>Warning</p> <p>You should redirect the SQL dump without <code>docker compose</code> to prevent parsing errors.</p> <pre><code>cd /path/to/mailcow-dockerized\nsource mailcow.conf\ndocker exec -i $(docker compose ps -q mysql-mailcow) mysql -u${DBUSER} -p${DBPASS} ${DBNAME} &lt; backup_file.sql\n</code></pre>"},{"location":"backup_restore/b_n_r-coldstandby/","title":"Cold-standby backup","text":"<p>mailcow offers an easy way to create a consistent copy of itself to be rsync'ed to a remote location without downtime.</p> <p>This may also be used to transfer your mailcow to a new server.</p>"},{"location":"backup_restore/b_n_r-coldstandby/#you-should-know","title":"You should know","text":"<p>The provided script will work on default installations.</p> <p>It may break when you use unsupported volume overrides. We don't support that and we will not include hacks to support that. Please run and maintain a fork if you plan to keep your changes.</p> <p>The script will use the same paths as your default mailcow installation. That is the mailcow base directory - for most users <code>/opt/mailcow-dockerized</code> - as well as the mountpoints.</p> <p>To find the paths of your source volumes we use <code>docker inspect</code> and read the destination directory of every volume related to your mailcow compose project. This means we will also transfer volumes you may have added in an override file. Local bind mounts may or may not work.</p> <p>The script uses rsync with the <code>--delete</code> flag. The destination will be an exact copy of the source.</p> <p><code>mariabackup</code> is used to create a consistent copy of the SQL data directory.</p> <p>After rsync'ing the data we will run <code>docker compose pull</code> and remove old image tags from the destination.</p> <p>Your source will not be changed at any time.</p> <p>You may want to make sure to use the same <code>/etc/docker/daemon.json</code> on the remote target.</p> <p>You should not run disk snapshots (e.g. via ZFS, LVM etc.) on the target at the very same time as this script is run.</p> <p>Versioning is not part of this script, we rely on the destination (snapshots or backups). You may also want to use any other tool for that.</p>"},{"location":"backup_restore/b_n_r-coldstandby/#prepare","title":"Prepare","text":"<p>You will need an SSH-enabled destination and a keyfile to connect to said destination. The key should not be protected by a password for the script to work unattended.</p> <p>In your mailcow base directory, e.g. <code>/opt/mailcow-dockerized</code> you will find a file <code>create_cold_standby.sh</code>.</p> <p>Edit this file and change the exported variables:</p> <pre><code>export REMOTE_SSH_KEY=/path/to/keyfile\nexport REMOTE_SSH_PORT=22\nexport REMOTE_SSH_HOST=mailcow-backup.host.name\n</code></pre> <p>The key must be owned and readable by root only.</p> <p>Both the source and destination require <code>rsync</code> &gt;= v3.1.0. The destination must have Docker and docker compose v2 available.</p> <p>The script will detect errors automatically and exit.</p> <p>You may want to test the connection by running <code>ssh mailcow-backup.host.name -p22 -i /path/to/keyfile</code>.</p>"},{"location":"backup_restore/b_n_r-coldstandby/#backup-and-refresh-the-cold-standby","title":"Backup and refresh the cold-standby","text":"<p>Run the first backup, this may take a while depending on the connection:</p> <pre><code>bash /opt/mailcow-dockerized/create_cold_standby.sh\n</code></pre> <p>That was easy, wasn't it?</p> <p>Updating your cold-standby is just as easy:</p> <pre><code>bash /opt/mailcow-dockerized/create_cold_standby.sh\n</code></pre> <p>It's the same command.</p>"},{"location":"backup_restore/b_n_r-coldstandby/#automated-backups-with-cron","title":"Automated backups with cron","text":"<p>First make sure that the <code>cron</code> service is enabled and running:</p> <pre><code>systemctl enable cron.service &amp;&amp; systemctl start cron.service\n</code></pre> <p>To automate the backups to the cold-standby server you can use a cron job. To edit the cron jobs for the root user run:</p> <pre><code>crontab -e\n</code></pre> <p>Add the following lines to synchronize the cold standby server daily at 03:00. In this example errors of the last execution are logged into a file.</p> <pre><code>PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n\n0 3 * * * bash /opt/mailcow-dockerized/create_cold_standby.sh 2&gt; /var/log/mailcow-coldstandby-sync.log\n</code></pre> <p>If saved correctly, the cron job should be shown by typing:</p> <pre><code>crontab -l\n</code></pre>"},{"location":"backup_restore/b_n_r-restore/","title":"Restore","text":""},{"location":"backup_restore/b_n_r-restore/#restore","title":"Restore","text":"<p>Please do not copy this script to another location.</p> <p>To run a restore, start mailcow, use the script with \"restore\" as first parameter.</p> <pre><code># Syntax:\n# ./helper-scripts/backup_and_restore.sh restore\n</code></pre> <p>The script will ask you for a backup location containing the mailcow_DATE folders.</p>"},{"location":"client/client-android/","title":"Android","text":"<ol> <li>Open the Email app.</li> <li>If this is your first email account, tap Add Account; if not, tap More and Settings and then Add account.</li> <li>Select Microsoft Exchange ActiveSync.</li> <li>Enter your email address () and password.</li> <li>Tap Sign in.</li> </ol>"},{"location":"client/client-apple/","title":"Apple macOS / iOS","text":""},{"location":"client/client-apple/#method-1-via-mobileconfig","title":"Method 1 via Mobileconfig","text":"<p>Email, contacts and calendars can be configured automatically on Apple devices by installing a profile. To download a profile you must login to the mailcow UI first.</p>"},{"location":"client/client-apple/#method-11-imap-smtp-and-calcarddav","title":"Method 1.1: IMAP, SMTP and Cal/CardDAV","text":"<p>This method configures IMAP, CardDAV and CalDAV.</p> <ol> <li>Download and open the file from https://${MAILCOW_HOSTNAME}/mobileconfig.phpmailcow.mobileconfig.</li> <li>Enter the unlock code (iPhone) or computer password (Mac).</li> <li>Enter your email password three times when prompted.</li> </ol>"},{"location":"client/client-apple/#method-12-imap-smtp-no-dav","title":"Method 1.2: IMAP, SMTP (no DAV)","text":"<p>This method configures IMAP and SMTP only.</p> <ol> <li>Download and open the file from https://${MAILCOW_HOSTNAME}/mobileconfig.php?only_emailmailcow.mobileconfig.</li> <li>Enter the unlock code (iPhone) or computer password (Mac).</li> <li>Enter your email password when prompted.</li> </ol>"},{"location":"client/client-apple/#method-2-exchange-activesync-emulation","title":"Method 2 (Exchange ActiveSync emulation)","text":"<p>On iOS, Exchange ActiveSync is also supported as an alternative to the procedure above. It has the advantage of supporting push email (i.e. you are immediately notified of incoming messages), but has some limitations, e.g. it does not support more than three email addresses per contact in your address book. Follow the steps below if you decide to use Exchange instead.</p> <ol> <li>Open the Settings app, tap Mail, tap Accounts, tap Add Acccount, select Exchange.</li> <li>Enter your email address () and tap Next.</li> <li>Enter your password, tap Next again.</li> <li>Finally, tap Save.</li> </ol>"},{"location":"client/client-emclient/","title":"eM Client","text":"<ol> <li>Launch eM Client.</li> <li>If this is the first time you launched eM Client, it asks you to set up your account. Proceed to step 4.</li> <li>Go to Menu at the top, select Tools and Accounts.</li> <li>Enter your email address () and click Start Now.</li> <li>Enter your password and click Continue.</li> <li>Enter your name () and click Next.</li> <li>Click Finish.</li> </ol>"},{"location":"client/client-kontact/","title":"KDE Kontact","text":"<ol> <li>Launch Kontact.</li> <li>If this is the first time you launched Kontact or KMail, it asks you to set up your account. Proceed to step 4.</li> <li>Go to Mail in the sidebar. Go to the Tools menu and select Account Wizard.</li> <li>Enter your name (), email address () and your password. Click Next.</li> <li>Click Create Account. If prompted, re-enter your password and click OK.</li> <li>Close the window by clicking Finish.</li> <li>Go to Calendar in the sidebar.</li> <li>Go to the Settings menu and select Configure KOrganizer.</li> <li>Go to the Calendars tab and click the Add button.</li> <li>Choose DAV groupware resource and click OK.</li> <li>Enter your email address () and your password. Click Next.</li> <li>Select ScalableOGo from the dropdown menu and click Next.</li> <li>Enter your mailcow hostname into the Host field and click Next.</li> <li>Click Test Connection and then Finish. Finally, click OK twice.</li> </ol> <p>Once you have set up Kontact, you can also use KMail, KOrganizer and KAddressBook individually.</p>"},{"location":"client/client-manual/","title":"Manual configuration","text":"<p>These instructions are valid for unchanged port bindings only!</p>"},{"location":"client/client-manual/#email","title":"Email","text":"Service Encryption Host Port IMAP STARTTLS mailcow hostname 143 IMAPS SSL mailcow hostname 993 POP3 STARTTLS mailcow hostname 110 POP3S SSL mailcow hostname 995 SMTP STARTTLS mailcow hostname 587 SMTPS SSL mailcow hostname 465 <p>Please use the \"plain\" password setting as the authentication mechanism. Contrary to what the name implies, the password will not be transferred to the server in plain text as no authentication is allowed to take place without TLS.</p>"},{"location":"client/client-manual/#contacts-and-calendars","title":"Contacts and calendars","text":"<p>SOGos default calendar (CalDAV) and contacts (CardDAV) URLs:</p> <ol> <li> <p>CalDAV https://mail.example.com/SOGo/dav/user@example.com/Calendar/personal/https:///SOGo/dav//Calendar/personal/</p> </li> <li> <p>CardDAV https://mail.example.com/SOGo/dav/user@example.com/Contacts/personal/https:///SOGo/dav//Contacts/personal/</p> </li> </ol> <p>Some applications may require you to use https://mail.example.com/SOGo/dav/https:///SOGo/dav/ or the full path to your calendar, which can be found and copied from within SOGo.</p>"},{"location":"client/client-outlook/","title":"Microsoft Outlook","text":""},{"location":"client/client-outlook/#outlook-2016-or-higher-from-office-365-on-windows","title":"Outlook 2016 or higher from Office 365 on Windows","text":"<p>This is only applicable if your server administrator has not disabled EAS for Outlook. If it is disabled, please follow the guide for Outlook 2007 instead.</p> <p>Outlook 2016 has an issue with autodiscover. Only Outlook from Office 365 is affected. If you installed Outlook from another source, please follow the guide for Outlook 2013 or higher. </p> <p>For EAS you must use the old assistant by launching <code>C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\OLCFG.EXE</code>. If this application opens, you can go to step 4 of the guide for Outlook 2013 below.</p> <p>If it does not open, you can completely disable the new account creation wizard and follow the guide for Outlook 2013 below.</p>"},{"location":"client/client-outlook/#outlook-2007-or-2010-on-windows","title":"Outlook 2007 or 2010 on Windows","text":""},{"location":"client/client-outlook/#outlook-2007-or-higher-on-windows-calendercontacts-via-caldav-synchronizer","title":"Outlook 2007 or higher on Windows (Calender/Contacts via CalDav Synchronizer)","text":"<ol> <li>Download and install Outlook CalDav Synchronizer.</li> <li>Launch Outlook.</li> <li>If this is the first time you launched Outlook, it asks you to set up your account. Proceed to step 5.</li> <li>Go to the File menu and click Add Account.</li> <li>Enter your name (), email address () and your password. Click Next.</li> <li>Click Finish.</li> <li>Go to the CalDav Synchronizer ribbon and click Synchronization Profiles.</li> <li>Click the second button at top (Add multiple profiles), select Sogo, click Ok.</li> <li>Click the Get IMAP/POP3 account settings button.</li> <li>Click Discover resources and assign to Outlook folders.</li> <li>In the Select Resource window that pops up, select your main calendar (usually Personal Calendar), click the ... button, assign it to Calendar, and click OK. Go to the Address Books and Tasks tabs and repeat repeat the process accordingly. Do not assign multiple calendars, address books or task lists!</li> <li>Close all windows with the OK buttons.</li> </ol>"},{"location":"client/client-outlook/#outlook-2013-or-higher-on-windows-active-sync-not-recommended","title":"Outlook 2013 or higher on Windows (Active Sync - not recommended)","text":"<p>This is only applicable if your server administrator has not disabled EAS for Outlook. If it is disabled, please follow the guide for Outlook 2007 instead.</p> <ol> <li>Launch Outlook.</li> <li>If this is the first time you launched Outlook, it asks you to set up your account. Proceed to step 4.</li> <li>Go to the File menu and click Add Account.</li> <li>Enter your name (), email address () and your password. Click Next.</li> <li>When prompted, enter your password again, check Remember my credentials and click OK.</li> <li>Click the Allow button.</li> <li>Click Finish.</li> </ol>"},{"location":"client/client-outlook/#outlook-2011-or-higher-on-macos","title":"Outlook 2011 or higher on macOS","text":"<p>The Mac version of Outlook does not synchronize calendars and contacts and therefore is not supported.</p>"},{"location":"client/client-thunderbird/","title":"Mozilla Thunderbird","text":"<ol> <li> Launch Thunderbird. </li> <li> If this is the first time you launched Thunderbird, it asks you whether you would like a new email address. Click Skip this and use my existing email and proceed to step 4. </li> <li> Go to the File menu and select New, Existing Mail Account.... </li> <li> Enter your name (), email address () and your password. Make sure the Remember password checkbox is selected and click Continue. </li> <li> Once the configuration has been automatically detected, make sure IMAP is selected and click Done. </li> <li> To use your contacts from the server, click on the arrow next to \"Address Books\" and click the Connect button on each address book you would like to use. </li> <li> To use your calendars from the server, click on the arrow next to \"Calendars\" and click the Connect button on each calendar you would like to use. </li> <li> Click Finish to close the Account Setup window."},{"location":"client/client-windows/","title":"Windows Mail","text":"<p>Windows 8 and higher support email, contacts and calendar via Exchange ActiveSync.</p> <ol> <li>Open the Mail app.</li> <li>If you have not previously used Mail, you can click Add Account in the main window. Proceed to step 4.</li> <li>Click Accounts in the sidebar on the left, then click Add Account on the far right.</li> <li>Select Exchange.</li> <li>Enter your email address () and click Next.</li> <li>Enter your password and click Log in.</li> </ol> <p>Once you have set up the Mail app, you can also use the People and Calendar apps.</p>"},{"location":"client/client/","title":"Overview","text":"<p>mailcow supports a variety of email clients, both on desktop computers and on smartphones. Below, you can find a number of configuration guides that explain how to configure your mailcow account.</p> <p>Tip</p> If you access this page by logging into your mailcow server and clicking the \"Show configuration guides for email clients and smartphones\" link, all of the guides will be personalized with your email address and server name. <p>Success</p> Since you accessed this page after logging into your mailcow server, all of the guides have been personalized with your email address and server name. <ul> <li>Android</li> <li>Apple iOS / macOS</li> <li>eM Client</li> <li>KDE Kontact / KMail</li> <li>Microsoft Outlook</li> <li>Mozilla Thunderbird</li> <li>Windows Mail</li> <li>Manual configuration</li> </ul>"},{"location":"i_u_m/i_u_m_deinstall/","title":"Deinstallation","text":"<p>To remove mailcow: dockerized with all it's volumes, images and containers do:</p> <pre><code>docker compose down -v --rmi all --remove-orphans\n</code></pre> <p>Info</p> <ul> <li>-v Remove named volumes declared in the <code>volumes</code> section of the Compose file and anonymous volumes attached to containers.</li> <li>--rmi Remove images. Type must be one of: <code>all</code>: Remove all images used by any service. <code>local</code>: Remove only images that don't have a custom tag set by the <code>image</code> field. <li>--remove-orphans Remove containers for services not defined in the compose file.</li> <li>By default <code>docker compose down</code> only removes currently active containers and networks defined in the <code>docker-compose.yml</code>.</li>"},{"location":"i_u_m/i_u_m_install/","title":"Installation","text":""},{"location":"i_u_m/i_u_m_install/#docker-and-docker-compose-installation","title":"Docker and Docker Compose Installation","text":"<p>You need Docker (a version &gt;= <code>20.10.2</code> is required) and Docker Compose (a version <code>&gt;= 2.0</code> is required).</p> <p>Learn how to install Docker and Docker Compose.</p> <p>Quick installation for most operation systems:</p>"},{"location":"i_u_m/i_u_m_install/#docker","title":"Docker","text":"<pre><code>curl -sSL https://get.docker.com/ | CHANNEL=stable sh\n# After the installation process is finished, you may need to enable the service and make sure it is started (e.g. CentOS 7)\nsystemctl enable --now docker\n</code></pre>"},{"location":"i_u_m/i_u_m_install/#docker-compose","title":"docker compose","text":"<p>Danger</p> <p>mailcow requires the latest version of docker compose v2. If Docker was installed using the script above, the Docker Compose plugin is already automatically installed in a version &gt;=2.0. Is your mailcow installation older or Docker was installed in a different way, the Compose plugin or the standalone version of Docker must be installed manually.</p>"},{"location":"i_u_m/i_u_m_install/#installation-via-paketmanager-plugin","title":"Installation via Paketmanager (plugin)","text":"<p>Info</p> <p>This approach with the package sources is only possible if the Docker repository has been included. This can happen either through the instructions above (see Docker) or through a manually integration.</p> <p>On Debian/Ubuntu systems: <pre><code>apt update\napt install docker-compose-plugin\n</code></pre></p> <p>On Centos 7 systems: <pre><code>yum update\nyum install docker-compose-plugin\n</code></pre></p> <p>Danger</p> <p>The Docker Compose command syntax is <code>docker compose</code> for the plugin variant of Docker Compose!!!</p>"},{"location":"i_u_m/i_u_m_install/#installation-via-script-standalone","title":"Installation via Script (standalone)","text":"<p>Info</p> <p>This installation is the old familiar way. It installs Docker Compose as a standalone program and does not rely on the Docker installation way.</p> <pre><code>curl -L https://github.com/docker/compose/releases/download/v$(curl -Ls https://www.servercow.de/docker-compose/latest.php)/docker-compose-$(uname -s)-$(uname -m) &gt; /usr/local/bin/docker-compose\nchmod +x /usr/local/bin/docker-compose\n</code></pre> <p>Danger</p> <p>The Docker Compose command syntax is <code>docker-compose</code> for the standalone variant of Docker Compose!!! </p> <p>Please use the latest Docker engine available and do not use the engine that ships with your distros repository.</p>"},{"location":"i_u_m/i_u_m_install/#check-selinux-specifics","title":"Check SELinux specifics","text":"<p>On SELinux enabled systems, e.g. CentOS 7:</p> <ul> <li>Check if \"container-selinux\" package is present on your system:</li> </ul> <pre><code>rpm -qa | grep container-selinux\n</code></pre> <p>If the above command returns an empty or no output, you should install it via your package manager.</p> <ul> <li>Check if docker has SELinux support enabled:</li> </ul> <pre><code>docker info | grep selinux\n</code></pre> <p>If the above command returns an empty or no output, create or edit <code>/etc/docker/daemon.json</code> and add <code>\"selinux-enabled\": true</code>. Example file content:</p> <pre><code>{\n \"selinux-enabled\": true\n}\n</code></pre> <p>Restart the docker daemon and verify SELinux is now enabled.</p> <p>This step is required to make sure mailcows volumes are properly labeled as declared in the compose file. If you are interested in how this works, you can check out the readme of https://github.com/containers/container-selinux which links to a lot of useful information on that topic.</p>"},{"location":"i_u_m/i_u_m_install/#install-mailcow","title":"Install mailcow","text":"<p>Clone the master branch of the repository, make sure your umask equals 0022. Please clone the repository as root user and also control the stack as root. We will modify attributes - if necessary - while bootstrapping the containers automatically and make sure everything is secured. The update.sh script must therefore also be run as root. It might be necessary to change ownership and other attributes of files you will otherwise not have access to. We drop permissions for every exposed application and will not run an exposed service as root! Controlling the Docker daemon as non-root user does not give you additional security. The unprivileged user will spawn the containers as root likewise. The behaviour of the stack is identical.</p> <pre><code>$ su\n# umask\n0022 # &lt;- Verify it is 0022\n# cd /opt\n# git clone https://github.com/mailcow/mailcow-dockerized\n# cd mailcow-dockerized\n</code></pre>"},{"location":"i_u_m/i_u_m_install/#initialize-mailcow","title":"Initialize mailcow","text":"<p>Generate a configuration file. Use a FQDN (<code>host.domain.tld</code>) as hostname when asked. <pre><code>./generate_config.sh\n</code></pre></p> <p>Change configuration if you want or need to. <pre><code>nano mailcow.conf\n</code></pre> If you plan to use a reverse proxy, you can, for example, bind HTTPS to 127.0.0.1 on port 8443 and HTTP to 127.0.0.1 on port 8080.</p> <p>You may need to stop an existing pre-installed MTA which blocks port 25/tcp. See this chapter to learn how to reconfigure Postfix to run besides mailcow after a successful installation.</p> <p>Some updates modify mailcow.conf and add new parameters. It is hard to keep track of them in the documentation. Please check their description and, if unsure, ask at the known channels for advise.</p>"},{"location":"i_u_m/i_u_m_install/#troubleshooting","title":"Troubleshooting","text":""},{"location":"i_u_m/i_u_m_install/#users-with-a-mtu-not-equal-to-1500-eg-openstack","title":"Users with a MTU not equal to 1500 (e.g. OpenStack)","text":"<p>Whenever you run into trouble and strange phenomena, please check your MTU.</p> <p>Edit <code>docker-compose.yml</code> and change the network settings according to your MTU. Add the new driver_opts parameter like this: <pre><code>networks:\n mailcow-network:\n ...\n driver_opts:\n com.docker.network.driver.mtu: 1450\n ...\n</code></pre></p>"},{"location":"i_u_m/i_u_m_install/#users-without-an-ipv6-enabled-network-on-their-host-system","title":"Users without an IPv6 enabled network on their host system","text":"<p>Please don't turn off IPv6, even if you don't like it. IPv6 is the future and should not be ignored.</p> <p>If you do not have an IPv6 enabled network on your host and you don't care for a better internet (thehe), it is recommended to disable IPv6 for the mailcow network to prevent unforeseen issues.</p>"},{"location":"i_u_m/i_u_m_install/#start-mailcow","title":"Start mailcow","text":"<p>Pull the images and run the compose file. The parameter <code>-d</code> will start mailcow: dockerized detached: <pre><code>docker compose pull\ndocker compose up -d\n</code></pre></p> <p>Done!</p> <p>You can now access https://${MAILCOW_HOSTNAME} with the default credentials <code>admin</code> + password <code>moohoo</code>.</p> <p>Info</p> <p>If you are not using mailcow behind a reverse proxy, you should redirect all HTTP requests to HTTPS.</p> <p>The database will be initialized right after a connection to MySQL can be established.</p> <p>Your data will persist in multiple Docker volumes, that are not deleted when you recreate or delete containers. Run <code>docker volume ls</code> to see a list of all volumes. You can safely run <code>docker compose down</code> without removing persistent data.</p>"},{"location":"i_u_m/i_u_m_migration/","title":"Migration","text":"<p>Warning</p> <p>This guide assumes you intend to migrate an existing mailcow server (source) over to a brand new, empty server (target). It takes no care about preserving any existing data on your target server and will erase anything within <code>/var/lib/docker/volumes</code> and thus any Docker volumes you may have already set up.</p> <p>Tip</p> <p>Alternatively, you can use the <code>./helper-scripts/backup_and_restore.sh</code> script to create a full backup on the source machine, then install mailcow on the target machine as usual, copy over your <code>mailcow.conf</code> and use the same script to restore your backup to the target machine.</p> <p>1. Follow the installation guide to install Docker and Compose.</p> <p>2. Stop Docker and assure Docker has stopped: <pre><code>systemctl stop docker.service\nsystemctl status docker.service\n</code></pre></p> <p>3. Run the following commands on the source machine (take care of adding the trailing slashes in the first path parameter as shown below!) - WARNING: This command will erase anything that may already exist under <code>/var/lib/docker/volumes</code> on the target machine: <pre><code>rsync -aHhP --numeric-ids --delete /opt/mailcow-dockerized/ root@target-machine.example.com:/opt/mailcow-dockerized\nrsync -aHhP --numeric-ids --delete /var/lib/docker/volumes/ root@target-machine.example.com:/var/lib/docker/volumes\n</code></pre></p> <p>4. Shut down mailcow and stop Docker on the source machine. <pre><code>cd /opt/mailcow-dockerized\ndocker compose down\nsystemctl stop docker.service\n</code></pre></p> <p>5. Repeat step 3 with the same commands. This will be much quicker than the first time.</p> <p>6. Switch over to the target machine and start Docker. <pre><code>systemctl start docker.service\n</code></pre></p> <p>7. Now pull the mailcow Docker images on the target machine. <pre><code>cd /opt/mailcow-dockerized\ndocker compose pull\n</code></pre></p> <p>8. Start the whole mailcow stack and everything should be done! <pre><code>docker compose up -d\n</code></pre></p> <p>9. Finally, change your DNS settings to point to the target server. Also check the <code>SNAT_TO_SOURCE</code> variable in your <code>mailcow.conf</code> file if you have changed your public IP address, otherwise SOGo may not work.</p>"},{"location":"i_u_m/i_u_m_update/","title":"Update","text":""},{"location":"i_u_m/i_u_m_update/#automatic-update","title":"Automatic update","text":"<p>An update script in your mailcow-dockerized directory will take care of updates.</p> <p>But use it with caution! If you think you made a lot of changes to the mailcow code, you should use the manual update guide below.</p> <p>Run the update script: <pre><code>./update.sh\n</code></pre></p> <p>If it needs to, it will ask you how you wish to proceed. Merge errors will be reported. Some minor conflicts will be auto-corrected (in favour for the mailcow-dockerized repository code).</p>"},{"location":"i_u_m/i_u_m_update/#options","title":"Options","text":"<pre><code># Options can be combined\n\n# - Check for updates and show changes\n./update.sh --check\n\n# - Do not start mailcow after applying an update\n./update.sh --skip-start\n\n# - Skip ICMP Check to public DNS resolvers (Use it only if you\u00b4ve blocked any ICMP Connections to your mailcow machine)\n./update.sh --skip-ping-check\n\n# - Switch your mailcow updates to the unstable (nightly) branch.\nFOR TESTING PURPOSES ONLY!!!! NOT READY FOR PRODUCTION!!!\n./update.sh --nightly\n\n# - Switch your mailcow updates to the stable (master) branch. Default unless you changed it with --nightly.\n./update.sh --stable\n\n# - Force update (unattended, but unsupported, use at own risk)\n./update.sh --force\n\n# - Run garbage collector to cleanup old image tags and exit\n./update.sh --gc\n\n# - Update with merge strategy option \"ours\" instead of \"theirs\"\n# This will **solve conflicts** when merging in favor for your local changes and should be avoided. Local changes will always be kept, unless we changed file XY, too.\n./update.sh --ours\n\n# - Don't update, but prefetch images and exit\n./update.sh --prefetch\n</code></pre>"},{"location":"i_u_m/i_u_m_update/#i-forgot-what-i-changed-before-running-updatesh","title":"I forgot what I changed before running update.sh","text":"<p>See <code>git log --pretty=oneline | grep -i \"before update\"</code>, you will have an output similar to this:</p> <pre><code>22cd00b5e28893ef9ddef3c2b5436453cc5223ab Before update on 2020-09-28_19_25_45\ndacd4fb9b51e9e1c8a37d84485b92ffaf6c59353 Before update on 2020-08-07_13_31_31\n</code></pre> <p>Run <code>git diff 22cd00b5e28893ef9ddef3c2b5436453cc5223ab</code> to see what changed.</p>"},{"location":"i_u_m/i_u_m_update/#can-i-roll-back","title":"Can I roll back?","text":"<p>Yes.</p> <p>See the topic above, instead of a diff, you run checkout:</p> <pre><code>docker compose down\n# Replace commit ID 22cd00b5e28893ef9ddef3c2b5436453cc5223ab by your ID\ngit checkout 22cd00b5e28893ef9ddef3c2b5436453cc5223ab\ndocker compose pull\ndocker compose up -d\n</code></pre>"},{"location":"i_u_m/i_u_m_update/#hooks","title":"Hooks","text":"<p>You can hook into the update mechanism by adding scripts called <code>pre_commit_hook.sh</code> and <code>post_commit_hook.sh</code> to your mailcows root directory. See this for more details.</p>"},{"location":"i_u_m/i_u_m_update/#update-cycle","title":"Update Cycle","text":"<ul> <li>We schedule a monthly release cycle for a major update at the first tuesday of the month.</li> <li>The releases are numbered like this: <code>YYYY-MM</code> (e.g. <code>2022-05</code>)</li> <li>Fixes for a main Update will be stated as \"Revisions\" like a,b,c (e.g. <code>2022-05a</code>, <code>2022-05b</code> etc.)</li> </ul>"},{"location":"i_u_m/i_u_m_update/#update-variants","title":"Update variants","text":"<p>stable (stable updates): These updates are suitable for productive usage. They appear in a cycle of at least 1x per month.</p> <p>nightly (unstable updates): These updates are NOT suitable for production use and are for testing only. The nightly updates are ahead of the stable updates, since in these updates we test newer and more extensive features before they go live for all users.</p>"},{"location":"i_u_m/i_u_m_update/#new-get-nightly-updates","title":"NEW: Get Nightly Updates","text":""},{"location":"i_u_m/i_u_m_update/#info-about-the-nightly-updates","title":"Info about the Nightly Updates","text":"<p>Since the 2022-08 update there is the possibility to change the update sources. Until now, the master branch on GitHub served as the only (official) update source. With the August 2022 update, however, there is now the Nightly Branch which contains unstable and major changes for testing and feedback.</p> <p>The Nightly Branch always gets new updates when something is finished on the mailcow project that will be included in the new main version.</p> <p>Besides the obvious changes that will be included in the next major update anyway, it also contains exclusive features that need a longer testing time (e.g. the UI update to Bootstrap 5).</p>"},{"location":"i_u_m/i_u_m_update/#how-do-i-get-nightly-updates","title":"How do I get Nightly Updates?","text":"<p>The process is relatively simple. With the 2022-08 update (assuming an update to the version) it is possible to run <code>update.sh</code> with the parameter <code>--nightly</code>.</p> <p>Danger<p>Please make a backup before or follow the Best Practice Nightly Update section before switching to mailcow nightly builds. We are not responsible for any data loss/corruption, so work with caution!</p> </p> <p>The script will now change the branch with <code>git checkout nightly</code>, which means it will ask for the IPv6 settings again. But this is normal.</p> <p>If everything worked fine (for which we made a backup before) the mailcow UI should now show the current version number and date stamp in the lower right corner: </p>"},{"location":"i_u_m/i_u_m_update/#best-practice-nightly-update","title":"Best Practice Nightly Update","text":"<p>Info<p>We recommend using the Nightly Update only if you have another machine or VM and NOT use it productively.</p> </p> <ol> <li>use the cold standby script to copy the machine before the switch to the nightly builds on another system.</li> <li>run the <code>update.sh</code> script on the new machine with the parameter <code>--nightly</code> and confirm.</li> <li>experience/test the nightly updates on the secondary machine.</li> </ol>"},{"location":"manual-guides/u_e-80_to_443/","title":"Redirect HTTP to HTTPS","text":"<p>Since February the 28th 2017 mailcow does come with port 80 and 443 enabled.</p> <p>Do not use the config below for reverse proxy setups, please see our reverse proxy guide for this, which includes a redirect from HTTP to HTTPS.</p> <p>Open <code>mailcow.conf</code> and set <code>HTTP_BIND=</code> - if not already set.</p> <p>Create a new file <code>data/conf/nginx/redirect.conf</code> and add the following server config to the file:</p> <pre><code>server {\n root /web;\n listen 80 default_server;\n listen [::]:80 default_server;\n include /etc/nginx/conf.d/server_name.active;\n if ( $request_uri ~* \"%0A|%0D\" ) { return 403; }\n location ^~ /.well-known/acme-challenge/ {\n allow all;\n default_type \"text/plain\";\n }\n location / {\n return 301 https://$host$uri$is_args$args;\n }\n}\n</code></pre> <p>In case you changed the HTTP_BIND parameter, recreate the container:</p> <pre><code>docker compose up -d\n</code></pre> <p>Otherwise restart Nginx:</p> <pre><code>docker compose restart nginx-mailcow\n</code></pre>"},{"location":"manual-guides/u_e-autodiscover_config/","title":"Autodiscover / Autoconfig","text":"<p>You do not need to change or create this file, autodiscover works out of the box. This guide is only meant for customizations to the autodiscover or autoconfig process.</p> <p>Newer Outlook clients (especially those delivered with O365) will not autodiscover mail profiles. Keep in mind, that ActiveSync should NOT be used with a desktop client.</p> <p>Open/create <code>data/web/inc/vars.local.inc.php</code> and add your changes to the configuration array.</p> <p>Changes will be merged with \"$autodiscover_config\" in <code>data/web/inc/vars.inc.php</code>):</p> <pre><code>&lt;?php\n$autodiscover_config = array(\n // General autodiscover service type: \"activesync\" or \"imap\"\n // emClient uses autodiscover, but does not support ActiveSync. mailcow excludes emClient from ActiveSync.\n 'autodiscoverType' =&gt; 'activesync',\n // If autodiscoverType =&gt; activesync, also use ActiveSync (EAS) for Outlook desktop clients (&gt;= Outlook 2013 on Windows)\n // Outlook for Mac does not support ActiveSync\n 'useEASforOutlook' =&gt; 'yes',\n // Please don't use STARTTLS-enabled service ports in the \"port\" variable.\n // The autodiscover service will always point to SMTPS and IMAPS (TLS-wrapped services).\n // The autoconfig service will additionally announce the STARTTLS-enabled ports, specified in the \"tlsport\" variable.\n 'imap' =&gt; array(\n 'server' =&gt; $mailcow_hostname,\n 'port' =&gt; array_pop(explode(':', getenv('IMAPS_PORT'))),\n 'tlsport' =&gt; array_pop(explode(':', getenv('IMAP_PORT'))),\n ),\n 'pop3' =&gt; array(\n 'server' =&gt; $mailcow_hostname,\n 'port' =&gt; array_pop(explode(':', getenv('POPS_PORT'))),\n 'tlsport' =&gt; array_pop(explode(':', getenv('POP_PORT'))),\n ),\n 'smtp' =&gt; array(\n 'server' =&gt; $mailcow_hostname,\n 'port' =&gt; array_pop(explode(':', getenv('SMTPS_PORT'))),\n 'tlsport' =&gt; array_pop(explode(':', getenv('SUBMISSION_PORT'))),\n ),\n 'activesync' =&gt; array(\n 'url' =&gt; 'https://'.$mailcow_hostname.($https_port == 443 ? '' : ':'.$https_port).'/Microsoft-Server-ActiveSync',\n ),\n 'caldav' =&gt; array(\n 'server' =&gt; $mailcow_hostname,\n 'port' =&gt; $https_port,\n ),\n 'carddav' =&gt; array(\n 'server' =&gt; $mailcow_hostname,\n 'port' =&gt; $https_port,\n ),\n);\n</code></pre> <p>To always use IMAP and SMTP instead of EAS, set <code>'autodiscoverType' =&gt; 'imap'</code>.</p> <p>Disable ActiveSync for Outlook desktop clients by setting \"useEASforOutlook\" to \"no\".</p>"},{"location":"manual-guides/u_e-reeanble-weak-protocols/","title":"Re-enable TLS 1.0 and TLS 1.1","text":"<p>On February the 12th 2020 we disabled the deprecated protocols TLS 1.0 and 1.1 in Dovecot (POP3, POP3S, IMAP, IMAPS) and Postfix (SMTPS, SUBMISSION).</p> <p>Unauthenticated mail via SMTP on port 25/tcp does still accept &gt;= TLS 1.0 . It is better to accept a weak encryption than none at all.</p> <p>How to re-enable weak protocols?</p> <p>Edit <code>data/conf/postfix/extra.cf</code>:</p> <pre><code>submission_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3\nsmtps_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3\n</code></pre> <p>Edit <code>data/conf/dovecot/extra.conf</code>:</p> <pre><code>ssl_min_protocol = TLSv1\n</code></pre> <p>Restart the affected services:</p> <pre><code>docker compose restart postfix-mailcow dovecot-mailcow\n</code></pre> <p>Hint: You can enable TLS 1.2 in Windows 7.</p>"},{"location":"manual-guides/u_e-update-hooks/","title":"Run scripts before and after updates","text":"<p>It is possible to add pre- and post-update-hooks to the <code>update.sh</code> script that upgrades your whole mailcow installation.</p> <p>To do so, just add the corresponding bash script into your mailcow root directory: </p> <ul> <li><code>pre_update_hook.sh</code> for commands that should run before the update</li> <li><code>post_update_hook.sh</code> for commands that should run after the update is completed</li> </ul> <p>Keep in mind that <code>pre_update_hook.sh</code> runs every time you call <code>update.sh</code> and <code>post_update_hook.sh</code> will only run if the update was successful and the script doesn't have to be re-run.</p> <p>The scripts will be run by bash, an interpreter (e.g. <code>#!/bin/bash</code>) as well as an execute permission flag (\"+x\") are not required.</p>"},{"location":"manual-guides/u_e-why_unbound/","title":"Why unbound?","text":"<p>For DNS blacklist lookups and DNSSEC.</p> <p>Most systems use either a public or a local caching DNS resolver. That's a very bad idea when it comes to filter spam using DNS-based black hole lists (DNSBL) or similar technics. Most if not all providers apply a rate limit based on the DNS resolver that is used to query their service. Using a public resolver like Googles 4x8, OpenDNS or any other shared DNS resolver like your ISPs will hit that limit very soon.</p>"},{"location":"manual-guides/ClamAV/u_e-clamav-additional_dbs/","title":"Additional Databases","text":""},{"location":"manual-guides/ClamAV/u_e-clamav-additional_dbs/#additional-databases-for-clamav","title":"Additional Databases for ClamAV","text":"<p>Default ClamAV databases do not have great detection levels, but it can be enhanced with free or paid signature databases.</p>"},{"location":"manual-guides/ClamAV/u_e-clamav-additional_dbs/#list-of-known-free-databases-as-of-april-2022","title":"List of known free databases | As of April 2022","text":"<ul> <li>SecurityInfo - free ClamAV DBs for testing purposes, required registration after which you can use them from 1 IP</li> <li>InterServer - free to use ClamAV DBs, but they do not fit well for email scanning</li> </ul>"},{"location":"manual-guides/ClamAV/u_e-clamav-additional_dbs/#enable-securiteinfo-databases","title":"Enable SecuriteInfo databases","text":"<ol> <li>Sign up for a free account at https://www.securiteinfo.com/clients/customers/signup</li> <li>You will receive an email to activate your account and then a follow-up email with your login name</li> <li>Login and navigate to your customer account: https://www.securiteinfo.com/clients/customers/account</li> <li>Click on the Setup tab</li> <li>You will need to get <code>your_id</code> from one of the download links, they are individual for every user</li> <li> <p>Add to <code>data/conf/clamav/freshclam.conf</code> with replaced <code>your_id</code> part: <pre><code>DatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/securiteinfo.hdb\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/securiteinfo.ign2\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/javascript.ndb\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/spam_marketing.ndb\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/securiteinfohtml.hdb\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/securiteinfoascii.hdb\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/securiteinfopdf.hdb\n</code></pre></p> </li> <li> <p>For free SecuriteInfo databases, download speed is limited to 300 kB/s. In <code>data/conf/clamav/freshclam.conf</code>, increase the default <code>ReceiveTimeout 20</code> value to <code>ReceiveTimeout 90</code> (time in seconds), otherwise some of the database downloads could fail because of their size.</p> </li> <li> <p>Adjust <code>data/conf/clamav/clamd.conf</code> to align with next settings: <pre><code>DetectPUA yes\nExcludePUA PUA.Win.Packer\nExcludePUA PUA.Win.Trojan.Packed\nExcludePUA PUA.Win.Trojan.Molebox\nExcludePUA PUA.Win.Packer.Upx\nExcludePUA PUA.Doc.Packed\nMaxScanSize 150M\nMaxFileSize 100M\nMaxRecursion 40\nMaxEmbeddedPE 100M\nMaxHTMLNormalize 50M\nMaxScriptNormalize 50M\nMaxZipTypeRcg 50M\n</code></pre></p> </li> <li>Restart ClamAV container: <pre><code>docker compose restart clamd-mailcow\n</code></pre></li> </ol> <p>Please note:</p> <ul> <li>You can't use <code>ExcludePUA</code> and <code>IncludePUA</code> in <code>clamd.conf</code> simultaneously, so please comment any <code>IncludePUA</code> if you uncommented them before. </li> <li>List of databases provided in this example fit most use-cases, but SecuriteInfo also provides other databases. Please check SecuriteInfo FAQ for additional information.</li> <li>With the current DB set (including default DBs) ClamAV will consume about 1.3Gb of RAM on your server.</li> <li>If you modified <code>message_size_limit</code> in Postfix you need to adapt <code>MaxSize</code> settings in ClamAV as well.</li> </ul>"},{"location":"manual-guides/ClamAV/u_e-clamav-additional_dbs/#enable-interserver-databases","title":"Enable InterServer databases","text":"<ol> <li>Add to <code>data/conf/clamav/freshclam.conf</code>: <pre><code>DatabaseCustomURL http://sigs.interserver.net/interserver256.hdb\nDatabaseCustomURL http://sigs.interserver.net/interservertopline.db\nDatabaseCustomURL http://sigs.interserver.net/shell.ldb\nDatabaseCustomURL http://sigs.interserver.net/whitelist.fp\n</code></pre></li> <li>Restart ClamAV container: <pre><code>docker compose restart clamd-mailcow\n</code></pre></li> </ol>"},{"location":"manual-guides/ClamAV/u_e-clamav-whitelist/","title":"Whitelist","text":""},{"location":"manual-guides/ClamAV/u_e-clamav-whitelist/#whitelist-specific-clamav-signatures","title":"Whitelist specific ClamAV signatures","text":"<p>You may find that legitimate (clean) mail is being blocked by ClamAV (Rspamd will flag the mail with <code>VIRUS_FOUND</code>). For instance, interactive PDF form attachments are blocked by default because the embedded Javascript code may be used for nefarious purposes. Confirm by looking at the clamd logs, e.g.:</p> <pre><code>docker compose logs clamd-mailcow | grep \"FOUND\"\n</code></pre> <p>This line confirms that such was identified:</p> <pre><code>clamd-mailcow_1 | Sat Sep 28 07:43:24 2019 -&gt; instream(local): PUA.Pdf.Trojan.EmbeddedJavaScript-1(e887d2ac324ce90750768b86b63d0749:363325) FOUND\n</code></pre> <p>To whitelist this particular signature (and enable sending this type of file attached), add it to the ClamAV signature whitelist file:</p> <pre><code>echo 'PUA.Pdf.Trojan.EmbeddedJavaScript-1' &gt;&gt; data/conf/clamav/whitelist.ign2\n</code></pre> <p>Then restart the clamd-mailcow service container in the mailcow UI or using docker compose:</p> <pre><code>docker compose restart clamd-mailcow\n</code></pre> <p>Cleanup cached ClamAV results in Redis:</p> <pre><code># docker compose exec redis-mailcow /bin/sh\n/data # redis-cli KEYS rs_cl* | xargs redis-cli DEL\n/data # exit\n</code></pre>"},{"location":"manual-guides/Docker/u_e-docker-cust_dockerfiles/","title":"Customize Dockerfiles","text":"<p>You need to copy the override file with corresponding build tags to the mailcow: dockerized root folder (i.e. <code>/opt/mailcow-dockerized</code>):</p> <pre><code>cp helper-scripts/docker-compose.override.yml.d/BUILD_FLAGS/docker-compose.override.yml docker-compose.override.yml\n</code></pre> <p>Customize <code>data/Dockerfiles/$service</code> and build the image locally: <pre><code>docker build data/Dockerfiles/$service -t mailcow/$service:$tag\n</code></pre> (without a personalized :$tag docker will use :latest automatically)</p> <p>Now the created image has to be activated in docker-compose.override.yml, e.g.: <pre><code>$service-mailcow:\n build: ./data/Dockerfiles/$service\n image: mailcow/$service:$tag\n</code></pre></p> <p>Now auto-recreate modified containers:</p> <pre><code>docker compose up -d\n</code></pre>"},{"location":"manual-guides/Dovecot/u_e-dovecot-any_acl/","title":"Enable \"any\" ACL settings","text":"<p>On August the 17th, we disabled the possibility to share with \"any\" or \"all authenticated users\" by default.</p> <p>This function can be re-enabled by setting <code>ACL_ANYONE</code> to <code>allow</code> in mailcow.conf:</p> <pre><code>ACL_ANYONE=allow\n</code></pre> <p>Apply the changes by running <code>docker compose up -d</code>.</p>"},{"location":"manual-guides/Dovecot/u_e-dovecot-catchall_vacation/","title":"Vacation replies for catchall addresses","text":"<p>The Dovecot parameter <code>sieve_vacation_dont_check_recipient</code> - which was by default set to <code>yes</code> in mailcow configurations pre 21st July 2021 - allows for vacation replies even when a mail is sent to non-existent mailboxes like a catch-all addresses.</p> <p>We decided to switch this parameter back to <code>no</code> and allow a user to specify which recipient address triggers a vacation reply. The triggering recipients can also be configured in SOGos autoresponder feature.</p>"},{"location":"manual-guides/Dovecot/u_e-dovecot-expunge/","title":"Expunge a Users mails","text":"<p>If you want to delete old mails out of the <code>.Junk</code> or <code>.Trash</code> folders or maybe delete all read mails that are older than a certain amount of time you may use dovecot's tool doveadm man doveadm-expunge.</p>"},{"location":"manual-guides/Dovecot/u_e-dovecot-expunge/#the-manual-way","title":"The manual way","text":"<p>That said, let's dive in:</p> <p>Delete a user's mails inside the junk folder that are read and older than 4 hours</p> <pre><code>docker compose exec dovecot-mailcow doveadm expunge -u 'mailbox@example.com' mailbox 'Junk' SEEN not SINCE 4h\n</code></pre> <p>Delete all user's mails in the junk folder that are older than 7 days</p> <pre><code>docker compose exec dovecot-mailcow doveadm expunge -A mailbox 'Junk' savedbefore 7d\n</code></pre> <p>Delete all mails (of all users) in all folders that are older than 52 weeks (internal date of the mail, not the date it was saved on the system =&gt; <code>before</code> instead of <code>savedbefore</code>). Useful for deleting very old mails on all users and folders (thus especially useful for GDPR-compliance).</p> <pre><code>docker compose exec dovecot-mailcow doveadm expunge -A mailbox % before 52w\n</code></pre> <p>Delete mails inside a custom folder inside a user's inbox that are not flagged and older than 2 weeks</p> <pre><code>docker compose exec dovecot-mailcow doveadm expunge -u 'mailbox@example.com' mailbox 'INBOX/custom-folder' not FLAGGED not SINCE 2w\n</code></pre> <p>Info</p> <p>For possible time spans or search keys have a look at man doveadm-search-query</p>"},{"location":"manual-guides/Dovecot/u_e-dovecot-expunge/#job-scheduler","title":"Job scheduler","text":""},{"location":"manual-guides/Dovecot/u_e-dovecot-expunge/#via-the-host-system-cron","title":"via the host system cron","text":"<p>If you want to automate such a task you can create a cron job on your host that calls a script like the one below:</p> <pre><code>#!/bin/bash\n# Path to mailcow-dockerized, e.g. /opt/mailcow-dockerized\ncd /path/to/your/mailcow-dockerized\n\n/usr/local/bin/docker compose exec -T dovecot-mailcow doveadm expunge -A mailbox 'Junk' savedbefore 2w\n/usr/local/bin/docker compose exec -T dovecot-mailcow doveadm expunge -A mailbox 'Junk' SEEN not SINCE 12h\n[...]\n</code></pre> <p>To create a cron job you may execute <code>crontab -e</code> and insert something like the following to execute a script:</p> <pre><code># Execute everyday at 04:00 A.M.\n0 4 * * * /path/to/your/expunge_mailboxes.sh\n</code></pre>"},{"location":"manual-guides/Dovecot/u_e-dovecot-expunge/#via-docker-job-scheduler","title":"via Docker job scheduler","text":"<p>To archive this with a docker job scheduler use this docker-compose.override.yml with your mailcow: </p> <pre><code>version: '2.1'\n\nservices:\n\n ofelia:\n image: mcuadros/ofelia:latest\n restart: always\n command: daemon --docker\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock:ro \n network_mode: none\n\n dovecot-mailcow:\n labels:\n - \"ofelia.enabled=true\"\n - \"ofelia.job-exec.dovecot-expunge-trash.schedule=0 4 * * *\"\n - \"ofelia.job-exec.dovecot-expunge-trash.command=doveadm expunge -A mailbox 'Junk' savedbefore 2w\"\n - \"ofelia.job-exec.dovecot-expunge-trash.tty=false\"\n</code></pre> <p>The job controller just need access to the docker control socket to be able to emulate the behavior of \"exec\". Then we add a few label to our dovecot-container to activate the job scheduler and tell him in a cron compatible scheduling format when to run. If you struggle with that schedule string you can use crontab guru. This docker-compose.override.yml deletes all mails older then 2 weeks from the \"Junk\" folder every day at 4 am. To see if things ran proper, you can not only see in your mailbox but also check Ofelia's docker log if it looks something like this:</p> <pre><code>common.go:124 \u25b6 NOTICE [Job \"dovecot-expunge-trash\" (8759567efa66)] Started - doveadm expunge -A mailbox 'Junk' savedbefore 2w,\ncommon.go:124 \u25b6 NOTICE [Job \"dovecot-expunge-trash\" (8759567efa66)] Finished in \"285.032291ms\", failed: false, skipped: false, error: none,\n</code></pre> <p>If it failed it will say so and give you the output of the doveadm in the log to make it easy on you to debug.</p> <p>In case you want to add more jobs, ensure you change the \"dovecot-expunge-trash\" part after \"ofelia.job-exec.\" to something else, it defines the name of the job. Syntax of the labels you find at mcuadros/ofelia.</p>"},{"location":"manual-guides/Dovecot/u_e-dovecot-extra_conf/","title":"Customize/Expand dovecot.conf","text":"<p>Create a file <code>data/conf/dovecot/extra.conf</code> - if missing - and add your additional content here.</p> <p>Restart <code>dovecot-mailcow</code> to apply your changes:</p> <pre><code>docker compose restart dovecot-mailcow\n</code></pre>"},{"location":"manual-guides/Dovecot/u_e-dovecot-fts/","title":"FTS (Solr)","text":""},{"location":"manual-guides/Dovecot/u_e-dovecot-fts/#fts-solr","title":"FTS Solr","text":"<p>Solr is used for setups with memory &gt;= 3.5 GiB to provide full-text search in Dovecot.</p> <p>Please be aware that applications like Solr may need maintenance from time to time.</p> <p>Besides that, Solr will eat a lot of RAM, depending on the usage of your server. Please avoid it on machines with less than 3 GB RAM.</p> <p>The default heap size (1024 M) is defined in mailcow.conf.</p> <p>Since we run in Docker and create our containers with the \"restart: always\" flag, a oom situation will at least only trigger a restart of the container.</p>"},{"location":"manual-guides/Dovecot/u_e-dovecot-fts/#fts-related-dovecot-commands","title":"FTS related Dovecot commands","text":"<pre><code># single user\ndocker compose exec dovecot-mailcow doveadm fts rescan -u user@domain\n# all users\ndocker compose exec dovecot-mailcow doveadm fts rescan -A\n</code></pre> <p>Dovecot Wiki: \"Scan what mails exist in the full text search index and compare those to what actually exist in mailboxes. This removes mails from the index that have already been expunged and makes sure that the next doveadm index will index all the missing mails (if any).\"</p> <p>This does not re-index a mailbox. It basically repairs a given index.</p> <p>If you want to re-index data immediately, you can run the followig command, where '*' can also be a mailbox mask like 'Sent'. You do not need to run these commands, but it will speed things up a bit:</p> <pre><code># single user\ndocker compose exec dovecot-mailcow doveadm index -u user@domain '*'\n# all users, but obviously slower and more dangerous\ndocker compose exec dovecot-mailcow doveadm index -A '*'\n</code></pre> <p>This will take some time depending on your machine and Solr can run oom, monitor it!</p> <p>Because re-indexing is very sensible, we did not include it to mailcow UI. You will need to take care of any errors while re-indexing a mailbox.</p>"},{"location":"manual-guides/Dovecot/u_e-dovecot-fts/#delete-mailbox-data","title":"Delete mailbox data","text":"<p>mailcow will purge index data of a user when deleting a mailbox.</p>"},{"location":"manual-guides/Dovecot/u_e-dovecot-idle_interval/","title":"Changing the IMAP IDLE interval","text":""},{"location":"manual-guides/Dovecot/u_e-dovecot-idle_interval/#what-is-the-idle-interval","title":"What is the IDLE interval?","text":"<p>Per default, Dovecot sends a \"I'm still here\" notification to every client that has an open connection with Dovecot to get mails as quickly as possible without manually polling it (IMAP PUSH). This notification is controlled by the setting <code>imap_idle_notify_interval</code>, which defaults to 2 minutes. </p> <p>A short interval results in the client getting a lot of messages for this connection, which is bad for mobile devices, because every time the device receives this message, the mailing app has to wake up. This can result in unnecessary battery drain.</p>"},{"location":"manual-guides/Dovecot/u_e-dovecot-idle_interval/#edit-the-value","title":"Edit the value","text":""},{"location":"manual-guides/Dovecot/u_e-dovecot-idle_interval/#change-configuration","title":"Change configuration","text":"<p>Create a new file <code>data/conf/dovecot/extra.conf</code> (or edit it if it already exists). Insert the setting followed by the new value. For example, to set the interval to 5 minutes you could type:</p> <pre><code>imap_idle_notify_interval = 5 mins\n</code></pre> <p>29 minutes is the maximum value allowed by the corresponding RFC.</p> <p>Warning</p> <p>This isn't a default setting in mailcow because we don't know how this setting changes the behavior of other clients. Be careful if you change this and monitor different behavior.</p>"},{"location":"manual-guides/Dovecot/u_e-dovecot-idle_interval/#reload-dovecot","title":"Reload Dovecot","text":"<p>Now reload Dovecot: <pre><code>docker compose exec dovecot-mailcow dovecot reload\n</code></pre></p> <p>Info</p> <p>You can check the value of this setting with <pre><code>docker compose exec dovecot-mailcow dovecot -a | grep \"imap_idle_notify_interval\"\n</code></pre> If you didn't change it, it should be at 2m. If you did change it, you should see your new value.</p>"},{"location":"manual-guides/Dovecot/u_e-dovecot-mail-crypt/","title":"Mail crypt","text":"<p>Warning</p> <p>Mails are stored compressed (lz4) and encrypted. The key pair can be found in crypt-vol-1.</p> <p>If you want to decode/encode existing maildir files, you can use the following script at your own risk:</p> <p>Enter Dovecot by running <code>docker compose exec dovecot-mailcow /bin/bash</code> in the mailcow-dockerized location.</p> <pre><code># Decrypt /var/vmail\nfind /var/vmail/ -type f -regextype egrep -regex '.*S=.*W=.*' | while read -r file; do\nif [[ $(head -c7 \"$file\") == \"CRYPTED\" ]]; then\ndoveadm fs get compress lz4:1:crypt:private_key_path=/mail_crypt/ecprivkey.pem:public_key_path=/mail_crypt/ecpubkey.pem:posix:prefix=/ \\\n \"$file\" &gt; \"/tmp/$(basename \"$file\")\"\n if [[ -s \"/tmp/$(basename \"$file\")\" ]]; then\n chmod 600 \"/tmp/$(basename \"$file\")\"\n chown 5000:5000 \"/tmp/$(basename \"$file\")\"\n mv \"/tmp/$(basename \"$file\")\" \"$file\"\n else\n rm \"/tmp/$(basename \"$file\")\"\n fi\nfi\ndone\n\n# Encrypt /var/vmail\nfind /var/vmail/ -type f -regextype egrep -regex '.*S=.*W=.*' | while read -r file; do\nif [[ $(head -c7 \"$file\") != \"CRYPTED\" ]]; then\ndoveadm fs put crypt private_key_path=/mail_crypt/ecprivkey.pem:public_key_path=/mail_crypt/ecpubkey.pem:posix:prefix=/ \\\n \"$file\" \"$file\"\n chmod 600 \"$file\"\n chown 5000:5000 \"$file\"\nfi\ndone\n</code></pre>"},{"location":"manual-guides/Dovecot/u_e-dovecot-more/","title":"More Examples with DOVEADM","text":"<p>Here is just an unsorted list of useful <code>doveadm</code> commands that could be useful.</p>"},{"location":"manual-guides/Dovecot/u_e-dovecot-more/#doveadm-quota","title":"doveadm quota","text":"<p>The <code>quota get</code> and <code>quota recalc</code>1 commands are used to display or recalculate the current user's quota usage. The reported values are in kilobytes.</p> <p>To list the current quota status for a user / mailbox, do:</p> <pre><code>doveadm quota get -u 'mailbox@example.org'\n</code></pre> <p>To list the quota storage value for all users, do:</p> <pre><code>doveadm quota get -A |grep \"STORAGE\"\n</code></pre> <p>Recalculate a single user's quota usage:</p> <pre><code>doveadm quota recalc -u 'mailbox@example.org'\n</code></pre>"},{"location":"manual-guides/Dovecot/u_e-dovecot-more/#doveadm-search","title":"doveadm search","text":"<p>The <code>doveadm search</code>2 command is used to find messages matching your query. It can return the username, mailbox-GUID / -UID and message-GUIDs / -UIDs.</p> <p>To view the number of messages, by user, in their .Trash folder:</p> <pre><code>doveadm search -A mailbox 'Trash' | awk '{print $1}' | sort | uniq -c\n</code></pre> <p>Show all messages in a user's inbox older then 90 days:</p> <pre><code>doveadm search -u 'mailbox@example.org' mailbox 'INBOX' savedbefore 90d\n</code></pre> <p>Show all messages in any folder that are older then 30 days for <code>mailbox@example.org</code>:</p> <pre><code>doveadm search -u 'mailbox@example.org' mailbox \"*\" savedbefore 30d\n</code></pre> <ol> <li> <p>https://wiki.dovecot.org/Tools/Doveadm/Quota \u21a9</p> </li> <li> <p>https://wiki.dovecot.org/Tools/Doveadm/Search \u21a9</p> </li> </ol>"},{"location":"manual-guides/Dovecot/u_e-dovecot-public_folder/","title":"Public folders","text":"<p>Create a new public namespace \"Public\" and a mailbox \"Develcow\" inside that namespace:</p> <p>Edit or create <code>data/conf/dovecot/extra.conf</code>, add:</p> <pre><code>namespace {\n type = public\n separator = /\n prefix = Public/\n location = maildir:/var/vmail/public:INDEXPVT=~/public\n subscriptions = yes\n mailbox \"Develcow\" {\n auto = subscribe\n }\n}\n</code></pre> <p><code>:INDEXPVT=~/public</code> can be omitted if per-user seen flags are not wanted.</p> <p>The new mailbox in the public namespace will be auto-subscribed by users.</p> <p>To allow all authenticated users access full to that new mailbox (not the whole namespace), run:</p> <pre><code>docker compose exec dovecot-mailcow doveadm acl set -A \"Public/Develcow\" \"authenticated\" lookup read write write-seen write-deleted insert post delete expunge create\n</code></pre> <p>Adjust the command to your needs if you like to assign more granular rights per user (use <code>-u user@domain</code> instead of <code>-A</code> for example).</p>"},{"location":"manual-guides/Dovecot/u_e-dovecot-public_folder/#allow-authenticated-users-access-to-the-whole-public-namespace","title":"Allow authenticated users access to the whole public namespace","text":"<p>To allow all authenticated users access full access to the whole public namespace and its subfolders, create a new <code>dovecot-acl</code> file in the namespace root directory:</p> <p>Open/edit/create <code>/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/public/dovecot-acl</code> (adjust the path accordingly) to create the global ACL file with the following content:</p> <pre><code>authenticated kxeilprwts\n</code></pre> <p><code>kxeilprwts</code> equals to <code>lookup read write write-seen write-deleted insert post delete expunge create</code>.</p> <p>You can use <code>doveadm acl set -u user@domain \"Public/Develcow\" user=user@domain lookup read</code> to limit access for a single user. You may also turn it around to limit access for all users to \"lr\" and grant only some users full access.</p> <p>See Dovecot ACL for further information about ACL.</p>"},{"location":"manual-guides/Dovecot/u_e-dovecot-static_master/","title":"Static master user","text":"<p>Random master usernames and passwords are automatically created on every restart of dovecot-mailcow.</p> <p>That's recommended and should not be changed.</p> <p>If you need the user to be static anyway, please specify two variables in <code>mailcow.conf</code>.</p> <p>Both parameters must not be empty!</p> <pre><code>DOVECOT_MASTER_USER=mymasteruser\nDOVECOT_MASTER_PASS=mysecretpass\n</code></pre> <p>Run <code>docker compose up -d</code> to apply your changes.</p> <p>The static master username will be expanded to <code>DOVECOT_MASTER_USER@mailcow.local</code>.</p> <p>To login as <code>test@example.org</code> this would equal to <code>test@example.org*mymasteruser@mailcow.local</code> with the specified password above.</p> <p>A login to SOGo is not possible with this username. A click-to-login function for SOGo is available for admins as described here No master user is required.</p>"},{"location":"manual-guides/Dovecot/u_e-dovecot-vmail-volume/","title":"Move Maildir (vmail)","text":""},{"location":"manual-guides/Dovecot/u_e-dovecot-vmail-volume/#the-new-way","title":"The \"new\" way","text":"<p>Warning</p> <p>Newer Docker versions seem to complain about existing volumes. You can fix this temporarily by removing the existing volume and start mailcow with the override file. But it seems to be problematic after a reboot (needs to be confirmed).</p> <p>An easy, dirty, yet stable workaround is to stop mailcow (<code>docker compose down</code>), remove <code>/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data</code> and create a new link to your remote filesystem location, for example:</p> <pre><code>mv /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data_backup\nln -s /mnt/volume-xy/vmail_data /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data\n</code></pre> <p>Start mailcow afterwards.</p>"},{"location":"manual-guides/Dovecot/u_e-dovecot-vmail-volume/#the-old-way","title":"The \"old\" way","text":"<p>If you want to use another folder for the vmail-volume, you can create a <code>docker-compose.override.yml</code> file and add the following content:</p> <pre><code>version: '2.1'\nvolumes:\n vmail-vol-1:\n driver_opts:\n type: none\n device: /data/mailcow/vmail \n o: bind\n</code></pre>"},{"location":"manual-guides/Dovecot/u_e-dovecot-vmail-volume/#moving-an-existing-vmail-folder","title":"Moving an existing vmail folder:","text":"<ul> <li>Locate the current vmail folder by its \"Mountpoint\" attribute: <code>docker volume inspect mailcowdockerized_vmail-vol-1</code></li> </ul> <pre><code>[\n {\n \"CreatedAt\": \"2019-06-16T22:08:34+02:00\",\n \"Driver\": \"local\",\n \"Labels\": {\n \"com.docker.compose.project\": \"mailcowdockerized\",\n \"com.docker.compose.version\": \"1.23.2\",\n \"com.docker.compose.volume\": \"vmail-vol-1\"\n },\n \"Mountpoint\": \"/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data\",\n \"Name\": \"mailcowdockerized_vmail-vol-1\",\n \"Options\": null,\n \"Scope\": \"local\"\n }\n]\n</code></pre> <ul> <li>Copy the content of the <code>Mountpoint</code> folder to the new location (e.g. <code>/data/mailcow/vmail</code>) using <code>cp -a</code>, <code>rsync -a</code> or a similar non strcuture breaking copy command</li> <li>Stop mailcow by executing <code>docker compose down</code> from within your mailcow root folder (e.g. <code>/opt/mailcow-dockerized</code>)</li> <li>Create the file <code>docker-compose.override.yml</code>, edit the device path accordingly</li> <li>Delete the current vmail folder: <code>docker volume rm mailcowdockerized_vmail-vol-1</code></li> <li>Start mailcow by executing <code>docker compose up -d</code> from within your mailcow root folder (e.g. <code>/opt/mailcow-dockerized</code>)</li> </ul>"},{"location":"manual-guides/Nginx/u_e-nginx_custom/","title":"Custom sites","text":""},{"location":"manual-guides/Nginx/u_e-nginx_custom/#ssl","title":"SSL","text":"<p>Please see Advanced SSL and explicitly check <code>ADDITIONAL_SERVER_NAMES</code> for SSL configuration.</p> <p>Please do not add ADDITIONAL_SERVER_NAMES when you plan to use a different web root.</p>"},{"location":"manual-guides/Nginx/u_e-nginx_custom/#new-site","title":"New site","text":"<p>To create persistent (over updates) sites hosted by mailcow: dockerized, a new site configuration must be placed inside <code>data/conf/nginx/</code>:</p> <p>A good template to begin with:</p> <pre><code>nano data/conf/nginx/my_custom_site.conf\n</code></pre> <pre><code>server {\n ssl_certificate /etc/ssl/mail/cert.pem;\n ssl_certificate_key /etc/ssl/mail/key.pem;\n ssl_protocols TLSv1.2 TLSv1.3;\n ssl_prefer_server_ciphers on;\n ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;\n ssl_ecdh_curve X25519:X448:secp384r1:secp256k1;\n ssl_session_cache shared:SSL:50m;\n ssl_session_timeout 1d;\n ssl_session_tickets off;\n index index.php index.html;\n client_max_body_size 0;\n # Location: data/web\n root /web;\n # Location: data/web/mysite.com\n #root /web/mysite.com\n include /etc/nginx/conf.d/listen_plain.active;\n include /etc/nginx/conf.d/listen_ssl.active;\n server_name mysite.example.org;\n server_tokens off;\n\n # This allows acme to be validated even with a different web root\n location ^~ /.well-known/acme-challenge/ {\n default_type \"text/plain\";\n rewrite /.well-known/acme-challenge/(.*) /$1 break;\n root /web/.well-known/acme-challenge/;\n }\n\n if ($scheme = http) {\n return 301 https://$server_name$request_uri;\n }\n}\n</code></pre>"},{"location":"manual-guides/Nginx/u_e-nginx_custom/#new-site-with-proxy-to-a-remote-location","title":"New site with proxy to a remote location","text":"<p>Another example with a reverse proxy configuration:</p> <pre><code>nano data/conf/nginx/my_custom_site.conf\n</code></pre> <pre><code>server {\n ssl_certificate /etc/ssl/mail/cert.pem;\n ssl_certificate_key /etc/ssl/mail/key.pem;\n ssl_protocols TLSv1.2 TLSv1.3;\n ssl_prefer_server_ciphers on;\n ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;\n ssl_ecdh_curve X25519:X448:secp384r1:secp256k1;\n ssl_session_cache shared:SSL:50m;\n ssl_session_timeout 1d;\n ssl_session_tickets off;\n index index.php index.html;\n client_max_body_size 0;\n root /web;\n include /etc/nginx/conf.d/listen_plain.active;\n include /etc/nginx/conf.d/listen_ssl.active;\n server_name example.domain.tld;\n server_tokens off;\n\n location ^~ /.well-known/acme-challenge/ {\n allow all;\n default_type \"text/plain\";\n }\n\n if ($scheme = http) {\n return 301 https://$host$request_uri;\n }\n\n location / {\n proxy_pass http://service:3000/;\n proxy_set_header Host $http_host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n client_max_body_size 0;\n }\n}\n</code></pre>"},{"location":"manual-guides/Nginx/u_e-nginx_custom/#config-expansion-in-mailcows-nginx","title":"Config expansion in mailcows Nginx","text":"<p>The filename used for a new site is not important, as long as the filename carries a .conf extension.</p> <p>It is also possible to extend the configuration of the default file <code>site.conf</code> file:</p> <pre><code>nano data/conf/nginx/site.my_content.custom\n</code></pre> <p>This filename does not need to have a \".conf\" extension but follows the pattern <code>site.*.custom</code>, where <code>*</code> is a custom name.</p> <p>If PHP is to be included in a custom site, please use the PHP-FPM listener on phpfpm:9002 or create a new listener in <code>data/conf/phpfpm/php-fpm.d/pools.conf</code>.</p> <p>Restart Nginx (and PHP-FPM, if a new listener was created):</p> <pre><code>docker compose restart nginx-mailcow\ndocker compose restart php-fpm-mailcow\n</code></pre>"},{"location":"manual-guides/Nginx/u_e-nginx_webmail-site/","title":"Create subdomain webmail.example.org","text":"<p>IMPORTANT: This guide only applies to non SNI enabled configurations. The certificate path needs to be adjusted if SNI is enabled. Something like <code>ssl_certificate,key /etc/ssl/mail/webmail.example.org/cert.pem,key.pem;</code> will do. But: The certificate should be acquired first and only after the certificate exists a site config should be created. Nginx will fail to start if it cannot find the certificate and key.</p> <p>To create a subdomain <code>webmail.example.org</code> and redirect it to SOGo, you need to create a new Nginx site. Take care of \"CHANGE_TO_MAILCOW_HOSTNAME\"!</p> <p>nano data/conf/nginx/webmail.conf</p> <pre><code>server {\n ssl_certificate /etc/ssl/mail/cert.pem;\n ssl_certificate_key /etc/ssl/mail/key.pem;\n index index.php index.html;\n client_max_body_size 0;\n root /web;\n include /etc/nginx/conf.d/listen_plain.active;\n include /etc/nginx/conf.d/listen_ssl.active;\n server_name webmail.example.org;\n server_tokens off;\n location ^~ /.well-known/acme-challenge/ {\n allow all;\n default_type \"text/plain\";\n }\n\n location / {\n return 301 https://CHANGE_TO_MAILCOW_HOSTNAME/SOGo;\n }\n}\n</code></pre> <p>Save and restart Nginx: <code>docker compose restart nginx-mailcow</code>.</p> <p>Now open <code>mailcow.conf</code> and find <code>ADDITIONAL_SAN</code>. Add <code>webmail.example.org</code> to this array, don't use quotes!</p> <pre><code>ADDITIONAL_SAN=webmail.example.org\n</code></pre> <p>Run <code>docker compose up -d</code>. See \"acme-mailcow\" and \"nginx-mailcow\" logs if anything fails.</p>"},{"location":"manual-guides/Postfix/u_e-postfix-attachment_size/","title":"Max. message size (attachment size)","text":"<p>Open <code>data/conf/postfix/extra.cf</code> and set the <code>message_size_limit</code> accordingly in bytes. See <code>main.cf</code> for the default value.</p> <p>Restart Postfix:</p> <pre><code>docker compose restart postfix-mailcow\n</code></pre>"},{"location":"manual-guides/Postfix/u_e-postfix-custom_transport/","title":"Custom transport maps","text":"<p>For transport maps other than those to be configured in mailcow UI, please use <code>data/conf/postfix/custom_transport.pcre</code> to prevent existing maps or settings from being overwritten by updates.</p> <p>In most cases using this file is not necessary. Please make sure mailcow UI is not able to route your desired traffic properly before using that file.</p> <p>The file needs valid PCRE content and can break Postfix, if configured incorrectly.</p>"},{"location":"manual-guides/Postfix/u_e-postfix-disable_sender_verification/","title":"Disable Sender Addresses Verification","text":""},{"location":"manual-guides/Postfix/u_e-postfix-disable_sender_verification/#new-guide","title":"New guide","text":"<p>Edit a mailbox and select \"Allow to send as *\".</p> <p>For historical reasons we kept the old and deprecated guide below:</p>"},{"location":"manual-guides/Postfix/u_e-postfix-disable_sender_verification/#deprecated-guide-do-not-use-on-newer-mailcows","title":"Deprecated guide (DO NOT USE ON NEWER MAILCOWS!)","text":"<p>This option is not best-practice and should only be implemented when there is no other option available to achieve whatever you are trying to do.</p> <p>Simply create a file <code>data/conf/postfix/check_sasl_access</code> and enter the following content. This user must exist in your installation and needs to authenticate before sending mail. <pre><code>user-to-allow-everything@example.com OK\n</code></pre></p> <p>Open <code>data/conf/postfix/main.cf</code> and find <code>smtpd_sender_restrictions</code>. Prepend <code>check_sasl_access hash:/opt/postfix/conf/check_sasl_access</code> like this: <pre><code>smtpd_sender_restrictions = check_sasl_access hash:/opt/postfix/conf/check_sasl_access reject_authenticated_sender_login_mismatch [...]\n</code></pre></p> <p>Run postmap on check_sasl_access:</p> <pre><code>docker compose exec postfix-mailcow postmap /opt/postfix/conf/check_sasl_access\n</code></pre> <p>Restart the Postfix container.</p>"},{"location":"manual-guides/Postfix/u_e-postfix-extra_cf/","title":"Customize/Expand main.cf","text":"<p>Please create a new file <code>data/conf/postfix/extra.cf</code> for overrides or additional content to <code>main.cf</code>.</p> <p>Postfix will complain about duplicate values once after starting postfix-mailcow, this is intended.</p> <p>Syslog-ng was configured to hide those warnings while Postfix is running, to not spam the log files with unnecessary information every time a service is used.</p> <p>Restart <code>postfix-mailcow</code> to apply your changes:</p> <pre><code>docker compose restart postfix-mailcow\n</code></pre>"},{"location":"manual-guides/Postfix/u_e-postfix-pflogsumm/","title":"Statistics with pflogsumm","text":"<p>To use pflogsumm with the default logging driver, we need to query postfix-mailcow via docker logs and direct the output to pflogsumm:</p> <pre><code>docker logs --since 24h $(docker ps -qf name=postfix-mailcow) | pflogsumm\n</code></pre> <p>The above log output is limited to the last 24 hours.</p> <p>It is also possible to create a daily pflogsumm report via cron. Create the /etc/cron.d/pflogsumm file with the following content:</p> <pre><code>SHELL=/bin/bash\n59 23 * * * root docker logs --since 24h $(docker ps -qf name=postfix-mailcow) | /usr/sbin/pflogsumm -d today | mail -s \"Postfix Report of $(date)\" postmaster@example.net\n</code></pre> <p>To work, a local postfix must be installed on the server, which relays to the mailcow postfix.</p> <p>More detailed information can be found in section Post installation tasks -&gt; Local MTA on Dockerhost.</p> <p>Based on the postfix logs of the last 24 hours, this example then sends a pflogsumm report to postmaster@example.net every day at 23:59:00.</p>"},{"location":"manual-guides/Postfix/u_e-postfix-postscreen_whitelist/","title":"Whitelist IP in Postscreen","text":"<p>IPs can be removed from Postscreen and therefore also from RBL checks in <code>data/conf/postfix/custom_postscreen_whitelist.cidr</code>.</p> <p>Postscreen does multiple checks to identify malicious senders. In most cases you want to whitelist an IP to exclude it from blacklist lookups.</p> <p>The format of the file is as follows:</p> <p><code>CIDR ACTION</code></p> <p>Where CIDR is a single IP address or IP range in CIDR notation, and action is either \"permit\" or \"reject\".</p> <p>Example:</p> <pre><code># Rules are evaluated in the order as specified.\n# Blacklist 192.168.* except 192.168.0.1.\n192.168.0.1 permit\n192.168.0.0/16 reject\n</code></pre> <p>The file is reloaded on the fly, postfix restart is not required.</p>"},{"location":"manual-guides/Postfix/u_e-postfix-relayhost/","title":"Relayhosts","text":"<p>As of September 12, 2018 you can setup relayhosts as admin by using the mailcow UI.</p> <p>This is useful if you want to relay outgoing emails for a specific domain to a third-party spam filter or a service like Mailgun or Sendgrid. This is also known as a smarthost.</p>"},{"location":"manual-guides/Postfix/u_e-postfix-relayhost/#add-a-new-relayhost","title":"Add a new relayhost","text":"<p>Go to the <code>Routing</code> tab of the <code>Configuration and Details</code> section of the admin UI. Here you will see a list of relayhosts currently setup.</p> <p>Scroll to the <code>Add sender-dependent transport</code> section.</p> <p>Under <code>Host</code>, add the host you want to relay to. Example: if you want to use Mailgun to send emails instead of your server IP, enter smtp.mailgun.org</p> <p>If the relay host requires a username and password to authenticate, enter them in the respective fields. Keep in mind the credentials will be stored in plain text.</p>"},{"location":"manual-guides/Postfix/u_e-postfix-relayhost/#test-a-relayhost","title":"Test a relayhost","text":"<p>To test that connectivity to the host works, click on <code>Test</code> from the list of relayhosts and enter a From: address. Then, run the test.</p> <p>You will then see the results of the SMTP transmission. If all went well, you should see <code>SERVER -&gt; CLIENT: 250 2.0.0 Ok: queued as A093B401D4</code> as one of the last lines.</p> <p>If not, review the error provided and resolve it.</p> <p>Note: Some hosts, especially those who do not require authentication, will deny connections from servers that have not been added to their system beforehand. Make sure you read the documentation of the relayhost to make sure you've added your domain and/or the server IP to their system.</p> <p>Tip: You can change the default test To: address the test uses from null@mailcow.email to any email address you choose by modifying the $RELAY_TO variable on the vars.inc.php file under /opt/mailcow-dockerized/data/web/inc This way you can check that the relay worked by checking the destination mailbox.</p>"},{"location":"manual-guides/Postfix/u_e-postfix-relayhost/#set-the-relayhost-for-a-domain","title":"Set the relayhost for a domain","text":"<p>Go to the <code>Domains</code> tab of the <code>Mail setup</code> section of the admin UI.</p> <p>Edit the desired domain.</p> <p>Select the newly added host on the <code>Sender-dependent transports</code> dropdown and save changes.</p> <p>Send an email from a mailbox on that domain and you should see postfix handing the message over to the relayhost in the logs.</p>"},{"location":"manual-guides/Postfix/u_e-postfix-trust_networks/","title":"Add trusted networks","text":"<p>By default mailcow considers all networks as untrusted excluding its own IPV4_NETWORK and IPV6_NETWORK scopes. Though it is reasonable in most cases, there may be circumstances that you need to loosen this restriction.</p> <p>By default mailcow uses <code>mynetworks_style = subnet</code> to determine internal subnets and leaves <code>mynetworks</code> unconfigured.</p> <p>If you decide to set <code>mynetworks</code>, Postfix ignores the mynetworks_style setting. This means you have to add the IPV4_NETWORK and IPV6_NETWORK scopes as well as loopback subnets manually!</p>"},{"location":"manual-guides/Postfix/u_e-postfix-trust_networks/#unauthenticated-relaying","title":"Unauthenticated relaying","text":"<p>Warning</p> <p>Incorrect setup of <code>mynetworks</code> will allow your server to be used as an open relay. If abused, this will affect your ability to send emails and can take some time to be resolved.</p>"},{"location":"manual-guides/Postfix/u_e-postfix-trust_networks/#ipv4-hostssubnets","title":"IPv4 hosts/subnets","text":"<p>To add the subnet <code>192.168.2.0/24</code> to the trusted networks you may use the following configuration, depending on your IPV4_NETWORK and IPV6_NETWORK scopes:</p> <p>Edit <code>data/conf/postfix/extra.cf</code>:</p> <pre><code>mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 [fe80::]/10 172.22.1.0/24 [fd4d:6169:6c63:6f77::]/64 192.168.2.0/24\n</code></pre> <p>Run <code>docker compose restart postfix-mailcow</code> to apply your new settings.</p>"},{"location":"manual-guides/Postfix/u_e-postfix-trust_networks/#ipv6-hostssubnets","title":"IPv6 hosts/subnets","text":"<p>Adding IPv6 hosts is done the same as IPv4, however the subnet needs to be placed in brackets <code>[]</code> with the netmask appended.</p> <p>To add the subnet 2001:db8::/32 to the trusted networks you may use the following configuration, depending on your IPV4_NETWORK and IPV6_NETWORK scopes:</p> <p>Edit <code>data/conf/postfix/extra.cf</code>:</p> <pre><code>mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 [fe80::]/10 172.22.1.0/24 [fd4d:6169:6c63:6f77::]/64 [2001:db8::]/32\n</code></pre> <p>Run <code>docker compose restart postfix-mailcow</code> to apply your new settings.</p> <p>Info</p> <p>More information about mynetworks can be found in the Postfix documentation.</p>"},{"location":"manual-guides/Redis/u_e-redis/","title":"Redis","text":"<p>Redis is used as a key-value store for rspamd's and (some of) mailcow's settings and data. If you are unfamiliar with redis please read the introduction to redis and maybe visit this wonderful guide on how to use it.</p>"},{"location":"manual-guides/Redis/u_e-redis/#client","title":"Client","text":"<p>To connect to the redis cli execute:</p> <pre><code>docker compose exec redis-mailcow redis-cli\n</code></pre>"},{"location":"manual-guides/Redis/u_e-redis/#debugging","title":"Debugging","text":"<p>Here are some useful commands for the redis-cli for debugging:</p>"},{"location":"manual-guides/Redis/u_e-redis/#monitor","title":"MONITOR","text":"<p>Listens for all requests received by the server in real time:</p> <pre><code># docker compose exec redis-mailcow redis-cli\n127.0.0.1:6379&gt; monitor\nOK\n1494077286.401963 [0 172.22.1.253:41228] \"SMEMBERS\" \"BAYES_SPAM_keys\"\n1494077288.292970 [0 172.22.1.253:41229] \"SMEMBERS\" \"BAYES_SPAM_keys\"\n[...]\n</code></pre>"},{"location":"manual-guides/Redis/u_e-redis/#keys","title":"KEYS","text":"<p>Get all keys matching your pattern:</p> <pre><code>KEYS *\n</code></pre>"},{"location":"manual-guides/Redis/u_e-redis/#ping","title":"PING","text":"<p>Test a connection:</p> <pre><code>127.0.0.1:6379&gt; PING\nPONG\n</code></pre> <p>If you want to know more, here is a cheat sheet.</p>"},{"location":"manual-guides/Rspamd/u_e-rspamd/","title":"Rspamd","text":"<p>Rspamd is used for AV handling, DKIM signing and SPAM handling. It's a powerful and fast filter system. For a more in-depth documentation on Rspamd please visit its own documentation.</p>"},{"location":"manual-guides/Rspamd/u_e-rspamd/#learn-spam-ham","title":"Learn Spam &amp; Ham","text":"<p>Rspamd learns mail as spam or ham when you move a message in or out of the junk folder to any mailbox besides trash. This is achieved by using the Sieve plugin \"sieve_imapsieve\" and parser scripts.</p> <p>Rspamd also auto-learns mail when a high or low score is detected (see https://rspamd.com/doc/configuration/statistic.html#autolearning). We configured the plugin to keep a sane ratio between spam and ham learns.</p> <p>The bayes statistics are written to Redis as keys <code>BAYES_HAM</code> and <code>BAYES_SPAM</code>.</p> <p>Besides bayes, a local fuzzy storage is used to learn recurring patterns in text or images that indicate ham or spam.</p> <p>You can also use Rspamd's web UI to learn ham and / or spam or to adjust certain settings of Rspamd.</p>"},{"location":"manual-guides/Rspamd/u_e-rspamd/#learn-spam-or-ham-from-existing-directory","title":"Learn Spam or Ham from existing directory","text":"<p>You can use a one-liner to learn mail in plain-text (uncompressed) format:</p> <pre><code># Ham\nfor file in /my/folder/cur/*; do docker exec -i $(docker compose ps -q rspamd-mailcow) rspamc learn_ham &lt; $file; done\n# Spam\nfor file in /my/folder/.Junk/cur/*; do docker exec -i $(docker compose ps -q rspamd-mailcow) rspamc learn_spam &lt; $file; done\n</code></pre> <p>Consider attaching a local folder as new volume to <code>rspamd-mailcow</code> in <code>docker-compose.yml</code> and learn given files inside the container. This can be used as workaround to parse compressed data with zcat. Example:</p> <pre><code>for file in /data/old_mail/.Junk/cur/*; do rspamc learn_spam &lt; zcat $file; done\n</code></pre>"},{"location":"manual-guides/Rspamd/u_e-rspamd/#reset-learned-data-bayes-neural","title":"Reset learned data (Bayes, Neural)","text":"<p>You need to delete keys in Redis to reset learned data, so create a copy of your Redis database now:</p> <p>Backup database</p> <pre><code># It is better to stop Redis before you copy the file.\ncp /var/lib/docker/volumes/mailcowdockerized_redis-vol-1/_data/dump.rdb /root/\n</code></pre> <p>Reset Bayes data</p> <pre><code>docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern BAYES_* | xargs redis-cli del'\ndocker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern RS* | xargs redis-cli del'\n</code></pre> <p>Reset Neural data</p> <pre><code>docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern rn_* | xargs redis-cli del'\n</code></pre> <p>Reset Fuzzy data</p> <pre><code># We need to enter the redis-cli first:\ndocker compose exec redis-mailcow redis-cli\n# In redis-cli:\n127.0.0.1:6379&gt; EVAL \"for i, name in ipairs(redis.call('KEYS', ARGV[1])) do redis.call('DEL', name); end\" 0 fuzzy*\n</code></pre> <p>Info</p> <p>If redis-cli complains about...</p> <pre><code>(error) ERR wrong number of arguments for 'del' command\n</code></pre> <p>...the key pattern was not found and thus no data is available to delete - it is fine.</p>"},{"location":"manual-guides/Rspamd/u_e-rspamd/#cli-tools","title":"CLI tools","text":"<pre><code>docker compose exec rspamd-mailcow rspamc --help\ndocker compose exec rspamd-mailcow rspamadm --help\n</code></pre>"},{"location":"manual-guides/Rspamd/u_e-rspamd/#disable-greylisting","title":"Disable Greylisting","text":"<p>Only messages with a higher score will be considered to be greylisted (soft rejected). It is bad practice to disable greylisting.</p> <p>You can disable greylisting server-wide by editing:</p> <p><code>{mailcow-dir}/data/conf/rspamd/local.d/greylist.conf</code></p> <p>Add the line:</p> <pre><code>enabled = false;\n</code></pre> <p>Save the file and restart \"rspamd-mailcow\": <code>docker compose restart rspamd-mailcow</code></p>"},{"location":"manual-guides/Rspamd/u_e-rspamd/#spam-filter-thresholds-global","title":"Spam filter thresholds (global)","text":"<p>Each user is able to change their spam rating individually. To define a new server-wide limit, edit <code>data/conf/rspamd/local.d/actions.conf</code>:</p> <pre><code>reject = 15;\nadd_header = 8;\ngreylist = 7;\n</code></pre> <p>Save the file and restart \"rspamd-mailcow\": <code>docker compose restart rspamd-mailcow</code></p> <p>Existing settings of users will not be overwritten!</p> <p>To reset custom defined thresholds, run:</p> <pre><code>source mailcow.conf\ndocker compose exec mysql-mailcow mysql -umailcow -p$DBPASS mailcow -e \"delete from filterconf where option = 'highspamlevel' or option = 'lowspamlevel';\"\n# or:\n# docker compose exec mysql-mailcow mysql -umailcow -p$DBPASS mailcow -e \"delete from filterconf where option = 'highspamlevel' or option = 'lowspamlevel' and object = 'only-this-mailbox@example.org';\"\n</code></pre>"},{"location":"manual-guides/Rspamd/u_e-rspamd/#custom-reject-messages","title":"Custom reject messages","text":"<p>The default spam reject message can be changed by adding a new file <code>data/conf/rspamd/override.d/worker-proxy.custom.inc</code> with the following content:</p> <pre><code>reject_message = \"My custom reject message\";\n</code></pre> <p>Save the file and restart Rspamd: <code>docker compose restart rspamd-mailcow</code>.</p> <p>While the above works for rejected mails with a high spam score, prefilter reject actions will ignore this setting. For these maps, the multimap module in Rspamd needs to be adjusted:</p> <ol> <li> <p>Find prefilet reject symbol for which you want change message, to do it run: <code>grep -R \"SYMBOL_YOU_WANT_TO_ADJUST\" /opt/mailcow-dockerized/data/conf/rspamd/</code></p> </li> <li> <p>Add your custom message as new line:</p> </li> </ol> <pre><code>GLOBAL_RCPT_BL {\n type = \"rcpt\";\n map = \"${LOCAL_CONFDIR}/custom/global_rcpt_blacklist.map\";\n regexp = true;\n prefilter = true;\n action = \"reject\";\n message = \"Sending mail to this recipient is prohibited by postmaster@your.domain\";\n}\n</code></pre> <ol> <li>Save the file and restart Rspamd: <code>docker compose restart rspamd-mailcow</code>.</li> </ol>"},{"location":"manual-guides/Rspamd/u_e-rspamd/#discard-instead-of-reject","title":"Discard instead of reject","text":"<p>If you want to silently drop a message, create or edit the file <code>data/conf/rspamd/override.d/worker-proxy.custom.inc</code> and add the following content:</p> <pre><code>discard_on_reject = true;\n</code></pre> <p>Restart Rspamd:</p> <pre><code>docker compose restart rspamd-mailcow\n</code></pre>"},{"location":"manual-guides/Rspamd/u_e-rspamd/#wipe-all-ratelimit-keys","title":"Wipe all ratelimit keys","text":"<p>If you don't want to use the UI and instead wipe all keys in the Redis database, you can use redis-cli for that task:</p> <pre><code>docker compose exec redis-mailcow sh\n# Unlink (available in Redis &gt;=4.) will delete in the backgronud\nredis-cli --scan --pattern RL* | xargs redis-cli unlink\n</code></pre> <p>Restart Rspamd:</p> <pre><code>docker compose restart rspamd-mailcow\n</code></pre>"},{"location":"manual-guides/Rspamd/u_e-rspamd/#trigger-a-resend-of-quarantine-notifications","title":"Trigger a resend of quarantine notifications","text":"<p>Should be used for debugging only!</p> <pre><code>docker compose exec dovecot-mailcow bash\nmysql -umailcow -p$DBPASS mailcow -e \"update quarantine set notified = 0;\"\nredis-cli -h redis DEL Q_LAST_NOTIFIED\nquarantine_notify.py\n</code></pre>"},{"location":"manual-guides/Rspamd/u_e-rspamd/#increase-history-retention","title":"Increase history retention","text":"<p>By default Rspamd keeps 1000 elements in the history.</p> <p>The history is stored compressed.</p> <p>It is recommended not to use a disproportionate high value here, try something along 5000 or 10000 and see how your server handles it:</p> <p>Edit <code>data/conf/rspamd/local.d/history_redis.conf</code>:</p> <pre><code>nrows = 1000; # change this value\n</code></pre> <p>Restart Rspamd afterwards: <code>docker compose restart rspamd-mailcow</code></p>"},{"location":"manual-guides/SOGo/u_e-sogo/","title":"SOGo","text":"<p>SOGo is used for accessing your mails via a webbrowser, adding and sharing your contacts or calendars. For a more in-depth documentation on SOGo please visit its own documentation.</p>"},{"location":"manual-guides/SOGo/u_e-sogo/#apply-custom-sogo-theme","title":"Apply custom SOGo theme","text":"<p>mailcow builds after 28 January 2021 can change SOGo's theme by editing <code>data/conf/sogo/custom-theme.js</code>. Please check the AngularJS Material intro and documentation as well as the material style guideline to learn how this works. </p> <p>You can use the provided <code>custom-theme.js</code> as an example starting point by removing the comments. After you modified <code>data/conf/sogo/custom-theme.js</code> and made changes to your new SOGo theme you need to </p> <ol> <li>edit <code>data/conf/sogo/sogo.conf</code> and append/set <code>SOGoUIxDebugEnabled = YES;</code></li> <li>restart SOGo and Memcached containers by executing <code>docker compose restart memcached-mailcow sogo-mailcow</code>.</li> <li>open SOGo in browser</li> <li>open browser developer console, usually shortcut is F12</li> <li>only if you use Firefox: write by hands in dev console <code>allow pasting</code> and press enter</li> <li>paste java script snipet in dev console: <pre><code>copy([].slice.call(document.styleSheets)\n .map(e =&gt; e.ownerNode)\n .filter(e =&gt; e.hasAttribute('md-theme-style'))\n .map(e =&gt; e.textContent)\n .join('\\n')\n)\n</code></pre></li> <li>open text editor and paste data from clipboard (Ctrl+V), you should get minified CSS, save it</li> <li>copy CSS file to mailcow server <code>data/conf/sogo/custom-theme.css</code></li> <li>edit <code>data/conf/sogo/sogo.conf</code> and set <code>SOGoUIxDebugEnabled = NO;</code></li> <li>append/create <code>docker-compose.override.yml</code> with: <pre><code>version: '2.1'\n\nservices:\n sogo-mailcow:\n volumes:\n - ./data/conf/sogo/custom-theme.css:/usr/lib/GNUstep/SOGo/WebServerResources/css/theme-default.css:z\n</code></pre></li> <li>run <code>docker compose up -d</code></li> <li>run <code>docker compose restart memcached-mailcow</code></li> </ol>"},{"location":"manual-guides/SOGo/u_e-sogo/#reset-to-sogo-default-theme","title":"Reset to SOGo default theme","text":"<ol> <li>checkout <code>data/conf/sogo/custom-theme.js</code> by executing <code>git fetch ; git checkout origin/master data/conf/sogo/custom-theme.js data/conf/sogo/custom-theme.js</code></li> <li>find in <code>data/conf/sogo/custom-theme.js</code>: <pre><code>// Apply new palettes to the default theme, remap some of the hues\n $mdThemingProvider.theme('default')\n .primaryPalette('green-cow', {\n 'default': '400', // background color of top toolbars\n 'hue-1': '400',\n 'hue-2': '600', // background color of sidebar toolbar\n 'hue-3': 'A700'\n })\n .accentPalette('green', {\n 'default': '600', // background color of fab buttons and login screen\n 'hue-1': '300', // background color of center list toolbar\n 'hue-2': '300', // highlight color for selected mail and current day calendar\n 'hue-3': 'A700'\n })\n .backgroundPalette('frost-grey');\n</code></pre> and replace it with: <pre><code> $mdThemingProvider.theme('default');\n</code></pre></li> <li>remove from <code>docker-compose.override.yml</code> volume mount in <code>sogo-mailcow</code>: <pre><code>- ./data/conf/sogo/custom-theme.css:/usr/lib/GNUstep/SOGo/WebServerResources/css/theme-default.css:z\n</code></pre></li> <li>run <code>docker compose up -d</code></li> <li>run <code>docker compose restart memcached-mailcow</code></li> </ol>"},{"location":"manual-guides/SOGo/u_e-sogo/#change-favicon","title":"Change favicon","text":"<p>mailcow builds after 31 January 2021 can change SOGo's favicon by replacing <code>data/conf/sogo/custom-favicon.ico</code> for SOGo and <code>data/web/favicon.png</code> for mailcow UI. Note: You can use <code>.png</code> favicons for SOGo by renaming them to <code>custom-favicon.ico</code>. For both SOGo and mailcow UI favicons you need use one of the standard dimensions: 16x16, 32x32, 64x64, 128x128 and 256x256. After you replaced said file you need to restart SOGo and Memcached containers by executing <code>docker compose restart memcached-mailcow sogo-mailcow</code>.</p>"},{"location":"manual-guides/SOGo/u_e-sogo/#change-logo","title":"Change logo","text":"<p>mailcow builds after 21 December 2018 can change SOGo's logo by replacing or creating (if missing) <code>data/conf/sogo/sogo-full.svg</code>. After you replaced said file you need to restart SOGo and Memcached containers by executing <code>docker compose restart memcached-mailcow sogo-mailcow</code>.</p>"},{"location":"manual-guides/SOGo/u_e-sogo/#connect-domains","title":"Connect domains","text":"<p>Domains are usually isolated from eachother.</p> <p>You can change that by modifying <code>data/conf/sogo/sogo.conf</code>:</p> <p>Search... <pre><code> // SOGoDomainsVisibility = (\n // (domain1.tld, domain5.tld),\n // (domain3.tld, domain2.tld)\n // );\n</code></pre> ...and replace it by - for example:</p> <pre><code> SOGoDomainsVisibility = (\n (example.org, example.com, example.net)\n );\n</code></pre> <p>Restart SOGo: <code>docker compose restart sogo-mailcow</code></p>"},{"location":"manual-guides/SOGo/u_e-sogo/#disable-password-changing","title":"Disable password changing","text":"<p>Edit <code>data/conf/sogo/sogo.conf</code> and change <code>SOGoPasswordChangeEnabled</code> to <code>NO</code>. Please do not add a new parameter.</p> <p>Run <code>docker compose restart memcached-mailcow sogo-mailcow</code> to activate the changes.</p>"},{"location":"manual-guides/SOGo/u_e-sogo/#reset-totp-disable-totp","title":"Reset TOTP / Disable TOTP","text":"<p>Run <code>docker compose exec -u sogo sogo-mailcow sogo-tool user-preferences set defaults user@example.com SOGoTOTPEnabled '{\"SOGoTOTPEnabled\":0}'</code> from within the mailcow directory.</p>"},{"location":"manual-guides/Unbound/u_e-unbound-fwd/","title":"Using an external DNS service","text":"<p>If you want or have to use an external DNS service, you can either set a forwarder in Unbound or copy an override file to define external DNS servers:</p> <p>Warning</p> <p>Please do not use a public resolver like we did in the example above. Many - if not all - blacklist lookups will fail with public resolvers, because blacklist server has limits on how much requests can be done from one IP and public resolvers usually reach this limits. Important: Only DNSSEC validating DNS services will work.</p>"},{"location":"manual-guides/Unbound/u_e-unbound-fwd/#method-a-unbound","title":"Method A, Unbound","text":"<p>Edit <code>data/conf/unbound/unbound.conf</code> and append the following parameters:</p> <pre><code>forward-zone:\n name: \".\"\n forward-addr: 8.8.8.8 # DO NOT USE PUBLIC DNS SERVERS - JUST AN EXAMPLE\n forward-addr: 8.8.4.4 # DO NOT USE PUBLIC DNS SERVERS - JUST AN EXAMPLE\n</code></pre> <p>Restart Unbound:</p> <pre><code>docker compose restart unbound-mailcow\n</code></pre>"},{"location":"manual-guides/Unbound/u_e-unbound-fwd/#method-b-override-file","title":"Method B, Override file","text":"<pre><code>cd /opt/mailcow-dockerized\ncp helper-scripts/docker-compose.override.yml.d/EXTERNAL_DNS/docker-compose.override.yml .\n</code></pre> <p>Edit <code>docker-compose.override.yml</code> and adjust the IP.</p> <p>Run <code>docker compose down ; docker compose up -d</code>.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/","title":"Thresholds","text":"<p>Watchdog uses default values for all thresholds defined in <code>docker-compose.yml</code>.</p> <p>The default values will work for most setups. Example: <pre><code>- NGINX_THRESHOLD=${NGINX_THRESHOLD:-5}\n- UNBOUND_THRESHOLD=${UNBOUND_THRESHOLD:-5}\n- REDIS_THRESHOLD=${REDIS_THRESHOLD:-5}\n- MYSQL_THRESHOLD=${MYSQL_THRESHOLD:-5}\n- MYSQL_REPLICATION_THRESHOLD=${MYSQL_REPLICATION_THRESHOLD:-1}\n- SOGO_THRESHOLD=${SOGO_THRESHOLD:-3}\n- POSTFIX_THRESHOLD=${POSTFIX_THRESHOLD:-8}\n- CLAMD_THRESHOLD=${CLAMD_THRESHOLD:-15}\n- DOVECOT_THRESHOLD=${DOVECOT_THRESHOLD:-12}\n- DOVECOT_REPL_THRESHOLD=${DOVECOT_REPL_THRESHOLD:-20}\n- PHPFPM_THRESHOLD=${PHPFPM_THRESHOLD:-5}\n- RATELIMIT_THRESHOLD=${RATELIMIT_THRESHOLD:-1}\n- FAIL2BAN_THRESHOLD=${FAIL2BAN_THRESHOLD:-1}\n- ACME_THRESHOLD=${ACME_THRESHOLD:-1}\n- RSPAMD_THRESHOLD=${RSPAMD_THRESHOLD:-5}\n- OLEFY_THRESHOLD=${OLEFY_THRESHOLD:-5}\n- MAILQ_THRESHOLD=${MAILQ_THRESHOLD:-20}\n- MAILQ_CRIT=${MAILQ_CRIT:-30}\n</code></pre></p> <p>To adjust them just add necessary threshold variables (e.g. <code>MAILQ_THRESHOLD=10</code>) to <code>mailcow.conf</code> and run <code>docker compose up -d</code>.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#thresholds-descriptions","title":"Thresholds descriptions","text":""},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#nginx_threshold","title":"NGINX_THRESHOLD","text":"<p>Notifies administrators if watchdog can not establish a connection to Nginx on port 8081 and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#unbound_threshold","title":"UNBOUND_THRESHOLD","text":"<p>Notifies administrators if Unbound can not resolve/valide external domains/DNSSEC and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#redis_threshold","title":"REDIS_THRESHOLD","text":"<p>Notifies administrators if watchdog can not establish a connection to Redis on port 6379 and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#mysql_threshold","title":"MYSQL_THRESHOLD","text":"<p>Notifies administrators if watchdog can not establish a connection to MySQL or can not query a table and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#mysql_replication_threshold","title":"MYSQL_REPLICATION_THRESHOLD","text":"<p>Notifies administrators if the MySQL replication fails.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#sogo_threshold","title":"SOGO_THRESHOLD","text":"<p>Notifies administrators if watchdog can not establish a connection to SOGo on port 20000 and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#postfix_threshold","title":"POSTFIX_THRESHOLD","text":"<p>Notifies administrators if watchdog can not sent a test mail via port 589 and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#clamd_threshold","title":"CLAMD_THRESHOLD","text":"<p>Notifies administrators if watchdog can not establish a connection to Clamd and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#dovecot_threshold","title":"DOVECOT_THRESHOLD","text":"<p>Notifies administrators if watchdog fails with various tests with Dovecot container and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#dovecot_repl_threshold","title":"DOVECOT_REPL_THRESHOLD","text":"<p>Notifies administrators if the Dovecot replication fails.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#phpfpm_threshold","title":"PHPFPM_THRESHOLD","text":"<p>Notifies administrators if watchdog can not establish a connection to PHP-FPM on port 9001/9002 and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#ratelimit_threshold","title":"RATELIMIT_THRESHOLD","text":"<p>Notifies administrators if a ratelimit got hit.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#fail2ban_threshold","title":"FAIL2BAN_THRESHOLD","text":"<p>Notifies administrators if a fail2ban banned an IP.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#acme_threshold","title":"ACME_THRESHOLD","text":"<p>Notifies administrators if something is wrong with the acme-mailcow container. You may check its logs.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#rspamd_threshold","title":"RSPAMD_THRESHOLD","text":"<p>Notifies administrators if watchdog fails with various tests with Rspamd container and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#olefy_threshold","title":"OLEFY_THRESHOLD","text":"<p>Notifies administrators if watchdog can not establish a connection to olefy on port 10005 and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"manual-guides/Watchdog/u_e-watchdog-thresholds/#mailq_crit-and-mailq_threshold","title":"MAILQ_CRIT and MAILQ_THRESHOLD","text":"<p>Notifies administrators if number of emails in the postfix queue is greater then <code>MAILQ_CRIT</code> for period of <code>MAILQ_THRESHOLD * (60\u00b130)</code> seconds.</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-bl_wl/","title":"Blacklist / Whitelist","text":"<p>To add or edit an entry to your domain-wide filter table, log in to your mailcow UI as (domain) administrator and go to: <code>Configuration &gt; Email Setup &gt; Domains &gt; Edit Domain &gt; Spam Filter</code>.</p> <p>Info</p> <p>Be aware that a user can override this setting by setting their own blacklist and whitelist!</p> <p>There is also a global filter table in <code>Configuration &gt; Configuration &amp; Details &gt; Global filter maps</code> to configure a server wide filter for multiple regex maps (todo: screenshots).</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-config/","title":"Configuration","text":"<p>Several configuration parameters of the mailcow UI can be changed by creating a file <code>data/web/inc/vars.local.inc.php</code> which overrides defaults settings found in <code>data/web/inc/vars.inc.php</code>.</p> <p>The local configuration file is persistent over updates of mailcow. Try not to change values inside <code>data/web/inc/vars.inc.php</code>, but use them as template for the local override.</p> <p>mailcow UI configuration parameters can be used to...</p> <ul> <li>...change the default language1</li> <li>...change the default bootstrap theme</li> <li>...set a password complexity regex</li> <li>...enable DKIM private key visibility</li> <li>...set a pagination trigger size</li> <li>...set default mailbox attributes</li> <li>...change session lifetimes</li> <li>...create fixed app menus (which cannot be changed in mailcow UI)</li> <li>...set a default \"To\" field for relayhost tests</li> <li>...set a timeout for Docker API requests</li> <li>...toggle IP anonymization</li> </ul> <ol> <li> <p>To change SOGos default language, you will need to edit <code>data/conf/sogo/sogo.conf</code> and replace \"English\" by your preferred language.\u00a0\u21a9</p> </li> </ol>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-css/","title":"CSS overrides","text":"<p>For custom overrides of specific elements via CSS, use <code>data/web/css/build/0081-custom-mailcow.css</code>.</p> <p>The file is excluded from tracking and persists over updates.</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-fido/","title":"WebAuthn / FIDO2","text":""},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-fido/#how-is-uv-handled-in-mailcow","title":"How is UV handled in mailcow?","text":"<p>The UV flag (as in \"user verification\") enforces WebAuthn to verify the user before it allows access to the key (think of a PIN). We don't enforce UV to allow logins via iOS and NFC (YubiKey).</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-fido/#login-and-key-processing","title":"Login and key processing","text":"<p>mailcow uses client-side key processing. We ask the authenticator (i.e. YubiKey) to save the registration in its memory.</p> <p>A user does not need to enter a username. The available credentials - if any - will be shown to the user when selecting the \"key login\" via mailcow UI login.</p> <p>When calling the login process, the authenticator is not given any credential IDs. This will force it to lookup credentials in its own memory.</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-fido/#who-can-use-webauthn-to-login-to-mailcow","title":"Who can use WebAuthn to login to mailcow?","text":"<p>As of today, only administrators and domain administrators are able to setup WebAuthn/FIDO2.</p> <p>You want to use WebAuthn/Fido as 2FA? Check it out here: Two-Factor Authentication</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-netfilter/","title":"Netfilter","text":""},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-netfilter/#change-netfilter-ban-settings","title":"Change Netfilter Ban Settings","text":"<p>To change the Netfilter settings in general please navigate to: <code>Configuration -&gt; Configuration &amp; Details -&gt; Configuration -&gt; Fail2ban parameters</code>.</p> <p>You should now see a familar interface:</p> <p>Here you can set several options regarding the bans itself. For example the max. Ban time or the max. attempts before a ban is executed.</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-netfilter/#change-netfilter-regex","title":"Change Netfilter Regex","text":"<p>Danger</p> <p>The following area requires at least basic regex knowledge. If you are not sure what you are doing there, we can only advise you not to attempt a reconfiguration.</p> <p>In addition to the ban settings, you can also define what exactly should be used from the mailcow container logs to ban a possible attacker.</p> <p>To do this, you must first expand the regex field, which will look something like this:</p> <p>There you can now create various new filter rules.</p> <p>Info</p> <p>As updates progress, it is possible that new Netfilter regex rules will be added or removed. If this is the case, it is recommended to reset the Netfilter regex rules by clicking on <code>Reset to default</code>.</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-pushover/","title":"Pushover","text":"<p>Info</p> <p>Pushover makes it easy to get real-time notifications on your Android, iPhone, iPad, and Desktop</p> <p>You can use Pushover to get a push notification on every mail you receive for each mailbox where you enabled this feature.</p> <p>1. As admin open your mailbox' settings and scroll down to the Pushover settings</p> <p>2. Register yourself on Pushover</p> <p>3. Put your 'User Key' in the 'User/Group Key' field in your mailbox settings</p> <p>4. Create an Applications to get the API Token/Key which you also need to put in your mailbox settings</p> <p>5. Optional you can edit the notification title/text and define certain sender email addresses where a push notification is triggered</p> <p>6. Save everything and then you can verify your credentials</p> <p>If everything is done you can test sending a mail and you will receive a push message on your phone</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-spamalias/","title":"Temporary email aliases","text":"<p>These temporary email aliases are mostly used for places where we need to provide an email address but don't want future correspondence with. They are also called spam alias.</p> <p>To create, delete or extend a temporary email aliases you need to login to mailcow's UI as a mailbox user and navigate to the tab Temporary email aliases:</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-spamfilter/","title":"Spamfilter","text":"<p>A mailbox user may adjust the spam filter and black- / whitelist settings for his mailbox individually by navigating to the Spam filter tab in the users mailcow UI.</p> <p>Info</p> <p>For global adjustments on your spam filter please check our section on Rspamd. For a domain wide black- and whitelist please check our guide on Black / Whitelist</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-sub_addressing/","title":"Sub-addressing","text":"<p>Mailbox users can tag their mail address like in <code>me+facebook@example.org</code>. They can control the tag handling in the users mailcow UI panel under <code>Mailbox &gt; Settings</code>. </p> <p><code>sub-addressing</code> (RFC 5233) or <code>plus addressing</code> also known as tagging (do not mix with Tags)</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-sub_addressing/#available-actions","title":"Available Actions","text":"<p>1. Move this message to a sub folder \"facebook\" (will be created lower case if not existing)</p> <p>2. Prepend the tag to the subject: \"[facebook] Subject\"</p> <p>Please note: Uppercase tags are converted to lowercase except for the first letter. If you want to keep the tag as it is, please apply the following diff and restart mailcow: <pre><code>diff --git a/data/conf/dovecot/global_sieve_after b/data/conf/dovecot/global_sieve_after\nindex e047136e..933c4137 100644\n--- a/data/conf/dovecot/global_sieve_after\n+++ b/data/conf/dovecot/global_sieve_after\n@@ -15,7 +15,7 @@ if allof (\n envelope :detail :matches \"to\" \"*\",\n header :contains \"X-Moo-Tag\" \"YES\"\n ) {\n- set :lower :upperfirst \"tag\" \"${1}\";\n+ set \"tag\" \"${1}\";\n if mailboxexists \"INBOX/${1}\" {\n fileinto \"INBOX/${1}\";\n } else {\n</code></pre></p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-tags/","title":"Tags (for Domains and Mailboxes)","text":"<p>Info</p> <p>You need the mailcow Version 2022-05 at least for this feature. If you don\u00b4t have the Version installed please consider a update. For more informations about a mailcow update please take a look at the Update section here in the docs.</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-tags/#what-are-tags-designed-for","title":"What are Tags designed for?","text":"<p>With the Tags you can easily sort your Domains and Mailboxes by the tags instead of their name.</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-tags/#where-are-the-tags-located","title":"Where are the Tags located?","text":"<p>The Tags are located in the Domain/Mailbox section of the mailcow UI. To view them simply click on the small plus symbol on the left of your Domain/Mailbox (following picture is showing the domain ribbon menu): </p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-tags/#how-can-i-addremove-a-tag","title":"How can i add/remove a Tag?","text":"<p>You can simply add/remove a Tag during the creation of a new Domain/Mailbox. You also can add/remove them if you edit your desired Domain/Mailbox.</p> <p>It looks similar to this (following picture showing the domain edit section):</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-tags/#how-can-i-search-for-a-tag","title":"How can i search for a tag?","text":"<p>Simply type the Tag Name in the search bar in the Domain/Mailbox Section and wait for it to complete.</p> <p>You can even specify if you want to search for tags only.</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/","title":"Two-Factor Authentication","text":"<p>So far three methods for Two-Factor Authentication are implemented: WebAuthn (replacing U2F since February 2022), Yubi OTP, and TOTP</p> <ul> <li>For WebAuthn to work, you need an encrypted connection to the server (HTTPS) as well as a FIDO security key.</li> <li>Both WebAuthn and Yubi OTP work well with the fantastic Yubikey.</li> <li>While Yubi OTP needs an active internet connection and an API ID + key, WebAuthn will work with any Fido Security Key out of the box, but can only be used when mailcow is accessed over HTTPS.</li> <li>WebAuthn and Yubi OTP support multiple keys per user.</li> <li>As the third TFA method mailcow uses TOTP: time-based one-time passwords. Those passwords can be generated with apps like \"Google Authenticator\" after initially scanning a QR code or entering the given secret manually.</li> </ul> <p>As administrator you are able to temporary disable a domain administrators TFA login until they successfully logged in.</p> <p>The key used to login will be displayed in green, while other keys remain grey.</p> <p>Information on how to remove 2FA can be found here.</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#yubi-otp","title":"Yubi OTP","text":"<p>The Yubi API ID and Key will be checked against the Yubico Cloud API. When setting up TFA you will be asked for your personal API account for this key. The API ID, API key and the first 12 characters (your YubiKeys ID in modhex) are stored in the MySQL table as secret.</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#example-setup","title":"Example setup","text":"<p>First of all, the YubiKey must be configured for use as an OTP Generator. To do this, download the <code>YubiKey Manager</code> from the Yubico website: here</p> <p>In the following you configure the YubiKey for OTP. Via the menu item <code>Applications</code> -&gt; <code>OTP</code> and a click on the <code>Configure</code> button. In the following menu select <code>Credential Type</code> -&gt; <code>Yubico OTP</code> and click on <code>Next</code>.</p> <p>Set a checkmark in the <code>Use serial</code> checkbox, generate a <code>Private ID</code> and a <code>Secret key</code> via the buttons. So that the YubiKey can be validated later, the checkmark in the <code>Upload</code> checkbox must also be set and then click on <code>Finish</code>.</p> <p>Now a new browser window will open in which you have to enter an OTP of your YubiKey at the bottom of the form (click on the field and then tap on your YubiKey). Confirm the captcha and upload the information to the Yubico server by clicking 'Upload'. The processing of the data will take a moment.</p> <p>After the generation was successful, you will be shown a <code>Client ID</code> and a <code>Secret key</code>, make a note of this information in a safe place.</p> <p>Now you can select <code>Yubico OTP authentication</code> from the dropdown menu in the mailcow UI on the start page under <code>Access</code> -&gt; <code>Two-factor authentication</code>. In the dialog that opened now you can enter a name for this YubiKey and insert the <code>Client ID</code> you noted before as well as the <code>Secret key</code> into the fields provided. Finally, enter your current account password and, after selecting the <code>Touch Yubikey</code> field, touch your YubiKey button.</p> <p>Congratulations! You can now log in to the mailcow UI using your YubiKey!</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#webauthn-u2f-replacement","title":"WebAuthn (U2F, replacement)","text":"<p>Warning</p> <p>Since February 2022 Google Chrome has discarded support for U2F and standardized the use of WebAuthn. The WebAuthn (U2F removal) is part of mailcow since 21th January 2022, so if you want to use the Key past February 2022 please consider a update with the <code>update.sh</code> </p> <p>To use WebAuthn, the browser must support this standard.</p> <p>The following desktop browsers support this authentication type:</p> <ul> <li>Edge (&gt;=18)</li> <li>Firefox (&gt;=60)</li> <li>Chrome (&gt;=67)</li> <li>Safari (&gt;=13)</li> <li>Opera (&gt;=54)</li> </ul> <p>The following mobile browsers support this authentication type:</p> <ul> <li>Safari on iOS (&gt;=14.5)</li> <li>Android Browser (&gt;=97)</li> <li>Opera Mobile (&gt;=64)</li> <li>Chrome for Android (&gt;=97)</li> </ul> <p>Sources: caniuse.com, blog.mozilla.org</p> <p>WebAuthn works without an internet connection.</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#what-will-happen-to-my-registered-fido-security-key-after-the-update-from-u2f-to-webauthn","title":"What will happen to my registered Fido Security Key after the Update from U2F to WebAuthn?","text":"<p>Warning</p> <p>With this new U2F replacement (WebAuthn) you have to re-register your Fido Security Key, thankfully WebAuthn is backwards compatible and supports the U2F protocol.</p> <p>Ideally, the next time you log in (with the key), you should get a text box saying that your Fido Security Key has been removed due to the update to WebAuthn and deleted as a 2-factor authenticator.</p> <p>But don't worry! You can simply re-register your existing key and use it as usual, you probably won't even notice a difference, except that your browser won't show the U2F deactivation message anymore.</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#disable-unofficial-supported-fido-security-keys","title":"Disable unofficial supported Fido Security Keys","text":"<p>With WebAuthn there is the possibility to use only official Fido Security Keys (from the big brands like: Yubico, Apple, Nitro, Google, Huawei, Microsoft, etc.).</p> <p>This is primarily for security purposes, as it allows administrators to ensure that only official hardware can be used in their environment.</p> <p>To enable this feature, change the value <code>WEBAUTHN_ONLY_TRUSTED_VENDORS</code> in mailcow.conf from <code>n</code> to <code>y</code> and restart the affected containers with <code>docker compose up -d</code>.</p> <p>The mailcow will now use the Vendor Certificates located in your mailcow directory under <code>data/web/inc/lib/WebAuthn/rootCertificates</code>. </p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#example","title":"Example:","text":"<p>If you want to limit the official Vendor devices to Apple only you only need the Apple Vendor Certificate inside the <code>data/web/inc/lib/WebAuthn/rootCertificates</code>. After you deleted all other certs you now only can activate WebAuthn 2FA with Apple devices.</p> <p>That\u00b4s for every vendor the same, so choose what you like (if you want to).</p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#use-own-certificates-for-webauthn","title":"Use own certificates for WebAuthn","text":"<p>If you have a valid certificate from the vendor of your key you can also add it to your mailcow!</p> <p>Just copy the certificate into the <code>data/web/inc/lib/WebAuthn/rootCertificates</code> folder and restart your mailcow.</p> <p>Now you should be able to register this device as well, even though the verification for the vendor certificates is enabled, since you just added the certificate manually. </p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#is-it-dangerous-to-keep-the-vendor-check-disabled","title":"Is it dangerous to keep the Vendor Check disabled?","text":"<p>No, it isn\u00b4t! These vendor certificates are only used to verify original hardware, not to secure the registration process.</p> <p>As you can read in these articles, the deactivation is not software security related: - https://developers.yubico.com/U2F/Attestation_and_Metadata/ - https://medium.com/webauthnworks/webauthn-fido2-demystifying-attestation-and-mds-efc3b3cb3651 - https://medium.com/webauthnworks/sorting-fido-ctap-webauthn-terminology-7d32067c0b01</p> <p>In the end, however, it is of course your decision to leave this check disabled or enabled. </p>"},{"location":"manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#totp","title":"TOTP","text":"<p>The best known TFA method mostly used with a smartphone.</p> <p>To setup the TOTP method login to the Admin UI and select <code>Time-based OTP (TOTP)</code> from the list.</p> <p>Now a modal will open in which you have to type in a name for your 2FA \"device\" (example: John Deer\u00b4s Smartphone) and the password of the affected Admin account (you are currently logged in with).</p> <p>You have two seperate methods to register TOTP to your account: 1. Scan the QR-Code with your Authenticator App on a Smartphone or Tablet. 2. Use the TOTP Code (under the QR Code) in your TOTP Program or App (if you can\u00b4t scan a QR Code).</p> <p>After you have registered the QR or TOTP code in the TOTP app/program of your choice you only need to enter the now generated TOTP token (in the app/program) as confirmation in the mailcow UI to finally activate the TOTP 2FA, otherwise it will not be activated even though the TOTP token is already generated in your app/program.</p>"},{"location":"models/model-acl/","title":"ACL","text":"<p>Editing a domain administrator or a mailbox user allows to set restrictions to that account.</p> <p>Important: For overlapping modules like sync jobs, which both domain administrators and mailbox users can be granted access to, the domain administrators permissions are inherited, when logging in as mailbox user.</p> <p>Some examples:</p> <p>1.</p> <ul> <li>A domain administror has not access to sync jobs but can login as mailbox user</li> <li>When logging in as mailbox user, he does not gain access to sync jobs, even if the given mailbox user has access when logging in directly</li> </ul> <p>2.</p> <ul> <li>A domain administror has access to sync jobs and can login as mailbox user</li> <li>The mailbox user he tries to login as has not access to sync jobs</li> <li>The domain administrator, now logged in as mailbox user, inherits its permission to the mailbox user and can access sync jobs</li> </ul> <p>3.</p> <ul> <li>A domain administrator logs in as mailbox user</li> <li>Every permission, that does not exist in a domain administrators ACL, is automatically granted (example: time-limited alias, TLS policy etc.)</li> </ul>"},{"location":"models/model-passwd/","title":"Password hashing","text":""},{"location":"models/model-passwd/#fully-supported-hashing-methods","title":"Fully supported hashing methods","text":"<p>The most current mailcow fully supports the following hashing methods. The default hashing method is written in bold:</p> <ul> <li>BLF-CRYPT</li> <li>SSHA</li> <li>SSHA256</li> <li>SSHA512</li> </ul> <p>The methods above can be used in <code>mailcow.conf</code> as <code>MAILCOW_PASS_SCHEME</code> value.</p>"},{"location":"models/model-passwd/#read-only-hashing-methods","title":"Read-only hashing methods","text":"<p>The following methods are supported read only. If you plan to use SOGo (as per default), you need a SOGo compatible hashing method. Please see the note at the bottom of this page how to update the view if necessary. With SOGo disabled, all hashing methods below will be able to be read by mailcow and Dovecot.</p> <ul> <li>ARGON2I (SOGo compatible)</li> <li>ARGON2ID (SOGo compatible)</li> <li>CLEAR</li> <li>CLEARTEXT</li> <li>CRYPT (SOGo compatible)</li> <li>DES-CRYPT</li> <li>LDAP-MD5 (SOGo compatible)</li> <li>MD5 (SOGo compatible)</li> <li>MD5-CRYPT (SOGo compatible)</li> <li>PBKDF2 (SOGo compatible)</li> <li>PLAIN (SOGo compatible)</li> <li>PLAIN-MD4</li> <li>PLAIN-MD5</li> <li>PLAIN-TRUNC</li> <li>SHA (SOGo compatible)</li> <li>SHA1 (SOGo compatible)</li> <li>SHA256 (SOGo compatible)</li> <li>SHA256-CRYPT (SOGo compatible)</li> <li>SHA512 (SOGo compatible)</li> <li>SHA512-CRYPT (SOGo compatible)</li> <li>SMD5 (SOGo compatible)</li> </ul> <p>That means mailcow is able to verify users with a hash like <code>{MD5}1a1dc91c907325c69271ddf0c944bc72</code> from the database.</p> <p>The value of <code>MAILCOW_PASS_SCHEME</code> will always be used to encrypt new passwords.</p> <p>I changed the password hashes in the \"mailbox\" SQL table and cannot login.</p> <p>A \"view\" needs to be updated. You can trigger this by restarting sogo-mailcow: <code>docker compose restart sogo-mailcow</code></p>"},{"location":"models/model-sender_rcv/","title":"Sender and receiver model","text":"<p>When a mailbox is created, a user is allowed to send mail from and receive mail for his own mailbox address.</p> <pre><code>Mailbox me@example.org is created. example.org is a primary domain.\nNote: a mailbox cannot be created in an alias domain.\n\nme@example.org is only known as me@example.org.\nme@example.org is allowed to send as me@example.org.\n</code></pre> <p>We can add an alias domain for example.org:</p> <pre><code>Alias domain alias.com is added and assigned to primary domain example.org.\nme@example.org is now known as me@example.org and me@alias.com.\nme@example.org is now allowed to send as me@example.org and me@alias.com.\n</code></pre> <p>We can add aliases for a mailbox to receive mail for and to send from this new address.</p> <p>It is important to know, that you are not able to receive mail for <code>my-alias@my-alias-domain.tld</code>. You would need to create this particular alias.</p> <pre><code>me@example.org is assigned the alias alias@example.org\nme@example.org is now known as me@example.org, me@alias.com, alias@example.org\n\nme@example.org is NOT known as alias@alias.com.\n</code></pre> <p>Please note that this does not apply to catch-all aliases:</p> <pre><code>Alias domain alias.com is added and assigned to primary domain example.org\nme@example.org is assigned the catch-all alias @example.org\nme@example.org is still just known as me@example.org, which is the only available send-as option\n\nAny email send to alias.com will match the catch-all alias for example.org\n</code></pre> <p>Administrators and domain administrators can edit mailboxes to allow specific users to send as other mailbox users (\"delegate\" them).</p> <p>You can choose between mailbox users or completely disable the sender check for domains.</p>"},{"location":"models/model-sender_rcv/#sogo-mail-from-addresses","title":"SOGo \"mail from\" addresses","text":"<p>Mailbox users can, obviously, select their own mailbox address, as well as all alias addresses and aliases that exist through alias domains.</p> <p>If you want to select another existing mailbox user as your \"mail from\" address, this user has to delegate you access through SOGo (see SOGo documentation). Moreover a mailcow (domain) administrator needs to grant you access as described above.</p>"},{"location":"post_installation/firststeps-disable_ipv6/","title":"Disable IPv6","text":"<p>This is ONLY recommended if you do not have an IPv6 enabled network on your host!</p> <p>If you really need to, you can disable the usage of IPv6 in the compose file. Additionally, you can also disable the startup of container \"ipv6nat-mailcow\", as it's not needed if you won't use IPv6.</p> <p>Instead of editing docker-compose.yml directly, it is preferable to create an override file for it and implement your changes to the service there. Unfortunately, this right now only seems to work for services, not for network settings.</p> <p>To disable IPv6 on the mailcow network, open docker-compose.yml with your favourite text editor and search for the network section (it's near the bottom of the file). </p> <p>1. Modify docker-compose.yml</p> <p>Change <code>enable_ipv6: true</code> to <code>enable_ipv6: false</code>:</p> <pre><code>networks:\n mailcow-network:\n [...]\n enable_ipv6: true # &lt;&lt;&lt; set to false\n [...]\n</code></pre> <p>2. Disable ipv6nat-mailcow</p> <p>To disable the ipv6nat-mailcow container as well, go to your mailcow directory and create a new file called \"docker-compose.override.yml\": </p> <p>NOTE: If you already have an override file, of course don't recreate it, but merge the lines below into your existing one accordingly!</p> <pre><code># cd /opt/mailcow-dockerized\n# touch docker-compose.override.yml\n</code></pre> <p>Open the file in your favourite text editor and fill in the following:</p> <pre><code>version: '2.1'\nservices:\n\n ipv6nat-mailcow:\n image: bash:latest\n restart: \"no\"\n entrypoint: [\"echo\", \"ipv6nat disabled in compose.override.yml\"]\n</code></pre> <p>For these changes to be effective, you need to fully stop and then restart the stack, so containers and networks are recreated:</p> <pre><code>docker compose down\ndocker compose up -d\n</code></pre> <p>3. Disable IPv6 in unbound-mailcow</p> <p>Edit <code>data/conf/unbound/unbound.conf</code> and set <code>do-ip6</code> to \"no\":</p> <pre><code>server:\n [...]\n do-ip6: no\n [...]\n</code></pre> <p>Restart Unbound:</p> <pre><code>docker compose restart unbound-mailcow\n</code></pre> <p>4. Disable IPv6 in postfix-mailcow</p> <p>Create <code>data/conf/postfix/extra.cf</code> and set <code>smtp_address_preference</code> to <code>ipv4</code>:</p> <pre><code>smtp_address_preference = ipv4\ninet_protocols = ipv4\n</code></pre> <p>Restart Postfix:</p> <pre><code>docker compose restart postfix-mailcow\n</code></pre> <p>5. If your docker daemon completly disabled IPv6:</p> <p>Fix the following NGINX, Dovecot and php-fpm config files</p> <pre><code>sed -i '/::/d' data/conf/nginx/listen_*\nsed -i '/::/d' data/conf/nginx/templates/listen*\nsed -i '/::/d' data/conf/nginx/dynmaps.conf\nsed -i 's/,\\[::\\]//g' data/conf/dovecot/dovecot.conf\nsed -i 's/\\[::\\]://g' data/conf/phpfpm/php-fpm.d/pools.conf\n</code></pre>"},{"location":"post_installation/firststeps-dmarc_reporting/","title":"DMARC Reporting","text":"<p>DMARC Reporting done via Rspamd DMARC Module.</p> <p>Rspamd documentation can be found here: https://rspamd.com/doc/modules/dmarc.html</p> <p>Important:</p> <ol> <li> <p>Change <code>example.com</code>, <code>mail.example.com</code> and <code>Example</code> to reflect your setup</p> </li> <li> <p>DMARC reporting requires additional attention, especially over the first few days</p> </li> <li> <p>All receiving domains hosted on mailcow send from one reporting domain. It is recommended to use the parent domain of your <code>MAILCOW_HOSTNAME</code>:</p> <ul> <li>If your <code>MAILCOW_HOSTNAME</code> is <code>mail.example.com</code> change the following config to <code>domain = \"example.com\";</code></li> <li>Set <code>email</code> equally, e.g. <code>email = \"noreply-dmarc@example.com\";</code></li> </ul> </li> <li> <p>It is optional but recommended to create an email user <code>noreply-dmarc</code> in mailcow to handle bounces.</p> </li> </ol>"},{"location":"post_installation/firststeps-dmarc_reporting/#enable-dmarc-reporting","title":"Enable DMARC reporting","text":"<p>Create the file <code>data/conf/rspamd/local.d/dmarc.conf</code> and set the following content:</p> <pre><code>reporting {\n enabled = true;\n email = 'noreply-dmarc@example.com';\n domain = 'example.com';\n org_name = 'Example';\n helo = 'rspamd';\n smtp = 'postfix';\n smtp_port = 25;\n from_name = 'Example DMARC Report';\n msgid_from = 'rspamd.mail.example.com';\n max_entries = 2k;\n keys_expire = 2d;\n}\n</code></pre> <p>Create or modify <code>docker-compose.override.yml</code> in the mailcow-dockerized base directory:</p> <pre><code>version: '2.1'\n\nservices:\n rspamd-mailcow:\n environment:\n - MASTER=${MASTER:-y}\n labels:\n ofelia.enabled: \"true\"\n ofelia.job-exec.rspamd_dmarc_reporting_yesterday.schedule: \"@every 24h\"\n ofelia.job-exec.rspamd_dmarc_reporting_yesterday.command: \"/bin/bash -c \\\"[[ $${MASTER} == y ]] &amp;&amp; /usr/bin/rspamadm dmarc_report $(date --date yesterday '+%Y%m%d') &gt; /var/lib/rspamd/dmarc_reports_last_log 2&gt;&amp;1 || exit 0\\\"\"\n ofelia-mailcow:\n depends_on:\n - rspamd-mailcow\n</code></pre> <p>Run <code>docker compose up -d</code></p>"},{"location":"post_installation/firststeps-dmarc_reporting/#send-a-copy-reports-to-yourself","title":"Send a copy reports to yourself","text":"<p>To receive a hidden copy of reports generated by Rspamd you can set a <code>bcc_addrs</code> list in the <code>reporting</code> config section of <code>data/conf/rspamd/local.d/dmarc.conf</code>:</p> <pre><code>reporting {\n enabled = true;\n email = 'noreply-dmarc@example.com';\n bcc_addrs = [\"noreply-dmarc@example.com\",\"parsedmarc@example.com\"];\n[...]\n</code></pre> <p>Rspamd will load changes in real time, so you won't need to restart the container at this point.</p> <p>This can be useful if you...</p> <ul> <li>...want to check that your DMARC reports are sent correctly and authenticated.</li> <li>...want to analyze your own reports to get statistics, i.e. to use with ParseDMARC or other analytic systems.</li> </ul>"},{"location":"post_installation/firststeps-dmarc_reporting/#troubleshooting","title":"Troubleshooting","text":"<p>Check when the report schedule last ran:</p> <pre><code>docker compose exec rspamd-mailcow date -r /var/lib/rspamd/dmarc_reports_last_log\n</code></pre> <p>See the latest report output:</p> <pre><code>docker compose exec rspamd-mailcow cat /var/lib/rspamd/dmarc_reports_last_log\n</code></pre> <p>Manually trigger a DMARC report:</p> <pre><code>docker compose exec rspamd-mailcow rspamadm dmarc_report\n</code></pre> <p>Validate that Rspamd has recorded data in Redis: Change <code>20220428</code> to date which you interested in.</p> <p><pre><code>docker compose exec redis-mailcow redis-cli SMEMBERS \"dmarc_idx;20220428\"\n</code></pre> Take one of the lines from output you interested in and request it, f.e.: <pre><code>docker compose exec redis-mailcow redis-cli ZRANGE \"dmarc_rpt;microsoft.com;mailto:d@rua.agari.com;20220428\" 0 49\n</code></pre></p>"},{"location":"post_installation/firststeps-dmarc_reporting/#change-dmarc-reporting-frequency","title":"Change DMARC reporting frequency","text":"<p>In the example above reports are sent once every 24 hours and send reports for yesterday. This will be okay for most setups.</p> <p>If you have a large mail volume and want to run the DMARC reporting more than once a day you need create second schedule and run it with <code>dmarc_report $(date '+%Y%m%d')</code> to process the current day. You have to make sure that the first run on each day also processes the last report from the day before, so it needs to be started twice, one time with <code>$(date --date yesterday '+%Y%m%d')</code> at <code>0 5 0 * * *</code> (00:05 AM) and then with <code>$(date '+%Y%m%d')</code> with desired interval.</p> <p>The Ofelia schedule has the same implementation as <code>cron</code> in Go, supported syntax described at cron Documentation</p> <p>To change schedule:</p> <ol> <li>Edit <code>docker-compose.override.yml</code>:</li> </ol> <pre><code>version: '2.1'\n\nservices:\n rspamd-mailcow:\n environment:\n - MASTER=${MASTER:-y}\n labels:\n ofelia.enabled: \"true\"\n ofelia.job-exec.rspamd_dmarc_reporting_yesterday.schedule: \"0 5 0 * * *\"\n ofelia.job-exec.rspamd_dmarc_reporting_yesterday.command: \"/bin/bash -c \\\"[[ $${MASTER} == y ]] &amp;&amp; /usr/bin/rspamadm dmarc_report $(date --date yesterday '+%Y%m%d') &gt; /var/lib/rspamd/dmarc_reports_last_log 2&gt;&amp;1 || exit 0\\\"\"\n ofelia.job-exec.rspamd_dmarc_reporting_today.schedule: \"@every 12h\"\n ofelia.job-exec.rspamd_dmarc_reporting_today.command: \"/bin/bash -c \\\"[[ $${MASTER} == y ]] &amp;&amp; /usr/bin/rspamadm dmarc_report $(date '+%Y%m%d') &gt; /var/lib/rspamd/dmarc_reports_last_log 2&gt;&amp;1 || exit 0\\\"\"\n ofelia-mailcow:\n depends_on:\n - rspamd-mailcow\n</code></pre> <ol> <li> <p>Run <code>docker compose up -d</code></p> </li> <li> <p>Run <code>docker compose restart ofelia-mailcow</code></p> </li> </ol>"},{"location":"post_installation/firststeps-dmarc_reporting/#disable-dmarc-reporting","title":"Disable DMARC Reporting","text":"<p>To disable reporting:</p> <ol> <li> <p>Set <code>enabled</code> to <code>false</code> in <code>data/conf/rspamd/local.d/dmarc.conf</code></p> </li> <li> <p>Revert changes done in <code>docker-compose.override.yml</code> to <code>rspamd-mailcow</code> and <code>ofelia-mailcow</code></p> </li> <li> <p>Run <code>docker compose up -d</code></p> </li> </ol>"},{"location":"post_installation/firststeps-ip_bindings/","title":"IP bindings","text":"<p>Warning</p> <p>Changing the binding does not affect source NAT. See SNAT for required steps.</p>"},{"location":"post_installation/firststeps-ip_bindings/#ipv4-binding","title":"IPv4 binding","text":"<p>To adjust one or multiple IPv4 bindings, open <code>mailcow.conf</code> and edit one, multiple or all variables as per your needs:</p> <pre><code># For technical reasons, http bindings are a bit different from other service bindings.\n# You will find the following variables, separated by a bind address and its port:\n# Example: HTTP_BIND=1.2.3.4\n\nHTTP_PORT=80\nHTTP_BIND=\nHTTPS_PORT=443\nHTTPS_BIND=\n\n# Other services are bound by using the following format:\n# SMTP_PORT=1.2.3.4:25 will bind SMTP to the IP 1.2.3.4 on port 25\n# Important! Specifying an IPv4 address will skip all IPv6 bindings since Docker 20.x.\n# doveadm, SQL as well as Solr are bound to local ports only, please do not change that, unless you know what you are doing.\n\nSMTP_PORT=25\nSMTPS_PORT=465\nSUBMISSION_PORT=587\nIMAP_PORT=143\nIMAPS_PORT=993\nPOP_PORT=110\nPOPS_PORT=995\nSIEVE_PORT=4190\nDOVEADM_PORT=127.0.0.1:19991\nSQL_PORT=127.0.0.1:13306\nSOLR_PORT=127.0.0.1:18983\n</code></pre> <p>To apply your changes, run <code>docker compose down</code> followed by <code>docker compose up -d</code>.</p>"},{"location":"post_installation/firststeps-ip_bindings/#ipv6-binding","title":"IPv6 binding","text":"<p>Changing IPv6 bindings is different from IPv4. Again, this has a technical background.</p> <p>A <code>docker-compose.override.yml</code> file will be used instead of editing the <code>docker-compose.yml</code> file directly. This is to maintain updatability, as the <code>docker-compose.yml</code> file gets updated regularly and your changes will most likely be overwritten.</p> <p>Edit to create a file <code>docker-compose.override.yml</code> with the following content. Its content will be merged with the productive <code>docker-compose.yml</code> file.</p> <p>An example IPv6 2001:db8:dead:beef::123 is given. The first suffix <code>:PORT1</code> defines the external port, while the second suffix <code>:PORT2</code> routes to the corresponding port inside the container and must not be changed.</p> <pre><code>version: '2.1'\nservices:\n\n dovecot-mailcow:\n ports:\n - '[2001:db8:dead:beef::123]:143:143'\n - '[2001:db8:dead:beef::123]:993:993'\n - '[2001:db8:dead:beef::123]:110:110'\n - '[2001:db8:dead:beef::123]:995:995'\n - '[2001:db8:dead:beef::123]:4190:4190'\n\n postfix-mailcow:\n ports:\n - '[2001:db8:dead:beef::123]:25:25'\n - '[2001:db8:dead:beef::123]:465:465'\n - '[2001:db8:dead:beef::123]:587:587'\n\n nginx-mailcow:\n ports:\n - '[2001:db8:dead:beef::123]:80:80'\n - '[2001:db8:dead:beef::123]:443:443'\n</code></pre> <p>To apply your changes, run <code>docker compose down</code> followed by <code>docker compose up -d</code>.</p>"},{"location":"post_installation/firststeps-local_mta/","title":"Local MTA on Docker host","text":"<p>The easiest option would be to disable the listener on port 25/tcp.</p> <p>Postfix users disable the listener by commenting the following line (starting with <code>smtp</code> or <code>25</code>) in <code>/etc/postfix/master.cf</code>: <pre><code>#smtp inet n - - - - smtpd\n</code></pre></p> <p>Furthermore, to relay over a dockerized mailcow, you may want to add <code>172.22.1.1</code> as relayhost and remove the Docker interface from \"inet_interfaces\":</p> <pre><code>postconf -e 'relayhost = 172.22.1.1'\npostconf -e \"mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128\"\npostconf -e \"inet_interfaces = loopback-only\"\npostconf -e \"relay_transport = relay\"\npostconf -e \"default_transport = smtp\"\n</code></pre> <p>Now it is important to not have the same FQDN in <code>myhostname</code> as you use for your dockerized mailcow. Check your local (non-Docker) Postfix' main.cf for <code>myhostname</code> and set it to something different, for example <code>local.my.fqdn.tld</code>.</p> <p>\"172.22.1.1\" is the mailcow created network gateway in Docker. Relaying over this interface is necessary (instead of - for example - relaying directly over ${MAILCOW_HOSTNAME}) to relay over a known internal network.</p> <p>Restart Postfix after applying your changes.</p>"},{"location":"post_installation/firststeps-logging/","title":"Logging","text":"<p>Logging in mailcow: dockerized consists of multiple stages, but is, after all, much more flexible and easier to integrate into a logging daemon than before.</p> <p>In Docker the containerized application (PID 1) writes its output to stdout. For real one-application containers this works just fine. Run <code>docker compose logs --help</code> to learn more. </p> <p>Some containers log or stream to multiple destinations.</p> <p>No container will keep persistent logs in it. Containers are transient items!</p> <p>In the end, every line of logs will reach the Docker daemon - unfiltered.</p> <p>The default logging driver is \"json\".</p>"},{"location":"post_installation/firststeps-logging/#filtered-logs","title":"Filtered logs","text":"<p>Some logs are filtered and written to Redis keys but also streamed to a Redis channel.</p> <p>The Redis channel is used to stream logs with failed authentication attempts to be read by netfilter-mailcow.</p> <p>The Redis keys are persistent and will keep 10000 lines of logs for the web UI.</p> <p>This mechanism makes it possible to use whatever Docker logging driver you want to, without losing the ability to read logs from the UI or ban suspicious clients with netfilter-mailcow.</p> <p>Redis keys will only hold logs from applications and filter out system messages (think of cron etc.).</p>"},{"location":"post_installation/firststeps-logging/#logging-drivers","title":"Logging drivers","text":""},{"location":"post_installation/firststeps-logging/#via-docker-composeoverrideyml","title":"Via docker-compose.override.yml","text":"<p>Here is the good news: Since Docker has some great logging drivers, you can integrate mailcow: dockerized into your existing logging environment with ease.</p> <p>Create a <code>docker-compose.override.yml</code> and add, for example, this block to use the \"gelf\" logging plugin for <code>postfix-mailcow</code>:</p> <pre><code>version: '2.1'\nservices:\n postfix-mailcow: # or any other\n logging:\n driver: \"gelf\"\n options:\n gelf-address: \"udp://graylog:12201\"\n</code></pre> <p>Another example for Syslog:</p> <pre><code>version: '2.1'\nservices:\n\n postfix-mailcow: # or any other\n logging:\n driver: \"syslog\"\n options:\n syslog-address: \"udp://127.0.0.1:514\"\n syslog-facility: \"local3\"\n\n dovecot-mailcow: # or any other\n logging:\n driver: \"syslog\"\n options:\n syslog-address: \"udp://127.0.0.1:514\"\n syslog-facility: \"local3\"\n\n rspamd-mailcow: # or any other\n logging:\n driver: \"syslog\"\n options:\n syslog-address: \"udp://127.0.0.1:514\"\n syslog-facility: \"local3\"\n</code></pre>"},{"location":"post_installation/firststeps-logging/#for-rsyslog-only","title":"For Rsyslog only:","text":"<p>Make sure the following lines aren't commented out in <code>/etc/rsyslog.conf</code>:</p> <pre><code># provides UDP syslog reception\nmodule(load=\"imudp\")\ninput(type=\"imudp\" port=\"514\")\n</code></pre> <p>To move <code>local3</code> input to <code>/var/log/mailcow.log</code> and stop processing, create a file <code>/etc/rsyslog.d/docker.conf</code>:</p> <pre><code>local3.* /var/log/mailcow.log\n&amp; stop\n</code></pre> <p>Restart rsyslog afterwards.</p>"},{"location":"post_installation/firststeps-logging/#via-daemonjson-globally","title":"via daemon.json (globally)","text":"<p>If you want to change the logging driver globally, edit Dockers daemon configuration file <code>/etc/docker/daemon.json</code> and restart the Docker service:</p> <pre><code>{\n...\n \"log-driver\": \"gelf\",\n \"log-opts\": {\n \"gelf-address\": \"udp://graylog:12201\"\n }\n...\n}\n</code></pre> <p>For Syslog:</p> <pre><code>{\n...\n \"log-driver\": \"syslog\",\n \"log-opts\": {\n \"syslog-address\": \"udp://1.2.3.4:514\"\n }\n...\n}\n</code></pre> <p>Restart the Docker daemon and run <code>docker compose down &amp;&amp; docker compose up -d</code> to recreate the containers with the new logging driver.</p>"},{"location":"post_installation/firststeps-logging/#log-rotation","title":"Log rotation","text":"<p>As those logs can get quite big, it is a good idea to use logrotate to compress and delete them after a certain time period.</p> <p>Create <code>/etc/logrotate.d/mailcow</code> with the following content:</p> <pre><code>/var/log/mailcow.log {\n rotate 7\n daily\n compress\n delaycompress\n missingok\n notifempty\n create 660 root root\n}\n</code></pre> <p>With this configuration, logrotate will run daily and keep a maximum of 7 archives.</p> <p>To rotate the logfile weekly or monthly replace <code>daily</code> with <code>weekly</code> or <code>monthly</code> respectively.</p> <p>To keep more archives, set the desired number of <code>rotate</code>.</p> <p>Afterwards, logrotate can be restarted.</p>"},{"location":"post_installation/firststeps-rp/","title":"Reverse Proxy","text":"<p>You don't need to change the Nginx site that comes with mailcow: dockerized. mailcow: dockerized trusts the default gateway IP 172.22.1.1 as proxy.</p> <p>1. Make sure you change HTTP_BIND and HTTPS_BIND in <code>mailcow.conf</code> to a local address and set the ports accordingly, for example: <pre><code>HTTP_BIND=127.0.0.1\nHTTP_PORT=8080\nHTTPS_BIND=127.0.0.1\nHTTPS_PORT=8443\n</code></pre></p> <p>This will also change the bindings inside the Nginx container! This is important, if you decide to use a proxy within Docker.</p> <p>IMPORTANT: Do not use port 8081, 9081 or 65510!</p> <p>Recreate affected containers by running <code>docker compose up -d</code>.</p> <p>Important information, please read them carefully!</p> <p>Info</p> <p>If you plan to use a reverse proxy and want to use another server name that is not MAILCOW_HOSTNAME, you need to read Adding additional server names for mailcow UI at the bottom of this page.</p> <p>Warning</p> <p>Make sure you run <code>generate_config.sh</code> before you enable any site configuration examples below. The script <code>generate_config.sh</code> copies snake-oil certificates to the correct location, so the services will not fail to start due to missing files.</p> <p>Warning</p> <p>If you enable TLS SNI (<code>ENABLE_TLS_SNI</code> in mailcow.conf), the certificate paths in your reverse proxy must match the correct paths in data/assets/ssl/{hostname}. The certificates will be split into <code>data/assets/ssl/{hostname1,hostname2,etc}</code> and therefore will not work when you copy the examples from below pointing to <code>data/assets/ssl/cert.pem</code> etc.</p> <p>Info</p> <p>Using the site configs below will forward ACME requests to mailcow and let it handle certificates itself. The downside of using mailcow as ACME client behind a reverse proxy is, that you will need to reload your webserver after acme-mailcow changed/renewed/created the certificate. You can either reload your webserver daily or write a script to watch the file for changes. On many servers logrotate will reload the webserver daily anyway.</p> <p>If you want to use a local certbot installation, you will need to change the SSL certificate parameters accordingly. Make sure you run a post-hook script when you decide to use external ACME clients. You will find an example at the bottom of this page.</p> <p>2. Configure your local webserver as reverse proxy:</p>"},{"location":"post_installation/firststeps-rp/#apache-24","title":"Apache 2.4","text":"<p>Required modules: <pre><code>a2enmod rewrite proxy proxy_http headers ssl\n</code></pre></p> <p>Let's Encrypt will follow our rewrite, certificate requests in mailcow will work fine.</p> <p>Take care of highlighted lines.</p> <pre><code>&lt;VirtualHost *:80&gt;\n ServerName CHANGE_TO_MAILCOW_HOSTNAME\n ServerAlias autodiscover.*\n ServerAlias autoconfig.*\n RewriteEngine on\n\n RewriteCond %{HTTPS} off\n RewriteRule ^/?(.*) https://%{HTTP_HOST}/$1 [R=301,L]\n\n ProxyPass / http://127.0.0.1:8080/\n ProxyPassReverse / http://127.0.0.1:8080/\n ProxyPreserveHost On\n ProxyAddHeaders On\n RequestHeader set X-Forwarded-Proto \"http\"\n&lt;/VirtualHost&gt;\n&lt;VirtualHost *:443&gt;\n ServerName CHANGE_TO_MAILCOW_HOSTNAME\n ServerAlias autodiscover.*\n ServerAlias autoconfig.*\n\n # You should proxy to a plain HTTP session to offload SSL processing\n ProxyPass /Microsoft-Server-ActiveSync http://127.0.0.1:8080/Microsoft-Server-ActiveSync connectiontimeout=4000\n ProxyPassReverse /Microsoft-Server-ActiveSync http://127.0.0.1:8080/Microsoft-Server-ActiveSync\n ProxyPass / http://127.0.0.1:8080/\n ProxyPassReverse / http://127.0.0.1:8080/\n ProxyPreserveHost On\n ProxyAddHeaders On\n RequestHeader set X-Forwarded-Proto \"https\"\n\n SSLCertificateFile MAILCOW_PATH/data/assets/ssl/cert.pem\n SSLCertificateKeyFile MAILCOW_PATH/data/assets/ssl/key.pem\n\n # If you plan to proxy to a HTTPS host:\n #SSLProxyEngine On\n\n # If you plan to proxy to an untrusted HTTPS host:\n #SSLProxyVerify none\n #SSLProxyCheckPeerCN off\n #SSLProxyCheckPeerName off\n #SSLProxyCheckPeerExpire off\n&lt;/VirtualHost&gt;\n</code></pre>"},{"location":"post_installation/firststeps-rp/#nginx","title":"Nginx","text":"<p>Let's Encrypt will follow our rewrite, certificate requests will work fine.</p> <p>Take care of highlighted lines.</p> <pre><code>server {\n listen 80 default_server;\n listen [::]:80 default_server;\n server_name CHANGE_TO_MAILCOW_HOSTNAME autodiscover.* autoconfig.*;\n return 301 https://$host$request_uri;\n}\nserver {\n listen 443 ssl http2;\n listen [::]:443 ssl http2;\n server_name CHANGE_TO_MAILCOW_HOSTNAME autodiscover.* autoconfig.*;\n\n ssl_certificate MAILCOW_PATH/data/assets/ssl/cert.pem;\n ssl_certificate_key MAILCOW_PATH/data/assets/ssl/key.pem;\n ssl_session_timeout 1d;\n ssl_session_cache shared:SSL:50m;\n ssl_session_tickets off;\n\n # See https://ssl-config.mozilla.org/#server=nginx for the latest ssl settings recommendations\n # An example config is given below\n ssl_protocols TLSv1.2;\n ssl_ciphers HIGH:!aNULL:!MD5:!SHA1:!kRSA;\n ssl_prefer_server_ciphers off;\n\n location /Microsoft-Server-ActiveSync {\n proxy_pass http://127.0.0.1:8080/Microsoft-Server-ActiveSync;\n proxy_set_header Host $http_host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n proxy_connect_timeout 75;\n proxy_send_timeout 3650;\n proxy_read_timeout 3650;\n proxy_buffers 64 512k; # Needed since the 2022-04 Update for SOGo\n client_body_buffer_size 512k;\n client_max_body_size 0;\n }\n\n location / {\n proxy_pass http://127.0.0.1:8080/;\n proxy_set_header Host $http_host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n client_max_body_size 0;\n # The following Proxy Buffers has to be set if you want to use SOGo after the 2022-04 (April 2022) Update\n # Otherwise a Login will fail like this: https://github.com/mailcow/mailcow-dockerized/issues/4537\n proxy_buffer_size 128k;\n proxy_buffers 64 512k;\n proxy_busy_buffers_size 512k;\n }\n}\n</code></pre>"},{"location":"post_installation/firststeps-rp/#haproxy-community-supported","title":"HAProxy (community supported)","text":"<p>Warning</p> <p>This is an unsupported community contribution. Feel free to provide fixes.</p> <p>Important/Fixme: This example only forwards HTTPS traffic and does not use mailcows built-in ACME client.</p> <pre><code>frontend https-in\n bind :::443 v4v6 ssl crt mailcow.pem\n default_backend mailcow\n\nbackend mailcow\n option forwardfor\n http-request set-header X-Forwarded-Proto https if { ssl_fc }\n http-request set-header X-Forwarded-Proto http if !{ ssl_fc }\n server mailcow 127.0.0.1:8080 check\n</code></pre>"},{"location":"post_installation/firststeps-rp/#traefik-v2-community-supported","title":"Traefik v2 (community supported)","text":"<p>Warning</p> <p>This is an unsupported community contribution. Feel free to provide fixes.</p> <p>Important: This config only covers the \"reverseproxing\" of the webpannel (nginx-mailcow) using Traefik v2, if you also want to reverseproxy the mail services such as dovecot, postfix... you'll just need to adapt the following config to each container and create an EntryPoint on your <code>traefik.toml</code> or <code>traefik.yml</code> (depending which config you use) for each port. </p> <p>For this section we'll assume you have your Traefik 2 <code>[certificatesresolvers]</code> properly configured on your traefik configuration file, and also using acme, also, the following example uses Lets Encrypt, but feel free to change it to your own cert resolver. You can find a basic Traefik 2 toml config file with all the above implemented which can be used for this example here traefik.toml if you need one, or a hint on how to adapt your config.</p> <p>So, first of all, we are going to disable the acme-mailcow container since we'll use the certs that traefik will provide us. For this we'll have to set <code>SKIP_LETS_ENCRYPT=y</code> on our <code>mailcow.conf</code>, and run <code>docker compose up -d</code> to apply the changes.</p> <p>Then we'll create a <code>docker-compose.override.yml</code> file in order to override the main <code>docker-compose.yml</code> found in your mailcow root folder. </p> <pre><code>version: '2.1'\n\nservices:\n nginx-mailcow:\n networks:\n # Add Traefik's network\n web:\n labels:\n - traefik.enable=true\n # Creates a router called \"moo\" for the container, and sets up a rule to link the container to certain rule,\n # in this case, a Host rule with our MAILCOW_HOSTNAME var.\n - traefik.http.routers.moo.rule=Host(`${MAILCOW_HOSTNAME}`)\n # Enables tls over the router we created before.\n - traefik.http.routers.moo.tls=true\n # Specifies which kind of cert resolver we'll use, in this case le (Lets Encrypt).\n - traefik.http.routers.moo.tls.certresolver=le\n # Creates a service called \"moo\" for the container, and specifies which internal port of the container\n # should traefik route the incoming data to.\n - traefik.http.services.moo.loadbalancer.server.port=${HTTP_PORT}\n # Specifies which entrypoint (external port) should traefik listen to, for this container.\n # websecure being port 443, check the traefik.toml file liked above.\n - traefik.http.routers.moo.entrypoints=websecure\n # Make sure traefik uses the web network, not the mailcowdockerized_mailcow-network\n - traefik.docker.network=web\n\n certdumper:\n image: humenius/traefik-certs-dumper\n command: --restart-containers ${COMPOSE_PROJECT_NAME}-postfix-mailcow-1,${COMPOSE_PROJECT_NAME}-nginx-mailcow-1,${COMPOSE_PROJECT_NAME}-dovecot-mailcow-1\n network_mode: none\n volumes:\n # Mount the volume which contains Traefik's `acme.json' file\n # Configure the external name in the volume definition\n - acme:/traefik:ro\n # Mount mailcow's SSL folder\n - ./data/assets/ssl/:/output:rw\n # Mount docker socket to restart containers\n - /var/run/docker.sock:/var/run/docker.sock:ro\n restart: always\n environment:\n # only change this, if you're using another domain for mailcow's web frontend compared to the standard config\n - DOMAIN=${MAILCOW_HOSTNAME}\n\nnetworks:\n web:\n external: true\n # Name of the external network\n name: traefik_web\n\nvolumes:\n acme:\n external: true\n # Name of the external docker volume which contains Traefik's `acme.json' file\n name: traefik_acme\n</code></pre> <p>Start the new containers with <code>docker compose up -d</code>.</p> <p>Now, there's only one thing left to do, which is setup the certs so that the mail services can use them as well, since Traefik 2 uses an acme v2 format to save ALL the license from all the domains we have, we'll need to find a way to dump the certs, lucky we have this tiny container which grabs the <code>acme.json</code> file trough a volume, and a variable <code>DOMAIN=example.org</code>, and with these, the container will output the <code>cert.pem</code> and <code>key.pem</code> files, for this we'll simply run the <code>traefik-certs-dumper</code> container binding the <code>/traefik</code> volume to the folder where our <code>acme.json</code> is saved, bind the <code>/output</code> volume to our mailcow <code>data/assets/ssl/</code> folder, and set up the <code>DOMAIN=example.org</code> variable to the domain we want the certs dumped from. </p> <p>This container will watch over the <code>acme.json</code> file for any changes, and regenerate the <code>cert.pem</code> and <code>key.pem</code> files directly into <code>data/assets/ssl/</code> being the path binded to the container's <code>/output</code> path.</p> <p>You can use the command line to run it, or use the docker compose shown here.</p> <p>After we have the certs dumped, we'll have to reload the configs from our postfix and dovecot containers, and check the certs, you can see how here.</p> <p>Aaand that should be it \ud83d\ude0a, you can check if the Traefik router works fine trough Traefik's dashboard / traefik logs / accessing the setted domain trough https, or / and check HTTPS, SMTP and IMAP trough the commands shown on the page linked before.</p>"},{"location":"post_installation/firststeps-rp/#caddy-v2-supported-by-the-community","title":"Caddy v2 (supported by the community)","text":"<p>Warning</p> <p>This is an unsupported community contribution. Feel free to provide fixes.</p> <p>The configuration of Caddy with mailcow is very simple.</p> <p>In the caddyfile you just have to create a section for the mailserver.</p> <p>For example <pre><code>MAILCOW_HOSTNAME autodiscover.MAILCOW_HOSTNAME autoconfig.MAILCOW_HOSTNAME {\n log {\n output file /var/log/caddy/MAILCOW_HOSTNAME.log {\n roll_disabled\n roll_size 512M\n roll_uncompressed\n roll_local_time\n roll_keep 3\n roll_keep_for 48h\n }\n }\n\n reverse_proxy 127.0.0.1:HTTP_BIND\n}\n</code></pre></p> <p>This allows Caddy to automatically create the certificates and accept traffic for these mentioned domains and forward them to mailcow.</p> <p>Important: The ACME client of mailcow must be disabled, otherwise mailcow will fail.</p> <p>Since Caddy takes care of the certificates itself, we can use the following script to include the Caddy generated certificates into mailcow:</p> <pre><code>#!/bin/bash\nMD5SUM_CURRENT_CERT=($(md5sum /opt/mailcow-dockerized/data/assets/ssl/cert.pem))\nMD5SUM_NEW_CERT=($(md5sum /var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/your.domain.tld/your.domain.tld.crt))\n\nif [ $MD5SUM_CURRENT_CERT != $MD5SUM_NEW_CERT ]; then\n cp /var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/your.domain.tld/your.domain.tld.crt /opt/mailcow-dockerized/data/assets/ssl/cert.pem\n cp /var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/your.domain.tld/your.domain.tld.key /opt/mailcow-dockerized/data/assets/ssl/key.pem\n postfix_c=$(docker ps -qaf name=postfix-mailcow)\n dovecot_c=$(docker ps -qaf name=dovecot-mailcow)\n nginx_c=$(docker ps -qaf name=nginx-mailcow)\n docker restart ${postfix_c} ${dovecot_c} ${nginx_c}\n\nelse\n echo \"Certs not copied from Caddy (Not needed)\"\nfi\n</code></pre> <p>Attention</p> <p>Caddy's certificate path varies depending on the installation type. In this installation example, Caddy was installed using the Caddy repo (more informations here). To find out the Caddy certificate path on your system, just run a <code>find / -name \"certificates\"</code>.</p> <p>This script could be called as a cronjob every hour:</p> <pre><code>0 * * * * /bin/bash /path/to/script/deploy-certs.sh &gt;/dev/null 2&gt;&amp;1\n</code></pre>"},{"location":"post_installation/firststeps-rp/#optional-post-hook-script-for-non-mailcow-acme-clients","title":"Optional: Post-hook script for non-mailcow ACME clients","text":"<p>Using a local certbot (or any other ACME client) requires to restart some containers, you can do this with a post-hook script. Make sure you change the paths accordingly: <pre><code>#!/bin/bash\ncp /etc/letsencrypt/live/my.domain.tld/fullchain.pem /opt/mailcow-dockerized/data/assets/ssl/cert.pem\ncp /etc/letsencrypt/live/my.domain.tld/privkey.pem /opt/mailcow-dockerized/data/assets/ssl/key.pem\npostfix_c=$(docker ps -qaf name=postfix-mailcow)\ndovecot_c=$(docker ps -qaf name=dovecot-mailcow)\nnginx_c=$(docker ps -qaf name=nginx-mailcow)\ndocker restart ${postfix_c} ${dovecot_c} ${nginx_c}\n</code></pre></p>"},{"location":"post_installation/firststeps-rp/#adding-additional-server-names-for-mailcow-ui","title":"Adding additional server names for mailcow UI","text":"<p>If you plan to use a server name that is not <code>MAILCOW_HOSTNAME</code> in your reverse proxy, make sure to populate that name in mailcow.conf via <code>ADDITIONAL_SERVER_NAMES</code> first. Names must be separated by commas and must not contain spaces. If you skip this step, mailcow may respond to your reverse proxy with an incorrect site.</p> <pre><code>ADDITIONAL_SERVER_NAMES=webmail.domain.tld,other.example.tld\n</code></pre> <p>Run <code>docker compose up -d</code> to apply.</p>"},{"location":"post_installation/firststeps-rspamd_ui/","title":"Rspamd UI","text":"<p>Rspamd is an easy to use spam filtering tool presently installed with mailcow.</p> <ol> <li>Go to the mailcow web admin interface</li> <li>Navigate to the Access tab. (Access &gt; Rspamd UI)</li> <li>Modify the Rspamd UI password</li> <li>Go to https://${MAILCOW_HOSTNAME}/rspamd in a browser and log in!</li> </ol> <p>Additional configuration options and documentation can be found here : https://rspamd.com/webui/</p>"},{"location":"post_installation/firststeps-snat/","title":"SNAT","text":"<p>SNAT is used to change the source address of the packets sent by mailcow. It can be used to change the outgoing IP address on systems with multiple IP addresses.</p> <p>Open <code>mailcow.conf</code>, set either or both of the following parameters:</p> <pre><code># Use this IPv4 for outgoing connections (SNAT)\nSNAT_TO_SOURCE=1.2.3.4\n\n# Use this IPv6 for outgoing connections (SNAT)\nSNAT6_TO_SOURCE=dead:beef\n</code></pre> <p>Run <code>docker compose up -d</code>.</p> <p>The values are read by netfilter-mailcow. netfilter-mailcow will make sure, the post-routing rules are on position 1 in the netfilter table. It does automatically delete and re-create them if they are found on another position than 1.</p> <p>Check the output of <code>docker compose logs --tail=200 netfilter-mailcow</code> to ensure the SNAT settings have been applied.</p>"},{"location":"post_installation/firststeps-ssl/","title":"Advanced SSL","text":""},{"location":"post_installation/firststeps-ssl/#lets-encrypt-out-of-the-box","title":"Let's Encrypt (out-of-the-box)","text":"<p>The \"acme-mailcow\" container will try to obtain a LE certificate for <code>${MAILCOW_HOSTNAME}</code>, <code>autodiscover.ADDED_MAIL_DOMAIN</code> and <code>autoconfig.ADDED_MAIL_DOMAIN</code>.</p> <p>Warning</p> <p>mailcow must be available on port 80 for the acme-client to work. Our reverse proxy example configurations do cover that. You can also use any external ACME client (certbot for example) to obtain certificates, but you will need to make sure, that they are copied to the correct location and a post-hook reloads affected containers. See more in the Reverse Proxy documentation.</p> <p>By default, which means 0 domains are added to mailcow, it will try to obtain a certificate for <code>${MAILCOW_HOSTNAME}</code>.</p> <p>For each domain you add, it will try to resolve <code>autodiscover.ADDED_MAIL_DOMAIN</code> and <code>autoconfig.ADDED_MAIL_DOMAIN</code> to its IPv6 address or - if IPv6 is not configured in your domain - IPv4 address. If it succeeds, a name will be added as SAN to the certificate request.</p> <p>Only names that can be validated, will be added as SAN.</p> <p>For every domain you remove, the certificate will be moved and a new certificate will be requested. It is not possible to keep domains in a certificate, when we are not able validate the challenge for those.</p> <p>If you want to re-run the ACME client, use <code>docker compose restart acme-mailcow</code> and monitor its logs with <code>docker compose logs --tail=200 -f acme-mailcow</code>.</p>"},{"location":"post_installation/firststeps-ssl/#additional-domain-names","title":"Additional domain names","text":"<p>Edit \"mailcow.conf\" and add a parameter <code>ADDITIONAL_SAN</code> like this:</p> <p>Do not use quotes (<code>\"</code>) and do not use spaces between the names!</p> <pre><code>ADDITIONAL_SAN=smtp.*,cert1.example.com,cert2.example.org,whatever.*\n</code></pre> <p>Each name will be validated against its IPv6 address or - if IPv6 is not configured in your domain - IPv4 address.</p> <p>A wildcard name like <code>smtp.*</code> will try to obtain a smtp.DOMAIN_NAME SAN for each domain added to mailcow.</p> <p>Run <code>docker compose up -d</code> to recreate affected containers automatically.</p> <p>Info</p> <p>Using names other name <code>MAILCOW_HOSTNAME</code> to access the mailcow UI may need further configuration.</p> <p>If you plan to use a server name that is not <code>MAILCOW_HOSTNAME</code> to access the mailcow UI (for example by adding <code>mail.*</code> to <code>ADDITIONAL_SAN</code> make sure to populate that name in mailcow.conf via <code>ADDITIONAL_SERVER_NAMES</code>. Names must be separated by commas and must not contain spaces. If you skip this step, mailcow may respond with an incorrect site.</p> <pre><code>ADDITIONAL_SERVER_NAMES=webmail.domain.tld,other.example.tld\n</code></pre> <p>Run <code>docker compose up -d</code> to apply.</p>"},{"location":"post_installation/firststeps-ssl/#force-renewal","title":"Force renewal","text":"<p>To force a renewal, you need to create a file named <code>force_renew</code> and restart the <code>acme-mailcow</code> container:</p> <pre><code>cd /opt/mailcow-dockerized\ntouch data/assets/ssl/force_renew\ndocker compose restart acme-mailcow\n# Now check the logs for a renewal\ndocker compose logs --tail=200 -f acme-mailcow\n</code></pre> <p>The file will be deleted automatically.</p>"},{"location":"post_installation/firststeps-ssl/#validation-errors-and-how-to-skip-validation","title":"Validation errors and how to skip validation","text":"<p>You can skip the IP verification by setting <code>SKIP_IP_CHECK=y</code> in mailcow.conf (no quotes). Be warned that a misconfiguration will get you ratelimited by Let's Encrypt! This is primarily useful for multi-IP setups where the IP check would return the incorrect source IP address. Due to using dynamic IPs for acme-mailcow, source NAT is not consistent over restarts.</p> <p>If you encounter problems with \"HTTP validation\", but your IP address confirmation succeeds, you are most likely using firewalld, ufw or any other firewall, that disallows connections from <code>br-mailcow</code> to your external interface. Both firewalld and ufw disallow this by default. It is often not enough to just stop these firewall services. You'd need to stop mailcow (<code>docker compose down</code>), stop the firewall service, flush the chains and restart Docker.</p> <p>You can also skip this validation method by setting <code>SKIP_HTTP_VERIFICATION=y</code> in \"mailcow.conf\". Be warned that this is discouraged. In most cases, the HTTP verification is skipped to workaround unknown NAT reflection issues, which are not resolved by ignoring this specific network misconfiguration. If you encounter problems generating TLSA records in the DNS overview within mailcow, you are most likely having issues with NAT reflection you should fix.</p> <p>If you changed a SKIP_* parameter, run <code>docker compose up -d</code> to apply your changes.</p>"},{"location":"post_installation/firststeps-ssl/#disable-lets-encrypt","title":"Disable Let's Encrypt","text":""},{"location":"post_installation/firststeps-ssl/#disable-lets-encrypt-completely","title":"Disable Let's Encrypt completely","text":"<p>Set <code>SKIP_LETS_ENCRYPT=y</code> in \"mailcow.conf\" and recreate \"acme-mailcow\" by running <code>docker compose up -d</code>.</p>"},{"location":"post_installation/firststeps-ssl/#skip-all-names-but-mailcow_hostname","title":"Skip all names but ${MAILCOW_HOSTNAME}","text":"<p>Add <code>ONLY_MAILCOW_HOSTNAME=y</code> to \"mailcow.conf\" and recreate \"acme-mailcow\" by running <code>docker compose up -d</code>.</p>"},{"location":"post_installation/firststeps-ssl/#the-lets-encrypt-subjectaltname-limit-of-100-domains","title":"The Let's Encrypt subjectAltName limit of 100 domains","text":"<p>Let's Encrypt currently has a limit of 100 Domain Names per Certificate.</p> <p>By default, \"acme-mailcow\" will create a single SAN certificate for all validated domains (see the first section and Additional domain names). This provides best compatibility but means the Let's Encrypt limit exceeds if you add too many domains to a single mailcow installation.</p> <p>To solve this, you can configure <code>ENABLE_SSL_SNI</code> to generate:</p> <ul> <li>A main server certificate with <code>MAILCOW_HOSTNAME</code> and all fully qualified domain names in the <code>ADDITIONAL_SAN</code> config</li> <li>One additional certificate for each domain found in the database with autodiscover., autoconfig. and any other <code>ADDITIONAL_SAN</code> configured in this format (subdomain.*).</li> <li>Limitations: A certificate name <code>ADDITIONAL_SAN=test.example.com</code> will be added as SAN to the main certificate. A separate certificate/key pair will not be generated for this format.</li> </ul> <p>Postfix, Dovecot and Nginx will then serve these certificates with SNI.</p> <p>Set <code>ENABLE_SSL_SNI=y</code> in \"mailcow.conf\" and recreate \"acme-mailcow\" by running <code>docker compose up -d</code>.</p> <p>Warning</p> <p>Not all clients support SNI, see Dovecot documentation or Wikipedia. You should make sure these clients use the <code>MAILCOW_HOSTNAME</code> for secure connections if you enable this feature.</p> <p>Here is an example:</p> <ul> <li><code>MAILCOW_HOSTNAME=server.email.tld</code></li> <li><code>ADDITIONAL_SAN=webmail.email.tld,mail.*</code></li> <li>Mailcow email domains: \"domain1.tld\" and \"domain2.tld\"</li> </ul> <p>The following certificates will be generated:</p> <ul> <li><code>server.email.tld, webmail.email.tld</code> -&gt; this is the default certificate, all clients can connect with these domains</li> <li><code>mail.domain1.tld, autoconfig.domain1.tld, autodiscover.domain1.tld</code> -&gt; individual certificate for domain1.tld, cannot be used by clients without SNI support</li> <li><code>mail.domain2.tld, autoconfig.domain2.tld, autodiscover.domain2.tld</code> -&gt; individual certificate for domain2.tld, cannot be used by clients without SNI support</li> </ul>"},{"location":"post_installation/firststeps-ssl/#how-to-use-your-own-certificate","title":"How to use your own certificate","text":"<p>Make sure you disable mailcows internal LE client (see above).</p> <p>To use your own certificates, just save the combined certificate (containing the certificate and intermediate CA/CA if any) to <code>data/assets/ssl/cert.pem</code> and the corresponding key to <code>data/assets/ssl/key.pem</code>.</p> <p>IMPORTANT: Do not use symbolic links! Make sure you copy the certificates and do not link them to <code>data/assets/ssl</code>.</p> <p>Restart affected services afterwards:</p> <pre><code>docker restart $(docker ps -qaf name=postfix-mailcow)\ndocker restart $(docker ps -qaf name=nginx-mailcow)\ndocker restart $(docker ps -qaf name=dovecot-mailcow)\n</code></pre> <p>See Post-hook script for non-mailcow ACME clients for a full example script.</p>"},{"location":"post_installation/firststeps-ssl/#test-against-staging-acme-directory","title":"Test against staging ACME directory","text":"<p>Edit <code>mailcow.conf</code> and add <code>LE_STAGING=y</code>.</p> <p>Run <code>docker compose up -d</code> to activate your changes.</p>"},{"location":"post_installation/firststeps-ssl/#custom-directory-url","title":"Custom directory URL","text":"<p>Edit <code>mailcow.conf</code> and add the corresponding directory URL to the new variable <code>DIRECTORY_URL</code>:</p> <pre><code>DIRECTORY_URL=https://acme-custom-v9000.api.letsencrypt.org/directory\n</code></pre> <p>You cannot use <code>LE_STAGING</code> with <code>DIRECTORY_URL</code>. If both are set, only <code>LE_STAGING</code> is used.</p> <p>Run <code>docker compose up -d</code> to activate your changes.</p>"},{"location":"post_installation/firststeps-ssl/#check-your-configuration","title":"Check your configuration","text":"<p>Run <code>docker compose logs acme-mailcow</code> to find out why a validation fails.</p> <p>To check if nginx serves the correct certificate, simply use a browser of your choice and check the displayed certificate.</p> <p>To check the certificate served by Postfix, Dovecot and Nginx we will use <code>openssl</code>:</p> <pre><code># Connect via SMTP (587)\necho \"Q\" | openssl s_client -starttls smtp -crlf -connect mx.mailcow.email:587\n# Connect via IMAP (143)\necho \"Q\" | openssl s_client -starttls imap -showcerts -connect mx.mailcow.email:143\n# Connect via HTTPS (443)\necho \"Q\" | openssl s_client -connect mx.mailcow.email:443\n</code></pre> <p>To validate the expiry dates as returned by openssl against MAILCOW_HOSTNAME, you are able to use our helper script:</p> <pre><code>cd /opt/mailcow-dockerized\nbash helper-scripts/expiry-dates.sh\n</code></pre>"},{"location":"post_installation/firststeps-sync_jobs_migration/","title":"Sync job migration","text":"<p>Sync jobs are used to copy or move existing emails from an external IMAP server or within mailcow's existing mailboxes.</p> <p>Info</p> <p>Depending on your mailbox's ACL you may not have the option to add a sync job. Please contact your domain administrator if so.</p>"},{"location":"post_installation/firststeps-sync_jobs_migration/#setup-a-sync-job","title":"Setup a Sync Job","text":"<ol> <li> <p>In the \"Configuration &gt; Mail Setup\" or \"User Settings\" interface, create a new sync job.</p> </li> <li> <p>If you are an administrator, select the username of the downstream mailcow mailbox in the \"Username\" dropdown.</p> </li> <li> <p>Fill in the \"Host\" and \"Port\" fields with their respective correct values from the upstream IMAP server.</p> </li> <li> <p>In the \"Username\" and \"Password\" fields, supply the correct access credentials from the upstream IMAP server.</p> </li> <li> <p>Select the \"Encryption Method\". If the upstream IMAP server uses port 143, it is likely that the encryption method is TLS and SSL for port 993. Nevertheless, you can use PLAIN authentication, but it is stongly discouraged.</p> </li> <li> <p>For all ther other fields, you can leave them as is or modify them as desired.</p> </li> <li> <p>Make sure to tick \"Active\" and click \"Add\".</p> </li> </ol> <p>Info</p> <p>Once Completed, log into the mailbox and check if all emails are imported correctly. If all goes well, all your mails shall end up in your new mailbox. And don't forget to delete or deactivate the sync job after it is used.</p>"},{"location":"prerequisite/prerequisite-dns/","title":"DNS setup","text":"<p>Below you can find a list of recommended DNS records. While some are mandatory for a mail server (A, MX), others are recommended to build a good reputation score (TXT/SPF) or used for auto-configuration of mail clients (SRV).</p>"},{"location":"prerequisite/prerequisite-dns/#references","title":"References","text":"<ul> <li>A good article covering all relevant topics: \"3 DNS Records Every Email Marketer Must Know\"</li> <li>Another great one, but Zimbra as an example platform: \"Best Practices on Email Protection: SPF, DKIM and DMARC\"</li> <li>An in-depth discussion of SPF, DKIM and DMARC: \"How to eliminate spam and protect your name with DMARC\"</li> <li>A thorough guide on understanding DMARC: \"Demystifying DMARC: A guide to preventing email spoofing\"</li> </ul>"},{"location":"prerequisite/prerequisite-dns/#reverse-dns-of-your-ip-address","title":"Reverse DNS of your IP address","text":"<p>Make sure that the PTR record of your IP address matches the FQDN of your mailcow host: <code>${MAILCOW_HOSTNAME}</code> 1. This record is usually set at the provider you leased the IP address (server) from.</p>"},{"location":"prerequisite/prerequisite-dns/#the-minimal-dns-configuration","title":"The minimal DNS configuration","text":"<p>This example shows you a set of records for one domain managed by mailcow. Each domain that is added to mailcow needs at least this set of records to function correctly.</p> <pre><code># Name Type Value\nmail IN A 1.2.3.4\nautodiscover IN CNAME mail.example.org. (your ${MAILCOW_HOSTNAME})\nautoconfig IN CNAME mail.example.org. (your ${MAILCOW_HOSTNAME})\n@ IN MX 10 mail.example.org. (your ${MAILCOW_HOSTNAME})\n</code></pre> <p>Note: The <code>mail</code> DNS record which binds the subdomain to the given ip address must only be set for the domain on which mailcow is running and that is used to access the web interface. For every other mailcow managed domain, the <code>MX</code> record will route the traffic.</p>"},{"location":"prerequisite/prerequisite-dns/#dkim-spf-and-dmarc","title":"DKIM, SPF and DMARC","text":"<p>In the example DNS zone file snippet below, a simple SPF TXT record is used to only allow THIS server (the MX) to send mail for your domain. Every other server is disallowed but able to (\"<code>~all</code>\"). Please refer to SPF Project for further reading.</p> <pre><code># Name Type Value\n@ IN TXT \"v=spf1 mx a -all\"\n</code></pre> <p>It is highly recommended to create a DKIM TXT record in your mailcow UI and set the corresponding TXT record in your DNS records. Please refer to OpenDKIM for further reading.</p> <pre><code># Name Type Value\ndkim._domainkey IN TXT \"v=DKIM1; k=rsa; t=s; s=email; p=...\"\n</code></pre> <p>The last step in protecting yourself and others is the implementation of a DMARC TXT record, for example by using the DMARC Assistant (check).</p> <pre><code># Name Type Value\n_dmarc IN TXT \"v=DMARC1; p=reject; rua=mailto:mailauth-reports@example.org\"\n</code></pre>"},{"location":"prerequisite/prerequisite-dns/#the-advanced-dns-configuration","title":"The advanced DNS configuration","text":"<p>SRV records specify the server(s) for a specific protocol on your domain. If you want to explicitly announce a service as not provided, give \".\" as the target address (instead of \"mail.example.org.\"). Please refer to RFC 2782.</p> <pre><code># Name Type Priority Weight Port Value\n_autodiscover._tcp IN SRV 0 1 443 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_caldavs._tcp IN SRV 0 1 443 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_caldavs._tcp IN TXT \"path=/SOGo/dav/\"\n_carddavs._tcp IN SRV 0 1 443 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_carddavs._tcp IN TXT \"path=/SOGo/dav/\"\n_imap._tcp IN SRV 0 1 143 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_imaps._tcp IN SRV 0 1 993 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_pop3._tcp IN SRV 0 1 110 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_pop3s._tcp IN SRV 0 1 995 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_sieve._tcp IN SRV 0 1 4190 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_smtps._tcp IN SRV 0 1 465 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_submission._tcp IN SRV 0 1 587 mail.example.org. (your ${MAILCOW_HOSTNAME})\n</code></pre>"},{"location":"prerequisite/prerequisite-dns/#testing","title":"Testing","text":"<p>Here are some tools you can use to verify your DNS configuration:</p> <ul> <li>MX Toolbox (DNS, SMTP, RBL)</li> <li>port25.com (DKIM, SPF)</li> <li>Mail-tester (DKIM, DMARC, SPF)</li> <li>DMARC Analyzer (DMARC, SPF)</li> <li>MultiRBL.valli.org (DNSBL, RBL, FCrDNS)</li> </ul>"},{"location":"prerequisite/prerequisite-dns/#misc","title":"Misc","text":""},{"location":"prerequisite/prerequisite-dns/#optional-dmarc-statistics","title":"Optional DMARC Statistics","text":"<p>If you are interested in statistics, you can additionally register with some of the many below DMARC statistic services - or self-host your own.</p> <p>Tip</p> <p>It is worth considering that if you request DMARC statistic reports to your mailcow server and your mailcow server is not configured correctly to receive these reports, you may not get accurate and complete results. Please consider using an alternative email domain for receiving DMARC reports.</p> <p>It is worth mentioning, that the following suggestions are not a comprehensive list of all services and tools available, but only a small few of the many choices.</p> <ul> <li>Postmaster Tool</li> <li>parsedmarc (self-hosted)</li> <li>Fraudmarc</li> <li>Postmark</li> <li>Dmarcian</li> </ul> <p>Tip</p> <p>These services may provide you with a TXT record you need to insert into your DNS records as the provider specifies. Please ensure you read the provider's documentation from the service you choose as this process may vary.</p>"},{"location":"prerequisite/prerequisite-dns/#email-test-for-spf-dkim-and-dmarc","title":"Email test for SPF, DKIM and DMARC:","text":"<p>To run a rudimentary email authentication check, send a mail to <code>check-auth at verifier.port25.com</code> and wait for a reply. You will find a report similar to the following:</p> <pre><code>==========================================================\nSummary of Results\n==========================================================\nSPF check: pass\n\"iprev\" check: pass\nDKIM check: pass\nDKIM check: pass\nSpamAssassin check: ham\n\n==========================================================\nDetails:\n==========================================================\n....\n</code></pre> <p>The full report will contain more technical details.</p>"},{"location":"prerequisite/prerequisite-dns/#fully-qualified-domain-name-fqdn","title":"Fully Qualified Domain Name (FQDN)","text":"<ol> <li> <p>A Fully Qualified Domain Name (FQDN) is the complete (absolute) domain name for a specific computer or host, on the Internet. The FQDN consists of at least three parts divided by a dot: the hostname, the domain name, and the Top Level Domain (TLD for short). In the example of <code>mx.mailcow.email</code> the hostname would be <code>mx</code>, the domain name <code>mailcow</code> and the TLD <code>email</code>.\u00a0\u21a9</p> </li> </ol>"},{"location":"prerequisite/prerequisite-system/","title":"Prepare your system","text":"<p>Before you run mailcow: dockerized, there are a few requirements that you should check:</p> <p>Warning</p> <p>Do not try to install mailcow on a Synology/QNAP device (any NAS), OpenVZ, LXC or other container platforms. KVM, ESX, Hyper-V and other full virtualization platforms are supported.</p> <p>Info</p> <ul> <li>mailcow: dockerized requires some ports to be open for incoming connections, so make sure that your firewall is not blocking these.</li> <li>Make sure that no other application is interfering with mailcow's configuration, such as another mail service</li> <li>A correct DNS setup is crucial to every good mailserver setup, so please make sure you got at least the basics covered before you begin!</li> <li>Make sure that your system has a correct date and time setup. This is crucial for various components like two factor TOTP authentication.</li> </ul>"},{"location":"prerequisite/prerequisite-system/#minimum-system-resources","title":"Minimum System Resources","text":"<p>Not supported</p> <p>OpenVZ, Virtuozzo and LXC</p> <p>Please make sure that your system has at least the following resources:</p> Resource mailcow: dockerized CPU 1 GHz RAM Minimum 6 GiB + 1 GiB swap (default config) Disk 20 GiB (without emails) System Type x86_64 <p>ClamAV and Solr can be greedy with RAM. You may disable them in <code>mailcow.conf</code> by settings <code>SKIP_CLAMD=y</code> and <code>SKIP_SOLR=y</code>.</p> <p>Info</p> <p>We are aware that a pure MTA can run on 128 MiB RAM. mailcow is a full-grown and ready-to-use groupware with many extras making life easier. mailcow comes with a webserver, webmailer, ActiveSync (MS), antivirus, antispam, indexing (Solr), document scanner (Oletools), SQL (MariaDB), Cache (Redis), MDA, MTA, various web services etc.</p> <p>A single SOGo worker can acquire ~350 MiB RAM before it gets purged. The more ActiveSync connections you plan to use, the more RAM you will need. A default configuration spawns 20 workers.</p>"},{"location":"prerequisite/prerequisite-system/#ram-usage-examples","title":"RAM usage examples","text":"<p>A company with 15 phones (EAS enabled) and about 50 concurrent IMAP connections should plan 16 GiB RAM.</p> <p>6 GiB RAM + 1 GiB swap are fine for most private installations while 8 GiB RAM are recommended for ~5 to 10 users.</p> <p>We can help to correctly plan your setup as part of our support.</p>"},{"location":"prerequisite/prerequisite-system/#supported-os","title":"Supported OS","text":"<p>Basically, mailcow can be used on any distribution that is supported by Docker CE (see https://docs.docker.com/install/). However, in some cases there may be incompatibilities between the operating systems and the mailcow components.</p> <p>The following table contains all operating systems officially supported and tested by us (as of November 2022):</p> OS Compatibility Alpine 3.16 and older \u26a0\ufe0f Centos 7 \u2705 Debian 10, 11 \u2705 Ubuntu 18.04, 20.04, 22.04 \u2705 Rocky Linux 9 \u2754 <p>Legend<p>\u2705 = Works out of the box using the instructions. \u26a0\ufe0f = Requires some manual adjustments otherwise usable. \u274c = In general NOT Compatible. \u2754 = Pending.</p> </p> <p>Note: All other operating systems (not mentioned) may also work, but have not been officially tested.</p>"},{"location":"prerequisite/prerequisite-system/#firewall-ports","title":"Firewall &amp; Ports","text":"<p>Please check if any of mailcow's standard ports are open and not in use by other applications:</p> <pre><code>ss -tlpn | grep -E -w '25|80|110|143|443|465|587|993|995|4190'\n# or:\nnetstat -tulpn | grep -E -w '25|80|110|143|443|465|587|993|995|4190'\n</code></pre> <p>Danger</p> <p>There are several problems with running mailcow on a firewalld/ufw enabled system. You should disable it (if possible) and move your ruleset to the DOCKER-USER chain, which is not cleared by a Docker service restart, instead. See this (blog.donnex.net) or this (unrouted.io) guide for information about how to use iptables-persistent with the DOCKER-USER chain. As mailcow runs dockerized, INPUT rules have no effect on restricting access to mailcow. Use the FORWARD chain instead.</p> <p>If this command returns any results please remove or stop the application running on that port. You may also adjust mailcows ports via the <code>mailcow.conf</code> configuration file.</p>"},{"location":"prerequisite/prerequisite-system/#default-ports","title":"Default Ports","text":"<p>If you have a firewall in front of mailcow, please make sure that these ports are open for incoming connections:</p> Service Protocol Port Container Variable Postfix SMTP TCP 25 postfix-mailcow <code>${SMTP_PORT}</code> Postfix SMTPS TCP 465 postfix-mailcow <code>${SMTPS_PORT}</code> Postfix Submission TCP 587 postfix-mailcow <code>${SUBMISSION_PORT}</code> Dovecot IMAP TCP 143 dovecot-mailcow <code>${IMAP_PORT}</code> Dovecot IMAPS TCP 993 dovecot-mailcow <code>${IMAPS_PORT}</code> Dovecot POP3 TCP 110 dovecot-mailcow <code>${POP_PORT}</code> Dovecot POP3S TCP 995 dovecot-mailcow <code>${POPS_PORT}</code> Dovecot ManageSieve TCP 4190 dovecot-mailcow <code>${SIEVE_PORT}</code> HTTP(S) TCP 80/443 nginx-mailcow <code>${HTTP_PORT}</code> / <code>${HTTPS_PORT}</code> <p>To bind a service to an IP address, you can prepend the IP like this: <code>SMTP_PORT=1.2.3.4:25</code></p> <p>Important: You cannot use IP:PORT bindings in HTTP_PORT and HTTPS_PORT. Please use <code>HTTP_PORT=1234</code> and <code>HTTP_BIND=1.2.3.4</code> instead.</p>"},{"location":"prerequisite/prerequisite-system/#important-for-hetzner-firewalls","title":"Important for Hetzner firewalls","text":"<p>Quoting https://github.com/chermsen via https://github.com/mailcow/mailcow-dockerized/issues/497#issuecomment-469847380 (THANK YOU!):</p> <p>For all who are struggling with the Hetzner firewall:</p> <p>Port 53 unimportant for the firewall configuration in this case. According to the documentation unbound uses the port range 1024-65535 for outgoing requests. Since the Hetzner Robot Firewall is a static firewall (each incoming packet is checked isolated) - the following rules must be applied:</p> <p>For TCP <pre><code>SRC-IP: ---\nDST IP: ---\nSRC Port: ---\nDST Port: 1024-65535\nProtocol: tcp\nTCP flags: ack\nAction: Accept\n</code></pre></p> <p>For UDP <pre><code>SRC-IP: ---\nDST IP: ---\nSRC Port: ---\nDST Port: 1024-65535\nProtocol: udp\nAction: Accept\n</code></pre></p> <p>If you want to apply a more restrictive port range you have to change the config of unbound first (after installation):</p> <p>{mailcow-dockerized}/data/conf/unbound/unbound.conf: <pre><code>outgoing-port-avoid: 0-32767\n</code></pre></p> <p>Now the firewall rules can be adjusted as follows:</p> <pre><code>[...]\nDST Port: 32768-65535\n[...]\n</code></pre>"},{"location":"prerequisite/prerequisite-system/#date-and-time","title":"Date and Time","text":"<p>To ensure that you have the correct date and time setup on your system, please check the output of <code>timedatectl status</code>:</p> <pre><code>$ timedatectl status\n Local time: Sat 2017-05-06 02:12:33 CEST\n Universal time: Sat 2017-05-06 00:12:33 UTC\n RTC time: Sat 2017-05-06 00:12:32\n Time zone: Europe/Berlin (CEST, +0200)\n NTP enabled: yes\nNTP synchronized: yes\n RTC in local TZ: no\n DST active: yes\n Last DST change: DST began at\n Sun 2017-03-26 01:59:59 CET\n Sun 2017-03-26 03:00:00 CEST\n Next DST change: DST ends (the clock jumps one hour backwards) at\n Sun 2017-10-29 02:59:59 CEST\n Sun 2017-10-29 02:00:00 CET\n</code></pre> <p>The lines <code>NTP enabled: yes</code> and <code>NTP synchronized: yes</code> indicate whether you have NTP enabled and if it's synchronized.</p> <p>To enable NTP you need to run the command <code>timedatectl set-ntp true</code>. You also need to edit your <code>/etc/systemd/timesyncd.conf</code>:</p> <pre><code># vim /etc/systemd/timesyncd.conf\n[Time]\nNTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org\n</code></pre>"},{"location":"prerequisite/prerequisite-system/#hetzner-cloud-and-probably-others","title":"Hetzner Cloud (and probably others)","text":"<p>Check <code>/etc/network/interfaces.d/50-cloud-init.cfg</code> and change the IPv6 interface from eth0:0 to eth0:</p> <pre><code># Wrong:\nauto eth0:0\niface eth0:0 inet6 static\n# Right:\nauto eth0\niface eth0 inet6 static\n</code></pre> <p>Reboot or restart the interface. You may want to disable cloud-init network changes.</p>"},{"location":"prerequisite/prerequisite-system/#mtu","title":"MTU","text":"<p>Especially relevant for OpenStack users: Check your MTU and set it accordingly in docker-compose.yml. See Troubleshooting in our Installation guide.</p>"},{"location":"third_party/borgmatic/third_party-borgmatic/","title":"Borgmatic Backup","text":""},{"location":"third_party/borgmatic/third_party-borgmatic/#introduction","title":"Introduction","text":"<p>Borgmatic is a great way to run backups on your Mailcow setup as it securely encrypts your data and is extremely easy to set up.</p> <p>Due to it's deduplication capabilities you can store a great number of backups without wasting large amounts of disk space. This allows you to run backups in very short intervals to ensure minimal data loss when the need arises to recover data from a backup.</p> <p>This document guides you through the process to enable continuous backups for mailcow with borgmatic. The borgmatic functionality is provided by the borgmatic Docker image. Check out the <code>README</code> in that repository to find out about the other options (such as push notifications) that are available. This guide only covers the basics.</p>"},{"location":"third_party/borgmatic/third_party-borgmatic/#setting-up-borgmatic","title":"Setting up borgmatic","text":""},{"location":"third_party/borgmatic/third_party-borgmatic/#create-or-amend-docker-composeoverrideyml","title":"Create or amend <code>docker-compose.override.yml</code>","text":"<p>In the mailcow-dockerized root folder create or edit <code>docker-compose.override.yml</code> and insert the following configuration:</p> <pre><code>version: '2.1'\n\nservices:\n borgmatic-mailcow:\n image: ghcr.io/borgmatic-collective/borgmatic\n hostname: mailcow\n restart: always\n dns: ${IPV4_NETWORK:-172.22.1}.254\n volumes:\n - vmail-vol-1:/mnt/source/vmail:ro\n - crypt-vol-1:/mnt/source/crypt:ro\n - redis-vol-1:/mnt/source/redis:ro,z\n - rspamd-vol-1:/mnt/source/rspamd:ro,z\n - postfix-vol-1:/mnt/source/postfix:ro,z\n - mysql-socket-vol-1:/var/run/mysqld/:z\n - borg-config-vol-1:/root/.config/borg:Z\n - borg-cache-vol-1:/root/.cache/borg:Z\n - ./data/conf/borgmatic/etc:/etc/borgmatic.d:Z\n - ./data/conf/borgmatic/ssh:/root/.ssh:Z\n environment:\n - TZ=${TZ}\n - BORG_PASSPHRASE=YouBetterPutSomethingRealGoodHere\n networks:\n mailcow-network:\n aliases:\n - borgmatic\n\nvolumes:\n borg-cache-vol-1:\n borg-config-vol-1:\n</code></pre> <p>Ensure that you change the <code>BORG_PASSPHRASE</code> to a secure passphrase of your choosing.</p> <p>For security reasons we mount the maildir as read-only. If you later want to restore data you will need to remove the <code>ro</code> flag prior to restoring the data. This is described in the section on restoring backups.</p>"},{"location":"third_party/borgmatic/third_party-borgmatic/#create-dataconfborgmaticetcconfigyaml","title":"Create <code>data/conf/borgmatic/etc/config.yaml</code>","text":"<p>Next, we need to create the borgmatic configuration.</p> <pre><code>source mailcow.conf\ncat &lt;&lt;EOF &gt; data/conf/borgmatic/etc/config.yaml\nlocation:\n source_directories:\n - /mnt/source\n repositories:\n - ssh://user@rsync.net:22/./mailcow\n exclude_patterns:\n - '/mnt/source/postfix/public/'\n - '/mnt/source/postfix/private/'\n - '/mnt/source/rspamd/rspamd.sock'\n\nretention:\n keep_hourly: 24\n keep_daily: 7\n keep_weekly: 4\n keep_monthly: 6\n prefix: \"\"\n\nhooks:\n mysql_databases:\n - name: ${DBNAME}\n username: ${DBUSER}\n password: ${DBPASS}\n options: --default-character-set=utf8mb4\nEOF\n</code></pre> <p>Creating the file in this way ensures the correct MySQL credentials are pulled in from <code>mailcow.conf</code>.</p> <p>This file is a minimal example for using borgmatic with an account <code>user</code> on the cloud storage provider <code>rsync.net</code> for a repository called <code>mailcow</code> (see <code>repositories</code> setting). It will backup both the maildir and MySQL database, which is all you should need to restore your mailcow setup after an incident. The retention settings will keep one archive for each hour of the past 24 hours, one per day of the week, one per week of the month and one per month of the past half year.</p> <p>Check the borgmatic documentation on how to use other types of repositories or configuration options. If you choose to use a local filesystem as a backup destination make sure to mount it into the container. The container defines a volume called <code>/mnt/borg-repository</code> for this purpose.</p> <p>Note</p> <p>If you do not use rsync.net you can most likely drop the <code>remote_path</code> element from your config.</p>"},{"location":"third_party/borgmatic/third_party-borgmatic/#create-a-crontab","title":"Create a crontab","text":"<p>Create a new text file in <code>data/conf/borgmatic/etc/crontab.txt</code> with the following content:</p> <pre><code>14 * * * * PATH=$PATH:/usr/local/bin /usr/local/bin/borgmatic --stats -v 0 2&gt;&amp;1\n</code></pre> <p>This file expects crontab syntax. The example shown here will trigger the backup to run every hour at 14 minutes past the hour and log some nice stats at the end.</p>"},{"location":"third_party/borgmatic/third_party-borgmatic/#place-ssh-keys-in-folder","title":"Place SSH keys in folder","text":"<p>Place the SSH keys you intend to use for remote repository connections in <code>data/conf/borgmatic/ssh</code>. OpenSSH expects the usual <code>id_rsa</code>, <code>id_ed25519</code> or similar to be in this directory. Ensure the file is <code>chmod 600</code> and not world readable or OpenSSH will refuse to use the SSH key.</p>"},{"location":"third_party/borgmatic/third_party-borgmatic/#bring-up-the-container","title":"Bring up the container","text":"<p>For the next step we need the container to be up and running in a configured state. To do that run:</p> <pre><code>docker compose up -d\n</code></pre>"},{"location":"third_party/borgmatic/third_party-borgmatic/#initialize-the-repository","title":"Initialize the repository","text":"<p>By now your borgmatic container is up and running, but the backups will currently fail due to the repository not being initialized.</p> <p>To initialize the repository run:</p> <pre><code>docker compose exec borgmatic-mailcow borgmatic init --encryption repokey-blake2\n</code></pre> <p>You will be asked you to authenticate the SSH host key of your remote repository server. See if it matches and confirm the prompt by entering <code>yes</code>. The repository will be initialized with the passphrase you set in the <code>BORG_PASSPHRASE</code> environment variable earlier.</p> <p>When using any of the <code>repokey</code> encryption methods the encryption key will be stored in the repository itself and not on the client, so there is no further action required in this regard. If you decide to use a <code>keyfile</code> instead of a <code>repokey</code> make sure you export the key and back it up separately. Check the Exporting Keys section for how to retrieve the key.</p>"},{"location":"third_party/borgmatic/third_party-borgmatic/#restart-container","title":"Restart container","text":"<p>Now that we finished configuring and initializing the repository restart the container to ensure it is in a defined state:</p> <pre><code>docker compose restart borgmatic-mailcow\n</code></pre>"},{"location":"third_party/borgmatic/third_party-borgmatic/#restoring-from-a-backup","title":"Restoring from a backup","text":"<p>Restoring a backup assumes you are starting off with a fresh installation of mailcow, and you currently do not have any custom data in your maildir or your mailcow database.</p>"},{"location":"third_party/borgmatic/third_party-borgmatic/#restore-maildir","title":"Restore maildir","text":"<p>Warning</p> <p>Doing this will overwrite files in your maildir! Do not run this unless you actually intend to recover mail files from a backup.</p> <p>If you use SELinux in Enforcing mode</p> <p>If you are using mailcow on a host with SELinux in Enforcing mode you will have to temporarily disable it during extraction of the archive as the mailcow setup labels the vmail volume as private, belonging to the dovecot container exclusively. SELinux will (rightfully) prevent any other container, such as the borgmatic container, from writing to this volume.</p> <p>Before running a restore you must make the vmail volume writeable in <code>docker-compose.override.yml</code> by removing the <code>ro</code> flag from the volume. Then you can use the following command to restore the maildir from a backup:</p> <pre><code>docker compose exec borgmatic-mailcow borgmatic extract --path mnt/source --archive latest\n</code></pre> <p>Alternatively you can specify any archive name from the list of archives (see Listing all available archives)</p>"},{"location":"third_party/borgmatic/third_party-borgmatic/#restore-mysql","title":"Restore MySQL","text":"<p>Warning</p> <p>Running this command will delete and recreate the mailcow database! Do not run this unless you actually intend to recover the mailcow database from a backup.</p> <p>To restore the MySQL database from the latest archive use this command:</p> <pre><code>docker compose exec borgmatic-mailcow borgmatic restore --archive latest\n</code></pre> <p>Alternatively you can specify any archive name from the list of archives (see Listing all available archives)</p>"},{"location":"third_party/borgmatic/third_party-borgmatic/#after-restoring","title":"After restoring","text":"<p>After restoring you need to restart mailcow. If you disabled SELinux enforcing mode now would be a good time to re-enable it.</p> <p>To restart mailcow use the follwing command:</p> <pre><code>docker compose down &amp;&amp; docker compose up -d\n</code></pre> <p>If you use SELinux this will also trigger the re-labeling of all files in your vmail volume. Be patient, as this may take a while if you have lots of files.</p>"},{"location":"third_party/borgmatic/third_party-borgmatic/#useful-commands","title":"Useful commands","text":""},{"location":"third_party/borgmatic/third_party-borgmatic/#manual-archiving-run-with-debugging-output","title":"Manual archiving run (with debugging output)","text":"<pre><code>docker compose exec borgmatic-mailcow borgmatic -v 2\n</code></pre>"},{"location":"third_party/borgmatic/third_party-borgmatic/#listing-all-available-archives","title":"Listing all available archives","text":"<pre><code>docker compose exec borgmatic-mailcow borgmatic list\n</code></pre>"},{"location":"third_party/borgmatic/third_party-borgmatic/#break-lock","title":"Break lock","text":"<p>When borg is interrupted during an archiving run it will leave behind a stale lock that needs to be cleared before any new operations can be performed:</p> <pre><code>docker compose exec borgmatic-mailcow borg break-lock user@rsync.net:mailcow\n</code></pre> <p>Where <code>user@rsync.net:mailcow</code> is the URI to your repository.</p> <p>Now would be a good time to do a manual archiving run to ensure it can be successfully performed.</p>"},{"location":"third_party/borgmatic/third_party-borgmatic/#exporting-keys","title":"Exporting keys","text":"<p>When using any of the <code>keyfile</code> methods for encryption you MUST take care of backing up the key files yourself. The key files are generated when you initialize the repository. The <code>repokey</code> methods store the key file within the repository, so a manual backup isn't as essential.</p> <p>Note that in either case you also must have the passphrase to decrypt any archives.</p> <p>To fetch the keyfile run:</p> <pre><code>docker compose exec borgmatic-mailcow borg key export --paper user@rsync.net:mailcow\n</code></pre> <p>Where <code>user@rsync.net:mailcow</code> is the URI to your repository.</p>"},{"location":"third_party/checkmk/u_e-checkmk/","title":"CheckMK","text":"<p>Mailcow provides the ability to check for updates using its own update script.</p> <p>If you want to check for mailcow updates using checkmk, you can create an executable file in the <code>local</code> directory of the checkmk agent (typically <code>/usr/lib/check_mk_agent/local/</code>) with the name <code>mailcow_update</code> and the following content:</p> <pre><code>#!/bin/bash\ncd /opt/mailcow-dockerized/ &amp;&amp; ./update.sh -c &gt;/dev/null\nstatus=$?\nif [ $status -eq 3 ]; then\n echo \"0 \\\"mailcow_update\\\" mailcow_update=0;1;;0;1 No updates available.\"\nelif [ $status -eq 0 ]; then\n echo \"1 \\\"mailcow_update\\\" mailcow_update=1;1;;0;1 Updated code is available.\\nThe changes can be found here: https://github.com/mailcow/mailcow-dockerized/commits/master\"\nelse\n echo \"3 \\\"mailcow_update\\\" - Unknown output from update script ...\"\nfi\nexit\n</code></pre> <p>If the mailcow installation directory is not <code>/opt/</code>, adjust this in the 2nd line.</p> <p>After that re-inventory the services for your mailcow host in checmk and a new check named <code>mailcow_update</code> should be selectable.</p> <p>This will run the <code>mailcow_update</code> everytime checkmk agent is checked, you can cache the result by placing the script in a subfolder named the number of seconds you wish to cache it. \\ <code>/usr/lib/check_mk_agent/local/3600/</code> will cache the response for an 3600 seconds (1 hour).</p>"},{"location":"third_party/checkmk/u_e-checkmk/#screenshots","title":"Screenshots","text":""},{"location":"third_party/checkmk/u_e-checkmk/#no-updates-available","title":"No updates available","text":"<p>If there are no updates available, <code>OK</code> is displayed.</p>"},{"location":"third_party/checkmk/u_e-checkmk/#new-updates-available","title":"New updates available","text":"<p>If updates are available, <code>WARN</code> is displayed.</p> <p>If <code>CRIT</code> is desired instead, replace the 7th line with the following:</p> <pre><code> echo \"2 \\\"mailcow_update\\\" mailcow_update=1;1;;0;1 Updated code is available.\\nThe changes can be found here: https://github.com/mailcow/mailcow-dockerized/commits/master\"\n</code></pre>"},{"location":"third_party/checkmk/u_e-checkmk/#detailed-check-output","title":"Detailed check output","text":"<ul> <li>This provides a link to mailcow's GitHub commits, if updates are available.</li> <li>Metrics are also displayed ( not only when updates are available):</li> <li>0 = No updates available</li> <li>1 = New updates available</li> </ul>"},{"location":"third_party/exchange_onprem/third_party-exchange_onprem/","title":"Exchange Hybrid Setup","text":"<p>Using Microsoft Exchange in a hybrid setup is possible with mailcow. With this setup you can add mailboxes on your mailcow and still use Exchange Online Protection. All mailboxes setup in Exchange will receive their mails as usual, while with the hybrid approach additional Mailboxes can be setup in mailcow without any further configuration.</p> <p>This setup becomes very handy if you have enabled the Office 365 security defaults and third party applications can no longer login into your mailboxes by any of the supported methods.</p>"},{"location":"third_party/exchange_onprem/third_party-exchange_onprem/#requirements","title":"Requirements","text":"<ul> <li>The mx Record of your domain needs to point at the Exchange mail service. Log into your Admin center and look out for the dns settings of your domain to find your personalized gateway domain. It should look like this <code>contoso-com.mail.protection.outlook.com</code>. Contact your domain registrant to get further information on how to change mx record.</li> <li>The domain you want to have additional mailboxes for must be setup as <code>internal relay domain</code> in Exchange.<ol> <li>Log in to your Exchange Admin Center</li> <li>Select the <code>mail flow</code> pane and click on <code>accepted domains</code></li> <li>Select the domain and switch it from <code>authorative</code> to <code>internal relay</code></li> </ol> </li> </ul>"},{"location":"third_party/exchange_onprem/third_party-exchange_onprem/#set-up-the-mailcow","title":"Set up the mailcow","text":"<p>Your mailcow needs to relay all mails to your personalized Exchange Host. It is the same host address we already looked up for the mx Record.</p> <ol> <li>Add the domain to your mailcow</li> <li>Add your personalized Exchange Host address as relayhost</li> <li>Add your personalized Exchange Host address as forwarding host to unconditionally accepted all relayed mails from Exchange. (Admin &gt; Configuration &amp; Details &gt; Configuration Dropdown &gt; Forwarding Hosts)</li> <li>Go to the domain settings and select the newly added host on the <code>Sender-dependent transports</code> dropdown. Enable relaying by ticking the <code>Relay this domain</code>, <code>Relay all recipients</code> and the <code>Relay non-existing mailboxes only.</code> checkboxes</li> </ol> <p>Info</p> <p>From now on your mailcow will accept all mails relayed from Exchange. The inbound filtering and so the neural learning of your cow will no longer work. Because all mails are routed through Exchange the filtering process is handled there.</p>"},{"location":"third_party/exchange_onprem/third_party-exchange_onprem/#set-up-connectors-in-exchange","title":"Set up Connectors in Exchange","text":"<p>All mail traffic now goes through Exchange. At this point the Exchange Online Protection already filters all incoming and outgoing mails. Now we need to set up two connectors to relay incoming mails from our Exchange Service to the mailcow and another one to allow mails relayed from the mailcow to our exchange service. You can follow the official guide from Microsoft.</p> <p>Warning</p> <p>For the connector that handles mails from your mailcow to Exchange Microsoft offers two ways of authenticating it. The recommended way is to use a tls certificate configured with a subject name that matches an accepted domain in Exchange. Otherwise you need to choose authentication with the static ip address of your mailcow.</p>"},{"location":"third_party/exchange_onprem/third_party-exchange_onprem/#validating","title":"Validating","text":"<p>The easiest way to validate the hybrid setup is by sending a mail from the internet to a mailbox that only exists on the mailcow and vice versa.</p>"},{"location":"third_party/exchange_onprem/third_party-exchange_onprem/#common-issues","title":"Common Issues","text":"<ul> <li>The connector validation from Exchange to your mailcow failed with <code>550 5.1.10 RESOLVER.ADR.RecipientNotFound; Recipient test@contoso.com not found by SMTP address lookup</code> Possible Solution: Your domain is not set up as <code>internal relay</code>. Exchange therefore cannot find the recipient</li> <li>Mails sent from the mailcow to a mailbox in the internet cannot be sent. Non Delivery Report with error <code>550 5.7.64 TenantAttribution; Relay Access Denied</code> Possible Solution: The authentication method failed. Make sure the certificate subject matches an accepted domain in Exchange. Try authenticating by static ip instead.</li> </ul> <p>Microsoft Guide for the connector setup and additional requirements: https://docs.microsoft.com/exchange/mail-flow-best-practices/use-connectors-to-configure-mail-flow/set-up-connectors-to-route-mail#prerequisites-for-your-on-premises-email-environment</p>"},{"location":"third_party/gitea/third_party-gitea/","title":"Gitea","text":"<p>With Gitea' ability to authenticate over SMTP it is trivial to integrate it with mailcow. Few changes are needed:</p> <p>1. Open <code>docker-compose.override.yml</code> and add gitea:</p> <pre><code>version: '2.1'\nservices:\n\n gitea-mailcow:\n image: gitea/gitea:1\n volumes:\n - ./data/gitea:/data\n networks:\n mailcow-network:\n aliases:\n - gitea\n ports:\n - \"${GITEA_SSH_PORT:-127.0.0.1:4000}:22\"\n</code></pre> <p>2. Create <code>data/conf/nginx/site.gitea.custom</code>, add: <pre><code>location /gitea/ {\n proxy_pass http://gitea:3000/;\n}\n</code></pre></p> <p>3. Open <code>mailcow.conf</code> and define the binding you want gitea to use for SSH. Example:</p> <pre><code>GITEA_SSH_PORT=127.0.0.1:4000\n</code></pre> <p>5. Run <code>docker compose up -d</code> to bring up the gitea container and run <code>docker compose restart nginx-mailcow</code> afterwards.</p> <p>6. If you forced mailcow to https, execute step 9 and restart gitea with <code>docker compose restart gitea-mailcow</code> . Go head with step 7 (Remember to use https instead of http, <code>https://mx.example.org/gitea/</code> </p> <p>7. Open <code>http://${MAILCOW_HOSTNAME}/gitea/</code>, for example <code>http://mx.example.org/gitea/</code>. For database details set <code>mysql</code> as database host. Use the value of DBNAME found in mailcow.conf as database name, DBUSER as database user and DBPASS as database password.</p> <p>8. Once the installation is complete, login as admin and set \"settings\" -&gt; \"authorization\" -&gt; \"enable SMTP\". SMTP Host should be <code>postfix</code> with port <code>587</code>, set <code>Skip TLS Verify</code> as we are using an unlisted SAN (\"postfix\" is most likely not part of your certificate).</p> <p>9. Create <code>data/gitea/gitea/conf/app.ini</code> and set following values. You can consult gitea cheat sheet for their meaning and other possible values.</p> <pre><code>[server]\nSSH_LISTEN_PORT = 22\n# For GITEA_SSH_PORT=127.0.0.1:4000 in mailcow.conf, set:\nSSH_DOMAIN = 127.0.0.1\nSSH_PORT = 4000\n# For MAILCOW_HOSTNAME=mx.example.org in mailcow.conf (and default ports for HTTPS), set:\nROOT_URL = https://mx.example.org/gitea/\n</code></pre> <p>10. Restart gitea with <code>docker compose restart gitea-mailcow</code>. Your users should be able to login with mailcow managed accounts.</p>"},{"location":"third_party/gogs/third_party-gogs/","title":"Gogs","text":"<p>With Gogs' ability to authenticate over SMTP it is trivial to integrate it with mailcow. Few changes are needed:</p> <p>1. Open <code>docker-compose.override.yml</code> and add Gogs:</p> <pre><code>version: '2.1'\nservices:\n\n gogs-mailcow:\n image: gogs/gogs\n volumes:\n - ./data/gogs:/data\n networks:\n mailcow-network:\n aliases:\n - gogs\n ports:\n - \"${GOGS_SSH_PORT:-127.0.0.1:4000}:22\"\n</code></pre> <p>2. Create <code>data/conf/nginx/site.gogs.custom</code>, add: <pre><code>location /gogs/ {\n proxy_pass http://gogs:3000/;\n}\n</code></pre></p> <p>3. Open <code>mailcow.conf</code> and define the binding you want Gogs to use for SSH. Example:</p> <pre><code>GOGS_SSH_PORT=127.0.0.1:4000\n</code></pre> <p>5. Run <code>docker compose up -d</code> to bring up the Gogs container and run <code>docker compose restart nginx-mailcow</code> afterwards.</p> <p>6. Open <code>http://${MAILCOW_HOSTNAME}/gogs/</code>, for example <code>http://mx.example.org/gogs/</code>. For database details set <code>mysql</code> as database host. Use the value of DBNAME found in mailcow.conf as database name, DBUSER as database user and DBPASS as database password.</p> <p>7. Once the installation is complete, login as admin and set \"settings\" -&gt; \"authorization\" -&gt; \"enable SMTP\". SMTP Host should be <code>postfix</code> with port <code>587</code>, set <code>Skip TLS Verify</code> as we are using an unlisted SAN (\"postfix\" is most likely not part of your certificate).</p> <p>8. Create <code>data/gogs/gogs/conf/app.ini</code> and set following values. You can consult Gogs cheat sheet for their meaning and other possible values.</p> <pre><code>[server]\nSSH_LISTEN_PORT = 22\n# For GOGS_SSH_PORT=127.0.0.1:4000 in mailcow.conf, set:\nSSH_DOMAIN = 127.0.0.1\nSSH_PORT = 4000\n# For MAILCOW_HOSTNAME=mx.example.org in mailcow.conf (and default ports for HTTPS), set:\nROOT_URL = https://mx.example.org/gogs/\n</code></pre> <p>9. Restart Gogs with <code>docker compose restart gogs-mailcow</code>. Your users should be able to login with mailcow managed accounts.</p>"},{"location":"third_party/mailman3/third_party-mailman3/","title":"Installing mailcow and Mailman 3 based on dockerized versions","text":"<p>Info</p> <p>This guide is a copy from dockerized-mailcow-mailman. Please post issues, questions and improvements in the issue tracker there.</p> <p>Warning</p> <p>mailcow is not responsible for any data loss, hardware damage or broken keyboards. This guide comes without any warranty. Make backups before starting, 'coze: No backup no pity!</p>"},{"location":"third_party/mailman3/third_party-mailman3/#introduction","title":"Introduction","text":"<p>This guide aims to install and configure mailcow-dockerized with docker-mailman and to provide some useful scripts. An essential condition is, to preserve mailcow and Mailman in their own installations for independent updates.</p> <p>There are some guides and projects on the internet, but they are not up to date and/or incomplete in documentation or configuration. This guide is based on the work of:</p> <ul> <li>mailcow-mailman3-dockerized by Shadowghost</li> <li>mailman-mailcow-integration</li> </ul> <p>After finishing this guide, mailcow-dockerized and docker-mailman will run and Apache as a reverse proxy will serve the web frontends.</p> <p>The operating system used is an Ubuntu 20.04 LTS.</p>"},{"location":"third_party/mailman3/third_party-mailman3/#installation","title":"Installation","text":"<p>This guide is based on different steps:</p> <ol> <li>DNS setup</li> <li>Install Apache as a reverse proxy</li> <li>Obtain SSL certificates with Let's Encrypt</li> <li>Install mailcow with Mailman integration</li> <li>Install Mailman</li> <li>\ud83c\udfc3 Run</li> </ol>"},{"location":"third_party/mailman3/third_party-mailman3/#dns-setup","title":"DNS setup","text":"<p>Most of the configuration is covered by mailcows DNS setup. After finishing this setup add another subdomain for Mailman, e.g. <code>lists.example.org</code> that points to the same server:</p> <pre><code># Name Type Value\nlists IN A 1.2.3.4\nlists IN AAAA dead:beef\n</code></pre>"},{"location":"third_party/mailman3/third_party-mailman3/#install-apache-as-a-reverse-proxy","title":"Install Apache as a reverse proxy","text":"<p>Install Apache, e.g. with this guide from Digital Ocean: How To Install the Apache Web Server on Ubuntu 20.04.</p> <p>Activate certain Apache modules (as root or sudo):</p> <pre><code>a2enmod rewrite proxy proxy_http headers ssl wsgi proxy_uwsgi http2\n</code></pre> <p>Maybe you have to install further packages to get these modules. This PPA by Ond\u0159ej Sur\u00fd may help you.</p>"},{"location":"third_party/mailman3/third_party-mailman3/#vhost-configuration","title":"vHost configuration","text":"<p>Copy the mailcow.conf and the mailman.conf in the Apache conf folder <code>sites-available</code> (e.g. under <code>/etc/apache2/sites-available</code>).</p> <p>Change in <code>mailcow.conf</code>: - <code>MAILCOW_HOSTNAME</code> to your MAILCOW_HOSTNAME</p> <p>Change in <code>mailman.conf</code>: - <code>MAILMAN_DOMAIN</code> to your Mailman domain (e.g. <code>lists.example.org</code>)</p> <p>Don't activate the configuration, as the ssl certificates and directories are missing yet.</p>"},{"location":"third_party/mailman3/third_party-mailman3/#obtain-ssl-certificates-with-lets-encrypt","title":"Obtain SSL certificates with Let's Encrypt","text":"<p>Check if your DNS config is available over the internet and points to the right IP addresses, e.g. with MXToolBox:</p> <ul> <li>https://mxtoolbox.com/SuperTool.aspx?action=a%3aMAILCOW_HOSTNAME</li> <li>https://mxtoolbox.com/SuperTool.aspx?action=aaaa%3aMAILCOW_HOSTNAME</li> <li>https://mxtoolbox.com/SuperTool.aspx?action=a%3aMAILMAN_DOMAIN</li> <li>https://mxtoolbox.com/SuperTool.aspx?action=aaaa%3aMAILMAN_DOMAIN</li> </ul> <p>Install certbot (as root or sudo):</p> <pre><code>apt install certbot\n</code></pre> <p>Get the desired certificates (as root or sudo):</p> <pre><code>certbot certonly -d MAILCOW_HOSTNAME\ncertbot certonly -d MAILMAN_DOMAIN\n</code></pre>"},{"location":"third_party/mailman3/third_party-mailman3/#install-mailcow-with-mailman-integration","title":"Install mailcow with Mailman integration","text":""},{"location":"third_party/mailman3/third_party-mailman3/#install-mailcow","title":"Install mailcow","text":"<p>Follow the mailcow installation. Omit step 5 and do not pull and up with <code>docker compose</code>!</p>"},{"location":"third_party/mailman3/third_party-mailman3/#configure-mailcow","title":"Configure mailcow","text":"<p>This is also Step 4 in the official mailcow installation (<code>nano mailcow.conf</code>). So change to your needs and alter the following variables:</p> <pre><code>HTTP_PORT=18080 # don't use 8080 as mailman needs it\nHTTP_BIND=127.0.0.1 #\nHTTPS_PORT=18443 # you may use 8443\nHTTPS_BIND=127.0.0.1 #\n\nSKIP_LETS_ENCRYPT=y # reverse proxy will do the SSL termination\n\nSNAT_TO_SOURCE=1.2.3.4 # change this to your IPv4\nSNAT6_TO_SOURCE=dead:beef # change this to your global IPv6\n</code></pre>"},{"location":"third_party/mailman3/third_party-mailman3/#add-mailman-integration","title":"Add Mailman integration","text":"<p>Create the file <code>/opt/mailcow-dockerized/docker-compose.override.yml</code> (e.g. with <code>nano</code>) and add the following lines:</p> <p><pre><code>version: '2.1'\n\nservices:\n postfix-mailcow:\n volumes:\n - /opt/mailman:/opt/mailman\n networks:\n - docker-mailman_mailman\n\nnetworks:\n docker-mailman_mailman:\n external: true\n</code></pre> The additional volume is used by Mailman to generate additional config files for mailcow postfix. The external network is build and used by Mailman. mailcow needs it to deliver incoming list mails to Mailman.</p> <p>Create the file <code>/opt/mailcow-dockerized/data/conf/postfix/extra.cf</code> (e.g. with <code>nano</code>) and add the following lines:</p> <p><pre><code># mailman\n\nrecipient_delimiter = +\nunknown_local_recipient_reject_code = 550\nowner_request_special = no\n\nlocal_recipient_maps =\n regexp:/opt/mailman/core/var/data/postfix_lmtp,\n proxy:unix:passwd.byname,\n $alias_maps\nvirtual_mailbox_maps =\n proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_mailbox_maps.cf,\n regexp:/opt/mailman/core/var/data/postfix_lmtp\ntransport_maps =\n pcre:/opt/postfix/conf/custom_transport.pcre,\n pcre:/opt/postfix/conf/local_transport,\n proxy:mysql:/opt/postfix/conf/sql/mysql_relay_ne.cf,\n proxy:mysql:/opt/postfix/conf/sql/mysql_transport_maps.cf,\n regexp:/opt/mailman/core/var/data/postfix_lmtp\nrelay_domains =\n proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_relay_domain_maps.cf,\n regexp:/opt/mailman/core/var/data/postfix_domains\nrelay_recipient_maps =\n proxy:mysql:/opt/postfix/conf/sql/mysql_relay_recipient_maps.cf,\n regexp:/opt/mailman/core/var/data/postfix_lmtp\n</code></pre> As we overwrite mailcow postfix configuration here, this step may break your normal mail transports. Check the original configuration files if anything changed.</p>"},{"location":"third_party/mailman3/third_party-mailman3/#ssl-certificates","title":"SSL certificates","text":"<p>As we proxying mailcow, we need to copy the SSL certificates into the mailcow file structure. This task will do the script renew-ssl.sh for us:</p> <ul> <li>Copy the file to <code>/opt/mailcow-dockerized</code></li> <li>Change mailcow_HOSTNAME to your mailcow hostname</li> <li>Make it executable (<code>chmod a+x renew-ssl.sh</code>)</li> <li>Do not run it yet, as we first need Mailman</li> </ul> <p>You have to create a cronjob, so that new certificates will be copied. Execute as root or sudo:</p> <pre><code>crontab -e\n</code></pre> <p>To run the script every day at 5am, add:</p> <pre><code>0 5 * * * /opt/mailcow-dockerized/renew-ssl.sh\n</code></pre>"},{"location":"third_party/mailman3/third_party-mailman3/#install-mailman","title":"Install Mailman","text":"<p>Basicly follow the instructions at docker-mailman. As they are a lot, here is in a nuthshell what to do:</p> <p>As root or sudo:</p> <pre><code>cd /opt\nmkdir -p mailman/core\nmkdir -p mailman/web\ngit clone https://github.com/maxking/docker-mailman\ncd docker-mailman\n</code></pre>"},{"location":"third_party/mailman3/third_party-mailman3/#configure-mailman","title":"Configure Mailman","text":"<p>Create a long key for Hyperkitty, e.g. with the linux command <code>cat /dev/urandom | tr -dc a-zA-Z0-9 | head -c30; echo</code>. Save this key for a moment as HYPERKITTY_KEY.</p> <p>Create a long password for the database, e.g. with the linux command <code>cat /dev/urandom | tr -dc a-zA-Z0-9 | head -c30; echo</code>. Save this password for a moment as DBPASS.</p> <p>Create a long key for Django, e.g. with the linux command <code>cat /dev/urandom | tr -dc a-zA-Z0-9 | head -c30; echo</code>. Save this key for a moment as DJANGO_KEY.</p> <p>Create the file <code>/opt/docker-mailman/docker compose.override.yaml</code> and replace <code>HYPERKITTY_KEY</code>, <code>DBPASS</code> and <code>DJANGO_KEY</code> with the generated values:</p> <pre><code>version: '2'\n\nservices:\n mailman-core:\n environment:\n - DATABASE_URL=postgres://mailman:DBPASS@database/mailmandb\n - HYPERKITTY_API_KEY=HYPERKITTY_KEY\n - TZ=Europe/Berlin\n - MTA=postfix\n restart: always\n networks:\n - mailman\n\n mailman-web:\n environment:\n - DATABASE_URL=postgres://mailman:DBPASS@database/mailmandb\n - HYPERKITTY_API_KEY=HYPERKITTY_KEY\n - TZ=Europe/Berlin\n - SECRET_KEY=DJANGO_KEY\n - SERVE_FROM_DOMAIN=MAILMAN_DOMAIN # e.g. lists.example.org\n - MAILMAN_ADMIN_USER=admin # the admin user\n - MAILMAN_ADMIN_EMAIL=admin@example.org # the admin mail address\n - UWSGI_STATIC_MAP=/static=/opt/mailman-web-data/static\n restart: always\n\n database:\n environment:\n - POSTGRES_PASSWORD=DBPASS\n restart: always\n</code></pre> <p>At <code>mailman-web</code> fill in correct values for <code>SERVE_FROM_DOMAIN</code> (e.g. <code>lists.example.org</code>), <code>MAILMAN_ADMIN_USER</code> and <code>MAILMAN_ADMIN_EMAIL</code>. You need the admin credentials to log into the web interface (Postorius). For setting the password for the first time use the Forgot password function in the web interface.</p> <p>About other configuration options read Mailman-web and Mailman-core documentation.</p>"},{"location":"third_party/mailman3/third_party-mailman3/#configure-mailman-core-and-mailman-web","title":"Configure Mailman core and Mailman web","text":"<p>Create the file <code>/opt/mailman/core/mailman-extra.cfg</code> with the following content. <code>mailman@example.org</code> should be pointing to a valid mail box or redirection.</p> <pre><code>[mailman]\ndefault_language: de\nsite_owner: mailman@example.org\n</code></pre> <p>Create the file <code>/opt/mailman/web/settings_local.py</code> with the following content. <code>mailman@example.org</code> should be pointing to a valid mail box or redirection.</p> <p><pre><code># locale\nLANGUAGE_CODE = 'de-de'\n\n# disable social authentication\nMAILMAN_WEB_SOCIAL_AUTH = []\n\n# change it\nDEFAULT_FROM_EMAIL = 'mailman@example.org'\n\nDEBUG = False\n</code></pre> You can change <code>LANGUAGE_CODE</code> and <code>SOCIALACCOUNT_PROVIDERS</code> to your needs.</p>"},{"location":"third_party/mailman3/third_party-mailman3/#run","title":"\ud83c\udfc3 Run","text":"<p>Run (as root or sudo)</p> <pre><code>a2ensite mailcow.conf\na2ensite mailman.conf\nsystemctl restart apache2\n\ncd /opt/docker-mailman\ndocker compose pull\ndocker compose up -d\n\ncd /opt/mailcow-dockerized/\ndocker compose pull\n./renew-ssl.sh\n</code></pre> <p>Wait a few minutes! The containers have to create there databases and config files. This can last up to 1 minute and more.</p>"},{"location":"third_party/mailman3/third_party-mailman3/#remarks","title":"Remarks","text":""},{"location":"third_party/mailman3/third_party-mailman3/#new-lists-arent-recognized-by-postfix-instantly","title":"New lists aren't recognized by postfix instantly","text":"<p>When you create a new list and try to immediately send an e-mail, postfix responses with <code>User doesn't exist</code>, because postfix won't deliver it to Mailman yet. The configuration at <code>/opt/mailman/core/var/data/postfix_lmtp</code> is not instantly updated. If you need the list instantly, restart postifx manually:</p> <pre><code>cd /opt/mailcow-dockerized\ndocker compose restart postfix-mailcow\n</code></pre>"},{"location":"third_party/mailman3/third_party-mailman3/#update","title":"Update","text":"<p>mailcow has it's own update script in <code>/opt/mailcow-dockerized/update.sh</code>, see the docs.</p> <p>For Mailman just fetch the newest version from the github repository.</p>"},{"location":"third_party/mailman3/third_party-mailman3/#backup","title":"Backup","text":"<p>mailcow has an own backup script. Read the docs for further informations.</p> <p>Mailman won't state backup instructions in the README.md. In the gitbucket of pgollor is a script that may be helpful.</p>"},{"location":"third_party/mailman3/third_party-mailman3/#todo","title":"ToDo","text":""},{"location":"third_party/mailman3/third_party-mailman3/#install-script","title":"install script","text":"<p>Write a script like in mailman-mailcow-integration/mailman-install.sh as many of the steps are automatable.</p> <ol> <li>Ask for all the configuration variables and create passwords and keys.</li> <li>Do a (semi-)automatic installation.</li> <li>Have fun!</li> </ol>"},{"location":"third_party/mailpiler/third_party-mailpiler_integration/","title":"Mailpiler Integration","text":"<p>This is a simple integration of mailcow aliases and the mailbox name into mailpiler when using IMAP authentication.</p> <p>Disclaimer: This is not officially maintained nor supported by the mailcow project nor its contributors. No warranty or support is being provided, however you're free to open issues on GitHub for filing a bug or provide further ideas. GitHub repo can be found here.</p> <p>Info</p> <p>Support for domain wildcards were implemented in Piler 1.3.10 which was released on 03.01.2021. Prior versions basically do work, but after logging in you won't see emails sent from or to the domain alias. (e.g. when @example.com is an alias for admin@example.com)</p>"},{"location":"third_party/mailpiler/third_party-mailpiler_integration/#the-problem-to-solve","title":"The problem to solve","text":"<p>mailpiler offers the authentication based on IMAP, for example:</p> <pre><code>$config['ENABLE_IMAP_AUTH'] = 1;\n$config['IMAP_HOST'] = 'mail.example.com';\n$config['IMAP_PORT'] = 993;\n$config['IMAP_SSL'] = true;\n</code></pre> <ul> <li>So when you log in using <code>patrik@example.com</code>, you will only see delivered emails sent from or to this specific email address.</li> <li>When additional aliases are defined in mailcow, like <code>team@example.com</code>, you won't see emails sent to or from this email address even the fact you're a recipient of mails sent to this alias address.</li> </ul> <p>By hooking into the authentication process of mailpiler, we are able to get required data via the mailcow API during login. This fires API requests to the mailcow API (requiring read-only API access) to read out the aliases your email address participates and also the \"Name\" of the mailbox specified to display it on the top-right of mailpiler after login.</p> <p>Permitted email addresses can be seen in the mailpiler settings top-right after logging in.</p> <p>Info</p> <p>This is only pulled once during the authentication process. The authorized aliases and the realname are valid for the whole duration of the user session as mailpiler sets them in the session data. If user is removed from specific alias, this will only take effect after next login.</p>"},{"location":"third_party/mailpiler/third_party-mailpiler_integration/#the-solution","title":"The solution","text":"<p>Note: File paths might vary depending on your setup.</p>"},{"location":"third_party/mailpiler/third_party-mailpiler_integration/#requirements","title":"Requirements","text":"<ul> <li>A working mailcow instance</li> <li>A working mailpiler instance (You can find an installation guide here, check supported versions here)</li> <li>An mailcow API key (read-only works just fine): <code>Configuration &amp; Details - Access - Read-Only Access</code>. Don't forget to allow API access from your mailpiler IP.</li> </ul> <p>Warning</p> <p>As mailpiler authenticates against mailcow, our IMAP server, failed logins of users or bots might trigger a block for your mailpiler instance. Therefore you might want to consider whitelisting the IP address of the mailpiler instance within mailcow: <code>Configuration &amp; Details - Configuration - Fail2ban parameters - Whitelisted networks/hosts</code>.</p>"},{"location":"third_party/mailpiler/third_party-mailpiler_integration/#setup","title":"Setup","text":"<ol> <li> <p>Set the custom query function of mailpiler and append this to <code>/usr/local/etc/piler/config-site.php</code>:</p> <pre><code>$config['MAILCOW_API_KEY'] = 'YOUR_READONLY_API_KEY';\n$config['MAILCOW_SET_REALNAME'] = true; // when not specified, then default is false\n$config['CUSTOM_EMAIL_QUERY_FUNCTION'] = 'query_mailcow_for_email_access';\ninclude('auth-mailcow.php');\n</code></pre> <p>You can also change the mailcow hostname, if required: <pre><code>$config['MAILCOW_HOST'] = 'mail.domain.tld'; // defaults to $config['IMAP_HOST']\n</code></pre></p> </li> <li> <p>Download the PHP file with the functions from the GitHub repo:</p> <pre><code>curl -o /usr/local/etc/piler/auth-mailcow.php https://raw.githubusercontent.com/patschi/mailpiler-mailcow-integration/master/auth-mailcow.php\n</code></pre> </li> <li> <p>Done!</p> </li> </ol> <p>Make sure to re-login with your IMAP credentials for changes to take effect.</p> <p>If it doesn't work, most likely something's wrong with the API query itself. Consider debugging by sending manual API requests to the API. (Tip: Open <code>https://mail.domain.tld/api</code> on your instance)</p>"},{"location":"third_party/nextcloud/third_party-nextcloud/","title":"Nextcloud","text":""},{"location":"third_party/nextcloud/third_party-nextcloud/#manage-nextcloud-using-the-helper-script","title":"Manage Nextcloud using the helper script","text":"<p>Nextcloud can be set up (parameter <code>-i</code>) and removed (parameter <code>-p</code>) with the helper script included with mailcow. In order to install Nextcloud simply navigate to your mailcow-dockerized root folder and run the helper script as follows:</p> <p><code>./helper-scripts/nextcloud.sh -i</code></p> <p>In case you have forgotten the password (e.g. for admin) and can't request a new one via the password reset link on the login screen calling the helper script with <code>-r</code> as parameter allows you to set a new password. Only use this option if your Nextcloud isn't configured to use mailcow for authentication as described in the next section.</p> <p>In order for mailcow to generate a a certificate for the nextcloud domain you need to add \"nextcloud.domain.tld\" to ADDITIONAL_SAN in mailcow.conf and run <code>docker compose up -d</code> to apply. For more informaton refer to: Advanced SSL.</p>"},{"location":"third_party/nextcloud/third_party-nextcloud/#background-jobs","title":"Background jobs","text":"<p>To use the recommended setting (cron) to execute the background jobs following lines need to be added to the <code>docker-compose.override.yml</code>:</p> <pre><code>version: '2.1'\nservices:\n php-fpm-mailcow:\n labels:\n ofelia.enabled: \"true\"\n ofelia.job-exec.nextcloud-cron.schedule: \"@every 5m\"\n ofelia.job-exec.nextcloud-cron.command: \"su www-data -s /bin/bash -c \\\"/usr/local/bin/php -f /web/nextcloud/cron.php\\\"\"\n</code></pre> <p>After adding these lines the <code>docker compose up -d</code> command must be executed to update the docker image and also the docker scheduler image must be restarted to pick up the new job definition by executing <code>docker compose restart ofelia-mailcow</code>. To check if the job was successfully picked up by <code>ofelia</code> the command <code>docker compose logs ofelia-mailcow</code> will contain a line similar to <code>New job registered \"nextcloud-cron\" - ...</code>.</p> <p>By adding these lines the background jobs will be executed every 5 minutes. To verify that the execution works correctly, the only way is to see it in the basic settings when logged in as an admin in Nextcloud. If everything is correct the first scheduled execution will change the background jobs processing setting to <code>(X) Cron</code> and the timestamp after <code>Last job ran</code> will be updated every 5 minutes.</p>"},{"location":"third_party/nextcloud/third_party-nextcloud/#configure-nextcloud-to-use-mailcow-for-authentication","title":"Configure Nextcloud to use mailcow for authentication","text":"<p>The following describes how set up authentication via mailcow using the OAuth2 protocol. We will only assume that you have already set up Nextcloud at cloud.example.com and that your mailcow is running at mail.example.com. It does not matter if your Nextcloud is running on a different server, you can still use mailcow for authentication.</p> <p>1. Log into mailcow as administrator.</p> <p>2. Scroll down to OAuth2 Apps and click the Add button. Specify the redirect URI as <code>https://cloud.example.com/index.php/apps/sociallogin/custom_oauth2/Mailcow</code> and click Add. Save the client ID and secret for later.</p> <p>Info</p> <p>Some installations, including those setup using the helper script of mailcow, need to remove index.php/ from the URL to get a successful redirect: <code>https://cloud.example.com/apps/sociallogin/custom_oauth2/Mailcow</code></p> <p>3. Log into Nextcloud as administrator.</p> <p>4. Click the button in the top right corner and select Apps. Click the search button in the toolbar, search for the Social Login plugin and click Download and enable next to it.</p> <p>5. Click the button in the top right corner and select Settings. Scroll down to the Administration section on the left and click Social login.</p> <p>6. Uncheck the following items:</p> <ul> <li>\"Disable auto create new users\"</li> <li>\"Allow users to connect social logins with their accounts\"</li> <li>\"Do not prune not available user groups on login\"</li> <li>\"Automatically create groups if they do not exists\"</li> <li>\"Restrict login for users without mapped groups\"</li> </ul> <p>7. Check the following items:</p> <ul> <li>\"Prevent creating an account if the email address exists in another account\"</li> <li>\"Update user profile every login\"</li> <li>\"Disable notify admins about new users\"</li> </ul> <p>Click the Save button.</p> <p>8. Scroll down to Custom OAuth2 and click the + button. 9. Configure the parameters as follows:</p> <ul> <li>Internal name: <code>Mailcow</code></li> <li>Title: <code>Mailcow</code></li> <li>API Base URL: <code>https://mail.example.com</code></li> <li>Authorize URL: <code>https://mail.example.com/oauth/authorize</code></li> <li>Token URL: <code>https://mail.example.com/oauth/token</code></li> <li>Profile URL: <code>https://mail.example.com/oauth/profile</code></li> <li>Logout URL: (leave blank)</li> <li>Client ID: (what you obtained in step 1)</li> <li>Client Secret: (what you obtained in step 1)</li> <li>Scope: <code>profile</code></li> </ul> <p>Click the Save button at the very bottom of the page.</p> <p>If you have previously used Nextcloud with mailcow authentication via user_external/IMAP, you need to perform some additional steps to link your existing user accounts with OAuth2.</p> <p>1. Click the button in the top right corner and select Apps. Scroll down to the External user authentication app and click Remove next to it. 2. Run the following queries in your Nextcloud database (if you set up Nextcloud using mailcow's script, you can run <code>source mailcow.conf &amp;&amp; docker compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME</code>): <pre><code>INSERT INTO nc_users (uid, uid_lower) SELECT DISTINCT uid, LOWER(uid) FROM nc_users_external;\nINSERT INTO nc_sociallogin_connect (uid, identifier) SELECT DISTINCT uid, CONCAT(\"Mailcow-\", uid) FROM nc_users_external;\n</code></pre></p> <p>If you have previously used Nextcloud without mailcow authentication, but with the same usernames as mailcow, you can also link your existing user accounts with OAuth2.</p> <p>1. Run the following queries in your Nextcloud database (if you set up Nextcloud using mailcow's script, you can run <code>source mailcow.conf &amp;&amp; docker compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME</code>): <pre><code>INSERT INTO nc_sociallogin_connect (uid, identifier) SELECT DISTINCT uid, CONCAT(\"Mailcow-\", uid) FROM nc_users;\n</code></pre></p>"},{"location":"third_party/nextcloud/third_party-nextcloud/#update","title":"Update","text":"<p>The Nextcloud instance can be updated easily with the web update mechanism. In the case of larger updates, there may be further changes to be made after the update. After the Nextcloud instance has been checked, problems are shown. This can be e.g. missing indices in the DB or similar. It shows which commands have to be executed, these have to be placed in the php-fpm-mailcow container.</p> <p>As an an example run the following command to add the missing indices. <code>docker exec -it -u www-data $(docker ps -f name=php-fpm-mailcow -q) bash -c \"php /web/nextcloud/occ db:add-missing-indices\"</code></p>"},{"location":"third_party/nextcloud/third_party-nextcloud/#debugging-troubleshooting","title":"Debugging &amp; Troubleshooting","text":"<p>It may happen that you cannot reach the Nextcloud instance from your network. This may be due to the fact that the entry of your subnet in the array 'trusted_proxies' is missing. You can make changes in the Nextcloud config.php in <code>data/web/nextcloud/config/*</code>.</p> <pre><code>'trusted_proxies' =&gt;\n array (\n 0 =&gt; 'fd4d:6169:6c63:6f77::/64',\n 1 =&gt; '172.22.1.0/24',\n 2 =&gt; 'NewSubnet/24',\n ),\n</code></pre> <p>After the changes have been made, the nginx container must be restarted. <code>docker compose restart nginx-mailcow</code></p>"},{"location":"third_party/portainer/third_party-portainer/","title":"Portainer","text":"<p>In order to enable Portainer, the docker-compose.yml and site.conf for Nginx must be modified.</p> <p>1. Create a new file <code>docker-compose.override.yml</code> in the mailcow-dockerized root folder and insert the following configuration <pre><code>version: '2.1'\nservices:\n portainer-mailcow:\n image: portainer/portainer-ce\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock\n - ./data/conf/portainer:/data\n restart: always\n dns:\n - 172.22.1.254\n dns_search: mailcow-network\n networks:\n mailcow-network:\n aliases:\n - portainer\n</code></pre> 2a. Create <code>data/conf/nginx/portainer.conf</code>: <pre><code>upstream portainer {\n server portainer-mailcow:9000;\n}\n\nmap $http_upgrade $connection_upgrade {\n default upgrade;\n '' close;\n}\n</code></pre></p> <p>2b. Insert a new location to the default mailcow site by creating the file <code>data/conf/nginx/site.portainer.custom</code>: <pre><code> location /portainer/ {\n proxy_http_version 1.1;\n proxy_set_header Host $http_host; # required for docker client's sake\n proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n proxy_read_timeout 900;\n\n proxy_set_header Connection \"\";\n proxy_buffers 32 4k;\n proxy_pass http://portainer/;\n }\n\n location /portainer/api/websocket/ {\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection $connection_upgrade;\n proxy_pass http://portainer/api/websocket/;\n }\n</code></pre></p> <p>3. Apply your changes: <pre><code>docker compose up -d &amp;&amp; docker compose restart nginx-mailcow\n</code></pre></p> <p>Now you can simply navigate to https://${MAILCOW_HOSTNAME}/portainer/ to view your Portainer container monitoring page. You\u2019ll then be prompted to specify a new password for the admin account. After specifying your password, you\u2019ll then be able to connect to the Portainer UI.</p>"},{"location":"third_party/portainer/third_party-portainer/#reverse-proxy","title":"Reverse Proxy","text":"<p>If you are using a reverse proxy you will have to configure it to properly forward websocket requests.</p> <p>This needs to be done for the docker console and other components to work.</p> <p>Here is an example for Apache:</p> <pre><code>&lt;Location /portainer/api/websocket/&gt;\n RewriteEngine on\n RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]\n RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]\n RewriteRule /portainer/api/websocket/(.*) ws://127.0.0.1:8080/portainer/api/websocket/$1 [P]\n&lt;/Location&gt;\n</code></pre>"},{"location":"third_party/roundcube/third_party-roundcube/","title":"Roundcube","text":""},{"location":"third_party/roundcube/third_party-roundcube/#installing-roundcube","title":"Installing Roundcube","text":"<p>Download Roundcube 1.6.x to the web htdocs directory and extract it (here <code>rc/</code>): <pre><code># Check for a newer release!\ncd data/web\nwget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz | tar xfvz -\n\n# Change folder name\nmv roundcubemail-1.6.0 rc\n\n# Change permissions\nchown -R root: rc/\n</code></pre></p> <p>If you need spell check features, create a file <code>data/hooks/phpfpm/aspell.sh</code> with the following content, then <code>chmod +x data/hooks/phpfpm/aspell.sh</code>. This installs a local spell check engine. Note, most modern web browsers have built in spell check, so you may not want/need this. <pre><code>#!/bin/bash\napk update\napk add aspell-en # or any other language\n</code></pre></p> <p>Create a file <code>data/web/rc/config/config.inc.php</code> with the following content. - Change the <code>des_key</code> parameter to a random value. It is used to temporarily store your IMAP password. - The <code>db_prefix</code> is optional but recommended. - If you didn't install spell check in the above step, remove <code>spellcheck_engine</code> parameter and replace it with <code>$config['enable_spellcheck'] = false;</code>. <pre><code>&lt;?php\nerror_reporting(0);\nif (!file_exists('/tmp/mime.types')) {\nfile_put_contents(\"/tmp/mime.types\", fopen(\"http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types\", 'r'));\n}\n$config = array();\n$config['db_dsnw'] = 'mysql://' . getenv('DBUSER') . ':' . getenv('DBPASS') . '@mysql/' . getenv('DBNAME');\n$config['imap_host'] = 'tls://dovecot:143';\n$config['smtp_host'] = 'tls://postfix:587';\n$config['smtp_user'] = '%u';\n$config['smtp_pass'] = '%p';\n$config['support_url'] = '';\n$config['product_name'] = 'Roundcube Webmail';\n$config['des_key'] = 'yourrandomstring_changeme';\n$config['log_dir'] = '/dev/null';\n$config['temp_dir'] = '/tmp';\n$config['plugins'] = array(\n 'archive',\n 'managesieve'\n);\n$config['spellcheck_engine'] = 'aspell';\n$config['mime_types'] = '/tmp/mime.types';\n$config['imap_conn_options'] = array(\n 'ssl' =&gt; array('verify_peer' =&gt; false, 'verify_peer_name' =&gt; false, 'allow_self_signed' =&gt; true)\n);\n$config['enable_installer'] = true;\n$config['smtp_conn_options'] = array(\n 'ssl' =&gt; array('verify_peer' =&gt; false, 'verify_peer_name' =&gt; false, 'allow_self_signed' =&gt; true)\n);\n$config['db_prefix'] = 'mailcow_rc1';\n</code></pre></p> <p>Point your browser to <code>https://myserver/rc/installer</code> and follow the instructions. Initialize the database and leave the installer.</p> <p>Delete the directory <code>data/web/rc/installer</code> after a successful installation!</p>"},{"location":"third_party/roundcube/third_party-roundcube/#configure-managesieve-filtering","title":"Configure ManageSieve filtering","text":"<p>Open <code>data/web/rc/config/config.inc.php</code> and change the following parameters (or add them at the bottom of that file): <pre><code>$config['managesieve_host'] = 'tls://dovecot:4190';\n$config['managesieve_conn_options'] = array(\n 'ssl' =&gt; array('verify_peer' =&gt; false, 'verify_peer_name' =&gt; false, 'allow_self_signed' =&gt; true)\n);\n// Enables separate management interface for vacation responses (out-of-office)\n// 0 - no separate section (default),\n// 1 - add Vacation section,\n// 2 - add Vacation section, but hide Filters section\n$config['managesieve_vacation'] = 1;\n</code></pre></p>"},{"location":"third_party/roundcube/third_party-roundcube/#enable-change-password-function-in-roundcube","title":"Enable change password function in Roundcube","text":"<p>Open <code>data/web/rc/config/config.inc.php</code> and enable the password plugin:</p> <pre><code>...\n$config['plugins'] = array(\n 'archive',\n 'password',\n);\n...\n</code></pre> <p>Open <code>data/web/rc/plugins/password/password.php</code>, search for <code>case 'ssha':</code> and add above:</p> <pre><code> case 'ssha256':\n $salt = rcube_utils::random_bytes(8);\n $crypted = base64_encode( hash('sha256', $password . $salt, TRUE ) . $salt );\n $prefix = '{SSHA256}';\n break;\n</code></pre> <p>Open <code>data/web/rc/plugins/password/config.inc.php</code> and change the following parameters (or add them at the bottom of that file):</p> <pre><code>$config['password_driver'] = 'sql';\n$config['password_algorithm'] = 'ssha256';\n$config['password_algorithm_prefix'] = '{SSHA256}';\n$config['password_query'] = \"UPDATE mailbox SET password = %P WHERE username = %u\";\n</code></pre>"},{"location":"third_party/roundcube/third_party-roundcube/#integrate-carddav-addressbooks-in-roundcube","title":"Integrate CardDAV addressbooks in Roundcube","text":"<p>Download the latest release of RCMCardDAV to the Roundcube plugin directory and extract it (here <code>rc/plugins</code>): <pre><code>cd data/web/rc/plugins\nwget -O - https://github.com/mstilkerich/rcmcarddav/releases/download/v4.4.1/carddav-v4.4.1-roundcube16.tar.gz | tar xfvz -\nchown -R root: carddav/\n</code></pre></p> <p>Copy the file <code>config.inc.php.dist</code> to <code>config.inc.php</code> (here in <code>rc/plugins/carddav</code>) and append the following preset to the end of the file - don't forget to replace <code>mx.example.org</code> with your own hostname: <pre><code>$prefs['SOGo'] = array(\n 'name' =&gt; 'SOGo',\n 'username' =&gt; '%u',\n 'password' =&gt; '%p',\n 'url' =&gt; 'https://mx.example.org/SOGo/dav/%u/',\n 'carddav_name_only' =&gt; true,\n 'use_categories' =&gt; true,\n 'active' =&gt; true,\n 'readonly' =&gt; false,\n 'refresh_time' =&gt; '02:00:00',\n 'fixed' =&gt; array( 'active', 'name', 'username', 'password', 'refresh_time' ),\n 'hide' =&gt; false,\n);\n</code></pre> Please note, that this preset only integrates the default addressbook (the one that's named \"Personal Address Book\" and can't be deleted). Additional addressbooks are currently not automatically detected but can be manually added within the roundecube settings.</p> <p>Enable the plugin by adding <code>carddav</code> to <code>$config['plugins']</code> in <code>rc/config/config.inc.php</code>.</p> <p>If you want to remove the default addressbooks (stored in the Roundcube database), so that only the CardDAV addressbooks are accessible, append <code>$config['address_book_type'] = '';</code> to the config file <code>data/web/rc/config/config.inc.php</code>.</p> <p>Optionally, you can add Roundcube's link to the mailcow Apps list. To do this, open or create <code>data/web/inc/vars.local.inc.php</code> and add the following code-block:</p> <p>NOTE: Don't forget to add the <code>&lt;?php</code> delimiter on the first line</p> <pre><code>...\n$MAILCOW_APPS = array(\n array(\n 'name' =&gt; 'SOGo',\n 'link' =&gt; '/SOGo/'\n ),\n array(\n 'name' =&gt; 'Roundcube',\n 'link' =&gt; '/rc/'\n )\n);\n...\n</code></pre>"},{"location":"third_party/roundcube/third_party-roundcube/#upgrading-roundcube","title":"Upgrading Roundcube","text":"<p>Upgrading Roundcube is rather simple, go to the Github releases page for Roundcube and get the link for the \"complete.tar.gz\" file for the wanted release. Then follow the below commands and change the URL and Roundcube folder name if needed. </p> <pre><code># Enter a bash session of the mailcow PHP container\ndocker exec -it mailcowdockerized-php-fpm-mailcow-1 bash\n\n# Install required upgrade dependency, then upgrade Roundcube to wanted release\napk add rsync\ncd /tmp\nwget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz | tar xfvz -\ncd roundcubemail-1.6.0\nbin/installto.sh /web/rc\n\n# Type 'Y' and press enter to upgrade your install of Roundcube\n# Type 'N' to \"Do you want me to fix your local configuration\" if prompted\n\n# If you see \"NOTICE: Update dependencies by running php composer.phar update --no-dev\" just download composer.phar and run it:\ncd /web/rc\nwget https://getcomposer.org/download/2.4.2/composer.phar\nphp composer.phar update --no-dev\n# When asked \"Do you trust \"roundcube/plugin-installer\" to execute code and wish to enable it now? (writes \"allow-plugins\" to composer.json) [y,n,d,?] \" hit y and continue.\n\n\n# Remove leftover files\ncd /tmp\nrm -rf roundcube*\n\n# If you're going from 1.5 to 1.6 please run the config file changes below\nsed -i \"s/\\$config\\['default_host'\\].*$/\\$config\\['imap_host'\\]\\ =\\ 'tls:\\/\\/dovecot:143'\\;/\" /web/rc/config/config.inc.php\nsed -i \"/\\$config\\['default_port'\\].*$/d\" /web/rc/config/config.inc.php\nsed -i \"s/\\$config\\['smtp_server'\\].*$/\\$config\\['smtp_host'\\]\\ =\\ 'tls:\\/\\/postfix:587'\\;/\" /web/rc/config/config.inc.php\nsed -i \"/\\$config\\['smtp_port'\\].*$/d\" /web/rc/config/config.inc.php\nsed -i \"s/\\$config\\['managesieve_host'\\].*$/\\$config\\['managesieve_host'\\]\\ =\\ 'tls:\\/\\/dovecot:4190'\\;/\" /web/rc/config/config.inc.php\nsed -i \"/\\$config\\['managesieve_port'\\].*$/d\" /web/rc/config/config.inc.php\n</code></pre>"},{"location":"third_party/roundcube/third_party-roundcube/#let-admins-log-into-roundcube-without-password","title":"Let admins log into Roundcube without password","text":"<p>First, install plugin dovecot_impersonate and add Roundcube as an app (see above).</p> <p>Edit <code>mailcow.conf</code> and add the following:</p> <pre><code># Allow admins to log into Roundcube as email user (without any password)\n# Roundcube with plugin dovecot_impersonate must be installed first\n\nALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE=y\n</code></pre> <p>Edit <code>docker-compose.override.yml</code> and crate/extend the section for <code>php-fpm-mailcow</code>:</p> <pre><code>version: '2.1'\nservices:\n php-fpm-mailcow:\n environment:\n - ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE=${ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE:-n}\n</code></pre> <p>Edit <code>data/web/js/site/mailbox.js</code> and the following code after <code>if (ALLOW_ADMIN_EMAIL_LOGIN) { ... }</code></p> <pre><code>if (ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE) {\n item.action += '&lt;a href=\"/rc-auth.php?login=' + encodeURIComponent(item.username) + '\" class=\"login_as btn btn-xs ' + btnSize + ' btn-primary\" target=\"_blank\"&gt;&lt;i class=\"bi bi-envelope-fill\"&gt;&lt;/i&gt; Roundcube&lt;/a&gt;';\n}\n</code></pre> <p>Edit <code>data/web/mailbox.php</code> and add this line to array <code>$template_data</code>:</p> <pre><code> 'allow_admin_email_login_roundcube' =&gt; (preg_match(\"/^(yes|y)+$/i\", $_ENV[\"ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE\"])) ? 'true' : 'false',\n</code></pre> <p>Edit <code>data/web/templates/mailbox.twig</code> and add this code to the bottom of the javascript section:</p> <pre><code> var ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE = {{ allow_admin_email_login_roundcube }};\n</code></pre> <p>Copy the contents of the following files from this Snippet:</p> <ul> <li><code>data/web/inc/lib/RoundcubeAutoLogin.php</code></li> <li><code>data/web/rc-auth.php</code></li> </ul> <p>Finally, restart mailcow</p> <pre><code>docker compose down\ndocker compose up -d\n</code></pre>"},{"location":"troubleshooting/debug-admin_login_sogo/","title":"Admin login to SOGo","text":"<p>This is an experimental feature that allows admins and domain admins to directly log into SOGo as a mailbox user, without knowing the users password.</p> <p>For this, an additional link to SOGo is displayed in the mailbox list (mailcow UI).</p> <p>Multiple concurrent admin-logins to different mailboxes are also possible when using this feature.</p>"},{"location":"troubleshooting/debug-admin_login_sogo/#enabling-the-feature","title":"Enabling the feature","text":"<p>The feature is disabled by default. It can be enabled in the <code>mailcow.conf</code> by setting: <pre><code>ALLOW_ADMIN_EMAIL_LOGIN=y\n</code></pre> and recreating the affected containers with <pre><code>docker compose up -d\n</code></pre></p>"},{"location":"troubleshooting/debug-admin_login_sogo/#drawbacks-when-enabled","title":"Drawbacks when enabled","text":"<ul> <li>Each SOGo page-load and each Active-Sync request will cause an additional execution of an internal PHP script. This might impact load-times of SOGo / EAS. In most cases, this should not be noticeable but should be kept in mind if you face any performance issues.</li> <li>SOGo will not display a logout link for admin-logins, to login normally one has to logout from the mailcow UI so the PHP session is destroyed.</li> <li>Subscribing to another user's calendar or address book while logged in as admin does not work. Neither does inviting other users to calendar events. The page will reload when these things are attempted.</li> </ul>"},{"location":"troubleshooting/debug-admin_login_sogo/#technical-details","title":"Technical details","text":"<p>SOGoTrustProxyAuthentication option is set to YES which makes SOGo trust the x-webobjects-remote-user header.</p> <p>Dovecot will receive a random master-password which is valid for all mailboxes when used by the SOGo container.</p> <p>Clicking on the SOGo button in the mailbox list will open sogo-auth.php which checks permissions, sets session variables and redirects to the SOGo mailbox.</p> <p>Each SOGo, CardDAV, CalDAV and EAS http request will cause an additional, nginx internal auth_request call to sogo-auth.php with the following behavior:</p> <ul> <li> <p>If a basic_auth header is present, the script will validate the credentials in place of SOGo and provide the following headers: <code>x-webobjects-remote-user</code>, <code>Authorization</code> and <code>x-webobjects-auth-type</code>.</p> </li> <li> <p>If no basic_auth header is present, the script will check for an active mailcow admin session for the requested email user and provide the same headers but with the dovecot master password used in the <code>Authorization</code> header.</p> </li> <li> <p>If both fails the headers will be set empty, which makes SOGo use its standard authentication methods.</p> </li> </ul> <p>All of these options / behaviors are disabled if the <code>ALLOW_ADMIN_EMAIL_LOGIN</code> is not enabled in the config.</p>"},{"location":"troubleshooting/debug-attach_service/","title":"Attach to a Container","text":""},{"location":"troubleshooting/debug-attach_service/#attaching-a-container-to-your-shell","title":"Attaching a Container to your Shell","text":"<p>To attach a container to your shell you can simply run</p> <pre><code>docker compose exec $Service_Name /bin/bash\n</code></pre>"},{"location":"troubleshooting/debug-attach_service/#connecting-to-services","title":"Connecting to Services","text":"<p>If you want to connect to a service / application directly it is always a good idea to <code>source mailcow.conf</code> to get all relevant variables into your environment.</p>"},{"location":"troubleshooting/debug-attach_service/#mysql","title":"MySQL","text":"<pre><code>source mailcow.conf\ndocker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}\n</code></pre>"},{"location":"troubleshooting/debug-attach_service/#redis","title":"Redis","text":"<pre><code>docker compose exec redis-mailcow redis-cli\n</code></pre>"},{"location":"troubleshooting/debug-attach_service/#service-descriptions","title":"Service Descriptions","text":"<p>Here is a brief overview of what container / service does what:</p> Service Name Service Descriptions unbound-mailcow Local (DNSSEC) DNS Resolver mysql-mailcow Stores SOGo's and most of mailcow's settings postfix-mailcow Receives and sends mails dovecot-mailcow User logins and sieve filter redis-mailcow Storage back-end for DKIM keys and Rspamd rspamd-mailcow Mail filtering system. Used for av handling, dkim signing, spam handling clamd-mailcow Scans attachments for viruses olefy-mailcow Scans attached office documents for macro-viruses solr-mailcow Provides full-text search in Dovecot sogo-mailcow Webmail client that handles Microsoft ActiveSync and Cal- / CardDav nginx-mailcow Nginx remote proxy that handles all mailcow related HTTP / HTTPS requests acme-mailcow Automates HTTPS (SSL/TLS) certificate deployment memcached-mailcow Internal caching system for mailcow services watchdog-mailcow Allows the monitoring of docker containers / services php-fpm-mailcow Powers the mailcow web UI netfilter-mailcow Fail2Ban like integration"},{"location":"troubleshooting/debug-common_problems/","title":"Common Problems","text":"<p>Here we list common problems and possible solutions:</p>"},{"location":"troubleshooting/debug-common_problems/#mail-loops-back-to-myself","title":"Mail loops back to myself","text":"<p>Please check in your mailcow UI if you made the domain a backup MX:</p>"},{"location":"troubleshooting/debug-common_problems/#i-can-receive-but-not-send-mails","title":"I can receive but not send mails","text":"<p>There are a lot of things that could prevent you from sending mail:</p> <ul> <li>Check if your IP address is on any blacklists. You could use dnsbl.info or any other similar service to check for your IP address.</li> <li>There are some consumer ISP routers out there, that block mail ports for non whitelisted domains. Please check if you can reach your server on the ports <code>465</code> or <code>587</code>:</li> </ul> <pre><code># telnet 74.125.133.27 465\nTrying 74.125.133.27...\nConnected to 74.125.133.27.\nEscape character is '^]'.\n</code></pre>"},{"location":"troubleshooting/debug-common_problems/#my-mails-are-identified-as-spam","title":"My mails are identified as Spam","text":"<p>Please read our guide on DNS configuration.</p>"},{"location":"troubleshooting/debug-common_problems/#docker-compose-throws-weird-errors","title":"docker compose throws weird errors","text":"<p>... like:</p> <ul> <li><code>ERROR: Invalid interpolation format ...</code></li> <li><code>AttributeError: 'NoneType' object has no attribute 'keys'</code>.</li> <li><code>ERROR: In file './docker-compose.yml' service 'version' doesn't have any configuration options</code>.</li> </ul> <p>When you encounter one or similar messages while trying to run mailcow: dockerized please check if you have the latest version of Docker and docker compose</p>"},{"location":"troubleshooting/debug-common_problems/#container-xy-is-unhealthy","title":"Container XY is unhealthy","text":"<p>This error tries to tell you that one of the (health) conditions for a certain container are not met. Therefore it can't be started. This can have several reasons, the most common one is an updated git clone but old docker image or vice versa.</p> <p>A wrong configured firewall could also cause such a failure. The containers need to be able to talk to each other over the network 172.22.1.1/24.</p> <p>It might also be wrongly linked file (i.e. SSL certificate) that prevents a crucial container (nginx) from starting, so always check your logs to get an idea where your problem is coming from.</p>"},{"location":"troubleshooting/debug-common_problems/#address-already-in-use","title":"Address already in use","text":"<p>If you get an error message like:</p> <pre><code>ERROR: for postfix-mailcow Cannot start service postfix-mailcow: driver failed programming external connectivity on endpoint mailcowdockerized_postfix-mailcow_1: Error starting userland proxy: listen tcp 0.0.0.0:25: bind: address already in use\n</code></pre> <p>while trying to start / install mailcow: dockerized, make sure you've followed our section on the prerequisites.</p>"},{"location":"troubleshooting/debug-common_problems/#xyz-cant-connect-to","title":"XYZ can't connect to ...","text":"<p>Please check your local firewall! Docker and iptables-based firewalls sometimes create conflicting rules, so disable the firewall on your host to determine whether your connection issues are caused by such conflicts. If they are, you need to manually create appropriate rules in your host firewall to permit the necessary connections.</p> <p>If you experience connection problems from home, please check your ISP router's firewall too, some of them block mail traffic on the SMTP (587) or SMTPS (465) ports. It could also be, that your ISP is blocking the ports for SUBMISSION (25).</p> <p>While Linux users can chose from a variety of tools1 to check if a port is open, the Windows user has only the PowerShell command <code>Test-NetConnection -ComputerName host -Port port</code> available by default.</p> <p>To enable telnet on a Windows after Vista please check this guide or enter the following command in an terminal with administrator privileges:</p> <pre><code>dism /online /Enable-Feature /FeatureName:TelnetClient\n</code></pre>"},{"location":"troubleshooting/debug-common_problems/#inotify-instance-limit-for-user-5000-uid-vmail-exceeded-see-453","title":"Inotify instance limit for user 5000 (UID vmail) exceeded (see #453)","text":"<p>Docker containers use the Docker hosts inotify limits. Setting them on your Docker host will pass them to the container.</p>"},{"location":"troubleshooting/debug-common_problems/#dovecot-keeps-restarting-see-2672","title":"Dovecot keeps restarting (see #2672)","text":"<p>Check that you have at least the following files in <code>data/assets/ssl</code>:</p> <pre><code>cert.pem\ndhparams.pem\nkey.pem\n</code></pre> <p>If <code>dhparams.pem</code> is missing, you can generate it with</p> <pre><code>openssl dhparam -out data/assets/ssl/dhparams.pem 4096\n</code></pre> <ol> <li> <p>netcat, nmap, openssl, telnet, etc.\u00a0\u21a9</p> </li> </ol>"},{"location":"troubleshooting/debug-logs/","title":"Logs","text":"<p>Warning</p> <p>This section only applies for Dockers default logging driver (JSON).</p> <p>To view the logs of all mailcow: dockerized related containers, you can use <code>docker compose logs</code> inside your mailcow-dockerized folder that contains your <code>mailcow.conf</code>. This is usually a bit much, but you could trim the output with <code>--tail=100</code> to the last 100 lines per container, or add a <code>-f</code> to follow the live output of all your services.</p> <p>To view the logs of a specific service you can use <code>docker compose logs [options] $service_name</code></p> <p>Info</p> <p>The available options for the command docker compose logs are:</p> <ul> <li>--no-color: Produce monochrome output.</li> <li>-f: Follow the log output.</li> <li>-t: Show timestamps.</li> <li>--tail=\"all\": Number of lines to show from the end of the logs for each container.</li> </ul>"},{"location":"troubleshooting/debug-mysql_aria/","title":"Recover crashed Aria storage engine","text":""},{"location":"troubleshooting/debug-mysql_aria/#mariadb-aria-recovery-after-crash","title":"MariaDB: Aria recovery after crash","text":"<p>If your server crashed and MariaDB logs an error similar to <code>[ERROR] mysqld: Aria recovery failed. Please run aria_chk -r on all Aria tables (*.MAI) and delete all aria_log.######## files</code> you may want to try the following to recover the database to a healthy state:</p> <p>Start the stack and wait until mysql-mailcow begins to report a restarting state. Check by running <code>docker compose ps</code>.</p> <p>Now run the following commands:</p> <pre><code># Stop the stack, don't run \"down\"\ndocker compose stop\n# Run a bash in the stopped container as user mysql\ndocker compose run --rm --entrypoint '/bin/sh -c \"gosu mysql bash\"' mysql-mailcow\n# cd to the SQL data directory\ncd /var/lib/mysql\n# Run aria_chk\naria_chk --check --force */*.MAI\n# Delete aria log files\nrm aria_log.*\n</code></pre> <p>Now run <code>docker compose down</code> followed by <code>docker compose up -d</code>.</p>"},{"location":"troubleshooting/debug-mysql_upgrade/","title":"Manual MySQL upgrade","text":""},{"location":"troubleshooting/debug-mysql_upgrade/#run-a-manual-mysql_upgrade","title":"Run a manual mysql_upgrade","text":"<p>This step is usually not necessary. </p> <pre><code>docker compose stop mysql-mailcow watchdog-mailcow\ndocker compose run --rm --entrypoint '/bin/sh -c \"gosu mysql mysqld --skip-grant-tables &amp; sleep 10 &amp;&amp; bash &amp;&amp; exit 0\"' mysql-mailcow\n</code></pre> <p>As soon as the SQL shell spawned, run <code>mysql_upgrade</code> and exit the container:</p> <pre><code>mysql_upgrade\nexit\n</code></pre>"},{"location":"troubleshooting/debug-reset_pw/","title":"Reset Passwords (incl. SQL)","text":""},{"location":"troubleshooting/debug-reset_pw/#mailcow-admin-account","title":"mailcow Admin Account","text":"<p>Resets the mailcow admin account to a random password. Older mailcow: dockerized installations may find the <code>mailcow-reset-admin.sh</code> script in their mailcow root directory (mailcow_path).</p> <pre><code>cd mailcow_path\n./helper-scripts/mailcow-reset-admin.sh\n</code></pre>"},{"location":"troubleshooting/debug-reset_pw/#reset-mysql-passwords","title":"Reset MySQL Passwords","text":"<p>Stop the stack by running <code>docker compose stop</code>.</p> <p>When the containers came to a stop, run this command:</p> <pre><code>docker compose run --rm --entrypoint '/bin/sh -c \"gosu mysql mysqld --skip-grant-tables &amp; sleep 10 &amp;&amp; mysql -hlocalhost -uroot &amp;&amp; exit 0\"' mysql-mailcow\n</code></pre>"},{"location":"troubleshooting/debug-reset_pw/#1-find-database-name","title":"1. Find database name","text":"<pre><code># source mailcow.conf\n# docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}\nMariaDB [(none)]&gt; show databases;\n+--------------------+\n| Database |\n+--------------------+\n| information_schema |\n| mailcow_database | &lt;=====\n| mysql |\n| performance_schema |\n+--------------------+\n4 rows in set (0.00 sec)\n</code></pre>"},{"location":"troubleshooting/debug-reset_pw/#2-reset-one-or-more-users","title":"2. Reset one or more users","text":""},{"location":"troubleshooting/debug-reset_pw/#21-maria-db-104-older-mailcow-installations","title":"2.1 Maria DB &lt; 10.4 (older mailcow installations)","text":"<p>Both \"password\" and \"authentication_string\" exist. Currently \"password\" is used, but better set both.</p> <pre><code>MariaDB [(none)]&gt; SELECT user FROM mysql.user;\n+--------------+\n| user |\n+--------------+\n| mailcow | &lt;=====\n| root |\n+--------------+\n2 rows in set (0.00 sec)\n\nMariaDB [(none)]&gt; FLUSH PRIVILEGES;\nMariaDB [(none)]&gt; UPDATE mysql.user SET authentication_string = PASSWORD('gotr00t'), password = PASSWORD('gotr00t') WHERE User = 'root';\nMariaDB [(none)]&gt; UPDATE mysql.user SET authentication_string = PASSWORD('mookuh'), password = PASSWORD('mookuh') WHERE User = 'mailcow' AND Host = '%';\nMariaDB [(none)]&gt; FLUSH PRIVILEGES;\n</code></pre>"},{"location":"troubleshooting/debug-reset_pw/#22-maria-db-104-current-mailcows","title":"2.2 Maria DB &gt;= 10.4 (current mailcows)","text":"<pre><code>MariaDB [(none)]&gt; SELECT user FROM mysql.user;\n+--------------+\n| user |\n+--------------+\n| mailcow | &lt;=====\n| root |\n+--------------+\n2 rows in set (0.00 sec)\n\nMariaDB [(none)]&gt; FLUSH PRIVILEGES;\nMariaDB [(none)]&gt; ALTER USER 'mailcow'@'%' IDENTIFIED BY 'mookuh';\nMariaDB [(none)]&gt; ALTER USER 'root'@'%' IDENTIFIED BY 'gotr00t';\nMariaDB [(none)]&gt; ALTER USER 'root'@'localhost' IDENTIFIED BY 'gotr00t';\nMariaDB [(none)]&gt; FLUSH PRIVILEGES;\n</code></pre>"},{"location":"troubleshooting/debug-reset_pw/#remove-two-factor-authentication","title":"Remove Two-Factor Authentication","text":""},{"location":"troubleshooting/debug-reset_pw/#for-mailcow-webui","title":"For mailcow WebUI:","text":"<p>This works similar to resetting a MySQL password, now we do it from the host without connecting to the MySQL CLI:</p> <pre><code>source mailcow.conf\ndocker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e \"DELETE FROM tfa WHERE username='YOUR_USERNAME';\"\n</code></pre>"},{"location":"troubleshooting/debug-reset_pw/#for-sogo","title":"For SOGo:","text":"<pre><code>docker compose exec -u sogo sogo-mailcow sogo-tool user-preferences set defaults user@example.com SOGoGoogleAuthenticatorEnabled '{\"SOGoGoogleAuthenticatorEnabled\":0}'\n</code></pre>"},{"location":"troubleshooting/debug-reset_tls/","title":"Reset TLS certificates","text":"<p>In case you encounter problems with your certificate, key or Let's Encrypt account, please try to reset the TLS assets:</p> <pre><code>source mailcow.conf\ndocker compose down\nrm -rf data/assets/ssl\nmkdir data/assets/ssl\nopenssl req -x509 -newkey rsa:4096 -keyout data/assets/ssl-example/key.pem -out data/assets/ssl-example/cert.pem -days 365 -subj \"/C=DE/ST=NRW/L=Willich/O=mailcow/OU=mailcow/CN=${MAILCOW_HOSTNAME}\" -sha256 -nodes\ncp -n -d data/assets/ssl-example/*.pem data/assets/ssl/\ndocker compose up -d\n</code></pre> <p>This will stop mailcow, source the variables we need, create a self-signed certificate and start mailcow.</p> <p>If you use Let's Encrypt you should be careful as you will create a new account and a new set of certificates. You will run into a ratelimit sooner or later.</p> <p>Please also note that previous TLSA records will be invalid.</p>"},{"location":"troubleshooting/debug-rm_volumes/","title":"Remove Persistent Data","text":"<p>You may want to remove a set of persistent data to resolve a conflict or to start over.</p> <p><code>mailcowdockerized</code> can vary and depends on your compose project name (if it's unchanged, <code>mailcowdockerized</code> is the correct value). If you are unsure about volume names, run <code>docker volume ls</code> for a full list.</p> <p>Delete a single volume:</p> <pre><code>docker volume rm mailcowdockerized_${VOLUME_NAME}\n</code></pre> <ul> <li>Remove volume <code>mysql-vol-1</code> to remove all MySQL data.</li> <li>Remove volume <code>redis-vol-1</code> to remove all Redis data.</li> <li>Remove volume <code>vmail-vol-1</code> to remove all contents of <code>/var/vmail</code> mounted to <code>dovecot-mailcow</code>.</li> <li>Remove volume <code>rspamd-vol-1</code> to remove all Rspamd data.</li> <li>Remove volume <code>crypt-vol-1</code> to remove all crypto data. This will render all mails unreadable.</li> </ul> <p>Alternatively, running <code>docker compose down -v</code> will destroy all mailcow: dockerized volumes and delete any related containers and networks.</p>"},{"location":"troubleshooting/debug-rspamd_memory_leaks/","title":"Advanced: Find memory leaks in Rspamd","text":"<p>A quick guide to deeply analyze a malfunctioning Rspamd.</p> <pre><code>docker compose exec rspamd-mailcow bash\n\nif ! grep -qi 'apt-stable-asan' /etc/apt/sources.list.d/rspamd.list; then\n sed -i 's/apt-stable/apt-stable-asan/i' /etc/apt/sources.list.d/rspamd.list\nfi\n\napt-get update ; apt-get upgrade rspamd\n\nnano /docker-entrypoint.sh\n\n# Before \"exec \"$@\"\" add the following lines:\n\nexport G_SLICE=always-malloc\nexport ASAN_OPTIONS=new_delete_type_mismatch=0:detect_leaks=1:detect_odr_violation=0:log_path=/tmp/rspamd-asan:quarantine_size_mb=2048:malloc_context_size=8:fast_unwind_on_malloc=0\n</code></pre> <p>Restart Rspamd: <code>docker compose restart rspamd-mailcow</code></p> <p>Your memory consumption will increase by a lot, it will also steadily grow, which is not related to a possible memory leak you are looking for.</p> <p>Leave the container running for a few minutes, hours or days (it should match the time you usually wait for the leak to \"happen\") and restart it: <code>docker compose restart rspamd-mailcow</code>.</p> <p>Now enter the container by running <code>docker compose exec rspamd-mailcow bash</code>, change the directory to /tmp and copy the asan Files to your desired location or upload them via termbin.com (<code>cat /tmp/rspamd-asan.* | nc termbin.com 9999</code>).</p>"},{"location":"troubleshooting/debug/","title":"Introduction","text":"<p>When a problem occurs, then always for a reason! What you want to do in such a case is:</p> <ol> <li>Read your logs; follow them to see what the reason for your problem is.</li> <li>Follow the leads given to you in your logfiles and start investigating.</li> <li>Restarting the troubled service or the whole stack to see if the problem persists.</li> <li>Read the documentation of the troubled service and search it's bugtracker for your problem.</li> <li>Search our issues for your problem.</li> <li>Create an issue over at our GitHub repository if you think your problem might be a bug or a missing feature you badly need. But please make sure, that you include all the logs and a full description to your problem. Please do not ask for support on Git.</li> <li>Join our Telegram community or find the official support packages at Servercow.Alternatively ask Twitter and tag us with @mailcow_email</li> </ol>"},{"location":"en/","title":"\ud83d\udc2e + \ud83d\udc0b = \ud83d\udc95","text":""},{"location":"en/#help-mailcow","title":"Help mailcow","text":"<p>Please consider a support contract for a small monthly fee at Servercow EN to support further development. We support you while you support us. :)</p> <p>If you are super awesome and would like to support without a contract, you can get a SAL license that confirms your awesomeness (a flexible one-time payment) at Servercow EN.</p>"},{"location":"en/#get-support","title":"Get support","text":"<p>There are two ways to achieve support for your mailcow installation.</p>"},{"location":"en/#commercial-support","title":"Commercial support","text":"<p>For professional and prioritized commercial support you can sign a basic support subscription at Servercow EN. For custom inquiries or questions please contact us at info@servercow.de instead.</p> <p>Furthermore we do also provide a fully featured and managed mailcow here. This way we take care about the technical magic underneath and you can enjoy your whole mail experience in a hassle-free way.</p>"},{"location":"en/#community-support-and-chat","title":"Community support and chat","text":"<p>The other alternative is our free community-support on our various channels below. Please notice, that this support is driven by our awesome community around mailcow. This kind of support is best-effort, voluntary and there is no guarantee for anything.</p> <ul> <li> <p>Our mailcow community @ community.mailcow.email</p> </li> <li> <p>Telegram (Support) @ t.me/mailcow.</p> </li> <li> <p>Telegram (Off-Topic) @ t.me/mailcowOfftopic.</p> </li> <li> <p>Twitter @mailcow_email</p> </li> </ul> <p>Telegram desktop clients are available for multiple platforms. You can search the groups history for keywords.</p> <p>For bug tracking, feature requests and code contributions only:</p> <ul> <li>GitHub @ mailcow/mailcow-dockerized</li> </ul>"},{"location":"en/#demos","title":"Demos","text":"<p>Since September 2022 we\u00b4re providing two seperate Demo instances: </p> <ul> <li>demo.mailcow.email is the classic Demo based on the stable releases.</li> <li>nightly-demo.mailcow.email is the new nightly demo based on unreleased testing features. (So especially interesting for those who have no possibility to create a test instance themselves.)</li> </ul> <p>Use the following credentials to login on both demos:</p> <ul> <li>Administrator: admin / moohoo</li> <li>Domain-Administrator: department / moohoo</li> <li>Mailbox: demo@440044.xyz / moohoo</li> </ul> <p>Success</p> <p>The demo instances get the latest updates directly after releases from GitHub. Fully automatic, without any downtime!</p>"},{"location":"en/#overview","title":"Overview","text":"<p>The integrated mailcow UI allows administrative work on your mail server instance as well as separated domain administrator and mailbox user access:</p> <ul> <li>DKIM and ARC support</li> <li>Black- and whitelists per domain and per user</li> <li>Spam score management per-user (reject spam, mark spam, greylist)</li> <li>Allow mailbox users to create temporary spam aliases</li> <li>Prepend mail tags to subject or move mail to sub folder (per-user)</li> <li>Allow mailbox users to toggle incoming and outgoing TLS enforcement</li> <li>Allow users to reset SOGo ActiveSync device caches</li> <li>imapsync to migrate or pull remote mailboxes regularly</li> <li>TFA: Yubikey OTP and U2F USB (Google Chrome and derivatives only), TOTP</li> <li>Add domains, mailboxes, aliases, domain aliases and SOGo resources</li> <li>Add whitelisted hosts to forward mail to mailcow</li> <li>Fail2ban-like integration</li> <li>Quarantine system</li> <li>Antivirus scanning incl. macro scanning in office documents</li> <li>Integrated basic monitoring</li> <li>A lot more...</li> </ul> <p>mailcow: dockerized comes with multiple containers linked in one bridged network. Each container represents a single application.</p> <ul> <li>ACME</li> <li>ClamAV (optional)</li> <li>Dovecot</li> <li>MariaDB</li> <li>Memcached</li> <li>Netfilter (Fail2ban-like integration by @mkuron)</li> <li>Nginx</li> <li>Oletools via Olefy</li> <li>PHP</li> <li>Postfix</li> <li>Redis</li> <li>Rspamd</li> <li>SOGo</li> <li>Solr (optional)</li> <li>Unbound</li> <li>A Watchdog to provide basic monitoring</li> </ul> <p>Warning</p> <p>Mails are stored compressed and encrypted. The key pair can be found in crypt-vol-1. Be sure to backup this volume!</p> <p>Docker volumes to keep dynamic data - take care of them!</p> <ul> <li>clamd-db-vol-1</li> <li>crypt-vol-1</li> <li>mysql-socket-vol-1</li> <li>mysql-vol-1</li> <li>postfix-vol-1</li> <li>redis-vol-1</li> <li>rspamd-vol-1</li> <li>sogo-userdata-backup-vol-1</li> <li>sogo-web-vol-1</li> <li>solr-vol-1</li> <li>vmail-index-vol-1</li> <li>vmail-vol-1</li> </ul>"},{"location":"en/backup_restore/b_n_r-accidental_deletion/","title":"Recover accidentally deleted data","text":"<p>So you deleted a mailbox and have no backups, he?</p> <p>If you noticed your mistake within a few hours, you can probably recover the users data.</p>"},{"location":"en/backup_restore/b_n_r-accidental_deletion/#sogo","title":"SOGo","text":"<p>We automatically create daily backups (24h interval starting from running up -d) in <code>/var/lib/docker/volumes/mailcowdockerized_sogo-userdata-backup-vol-1/_data/</code>.</p> <p>Make sure the user you want to restore exists in your mailcow. Re-create them if they are missing.</p> <p>Copy the file named after the user you want to restore to <code>__MAILCOW_DIRECTORY__/data/conf/sogo</code>.</p> <p>1. Copy the backup: <code>cp /var/lib/docker/volumes/mailcowdockerized_sogo-userdata-backup-vol-1/_data/restoreme@example.org __MAILCOW_DIRECTORY__/data/conf/sogo</code></p> <p>2. Run <code>docker compose exec -u sogo sogo-mailcow sogo-tool restore -F ALL /etc/sogo restoreme@example.org</code></p> <p>Run <code>sogo-tool</code> without parameters to check for possible restore options.</p> <p>3. Delete the copied backup by running <code>rm __MAILCOW_DIRECTORY__/data/conf/sogo</code></p> <p>4. Restart SOGo and Memcached: <code>docker compose restart sogo-mailcow memcached-mailcow</code></p>"},{"location":"en/backup_restore/b_n_r-accidental_deletion/#mail","title":"Mail","text":"<p>In case of an accidental deletion of a mailbox, you will be able to recover for (by default) 5 days. This depends on the <code>MAILDIR_GC_TIME</code> parameter in <code>mailcow.conf</code>.</p> <p>A deleted mailbox is copied in its encrypted form to <code>/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/_garbage</code>.</p> <p>The folder inside <code>_garbage</code> follows the structure <code>[timestamp]_[domain_sanitized][user_sanitized]</code>, for example <code>1629109708_exampleorgtest</code> in case of test@example.org deleted on 1629109708.</p> <p>To restore make sure you are actually restoring to the same mailcow it was deleted from or you use the same encryption keys in <code>crypt-vol-1</code>.</p> <p>Make sure the user you want to restore exists in your mailcow. Re-create them if they are missing.</p> <p>Copy the folders from <code>/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/_garbage/[timestamp]_[domain_sanitized][user_sanitized]</code> back to <code>/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/[domain]/[user]</code> and resync the folder and recalc the quota:</p> <pre><code>docker compose exec dovecot-mailcow doveadm force-resync -u restoreme@example.net '*'\ndocker compose exec dovecot-mailcow doveadm quota recalc -u restoreme@example.net\n</code></pre>"},{"location":"en/backup_restore/b_n_r-backup/","title":"Backup","text":""},{"location":"en/backup_restore/b_n_r-backup/#backup","title":"Backup","text":""},{"location":"en/backup_restore/b_n_r-backup/#manual","title":"Manual","text":"<p>You can use the provided script <code>helper-scripts/backup_and_restore.sh</code> to backup mailcow automatically.</p> <p>Please do not copy this script to another location.</p> <p>To run a backup, write \"backup\" as first parameter and either one or more components to backup as following parameters. You can also use \"all\" as second parameter to backup all components. Append <code>--delete-days n</code> to delete backups older than n days.</p> <pre><code># Syntax:\n# ./helper-scripts/backup_and_restore.sh backup (vmail|crypt|redis|rspamd|postfix|mysql|all|--delete-days)\n\n# Backup all, delete backups older than 3 days\n./helper-scripts/backup_and_restore.sh backup all --delete-days 3\n\n# Backup vmail, crypt and mysql data, delete backups older than 30 days\n./helper-scripts/backup_and_restore.sh backup vmail crypt mysql --delete-days 30\n\n# Backup vmail\n./helper-scripts/backup_and_restore.sh backup vmail\n</code></pre>"},{"location":"en/backup_restore/b_n_r-backup/#variables-for-backuprestore-script","title":"Variables for backup/restore script","text":""},{"location":"en/backup_restore/b_n_r-backup/#multithreading","title":"Multithreading","text":"<p>With the 2022-10 update it is possible to run the script with multithreading support. This can be used for backups as well as for restores.</p> <p>To start the backup/restore with multithreading you have to add <code>THREADS</code> as an environment variable in front of the command to execute the script.</p> <p><pre><code>THREADS=14 /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all\n</code></pre> The number after the <code>=</code> character indicates the number of threads. Please keep your core count -2 to leave enough CPU power for mailcow itself.</p>"},{"location":"en/backup_restore/b_n_r-backup/#backup-path","title":"Backup path","text":"<p>The script will ask you for a backup location. Inside of this location it will create folders in the format \"mailcow_DATE\". You should not rename those folders to not break the restore process.</p> <p>To run a backup unattended, define MAILCOW_BACKUP_LOCATION as environment variable before starting the script:</p> <pre><code>MAILCOW_BACKUP_LOCATION=/opt/backup /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all\n</code></pre> <p>Tip<p>Both variables mentioned above can also be combined! Ex: <pre><code>MAILCOW_BACKUP_LOCATION=/opt/backup THREADS=14 /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all\n</code></pre></p> </p>"},{"location":"en/backup_restore/b_n_r-backup/#cronjob","title":"Cronjob","text":"<p>You can run the backup script regularly via cronjob. Make sure <code>BACKUP_LOCATION</code> exists:</p> <pre><code>PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n5 4 * * * cd /opt/mailcow-dockerized/; MAILCOW_BACKUP_LOCATION=/mnt/mailcow_backups /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup mysql crypt redis --delete-days 3\n</code></pre> <p>Per default cron sends the full result of each backup operation by email. If you want cron to only mail on error (non-zero exit code) you may want to use the following snippet. Pathes need to be modified according to your setup (this script is a user contribution).</p> <p>This following script may be placed in <code>/etc/cron.daily/mailcow-backup</code> - do not forget to mark it as executable via <code>chmod +x</code>:</p> <pre><code>#!/bin/sh\n\n# Backup mailcow data\n# https://mailcow.github.io/mailcow-dockerized-docs/backup_restore/b_n_r-backup/\n\nset -e\n\nOUT=\"$(mktemp)\"\nexport MAILCOW_BACKUP_LOCATION=\"/opt/backup\"\nSCRIPT=\"/opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh\"\nPARAMETERS=\"backup all\"\nOPTIONS=\"--delete-days 30\"\n\n# run command\nset +e\n\"${SCRIPT}\" ${PARAMETERS} ${OPTIONS} 2&gt;&amp;1 &gt; \"$OUT\"\nRESULT=$?\n\nif [ $RESULT -ne 0 ]\n then\n echo \"${SCRIPT} ${PARAMETERS} ${OPTIONS} encounters an error:\"\n echo \"RESULT=$RESULT\"\n echo \"STDOUT / STDERR:\"\n cat \"$OUT\"\nfi\n</code></pre>"},{"location":"en/backup_restore/b_n_r-backup/#backup-strategy-with-rsync-and-mailcow-backup-script","title":"Backup strategy with rsync and mailcow backup script","text":"<p>Create the destination directory for mailcows helper script: <pre><code>mkdir -p /external_share/backups/backup_script\n</code></pre></p> <p>Create cronjobs: <pre><code>PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n25 1 * * * rsync -aH --delete /opt/mailcow-dockerized /external_share/backups/mailcow-dockerized\n40 2 * * * rsync -aH --delete /var/lib/docker/volumes /external_share/backups/var_lib_docker_volumes\n5 4 * * * cd /opt/mailcow-dockerized/; BACKUP_LOCATION=/external_share/backups/backup_script /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup mysql crypt redis --delete-days 3\n# If you want to, use the acl util to backup permissions of some/all folders/files: getfacl -Rn /path\n</code></pre></p> <p>On the destination (in this case <code>/external_share/backups</code>) you may want to have snapshot capabilities (ZFS, Btrfs etc.). Snapshot daily and keep for n days for a consistent backup. Do not rsync to a Samba share, you need to keep the correct permissions!</p> <p>To restore you'd simply need to run rsync the other way round and restart Docker to re-read the volumes. Run <code>docker compose pull</code> and <code>docker compose up -d</code>.</p> <p>If you are lucky Redis and MariaDB can automatically fix the inconsistent databases (if they are inconsistent). In case of a corrupted database you'd need to use the helper script to restore the inconsistent elements. If a restore fails, try to extract the backups and copy the files back manually. Keep the file permissions!</p>"},{"location":"en/backup_restore/b_n_r-backup_restore-maildir/","title":"Maildir","text":""},{"location":"en/backup_restore/b_n_r-backup_restore-maildir/#backup","title":"Backup","text":"<p>This line backups the vmail directory to a file backup_vmail.tar.gz in the mailcow root directory: <pre><code>cd /path/to/mailcow-dockerized\ndocker run --rm -i -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination \"/var/vmail\" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:stretch-slim tar cvfz /backup/backup_vmail.tar.gz /vmail\n</code></pre></p> <p>You can change the path by adjusting ${PWD} (which equals to the current directory) to any path you have write-access to. Set the filename <code>backup_vmail.tar.gz</code> to any custom name, but leave the path as it is. Example: <code>[...] tar cvfz /backup/my_own_filename_.tar.gz</code></p>"},{"location":"en/backup_restore/b_n_r-backup_restore-maildir/#restore","title":"Restore","text":"<pre><code>cd /path/to/mailcow-dockerized\ndocker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination \"/var/vmail\" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:stretch-slim tar xvfz /backup/backup_vmail.tar.gz\n</code></pre>"},{"location":"en/backup_restore/b_n_r-backup_restore-mysql/","title":"MySQL (mysqldump)","text":""},{"location":"en/backup_restore/b_n_r-backup_restore-mysql/#backup","title":"Backup","text":"<pre><code>cd /path/to/mailcow-dockerized\nsource mailcow.conf\nDATE=$(date +\"%Y%m%d_%H%M%S\")\ndocker compose exec -T mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} &gt; backup_${DBNAME}_${DATE}.sql\n</code></pre>"},{"location":"en/backup_restore/b_n_r-backup_restore-mysql/#restore","title":"Restore","text":"<p>Warning</p> <p>You should redirect the SQL dump without <code>docker compose</code> to prevent parsing errors.</p> <pre><code>cd /path/to/mailcow-dockerized\nsource mailcow.conf\ndocker exec -i $(docker compose ps -q mysql-mailcow) mysql -u${DBUSER} -p${DBPASS} ${DBNAME} &lt; backup_file.sql\n</code></pre>"},{"location":"en/backup_restore/b_n_r-coldstandby/","title":"Cold-standby backup","text":"<p>mailcow offers an easy way to create a consistent copy of itself to be rsync'ed to a remote location without downtime.</p> <p>This may also be used to transfer your mailcow to a new server.</p>"},{"location":"en/backup_restore/b_n_r-coldstandby/#you-should-know","title":"You should know","text":"<p>The provided script will work on default installations.</p> <p>It may break when you use unsupported volume overrides. We don't support that and we will not include hacks to support that. Please run and maintain a fork if you plan to keep your changes.</p> <p>The script will use the same paths as your default mailcow installation. That is the mailcow base directory - for most users <code>/opt/mailcow-dockerized</code> - as well as the mountpoints.</p> <p>To find the paths of your source volumes we use <code>docker inspect</code> and read the destination directory of every volume related to your mailcow compose project. This means we will also transfer volumes you may have added in an override file. Local bind mounts may or may not work.</p> <p>The script uses rsync with the <code>--delete</code> flag. The destination will be an exact copy of the source.</p> <p><code>mariabackup</code> is used to create a consistent copy of the SQL data directory.</p> <p>After rsync'ing the data we will run <code>docker compose pull</code> and remove old image tags from the destination.</p> <p>Your source will not be changed at any time.</p> <p>You may want to make sure to use the same <code>/etc/docker/daemon.json</code> on the remote target.</p> <p>You should not run disk snapshots (e.g. via ZFS, LVM etc.) on the target at the very same time as this script is run.</p> <p>Versioning is not part of this script, we rely on the destination (snapshots or backups). You may also want to use any other tool for that.</p>"},{"location":"en/backup_restore/b_n_r-coldstandby/#prepare","title":"Prepare","text":"<p>You will need an SSH-enabled destination and a keyfile to connect to said destination. The key should not be protected by a password for the script to work unattended.</p> <p>In your mailcow base directory, e.g. <code>/opt/mailcow-dockerized</code> you will find a file <code>create_cold_standby.sh</code>.</p> <p>Edit this file and change the exported variables:</p> <pre><code>export REMOTE_SSH_KEY=/path/to/keyfile\nexport REMOTE_SSH_PORT=22\nexport REMOTE_SSH_HOST=mailcow-backup.host.name\n</code></pre> <p>The key must be owned and readable by root only.</p> <p>Both the source and destination require <code>rsync</code> &gt;= v3.1.0. The destination must have Docker and docker compose v2 available.</p> <p>The script will detect errors automatically and exit.</p> <p>You may want to test the connection by running <code>ssh mailcow-backup.host.name -p22 -i /path/to/keyfile</code>.</p>"},{"location":"en/backup_restore/b_n_r-coldstandby/#backup-and-refresh-the-cold-standby","title":"Backup and refresh the cold-standby","text":"<p>Run the first backup, this may take a while depending on the connection:</p> <pre><code>bash /opt/mailcow-dockerized/create_cold_standby.sh\n</code></pre> <p>That was easy, wasn't it?</p> <p>Updating your cold-standby is just as easy:</p> <pre><code>bash /opt/mailcow-dockerized/create_cold_standby.sh\n</code></pre> <p>It's the same command.</p>"},{"location":"en/backup_restore/b_n_r-coldstandby/#automated-backups-with-cron","title":"Automated backups with cron","text":"<p>First make sure that the <code>cron</code> service is enabled and running:</p> <pre><code>systemctl enable cron.service &amp;&amp; systemctl start cron.service\n</code></pre> <p>To automate the backups to the cold-standby server you can use a cron job. To edit the cron jobs for the root user run:</p> <pre><code>crontab -e\n</code></pre> <p>Add the following lines to synchronize the cold standby server daily at 03:00. In this example errors of the last execution are logged into a file.</p> <pre><code>PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n\n0 3 * * * bash /opt/mailcow-dockerized/create_cold_standby.sh 2&gt; /var/log/mailcow-coldstandby-sync.log\n</code></pre> <p>If saved correctly, the cron job should be shown by typing:</p> <pre><code>crontab -l\n</code></pre>"},{"location":"en/backup_restore/b_n_r-restore/","title":"Restore","text":""},{"location":"en/backup_restore/b_n_r-restore/#restore","title":"Restore","text":"<p>Please do not copy this script to another location.</p> <p>To run a restore, start mailcow, use the script with \"restore\" as first parameter.</p> <pre><code># Syntax:\n# ./helper-scripts/backup_and_restore.sh restore\n</code></pre> <p>The script will ask you for a backup location containing the mailcow_DATE folders.</p>"},{"location":"en/client/client-android/","title":"Android","text":"<ol> <li>Open the Email app.</li> <li>If this is your first email account, tap Add Account; if not, tap More and Settings and then Add account.</li> <li>Select Microsoft Exchange ActiveSync.</li> <li>Enter your email address () and password.</li> <li>Tap Sign in.</li> </ol>"},{"location":"en/client/client-apple/","title":"Apple macOS / iOS","text":""},{"location":"en/client/client-apple/#method-1-via-mobileconfig","title":"Method 1 via Mobileconfig","text":"<p>Email, contacts and calendars can be configured automatically on Apple devices by installing a profile. To download a profile you must login to the mailcow UI first.</p>"},{"location":"en/client/client-apple/#method-11-imap-smtp-and-calcarddav","title":"Method 1.1: IMAP, SMTP and Cal/CardDAV","text":"<p>This method configures IMAP, CardDAV and CalDAV.</p> <ol> <li>Download and open the file from https://${MAILCOW_HOSTNAME}/mobileconfig.phpmailcow.mobileconfig.</li> <li>Enter the unlock code (iPhone) or computer password (Mac).</li> <li>Enter your email password three times when prompted.</li> </ol>"},{"location":"en/client/client-apple/#method-12-imap-smtp-no-dav","title":"Method 1.2: IMAP, SMTP (no DAV)","text":"<p>This method configures IMAP and SMTP only.</p> <ol> <li>Download and open the file from https://${MAILCOW_HOSTNAME}/mobileconfig.php?only_emailmailcow.mobileconfig.</li> <li>Enter the unlock code (iPhone) or computer password (Mac).</li> <li>Enter your email password when prompted.</li> </ol>"},{"location":"en/client/client-apple/#method-2-exchange-activesync-emulation","title":"Method 2 (Exchange ActiveSync emulation)","text":"<p>On iOS, Exchange ActiveSync is also supported as an alternative to the procedure above. It has the advantage of supporting push email (i.e. you are immediately notified of incoming messages), but has some limitations, e.g. it does not support more than three email addresses per contact in your address book. Follow the steps below if you decide to use Exchange instead.</p> <ol> <li>Open the Settings app, tap Mail, tap Accounts, tap Add Acccount, select Exchange.</li> <li>Enter your email address () and tap Next.</li> <li>Enter your password, tap Next again.</li> <li>Finally, tap Save.</li> </ol>"},{"location":"en/client/client-emclient/","title":"eM Client","text":"<ol> <li>Launch eM Client.</li> <li>If this is the first time you launched eM Client, it asks you to set up your account. Proceed to step 4.</li> <li>Go to Menu at the top, select Tools and Accounts.</li> <li>Enter your email address () and click Start Now.</li> <li>Enter your password and click Continue.</li> <li>Enter your name () and click Next.</li> <li>Click Finish.</li> </ol>"},{"location":"en/client/client-kontact/","title":"KDE Kontact","text":"<ol> <li>Launch Kontact.</li> <li>If this is the first time you launched Kontact or KMail, it asks you to set up your account. Proceed to step 4.</li> <li>Go to Mail in the sidebar. Go to the Tools menu and select Account Wizard.</li> <li>Enter your name (), email address () and your password. Click Next.</li> <li>Click Create Account. If prompted, re-enter your password and click OK.</li> <li>Close the window by clicking Finish.</li> <li>Go to Calendar in the sidebar.</li> <li>Go to the Settings menu and select Configure KOrganizer.</li> <li>Go to the Calendars tab and click the Add button.</li> <li>Choose DAV groupware resource and click OK.</li> <li>Enter your email address () and your password. Click Next.</li> <li>Select ScalableOGo from the dropdown menu and click Next.</li> <li>Enter your mailcow hostname into the Host field and click Next.</li> <li>Click Test Connection and then Finish. Finally, click OK twice.</li> </ol> <p>Once you have set up Kontact, you can also use KMail, KOrganizer and KAddressBook individually.</p>"},{"location":"en/client/client-manual/","title":"Manual configuration","text":"<p>These instructions are valid for unchanged port bindings only!</p>"},{"location":"en/client/client-manual/#email","title":"Email","text":"Service Encryption Host Port IMAP STARTTLS mailcow hostname 143 IMAPS SSL mailcow hostname 993 POP3 STARTTLS mailcow hostname 110 POP3S SSL mailcow hostname 995 SMTP STARTTLS mailcow hostname 587 SMTPS SSL mailcow hostname 465 <p>Please use the \"plain\" password setting as the authentication mechanism. Contrary to what the name implies, the password will not be transferred to the server in plain text as no authentication is allowed to take place without TLS.</p>"},{"location":"en/client/client-manual/#contacts-and-calendars","title":"Contacts and calendars","text":"<p>SOGos default calendar (CalDAV) and contacts (CardDAV) URLs:</p> <ol> <li> <p>CalDAV https://mail.example.com/SOGo/dav/user@example.com/Calendar/personal/https:///SOGo/dav//Calendar/personal/</p> </li> <li> <p>CardDAV https://mail.example.com/SOGo/dav/user@example.com/Contacts/personal/https:///SOGo/dav//Contacts/personal/</p> </li> </ol> <p>Some applications may require you to use https://mail.example.com/SOGo/dav/https:///SOGo/dav/ or the full path to your calendar, which can be found and copied from within SOGo.</p>"},{"location":"en/client/client-outlook/","title":"Microsoft Outlook","text":""},{"location":"en/client/client-outlook/#outlook-2016-or-higher-from-office-365-on-windows","title":"Outlook 2016 or higher from Office 365 on Windows","text":"<p>This is only applicable if your server administrator has not disabled EAS for Outlook. If it is disabled, please follow the guide for Outlook 2007 instead.</p> <p>Outlook 2016 has an issue with autodiscover. Only Outlook from Office 365 is affected. If you installed Outlook from another source, please follow the guide for Outlook 2013 or higher. </p> <p>For EAS you must use the old assistant by launching <code>C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\OLCFG.EXE</code>. If this application opens, you can go to step 4 of the guide for Outlook 2013 below.</p> <p>If it does not open, you can completely disable the new account creation wizard and follow the guide for Outlook 2013 below.</p>"},{"location":"en/client/client-outlook/#outlook-2007-or-2010-on-windows","title":"Outlook 2007 or 2010 on Windows","text":""},{"location":"en/client/client-outlook/#outlook-2007-or-higher-on-windows-calendercontacts-via-caldav-synchronizer","title":"Outlook 2007 or higher on Windows (Calender/Contacts via CalDav Synchronizer)","text":"<ol> <li>Download and install Outlook CalDav Synchronizer.</li> <li>Launch Outlook.</li> <li>If this is the first time you launched Outlook, it asks you to set up your account. Proceed to step 5.</li> <li>Go to the File menu and click Add Account.</li> <li>Enter your name (), email address () and your password. Click Next.</li> <li>Click Finish.</li> <li>Go to the CalDav Synchronizer ribbon and click Synchronization Profiles.</li> <li>Click the second button at top (Add multiple profiles), select Sogo, click Ok.</li> <li>Click the Get IMAP/POP3 account settings button.</li> <li>Click Discover resources and assign to Outlook folders.</li> <li>In the Select Resource window that pops up, select your main calendar (usually Personal Calendar), click the ... button, assign it to Calendar, and click OK. Go to the Address Books and Tasks tabs and repeat repeat the process accordingly. Do not assign multiple calendars, address books or task lists!</li> <li>Close all windows with the OK buttons.</li> </ol>"},{"location":"en/client/client-outlook/#outlook-2013-or-higher-on-windows-active-sync-not-recommended","title":"Outlook 2013 or higher on Windows (Active Sync - not recommended)","text":"<p>This is only applicable if your server administrator has not disabled EAS for Outlook. If it is disabled, please follow the guide for Outlook 2007 instead.</p> <ol> <li>Launch Outlook.</li> <li>If this is the first time you launched Outlook, it asks you to set up your account. Proceed to step 4.</li> <li>Go to the File menu and click Add Account.</li> <li>Enter your name (), email address () and your password. Click Next.</li> <li>When prompted, enter your password again, check Remember my credentials and click OK.</li> <li>Click the Allow button.</li> <li>Click Finish.</li> </ol>"},{"location":"en/client/client-outlook/#outlook-2011-or-higher-on-macos","title":"Outlook 2011 or higher on macOS","text":"<p>The Mac version of Outlook does not synchronize calendars and contacts and therefore is not supported.</p>"},{"location":"en/client/client-thunderbird/","title":"Mozilla Thunderbird","text":"<ol> <li> Launch Thunderbird. </li> <li> If this is the first time you launched Thunderbird, it asks you whether you would like a new email address. Click Skip this and use my existing email and proceed to step 4. </li> <li> Go to the File menu and select New, Existing Mail Account.... </li> <li> Enter your name (), email address () and your password. Make sure the Remember password checkbox is selected and click Continue. </li> <li> Once the configuration has been automatically detected, make sure IMAP is selected and click Done. </li> <li> To use your contacts from the server, click on the arrow next to \"Address Books\" and click the Connect button on each address book you would like to use. </li> <li> To use your calendars from the server, click on the arrow next to \"Calendars\" and click the Connect button on each calendar you would like to use. </li> <li> Click Finish to close the Account Setup window."},{"location":"en/client/client-windows/","title":"Windows Mail","text":"<p>Windows 8 and higher support email, contacts and calendar via Exchange ActiveSync.</p> <ol> <li>Open the Mail app.</li> <li>If you have not previously used Mail, you can click Add Account in the main window. Proceed to step 4.</li> <li>Click Accounts in the sidebar on the left, then click Add Account on the far right.</li> <li>Select Exchange.</li> <li>Enter your email address () and click Next.</li> <li>Enter your password and click Log in.</li> </ol> <p>Once you have set up the Mail app, you can also use the People and Calendar apps.</p>"},{"location":"en/client/client/","title":"Overview","text":"<p>mailcow supports a variety of email clients, both on desktop computers and on smartphones. Below, you can find a number of configuration guides that explain how to configure your mailcow account.</p> <p>Tip</p> If you access this page by logging into your mailcow server and clicking the \"Show configuration guides for email clients and smartphones\" link, all of the guides will be personalized with your email address and server name. <p>Success</p> Since you accessed this page after logging into your mailcow server, all of the guides have been personalized with your email address and server name. <ul> <li>Android</li> <li>Apple iOS / macOS</li> <li>eM Client</li> <li>KDE Kontact / KMail</li> <li>Microsoft Outlook</li> <li>Mozilla Thunderbird</li> <li>Windows Mail</li> <li>Manual configuration</li> </ul>"},{"location":"en/i_u_m/i_u_m_deinstall/","title":"Deinstallation","text":"<p>To remove mailcow: dockerized with all it's volumes, images and containers do:</p> <pre><code>docker compose down -v --rmi all --remove-orphans\n</code></pre> <p>Info</p> <ul> <li>-v Remove named volumes declared in the <code>volumes</code> section of the Compose file and anonymous volumes attached to containers.</li> <li>--rmi Remove images. Type must be one of: <code>all</code>: Remove all images used by any service. <code>local</code>: Remove only images that don't have a custom tag set by the <code>image</code> field. <li>--remove-orphans Remove containers for services not defined in the compose file.</li> <li>By default <code>docker compose down</code> only removes currently active containers and networks defined in the <code>docker-compose.yml</code>.</li>"},{"location":"en/i_u_m/i_u_m_install/","title":"Installation","text":""},{"location":"en/i_u_m/i_u_m_install/#docker-and-docker-compose-installation","title":"Docker and Docker Compose Installation","text":"<p>You need Docker (a version &gt;= <code>20.10.2</code> is required) and Docker Compose (a version <code>&gt;= 2.0</code> is required).</p> <p>Learn how to install Docker and Docker Compose.</p> <p>Quick installation for most operation systems:</p>"},{"location":"en/i_u_m/i_u_m_install/#docker","title":"Docker","text":"<pre><code>curl -sSL https://get.docker.com/ | CHANNEL=stable sh\n# After the installation process is finished, you may need to enable the service and make sure it is started (e.g. CentOS 7)\nsystemctl enable --now docker\n</code></pre>"},{"location":"en/i_u_m/i_u_m_install/#docker-compose","title":"docker compose","text":"<p>Danger</p> <p>mailcow requires the latest version of docker compose v2. If Docker was installed using the script above, the Docker Compose plugin is already automatically installed in a version &gt;=2.0. Is your mailcow installation older or Docker was installed in a different way, the Compose plugin or the standalone version of Docker must be installed manually.</p>"},{"location":"en/i_u_m/i_u_m_install/#installation-via-paketmanager-plugin","title":"Installation via Paketmanager (plugin)","text":"<p>Info</p> <p>This approach with the package sources is only possible if the Docker repository has been included. This can happen either through the instructions above (see Docker) or through a manually integration.</p> <p>On Debian/Ubuntu systems: <pre><code>apt update\napt install docker-compose-plugin\n</code></pre></p> <p>On Centos 7 systems: <pre><code>yum update\nyum install docker-compose-plugin\n</code></pre></p> <p>Danger</p> <p>The Docker Compose command syntax is <code>docker compose</code> for the plugin variant of Docker Compose!!!</p>"},{"location":"en/i_u_m/i_u_m_install/#installation-via-script-standalone","title":"Installation via Script (standalone)","text":"<p>Info</p> <p>This installation is the old familiar way. It installs Docker Compose as a standalone program and does not rely on the Docker installation way.</p> <pre><code>curl -L https://github.com/docker/compose/releases/download/v$(curl -Ls https://www.servercow.de/docker-compose/latest.php)/docker-compose-$(uname -s)-$(uname -m) &gt; /usr/local/bin/docker-compose\nchmod +x /usr/local/bin/docker-compose\n</code></pre> <p>Danger</p> <p>The Docker Compose command syntax is <code>docker-compose</code> for the standalone variant of Docker Compose!!! </p> <p>Please use the latest Docker engine available and do not use the engine that ships with your distros repository.</p>"},{"location":"en/i_u_m/i_u_m_install/#check-selinux-specifics","title":"Check SELinux specifics","text":"<p>On SELinux enabled systems, e.g. CentOS 7:</p> <ul> <li>Check if \"container-selinux\" package is present on your system:</li> </ul> <pre><code>rpm -qa | grep container-selinux\n</code></pre> <p>If the above command returns an empty or no output, you should install it via your package manager.</p> <ul> <li>Check if docker has SELinux support enabled:</li> </ul> <pre><code>docker info | grep selinux\n</code></pre> <p>If the above command returns an empty or no output, create or edit <code>/etc/docker/daemon.json</code> and add <code>\"selinux-enabled\": true</code>. Example file content:</p> <pre><code>{\n \"selinux-enabled\": true\n}\n</code></pre> <p>Restart the docker daemon and verify SELinux is now enabled.</p> <p>This step is required to make sure mailcows volumes are properly labeled as declared in the compose file. If you are interested in how this works, you can check out the readme of https://github.com/containers/container-selinux which links to a lot of useful information on that topic.</p>"},{"location":"en/i_u_m/i_u_m_install/#install-mailcow","title":"Install mailcow","text":"<p>Clone the master branch of the repository, make sure your umask equals 0022. Please clone the repository as root user and also control the stack as root. We will modify attributes - if necessary - while bootstrapping the containers automatically and make sure everything is secured. The update.sh script must therefore also be run as root. It might be necessary to change ownership and other attributes of files you will otherwise not have access to. We drop permissions for every exposed application and will not run an exposed service as root! Controlling the Docker daemon as non-root user does not give you additional security. The unprivileged user will spawn the containers as root likewise. The behaviour of the stack is identical.</p> <pre><code>$ su\n# umask\n0022 # &lt;- Verify it is 0022\n# cd /opt\n# git clone https://github.com/mailcow/mailcow-dockerized\n# cd mailcow-dockerized\n</code></pre>"},{"location":"en/i_u_m/i_u_m_install/#initialize-mailcow","title":"Initialize mailcow","text":"<p>Generate a configuration file. Use a FQDN (<code>host.domain.tld</code>) as hostname when asked. <pre><code>./generate_config.sh\n</code></pre></p> <p>Change configuration if you want or need to. <pre><code>nano mailcow.conf\n</code></pre> If you plan to use a reverse proxy, you can, for example, bind HTTPS to 127.0.0.1 on port 8443 and HTTP to 127.0.0.1 on port 8080.</p> <p>You may need to stop an existing pre-installed MTA which blocks port 25/tcp. See this chapter to learn how to reconfigure Postfix to run besides mailcow after a successful installation.</p> <p>Some updates modify mailcow.conf and add new parameters. It is hard to keep track of them in the documentation. Please check their description and, if unsure, ask at the known channels for advise.</p>"},{"location":"en/i_u_m/i_u_m_install/#troubleshooting","title":"Troubleshooting","text":""},{"location":"en/i_u_m/i_u_m_install/#users-with-a-mtu-not-equal-to-1500-eg-openstack","title":"Users with a MTU not equal to 1500 (e.g. OpenStack)","text":"<p>Whenever you run into trouble and strange phenomena, please check your MTU.</p> <p>Edit <code>docker-compose.yml</code> and change the network settings according to your MTU. Add the new driver_opts parameter like this: <pre><code>networks:\n mailcow-network:\n ...\n driver_opts:\n com.docker.network.driver.mtu: 1450\n ...\n</code></pre></p>"},{"location":"en/i_u_m/i_u_m_install/#users-without-an-ipv6-enabled-network-on-their-host-system","title":"Users without an IPv6 enabled network on their host system","text":"<p>Please don't turn off IPv6, even if you don't like it. IPv6 is the future and should not be ignored.</p> <p>If you do not have an IPv6 enabled network on your host and you don't care for a better internet (thehe), it is recommended to disable IPv6 for the mailcow network to prevent unforeseen issues.</p>"},{"location":"en/i_u_m/i_u_m_install/#start-mailcow","title":"Start mailcow","text":"<p>Pull the images and run the compose file. The parameter <code>-d</code> will start mailcow: dockerized detached: <pre><code>docker compose pull\ndocker compose up -d\n</code></pre></p> <p>Done!</p> <p>You can now access https://${MAILCOW_HOSTNAME} with the default credentials <code>admin</code> + password <code>moohoo</code>.</p> <p>Info</p> <p>If you are not using mailcow behind a reverse proxy, you should redirect all HTTP requests to HTTPS.</p> <p>The database will be initialized right after a connection to MySQL can be established.</p> <p>Your data will persist in multiple Docker volumes, that are not deleted when you recreate or delete containers. Run <code>docker volume ls</code> to see a list of all volumes. You can safely run <code>docker compose down</code> without removing persistent data.</p>"},{"location":"en/i_u_m/i_u_m_migration/","title":"Migration","text":"<p>Warning</p> <p>This guide assumes you intend to migrate an existing mailcow server (source) over to a brand new, empty server (target). It takes no care about preserving any existing data on your target server and will erase anything within <code>/var/lib/docker/volumes</code> and thus any Docker volumes you may have already set up.</p> <p>Tip</p> <p>Alternatively, you can use the <code>./helper-scripts/backup_and_restore.sh</code> script to create a full backup on the source machine, then install mailcow on the target machine as usual, copy over your <code>mailcow.conf</code> and use the same script to restore your backup to the target machine.</p> <p>1. Follow the installation guide to install Docker and Compose.</p> <p>2. Stop Docker and assure Docker has stopped: <pre><code>systemctl stop docker.service\nsystemctl status docker.service\n</code></pre></p> <p>3. Run the following commands on the source machine (take care of adding the trailing slashes in the first path parameter as shown below!) - WARNING: This command will erase anything that may already exist under <code>/var/lib/docker/volumes</code> on the target machine: <pre><code>rsync -aHhP --numeric-ids --delete /opt/mailcow-dockerized/ root@target-machine.example.com:/opt/mailcow-dockerized\nrsync -aHhP --numeric-ids --delete /var/lib/docker/volumes/ root@target-machine.example.com:/var/lib/docker/volumes\n</code></pre></p> <p>4. Shut down mailcow and stop Docker on the source machine. <pre><code>cd /opt/mailcow-dockerized\ndocker compose down\nsystemctl stop docker.service\n</code></pre></p> <p>5. Repeat step 3 with the same commands. This will be much quicker than the first time.</p> <p>6. Switch over to the target machine and start Docker. <pre><code>systemctl start docker.service\n</code></pre></p> <p>7. Now pull the mailcow Docker images on the target machine. <pre><code>cd /opt/mailcow-dockerized\ndocker compose pull\n</code></pre></p> <p>8. Start the whole mailcow stack and everything should be done! <pre><code>docker compose up -d\n</code></pre></p> <p>9. Finally, change your DNS settings to point to the target server. Also check the <code>SNAT_TO_SOURCE</code> variable in your <code>mailcow.conf</code> file if you have changed your public IP address, otherwise SOGo may not work.</p>"},{"location":"en/i_u_m/i_u_m_update/","title":"Update","text":""},{"location":"en/i_u_m/i_u_m_update/#automatic-update","title":"Automatic update","text":"<p>An update script in your mailcow-dockerized directory will take care of updates.</p> <p>But use it with caution! If you think you made a lot of changes to the mailcow code, you should use the manual update guide below.</p> <p>Run the update script: <pre><code>./update.sh\n</code></pre></p> <p>If it needs to, it will ask you how you wish to proceed. Merge errors will be reported. Some minor conflicts will be auto-corrected (in favour for the mailcow-dockerized repository code).</p>"},{"location":"en/i_u_m/i_u_m_update/#options","title":"Options","text":"<pre><code># Options can be combined\n\n# - Check for updates and show changes\n./update.sh --check\n\n# - Do not start mailcow after applying an update\n./update.sh --skip-start\n\n# - Skip ICMP Check to public DNS resolvers (Use it only if you\u00b4ve blocked any ICMP Connections to your mailcow machine)\n./update.sh --skip-ping-check\n\n# - Switch your mailcow updates to the unstable (nightly) branch.\nFOR TESTING PURPOSES ONLY!!!! NOT READY FOR PRODUCTION!!!\n./update.sh --nightly\n\n# - Switch your mailcow updates to the stable (master) branch. Default unless you changed it with --nightly.\n./update.sh --stable\n\n# - Force update (unattended, but unsupported, use at own risk)\n./update.sh --force\n\n# - Run garbage collector to cleanup old image tags and exit\n./update.sh --gc\n\n# - Update with merge strategy option \"ours\" instead of \"theirs\"\n# This will **solve conflicts** when merging in favor for your local changes and should be avoided. Local changes will always be kept, unless we changed file XY, too.\n./update.sh --ours\n\n# - Don't update, but prefetch images and exit\n./update.sh --prefetch\n</code></pre>"},{"location":"en/i_u_m/i_u_m_update/#i-forgot-what-i-changed-before-running-updatesh","title":"I forgot what I changed before running update.sh","text":"<p>See <code>git log --pretty=oneline | grep -i \"before update\"</code>, you will have an output similar to this:</p> <pre><code>22cd00b5e28893ef9ddef3c2b5436453cc5223ab Before update on 2020-09-28_19_25_45\ndacd4fb9b51e9e1c8a37d84485b92ffaf6c59353 Before update on 2020-08-07_13_31_31\n</code></pre> <p>Run <code>git diff 22cd00b5e28893ef9ddef3c2b5436453cc5223ab</code> to see what changed.</p>"},{"location":"en/i_u_m/i_u_m_update/#can-i-roll-back","title":"Can I roll back?","text":"<p>Yes.</p> <p>See the topic above, instead of a diff, you run checkout:</p> <pre><code>docker compose down\n# Replace commit ID 22cd00b5e28893ef9ddef3c2b5436453cc5223ab by your ID\ngit checkout 22cd00b5e28893ef9ddef3c2b5436453cc5223ab\ndocker compose pull\ndocker compose up -d\n</code></pre>"},{"location":"en/i_u_m/i_u_m_update/#hooks","title":"Hooks","text":"<p>You can hook into the update mechanism by adding scripts called <code>pre_commit_hook.sh</code> and <code>post_commit_hook.sh</code> to your mailcows root directory. See this for more details.</p>"},{"location":"en/i_u_m/i_u_m_update/#update-cycle","title":"Update Cycle","text":"<ul> <li>We schedule a monthly release cycle for a major update at the first tuesday of the month.</li> <li>The releases are numbered like this: <code>YYYY-MM</code> (e.g. <code>2022-05</code>)</li> <li>Fixes for a main Update will be stated as \"Revisions\" like a,b,c (e.g. <code>2022-05a</code>, <code>2022-05b</code> etc.)</li> </ul>"},{"location":"en/i_u_m/i_u_m_update/#update-variants","title":"Update variants","text":"<p>stable (stable updates): These updates are suitable for productive usage. They appear in a cycle of at least 1x per month.</p> <p>nightly (unstable updates): These updates are NOT suitable for production use and are for testing only. The nightly updates are ahead of the stable updates, since in these updates we test newer and more extensive features before they go live for all users.</p>"},{"location":"en/i_u_m/i_u_m_update/#new-get-nightly-updates","title":"NEW: Get Nightly Updates","text":""},{"location":"en/i_u_m/i_u_m_update/#info-about-the-nightly-updates","title":"Info about the Nightly Updates","text":"<p>Since the 2022-08 update there is the possibility to change the update sources. Until now, the master branch on GitHub served as the only (official) update source. With the August 2022 update, however, there is now the Nightly Branch which contains unstable and major changes for testing and feedback.</p> <p>The Nightly Branch always gets new updates when something is finished on the mailcow project that will be included in the new main version.</p> <p>Besides the obvious changes that will be included in the next major update anyway, it also contains exclusive features that need a longer testing time (e.g. the UI update to Bootstrap 5).</p>"},{"location":"en/i_u_m/i_u_m_update/#how-do-i-get-nightly-updates","title":"How do I get Nightly Updates?","text":"<p>The process is relatively simple. With the 2022-08 update (assuming an update to the version) it is possible to run <code>update.sh</code> with the parameter <code>--nightly</code>.</p> <p>Danger<p>Please make a backup before or follow the Best Practice Nightly Update section before switching to mailcow nightly builds. We are not responsible for any data loss/corruption, so work with caution!</p> </p> <p>The script will now change the branch with <code>git checkout nightly</code>, which means it will ask for the IPv6 settings again. But this is normal.</p> <p>If everything worked fine (for which we made a backup before) the mailcow UI should now show the current version number and date stamp in the lower right corner: </p>"},{"location":"en/i_u_m/i_u_m_update/#best-practice-nightly-update","title":"Best Practice Nightly Update","text":"<p>Info<p>We recommend using the Nightly Update only if you have another machine or VM and NOT use it productively.</p> </p> <ol> <li>use the cold standby script to copy the machine before the switch to the nightly builds on another system.</li> <li>run the <code>update.sh</code> script on the new machine with the parameter <code>--nightly</code> and confirm.</li> <li>experience/test the nightly updates on the secondary machine.</li> </ol>"},{"location":"en/manual-guides/u_e-80_to_443/","title":"Redirect HTTP to HTTPS","text":"<p>Since February the 28th 2017 mailcow does come with port 80 and 443 enabled.</p> <p>Do not use the config below for reverse proxy setups, please see our reverse proxy guide for this, which includes a redirect from HTTP to HTTPS.</p> <p>Open <code>mailcow.conf</code> and set <code>HTTP_BIND=</code> - if not already set.</p> <p>Create a new file <code>data/conf/nginx/redirect.conf</code> and add the following server config to the file:</p> <pre><code>server {\n root /web;\n listen 80 default_server;\n listen [::]:80 default_server;\n include /etc/nginx/conf.d/server_name.active;\n if ( $request_uri ~* \"%0A|%0D\" ) { return 403; }\n location ^~ /.well-known/acme-challenge/ {\n allow all;\n default_type \"text/plain\";\n }\n location / {\n return 301 https://$host$uri$is_args$args;\n }\n}\n</code></pre> <p>In case you changed the HTTP_BIND parameter, recreate the container:</p> <pre><code>docker compose up -d\n</code></pre> <p>Otherwise restart Nginx:</p> <pre><code>docker compose restart nginx-mailcow\n</code></pre>"},{"location":"en/manual-guides/u_e-autodiscover_config/","title":"Autodiscover / Autoconfig","text":"<p>You do not need to change or create this file, autodiscover works out of the box. This guide is only meant for customizations to the autodiscover or autoconfig process.</p> <p>Newer Outlook clients (especially those delivered with O365) will not autodiscover mail profiles. Keep in mind, that ActiveSync should NOT be used with a desktop client.</p> <p>Open/create <code>data/web/inc/vars.local.inc.php</code> and add your changes to the configuration array.</p> <p>Changes will be merged with \"$autodiscover_config\" in <code>data/web/inc/vars.inc.php</code>):</p> <pre><code>&lt;?php\n$autodiscover_config = array(\n // General autodiscover service type: \"activesync\" or \"imap\"\n // emClient uses autodiscover, but does not support ActiveSync. mailcow excludes emClient from ActiveSync.\n 'autodiscoverType' =&gt; 'activesync',\n // If autodiscoverType =&gt; activesync, also use ActiveSync (EAS) for Outlook desktop clients (&gt;= Outlook 2013 on Windows)\n // Outlook for Mac does not support ActiveSync\n 'useEASforOutlook' =&gt; 'yes',\n // Please don't use STARTTLS-enabled service ports in the \"port\" variable.\n // The autodiscover service will always point to SMTPS and IMAPS (TLS-wrapped services).\n // The autoconfig service will additionally announce the STARTTLS-enabled ports, specified in the \"tlsport\" variable.\n 'imap' =&gt; array(\n 'server' =&gt; $mailcow_hostname,\n 'port' =&gt; array_pop(explode(':', getenv('IMAPS_PORT'))),\n 'tlsport' =&gt; array_pop(explode(':', getenv('IMAP_PORT'))),\n ),\n 'pop3' =&gt; array(\n 'server' =&gt; $mailcow_hostname,\n 'port' =&gt; array_pop(explode(':', getenv('POPS_PORT'))),\n 'tlsport' =&gt; array_pop(explode(':', getenv('POP_PORT'))),\n ),\n 'smtp' =&gt; array(\n 'server' =&gt; $mailcow_hostname,\n 'port' =&gt; array_pop(explode(':', getenv('SMTPS_PORT'))),\n 'tlsport' =&gt; array_pop(explode(':', getenv('SUBMISSION_PORT'))),\n ),\n 'activesync' =&gt; array(\n 'url' =&gt; 'https://'.$mailcow_hostname.($https_port == 443 ? '' : ':'.$https_port).'/Microsoft-Server-ActiveSync',\n ),\n 'caldav' =&gt; array(\n 'server' =&gt; $mailcow_hostname,\n 'port' =&gt; $https_port,\n ),\n 'carddav' =&gt; array(\n 'server' =&gt; $mailcow_hostname,\n 'port' =&gt; $https_port,\n ),\n);\n</code></pre> <p>To always use IMAP and SMTP instead of EAS, set <code>'autodiscoverType' =&gt; 'imap'</code>.</p> <p>Disable ActiveSync for Outlook desktop clients by setting \"useEASforOutlook\" to \"no\".</p>"},{"location":"en/manual-guides/u_e-reeanble-weak-protocols/","title":"Re-enable TLS 1.0 and TLS 1.1","text":"<p>On February the 12th 2020 we disabled the deprecated protocols TLS 1.0 and 1.1 in Dovecot (POP3, POP3S, IMAP, IMAPS) and Postfix (SMTPS, SUBMISSION).</p> <p>Unauthenticated mail via SMTP on port 25/tcp does still accept &gt;= TLS 1.0 . It is better to accept a weak encryption than none at all.</p> <p>How to re-enable weak protocols?</p> <p>Edit <code>data/conf/postfix/extra.cf</code>:</p> <pre><code>submission_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3\nsmtps_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3\n</code></pre> <p>Edit <code>data/conf/dovecot/extra.conf</code>:</p> <pre><code>ssl_min_protocol = TLSv1\n</code></pre> <p>Restart the affected services:</p> <pre><code>docker compose restart postfix-mailcow dovecot-mailcow\n</code></pre> <p>Hint: You can enable TLS 1.2 in Windows 7.</p>"},{"location":"en/manual-guides/u_e-update-hooks/","title":"Run scripts before and after updates","text":"<p>It is possible to add pre- and post-update-hooks to the <code>update.sh</code> script that upgrades your whole mailcow installation.</p> <p>To do so, just add the corresponding bash script into your mailcow root directory: </p> <ul> <li><code>pre_update_hook.sh</code> for commands that should run before the update</li> <li><code>post_update_hook.sh</code> for commands that should run after the update is completed</li> </ul> <p>Keep in mind that <code>pre_update_hook.sh</code> runs every time you call <code>update.sh</code> and <code>post_update_hook.sh</code> will only run if the update was successful and the script doesn't have to be re-run.</p> <p>The scripts will be run by bash, an interpreter (e.g. <code>#!/bin/bash</code>) as well as an execute permission flag (\"+x\") are not required.</p>"},{"location":"en/manual-guides/u_e-why_unbound/","title":"Why unbound?","text":"<p>For DNS blacklist lookups and DNSSEC.</p> <p>Most systems use either a public or a local caching DNS resolver. That's a very bad idea when it comes to filter spam using DNS-based black hole lists (DNSBL) or similar technics. Most if not all providers apply a rate limit based on the DNS resolver that is used to query their service. Using a public resolver like Googles 4x8, OpenDNS or any other shared DNS resolver like your ISPs will hit that limit very soon.</p>"},{"location":"en/manual-guides/ClamAV/u_e-clamav-additional_dbs/","title":"Additional Databases","text":""},{"location":"en/manual-guides/ClamAV/u_e-clamav-additional_dbs/#additional-databases-for-clamav","title":"Additional Databases for ClamAV","text":"<p>Default ClamAV databases do not have great detection levels, but it can be enhanced with free or paid signature databases.</p>"},{"location":"en/manual-guides/ClamAV/u_e-clamav-additional_dbs/#list-of-known-free-databases-as-of-april-2022","title":"List of known free databases | As of April 2022","text":"<ul> <li>SecurityInfo - free ClamAV DBs for testing purposes, required registration after which you can use them from 1 IP</li> <li>InterServer - free to use ClamAV DBs, but they do not fit well for email scanning</li> </ul>"},{"location":"en/manual-guides/ClamAV/u_e-clamav-additional_dbs/#enable-securiteinfo-databases","title":"Enable SecuriteInfo databases","text":"<ol> <li>Sign up for a free account at https://www.securiteinfo.com/clients/customers/signup</li> <li>You will receive an email to activate your account and then a follow-up email with your login name</li> <li>Login and navigate to your customer account: https://www.securiteinfo.com/clients/customers/account</li> <li>Click on the Setup tab</li> <li>You will need to get <code>your_id</code> from one of the download links, they are individual for every user</li> <li> <p>Add to <code>data/conf/clamav/freshclam.conf</code> with replaced <code>your_id</code> part: <pre><code>DatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/securiteinfo.hdb\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/securiteinfo.ign2\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/javascript.ndb\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/spam_marketing.ndb\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/securiteinfohtml.hdb\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/securiteinfoascii.hdb\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/securiteinfopdf.hdb\n</code></pre></p> </li> <li> <p>For free SecuriteInfo databases, download speed is limited to 300 kB/s. In <code>data/conf/clamav/freshclam.conf</code>, increase the default <code>ReceiveTimeout 20</code> value to <code>ReceiveTimeout 90</code> (time in seconds), otherwise some of the database downloads could fail because of their size.</p> </li> <li> <p>Adjust <code>data/conf/clamav/clamd.conf</code> to align with next settings: <pre><code>DetectPUA yes\nExcludePUA PUA.Win.Packer\nExcludePUA PUA.Win.Trojan.Packed\nExcludePUA PUA.Win.Trojan.Molebox\nExcludePUA PUA.Win.Packer.Upx\nExcludePUA PUA.Doc.Packed\nMaxScanSize 150M\nMaxFileSize 100M\nMaxRecursion 40\nMaxEmbeddedPE 100M\nMaxHTMLNormalize 50M\nMaxScriptNormalize 50M\nMaxZipTypeRcg 50M\n</code></pre></p> </li> <li>Restart ClamAV container: <pre><code>docker compose restart clamd-mailcow\n</code></pre></li> </ol> <p>Please note:</p> <ul> <li>You can't use <code>ExcludePUA</code> and <code>IncludePUA</code> in <code>clamd.conf</code> simultaneously, so please comment any <code>IncludePUA</code> if you uncommented them before. </li> <li>List of databases provided in this example fit most use-cases, but SecuriteInfo also provides other databases. Please check SecuriteInfo FAQ for additional information.</li> <li>With the current DB set (including default DBs) ClamAV will consume about 1.3Gb of RAM on your server.</li> <li>If you modified <code>message_size_limit</code> in Postfix you need to adapt <code>MaxSize</code> settings in ClamAV as well.</li> </ul>"},{"location":"en/manual-guides/ClamAV/u_e-clamav-additional_dbs/#enable-interserver-databases","title":"Enable InterServer databases","text":"<ol> <li>Add to <code>data/conf/clamav/freshclam.conf</code>: <pre><code>DatabaseCustomURL http://sigs.interserver.net/interserver256.hdb\nDatabaseCustomURL http://sigs.interserver.net/interservertopline.db\nDatabaseCustomURL http://sigs.interserver.net/shell.ldb\nDatabaseCustomURL http://sigs.interserver.net/whitelist.fp\n</code></pre></li> <li>Restart ClamAV container: <pre><code>docker compose restart clamd-mailcow\n</code></pre></li> </ol>"},{"location":"en/manual-guides/ClamAV/u_e-clamav-whitelist/","title":"Whitelist","text":""},{"location":"en/manual-guides/ClamAV/u_e-clamav-whitelist/#whitelist-specific-clamav-signatures","title":"Whitelist specific ClamAV signatures","text":"<p>You may find that legitimate (clean) mail is being blocked by ClamAV (Rspamd will flag the mail with <code>VIRUS_FOUND</code>). For instance, interactive PDF form attachments are blocked by default because the embedded Javascript code may be used for nefarious purposes. Confirm by looking at the clamd logs, e.g.:</p> <pre><code>docker compose logs clamd-mailcow | grep \"FOUND\"\n</code></pre> <p>This line confirms that such was identified:</p> <pre><code>clamd-mailcow_1 | Sat Sep 28 07:43:24 2019 -&gt; instream(local): PUA.Pdf.Trojan.EmbeddedJavaScript-1(e887d2ac324ce90750768b86b63d0749:363325) FOUND\n</code></pre> <p>To whitelist this particular signature (and enable sending this type of file attached), add it to the ClamAV signature whitelist file:</p> <pre><code>echo 'PUA.Pdf.Trojan.EmbeddedJavaScript-1' &gt;&gt; data/conf/clamav/whitelist.ign2\n</code></pre> <p>Then restart the clamd-mailcow service container in the mailcow UI or using docker compose:</p> <pre><code>docker compose restart clamd-mailcow\n</code></pre> <p>Cleanup cached ClamAV results in Redis:</p> <pre><code># docker compose exec redis-mailcow /bin/sh\n/data # redis-cli KEYS rs_cl* | xargs redis-cli DEL\n/data # exit\n</code></pre>"},{"location":"en/manual-guides/Docker/u_e-docker-cust_dockerfiles/","title":"Customize Dockerfiles","text":"<p>You need to copy the override file with corresponding build tags to the mailcow: dockerized root folder (i.e. <code>/opt/mailcow-dockerized</code>):</p> <pre><code>cp helper-scripts/docker-compose.override.yml.d/BUILD_FLAGS/docker-compose.override.yml docker-compose.override.yml\n</code></pre> <p>Customize <code>data/Dockerfiles/$service</code> and build the image locally: <pre><code>docker build data/Dockerfiles/$service -t mailcow/$service:$tag\n</code></pre> (without a personalized :$tag docker will use :latest automatically)</p> <p>Now the created image has to be activated in docker-compose.override.yml, e.g.: <pre><code>$service-mailcow:\n build: ./data/Dockerfiles/$service\n image: mailcow/$service:$tag\n</code></pre></p> <p>Now auto-recreate modified containers:</p> <pre><code>docker compose up -d\n</code></pre>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-any_acl/","title":"Enable \"any\" ACL settings","text":"<p>On August the 17th, we disabled the possibility to share with \"any\" or \"all authenticated users\" by default.</p> <p>This function can be re-enabled by setting <code>ACL_ANYONE</code> to <code>allow</code> in mailcow.conf:</p> <pre><code>ACL_ANYONE=allow\n</code></pre> <p>Apply the changes by running <code>docker compose up -d</code>.</p>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-catchall_vacation/","title":"Vacation replies for catchall addresses","text":"<p>The Dovecot parameter <code>sieve_vacation_dont_check_recipient</code> - which was by default set to <code>yes</code> in mailcow configurations pre 21st July 2021 - allows for vacation replies even when a mail is sent to non-existent mailboxes like a catch-all addresses.</p> <p>We decided to switch this parameter back to <code>no</code> and allow a user to specify which recipient address triggers a vacation reply. The triggering recipients can also be configured in SOGos autoresponder feature.</p>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-expunge/","title":"Expunge a Users mails","text":"<p>If you want to delete old mails out of the <code>.Junk</code> or <code>.Trash</code> folders or maybe delete all read mails that are older than a certain amount of time you may use dovecot's tool doveadm man doveadm-expunge.</p>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-expunge/#the-manual-way","title":"The manual way","text":"<p>That said, let's dive in:</p> <p>Delete a user's mails inside the junk folder that are read and older than 4 hours</p> <pre><code>docker compose exec dovecot-mailcow doveadm expunge -u 'mailbox@example.com' mailbox 'Junk' SEEN not SINCE 4h\n</code></pre> <p>Delete all user's mails in the junk folder that are older than 7 days</p> <pre><code>docker compose exec dovecot-mailcow doveadm expunge -A mailbox 'Junk' savedbefore 7d\n</code></pre> <p>Delete all mails (of all users) in all folders that are older than 52 weeks (internal date of the mail, not the date it was saved on the system =&gt; <code>before</code> instead of <code>savedbefore</code>). Useful for deleting very old mails on all users and folders (thus especially useful for GDPR-compliance).</p> <pre><code>docker compose exec dovecot-mailcow doveadm expunge -A mailbox % before 52w\n</code></pre> <p>Delete mails inside a custom folder inside a user's inbox that are not flagged and older than 2 weeks</p> <pre><code>docker compose exec dovecot-mailcow doveadm expunge -u 'mailbox@example.com' mailbox 'INBOX/custom-folder' not FLAGGED not SINCE 2w\n</code></pre> <p>Info</p> <p>For possible time spans or search keys have a look at man doveadm-search-query</p>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-expunge/#job-scheduler","title":"Job scheduler","text":""},{"location":"en/manual-guides/Dovecot/u_e-dovecot-expunge/#via-the-host-system-cron","title":"via the host system cron","text":"<p>If you want to automate such a task you can create a cron job on your host that calls a script like the one below:</p> <pre><code>#!/bin/bash\n# Path to mailcow-dockerized, e.g. /opt/mailcow-dockerized\ncd /path/to/your/mailcow-dockerized\n\n/usr/local/bin/docker compose exec -T dovecot-mailcow doveadm expunge -A mailbox 'Junk' savedbefore 2w\n/usr/local/bin/docker compose exec -T dovecot-mailcow doveadm expunge -A mailbox 'Junk' SEEN not SINCE 12h\n[...]\n</code></pre> <p>To create a cron job you may execute <code>crontab -e</code> and insert something like the following to execute a script:</p> <pre><code># Execute everyday at 04:00 A.M.\n0 4 * * * /path/to/your/expunge_mailboxes.sh\n</code></pre>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-expunge/#via-docker-job-scheduler","title":"via Docker job scheduler","text":"<p>To archive this with a docker job scheduler use this docker-compose.override.yml with your mailcow: </p> <pre><code>version: '2.1'\n\nservices:\n\n ofelia:\n image: mcuadros/ofelia:latest\n restart: always\n command: daemon --docker\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock:ro \n network_mode: none\n\n dovecot-mailcow:\n labels:\n - \"ofelia.enabled=true\"\n - \"ofelia.job-exec.dovecot-expunge-trash.schedule=0 4 * * *\"\n - \"ofelia.job-exec.dovecot-expunge-trash.command=doveadm expunge -A mailbox 'Junk' savedbefore 2w\"\n - \"ofelia.job-exec.dovecot-expunge-trash.tty=false\"\n</code></pre> <p>The job controller just need access to the docker control socket to be able to emulate the behavior of \"exec\". Then we add a few label to our dovecot-container to activate the job scheduler and tell him in a cron compatible scheduling format when to run. If you struggle with that schedule string you can use crontab guru. This docker-compose.override.yml deletes all mails older then 2 weeks from the \"Junk\" folder every day at 4 am. To see if things ran proper, you can not only see in your mailbox but also check Ofelia's docker log if it looks something like this:</p> <pre><code>common.go:124 \u25b6 NOTICE [Job \"dovecot-expunge-trash\" (8759567efa66)] Started - doveadm expunge -A mailbox 'Junk' savedbefore 2w,\ncommon.go:124 \u25b6 NOTICE [Job \"dovecot-expunge-trash\" (8759567efa66)] Finished in \"285.032291ms\", failed: false, skipped: false, error: none,\n</code></pre> <p>If it failed it will say so and give you the output of the doveadm in the log to make it easy on you to debug.</p> <p>In case you want to add more jobs, ensure you change the \"dovecot-expunge-trash\" part after \"ofelia.job-exec.\" to something else, it defines the name of the job. Syntax of the labels you find at mcuadros/ofelia.</p>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-extra_conf/","title":"Customize/Expand dovecot.conf","text":"<p>Create a file <code>data/conf/dovecot/extra.conf</code> - if missing - and add your additional content here.</p> <p>Restart <code>dovecot-mailcow</code> to apply your changes:</p> <pre><code>docker compose restart dovecot-mailcow\n</code></pre>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-fts/","title":"FTS (Solr)","text":""},{"location":"en/manual-guides/Dovecot/u_e-dovecot-fts/#fts-solr","title":"FTS Solr","text":"<p>Solr is used for setups with memory &gt;= 3.5 GiB to provide full-text search in Dovecot.</p> <p>Please be aware that applications like Solr may need maintenance from time to time.</p> <p>Besides that, Solr will eat a lot of RAM, depending on the usage of your server. Please avoid it on machines with less than 3 GB RAM.</p> <p>The default heap size (1024 M) is defined in mailcow.conf.</p> <p>Since we run in Docker and create our containers with the \"restart: always\" flag, a oom situation will at least only trigger a restart of the container.</p>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-fts/#fts-related-dovecot-commands","title":"FTS related Dovecot commands","text":"<pre><code># single user\ndocker compose exec dovecot-mailcow doveadm fts rescan -u user@domain\n# all users\ndocker compose exec dovecot-mailcow doveadm fts rescan -A\n</code></pre> <p>Dovecot Wiki: \"Scan what mails exist in the full text search index and compare those to what actually exist in mailboxes. This removes mails from the index that have already been expunged and makes sure that the next doveadm index will index all the missing mails (if any).\"</p> <p>This does not re-index a mailbox. It basically repairs a given index.</p> <p>If you want to re-index data immediately, you can run the followig command, where '*' can also be a mailbox mask like 'Sent'. You do not need to run these commands, but it will speed things up a bit:</p> <pre><code># single user\ndocker compose exec dovecot-mailcow doveadm index -u user@domain '*'\n# all users, but obviously slower and more dangerous\ndocker compose exec dovecot-mailcow doveadm index -A '*'\n</code></pre> <p>This will take some time depending on your machine and Solr can run oom, monitor it!</p> <p>Because re-indexing is very sensible, we did not include it to mailcow UI. You will need to take care of any errors while re-indexing a mailbox.</p>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-fts/#delete-mailbox-data","title":"Delete mailbox data","text":"<p>mailcow will purge index data of a user when deleting a mailbox.</p>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-idle_interval/","title":"Changing the IMAP IDLE interval","text":""},{"location":"en/manual-guides/Dovecot/u_e-dovecot-idle_interval/#what-is-the-idle-interval","title":"What is the IDLE interval?","text":"<p>Per default, Dovecot sends a \"I'm still here\" notification to every client that has an open connection with Dovecot to get mails as quickly as possible without manually polling it (IMAP PUSH). This notification is controlled by the setting <code>imap_idle_notify_interval</code>, which defaults to 2 minutes. </p> <p>A short interval results in the client getting a lot of messages for this connection, which is bad for mobile devices, because every time the device receives this message, the mailing app has to wake up. This can result in unnecessary battery drain.</p>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-idle_interval/#edit-the-value","title":"Edit the value","text":""},{"location":"en/manual-guides/Dovecot/u_e-dovecot-idle_interval/#change-configuration","title":"Change configuration","text":"<p>Create a new file <code>data/conf/dovecot/extra.conf</code> (or edit it if it already exists). Insert the setting followed by the new value. For example, to set the interval to 5 minutes you could type:</p> <pre><code>imap_idle_notify_interval = 5 mins\n</code></pre> <p>29 minutes is the maximum value allowed by the corresponding RFC.</p> <p>Warning</p> <p>This isn't a default setting in mailcow because we don't know how this setting changes the behavior of other clients. Be careful if you change this and monitor different behavior.</p>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-idle_interval/#reload-dovecot","title":"Reload Dovecot","text":"<p>Now reload Dovecot: <pre><code>docker compose exec dovecot-mailcow dovecot reload\n</code></pre></p> <p>Info</p> <p>You can check the value of this setting with <pre><code>docker compose exec dovecot-mailcow dovecot -a | grep \"imap_idle_notify_interval\"\n</code></pre> If you didn't change it, it should be at 2m. If you did change it, you should see your new value.</p>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-mail-crypt/","title":"Mail crypt","text":"<p>Warning</p> <p>Mails are stored compressed (lz4) and encrypted. The key pair can be found in crypt-vol-1.</p> <p>If you want to decode/encode existing maildir files, you can use the following script at your own risk:</p> <p>Enter Dovecot by running <code>docker compose exec dovecot-mailcow /bin/bash</code> in the mailcow-dockerized location.</p> <pre><code># Decrypt /var/vmail\nfind /var/vmail/ -type f -regextype egrep -regex '.*S=.*W=.*' | while read -r file; do\nif [[ $(head -c7 \"$file\") == \"CRYPTED\" ]]; then\ndoveadm fs get compress lz4:1:crypt:private_key_path=/mail_crypt/ecprivkey.pem:public_key_path=/mail_crypt/ecpubkey.pem:posix:prefix=/ \\\n \"$file\" &gt; \"/tmp/$(basename \"$file\")\"\n if [[ -s \"/tmp/$(basename \"$file\")\" ]]; then\n chmod 600 \"/tmp/$(basename \"$file\")\"\n chown 5000:5000 \"/tmp/$(basename \"$file\")\"\n mv \"/tmp/$(basename \"$file\")\" \"$file\"\n else\n rm \"/tmp/$(basename \"$file\")\"\n fi\nfi\ndone\n\n# Encrypt /var/vmail\nfind /var/vmail/ -type f -regextype egrep -regex '.*S=.*W=.*' | while read -r file; do\nif [[ $(head -c7 \"$file\") != \"CRYPTED\" ]]; then\ndoveadm fs put crypt private_key_path=/mail_crypt/ecprivkey.pem:public_key_path=/mail_crypt/ecpubkey.pem:posix:prefix=/ \\\n \"$file\" \"$file\"\n chmod 600 \"$file\"\n chown 5000:5000 \"$file\"\nfi\ndone\n</code></pre>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-more/","title":"More Examples with DOVEADM","text":"<p>Here is just an unsorted list of useful <code>doveadm</code> commands that could be useful.</p>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-more/#doveadm-quota","title":"doveadm quota","text":"<p>The <code>quota get</code> and <code>quota recalc</code>1 commands are used to display or recalculate the current user's quota usage. The reported values are in kilobytes.</p> <p>To list the current quota status for a user / mailbox, do:</p> <pre><code>doveadm quota get -u 'mailbox@example.org'\n</code></pre> <p>To list the quota storage value for all users, do:</p> <pre><code>doveadm quota get -A |grep \"STORAGE\"\n</code></pre> <p>Recalculate a single user's quota usage:</p> <pre><code>doveadm quota recalc -u 'mailbox@example.org'\n</code></pre>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-more/#doveadm-search","title":"doveadm search","text":"<p>The <code>doveadm search</code>2 command is used to find messages matching your query. It can return the username, mailbox-GUID / -UID and message-GUIDs / -UIDs.</p> <p>To view the number of messages, by user, in their .Trash folder:</p> <pre><code>doveadm search -A mailbox 'Trash' | awk '{print $1}' | sort | uniq -c\n</code></pre> <p>Show all messages in a user's inbox older then 90 days:</p> <pre><code>doveadm search -u 'mailbox@example.org' mailbox 'INBOX' savedbefore 90d\n</code></pre> <p>Show all messages in any folder that are older then 30 days for <code>mailbox@example.org</code>:</p> <pre><code>doveadm search -u 'mailbox@example.org' mailbox \"*\" savedbefore 30d\n</code></pre> <ol> <li> <p>https://wiki.dovecot.org/Tools/Doveadm/Quota \u21a9</p> </li> <li> <p>https://wiki.dovecot.org/Tools/Doveadm/Search \u21a9</p> </li> </ol>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-public_folder/","title":"Public folders","text":"<p>Create a new public namespace \"Public\" and a mailbox \"Develcow\" inside that namespace:</p> <p>Edit or create <code>data/conf/dovecot/extra.conf</code>, add:</p> <pre><code>namespace {\n type = public\n separator = /\n prefix = Public/\n location = maildir:/var/vmail/public:INDEXPVT=~/public\n subscriptions = yes\n mailbox \"Develcow\" {\n auto = subscribe\n }\n}\n</code></pre> <p><code>:INDEXPVT=~/public</code> can be omitted if per-user seen flags are not wanted.</p> <p>The new mailbox in the public namespace will be auto-subscribed by users.</p> <p>To allow all authenticated users access full to that new mailbox (not the whole namespace), run:</p> <pre><code>docker compose exec dovecot-mailcow doveadm acl set -A \"Public/Develcow\" \"authenticated\" lookup read write write-seen write-deleted insert post delete expunge create\n</code></pre> <p>Adjust the command to your needs if you like to assign more granular rights per user (use <code>-u user@domain</code> instead of <code>-A</code> for example).</p>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-public_folder/#allow-authenticated-users-access-to-the-whole-public-namespace","title":"Allow authenticated users access to the whole public namespace","text":"<p>To allow all authenticated users access full access to the whole public namespace and its subfolders, create a new <code>dovecot-acl</code> file in the namespace root directory:</p> <p>Open/edit/create <code>/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/public/dovecot-acl</code> (adjust the path accordingly) to create the global ACL file with the following content:</p> <pre><code>authenticated kxeilprwts\n</code></pre> <p><code>kxeilprwts</code> equals to <code>lookup read write write-seen write-deleted insert post delete expunge create</code>.</p> <p>You can use <code>doveadm acl set -u user@domain \"Public/Develcow\" user=user@domain lookup read</code> to limit access for a single user. You may also turn it around to limit access for all users to \"lr\" and grant only some users full access.</p> <p>See Dovecot ACL for further information about ACL.</p>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-static_master/","title":"Static master user","text":"<p>Random master usernames and passwords are automatically created on every restart of dovecot-mailcow.</p> <p>That's recommended and should not be changed.</p> <p>If you need the user to be static anyway, please specify two variables in <code>mailcow.conf</code>.</p> <p>Both parameters must not be empty!</p> <pre><code>DOVECOT_MASTER_USER=mymasteruser\nDOVECOT_MASTER_PASS=mysecretpass\n</code></pre> <p>Run <code>docker compose up -d</code> to apply your changes.</p> <p>The static master username will be expanded to <code>DOVECOT_MASTER_USER@mailcow.local</code>.</p> <p>To login as <code>test@example.org</code> this would equal to <code>test@example.org*mymasteruser@mailcow.local</code> with the specified password above.</p> <p>A login to SOGo is not possible with this username. A click-to-login function for SOGo is available for admins as described here No master user is required.</p>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-vmail-volume/","title":"Move Maildir (vmail)","text":""},{"location":"en/manual-guides/Dovecot/u_e-dovecot-vmail-volume/#the-new-way","title":"The \"new\" way","text":"<p>Warning</p> <p>Newer Docker versions seem to complain about existing volumes. You can fix this temporarily by removing the existing volume and start mailcow with the override file. But it seems to be problematic after a reboot (needs to be confirmed).</p> <p>An easy, dirty, yet stable workaround is to stop mailcow (<code>docker compose down</code>), remove <code>/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data</code> and create a new link to your remote filesystem location, for example:</p> <pre><code>mv /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data_backup\nln -s /mnt/volume-xy/vmail_data /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data\n</code></pre> <p>Start mailcow afterwards.</p>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-vmail-volume/#the-old-way","title":"The \"old\" way","text":"<p>If you want to use another folder for the vmail-volume, you can create a <code>docker-compose.override.yml</code> file and add the following content:</p> <pre><code>version: '2.1'\nvolumes:\n vmail-vol-1:\n driver_opts:\n type: none\n device: /data/mailcow/vmail \n o: bind\n</code></pre>"},{"location":"en/manual-guides/Dovecot/u_e-dovecot-vmail-volume/#moving-an-existing-vmail-folder","title":"Moving an existing vmail folder:","text":"<ul> <li>Locate the current vmail folder by its \"Mountpoint\" attribute: <code>docker volume inspect mailcowdockerized_vmail-vol-1</code></li> </ul> <pre><code>[\n {\n \"CreatedAt\": \"2019-06-16T22:08:34+02:00\",\n \"Driver\": \"local\",\n \"Labels\": {\n \"com.docker.compose.project\": \"mailcowdockerized\",\n \"com.docker.compose.version\": \"1.23.2\",\n \"com.docker.compose.volume\": \"vmail-vol-1\"\n },\n \"Mountpoint\": \"/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data\",\n \"Name\": \"mailcowdockerized_vmail-vol-1\",\n \"Options\": null,\n \"Scope\": \"local\"\n }\n]\n</code></pre> <ul> <li>Copy the content of the <code>Mountpoint</code> folder to the new location (e.g. <code>/data/mailcow/vmail</code>) using <code>cp -a</code>, <code>rsync -a</code> or a similar non strcuture breaking copy command</li> <li>Stop mailcow by executing <code>docker compose down</code> from within your mailcow root folder (e.g. <code>/opt/mailcow-dockerized</code>)</li> <li>Create the file <code>docker-compose.override.yml</code>, edit the device path accordingly</li> <li>Delete the current vmail folder: <code>docker volume rm mailcowdockerized_vmail-vol-1</code></li> <li>Start mailcow by executing <code>docker compose up -d</code> from within your mailcow root folder (e.g. <code>/opt/mailcow-dockerized</code>)</li> </ul>"},{"location":"en/manual-guides/Nginx/u_e-nginx_custom/","title":"Custom sites","text":""},{"location":"en/manual-guides/Nginx/u_e-nginx_custom/#ssl","title":"SSL","text":"<p>Please see Advanced SSL and explicitly check <code>ADDITIONAL_SERVER_NAMES</code> for SSL configuration.</p> <p>Please do not add ADDITIONAL_SERVER_NAMES when you plan to use a different web root.</p>"},{"location":"en/manual-guides/Nginx/u_e-nginx_custom/#new-site","title":"New site","text":"<p>To create persistent (over updates) sites hosted by mailcow: dockerized, a new site configuration must be placed inside <code>data/conf/nginx/</code>:</p> <p>A good template to begin with:</p> <pre><code>nano data/conf/nginx/my_custom_site.conf\n</code></pre> <pre><code>server {\n ssl_certificate /etc/ssl/mail/cert.pem;\n ssl_certificate_key /etc/ssl/mail/key.pem;\n ssl_protocols TLSv1.2 TLSv1.3;\n ssl_prefer_server_ciphers on;\n ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;\n ssl_ecdh_curve X25519:X448:secp384r1:secp256k1;\n ssl_session_cache shared:SSL:50m;\n ssl_session_timeout 1d;\n ssl_session_tickets off;\n index index.php index.html;\n client_max_body_size 0;\n # Location: data/web\n root /web;\n # Location: data/web/mysite.com\n #root /web/mysite.com\n include /etc/nginx/conf.d/listen_plain.active;\n include /etc/nginx/conf.d/listen_ssl.active;\n server_name mysite.example.org;\n server_tokens off;\n\n # This allows acme to be validated even with a different web root\n location ^~ /.well-known/acme-challenge/ {\n default_type \"text/plain\";\n rewrite /.well-known/acme-challenge/(.*) /$1 break;\n root /web/.well-known/acme-challenge/;\n }\n\n if ($scheme = http) {\n return 301 https://$server_name$request_uri;\n }\n}\n</code></pre>"},{"location":"en/manual-guides/Nginx/u_e-nginx_custom/#new-site-with-proxy-to-a-remote-location","title":"New site with proxy to a remote location","text":"<p>Another example with a reverse proxy configuration:</p> <pre><code>nano data/conf/nginx/my_custom_site.conf\n</code></pre> <pre><code>server {\n ssl_certificate /etc/ssl/mail/cert.pem;\n ssl_certificate_key /etc/ssl/mail/key.pem;\n ssl_protocols TLSv1.2 TLSv1.3;\n ssl_prefer_server_ciphers on;\n ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;\n ssl_ecdh_curve X25519:X448:secp384r1:secp256k1;\n ssl_session_cache shared:SSL:50m;\n ssl_session_timeout 1d;\n ssl_session_tickets off;\n index index.php index.html;\n client_max_body_size 0;\n root /web;\n include /etc/nginx/conf.d/listen_plain.active;\n include /etc/nginx/conf.d/listen_ssl.active;\n server_name example.domain.tld;\n server_tokens off;\n\n location ^~ /.well-known/acme-challenge/ {\n allow all;\n default_type \"text/plain\";\n }\n\n if ($scheme = http) {\n return 301 https://$host$request_uri;\n }\n\n location / {\n proxy_pass http://service:3000/;\n proxy_set_header Host $http_host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n client_max_body_size 0;\n }\n}\n</code></pre>"},{"location":"en/manual-guides/Nginx/u_e-nginx_custom/#config-expansion-in-mailcows-nginx","title":"Config expansion in mailcows Nginx","text":"<p>The filename used for a new site is not important, as long as the filename carries a .conf extension.</p> <p>It is also possible to extend the configuration of the default file <code>site.conf</code> file:</p> <pre><code>nano data/conf/nginx/site.my_content.custom\n</code></pre> <p>This filename does not need to have a \".conf\" extension but follows the pattern <code>site.*.custom</code>, where <code>*</code> is a custom name.</p> <p>If PHP is to be included in a custom site, please use the PHP-FPM listener on phpfpm:9002 or create a new listener in <code>data/conf/phpfpm/php-fpm.d/pools.conf</code>.</p> <p>Restart Nginx (and PHP-FPM, if a new listener was created):</p> <pre><code>docker compose restart nginx-mailcow\ndocker compose restart php-fpm-mailcow\n</code></pre>"},{"location":"en/manual-guides/Nginx/u_e-nginx_webmail-site/","title":"Create subdomain webmail.example.org","text":"<p>IMPORTANT: This guide only applies to non SNI enabled configurations. The certificate path needs to be adjusted if SNI is enabled. Something like <code>ssl_certificate,key /etc/ssl/mail/webmail.example.org/cert.pem,key.pem;</code> will do. But: The certificate should be acquired first and only after the certificate exists a site config should be created. Nginx will fail to start if it cannot find the certificate and key.</p> <p>To create a subdomain <code>webmail.example.org</code> and redirect it to SOGo, you need to create a new Nginx site. Take care of \"CHANGE_TO_MAILCOW_HOSTNAME\"!</p> <p>nano data/conf/nginx/webmail.conf</p> <pre><code>server {\n ssl_certificate /etc/ssl/mail/cert.pem;\n ssl_certificate_key /etc/ssl/mail/key.pem;\n index index.php index.html;\n client_max_body_size 0;\n root /web;\n include /etc/nginx/conf.d/listen_plain.active;\n include /etc/nginx/conf.d/listen_ssl.active;\n server_name webmail.example.org;\n server_tokens off;\n location ^~ /.well-known/acme-challenge/ {\n allow all;\n default_type \"text/plain\";\n }\n\n location / {\n return 301 https://CHANGE_TO_MAILCOW_HOSTNAME/SOGo;\n }\n}\n</code></pre> <p>Save and restart Nginx: <code>docker compose restart nginx-mailcow</code>.</p> <p>Now open <code>mailcow.conf</code> and find <code>ADDITIONAL_SAN</code>. Add <code>webmail.example.org</code> to this array, don't use quotes!</p> <pre><code>ADDITIONAL_SAN=webmail.example.org\n</code></pre> <p>Run <code>docker compose up -d</code>. See \"acme-mailcow\" and \"nginx-mailcow\" logs if anything fails.</p>"},{"location":"en/manual-guides/Postfix/u_e-postfix-attachment_size/","title":"Max. message size (attachment size)","text":"<p>Open <code>data/conf/postfix/extra.cf</code> and set the <code>message_size_limit</code> accordingly in bytes. See <code>main.cf</code> for the default value.</p> <p>Restart Postfix:</p> <pre><code>docker compose restart postfix-mailcow\n</code></pre>"},{"location":"en/manual-guides/Postfix/u_e-postfix-custom_transport/","title":"Custom transport maps","text":"<p>For transport maps other than those to be configured in mailcow UI, please use <code>data/conf/postfix/custom_transport.pcre</code> to prevent existing maps or settings from being overwritten by updates.</p> <p>In most cases using this file is not necessary. Please make sure mailcow UI is not able to route your desired traffic properly before using that file.</p> <p>The file needs valid PCRE content and can break Postfix, if configured incorrectly.</p>"},{"location":"en/manual-guides/Postfix/u_e-postfix-disable_sender_verification/","title":"Disable Sender Addresses Verification","text":""},{"location":"en/manual-guides/Postfix/u_e-postfix-disable_sender_verification/#new-guide","title":"New guide","text":"<p>Edit a mailbox and select \"Allow to send as *\".</p> <p>For historical reasons we kept the old and deprecated guide below:</p>"},{"location":"en/manual-guides/Postfix/u_e-postfix-disable_sender_verification/#deprecated-guide-do-not-use-on-newer-mailcows","title":"Deprecated guide (DO NOT USE ON NEWER MAILCOWS!)","text":"<p>This option is not best-practice and should only be implemented when there is no other option available to achieve whatever you are trying to do.</p> <p>Simply create a file <code>data/conf/postfix/check_sasl_access</code> and enter the following content. This user must exist in your installation and needs to authenticate before sending mail. <pre><code>user-to-allow-everything@example.com OK\n</code></pre></p> <p>Open <code>data/conf/postfix/main.cf</code> and find <code>smtpd_sender_restrictions</code>. Prepend <code>check_sasl_access hash:/opt/postfix/conf/check_sasl_access</code> like this: <pre><code>smtpd_sender_restrictions = check_sasl_access hash:/opt/postfix/conf/check_sasl_access reject_authenticated_sender_login_mismatch [...]\n</code></pre></p> <p>Run postmap on check_sasl_access:</p> <pre><code>docker compose exec postfix-mailcow postmap /opt/postfix/conf/check_sasl_access\n</code></pre> <p>Restart the Postfix container.</p>"},{"location":"en/manual-guides/Postfix/u_e-postfix-extra_cf/","title":"Customize/Expand main.cf","text":"<p>Please create a new file <code>data/conf/postfix/extra.cf</code> for overrides or additional content to <code>main.cf</code>.</p> <p>Postfix will complain about duplicate values once after starting postfix-mailcow, this is intended.</p> <p>Syslog-ng was configured to hide those warnings while Postfix is running, to not spam the log files with unnecessary information every time a service is used.</p> <p>Restart <code>postfix-mailcow</code> to apply your changes:</p> <pre><code>docker compose restart postfix-mailcow\n</code></pre>"},{"location":"en/manual-guides/Postfix/u_e-postfix-pflogsumm/","title":"Statistics with pflogsumm","text":"<p>To use pflogsumm with the default logging driver, we need to query postfix-mailcow via docker logs and direct the output to pflogsumm:</p> <pre><code>docker logs --since 24h $(docker ps -qf name=postfix-mailcow) | pflogsumm\n</code></pre> <p>The above log output is limited to the last 24 hours.</p> <p>It is also possible to create a daily pflogsumm report via cron. Create the /etc/cron.d/pflogsumm file with the following content:</p> <pre><code>SHELL=/bin/bash\n59 23 * * * root docker logs --since 24h $(docker ps -qf name=postfix-mailcow) | /usr/sbin/pflogsumm -d today | mail -s \"Postfix Report of $(date)\" postmaster@example.net\n</code></pre> <p>To work, a local postfix must be installed on the server, which relays to the mailcow postfix.</p> <p>More detailed information can be found in section Post installation tasks -&gt; Local MTA on Dockerhost.</p> <p>Based on the postfix logs of the last 24 hours, this example then sends a pflogsumm report to postmaster@example.net every day at 23:59:00.</p>"},{"location":"en/manual-guides/Postfix/u_e-postfix-postscreen_whitelist/","title":"Whitelist IP in Postscreen","text":"<p>IPs can be removed from Postscreen and therefore also from RBL checks in <code>data/conf/postfix/custom_postscreen_whitelist.cidr</code>.</p> <p>Postscreen does multiple checks to identify malicious senders. In most cases you want to whitelist an IP to exclude it from blacklist lookups.</p> <p>The format of the file is as follows:</p> <p><code>CIDR ACTION</code></p> <p>Where CIDR is a single IP address or IP range in CIDR notation, and action is either \"permit\" or \"reject\".</p> <p>Example:</p> <pre><code># Rules are evaluated in the order as specified.\n# Blacklist 192.168.* except 192.168.0.1.\n192.168.0.1 permit\n192.168.0.0/16 reject\n</code></pre> <p>The file is reloaded on the fly, postfix restart is not required.</p>"},{"location":"en/manual-guides/Postfix/u_e-postfix-relayhost/","title":"Relayhosts","text":"<p>As of September 12, 2018 you can setup relayhosts as admin by using the mailcow UI.</p> <p>This is useful if you want to relay outgoing emails for a specific domain to a third-party spam filter or a service like Mailgun or Sendgrid. This is also known as a smarthost.</p>"},{"location":"en/manual-guides/Postfix/u_e-postfix-relayhost/#add-a-new-relayhost","title":"Add a new relayhost","text":"<p>Go to the <code>Routing</code> tab of the <code>Configuration and Details</code> section of the admin UI. Here you will see a list of relayhosts currently setup.</p> <p>Scroll to the <code>Add sender-dependent transport</code> section.</p> <p>Under <code>Host</code>, add the host you want to relay to. Example: if you want to use Mailgun to send emails instead of your server IP, enter smtp.mailgun.org</p> <p>If the relay host requires a username and password to authenticate, enter them in the respective fields. Keep in mind the credentials will be stored in plain text.</p>"},{"location":"en/manual-guides/Postfix/u_e-postfix-relayhost/#test-a-relayhost","title":"Test a relayhost","text":"<p>To test that connectivity to the host works, click on <code>Test</code> from the list of relayhosts and enter a From: address. Then, run the test.</p> <p>You will then see the results of the SMTP transmission. If all went well, you should see <code>SERVER -&gt; CLIENT: 250 2.0.0 Ok: queued as A093B401D4</code> as one of the last lines.</p> <p>If not, review the error provided and resolve it.</p> <p>Note: Some hosts, especially those who do not require authentication, will deny connections from servers that have not been added to their system beforehand. Make sure you read the documentation of the relayhost to make sure you've added your domain and/or the server IP to their system.</p> <p>Tip: You can change the default test To: address the test uses from null@mailcow.email to any email address you choose by modifying the $RELAY_TO variable on the vars.inc.php file under /opt/mailcow-dockerized/data/web/inc This way you can check that the relay worked by checking the destination mailbox.</p>"},{"location":"en/manual-guides/Postfix/u_e-postfix-relayhost/#set-the-relayhost-for-a-domain","title":"Set the relayhost for a domain","text":"<p>Go to the <code>Domains</code> tab of the <code>Mail setup</code> section of the admin UI.</p> <p>Edit the desired domain.</p> <p>Select the newly added host on the <code>Sender-dependent transports</code> dropdown and save changes.</p> <p>Send an email from a mailbox on that domain and you should see postfix handing the message over to the relayhost in the logs.</p>"},{"location":"en/manual-guides/Postfix/u_e-postfix-trust_networks/","title":"Add trusted networks","text":"<p>By default mailcow considers all networks as untrusted excluding its own IPV4_NETWORK and IPV6_NETWORK scopes. Though it is reasonable in most cases, there may be circumstances that you need to loosen this restriction.</p> <p>By default mailcow uses <code>mynetworks_style = subnet</code> to determine internal subnets and leaves <code>mynetworks</code> unconfigured.</p> <p>If you decide to set <code>mynetworks</code>, Postfix ignores the mynetworks_style setting. This means you have to add the IPV4_NETWORK and IPV6_NETWORK scopes as well as loopback subnets manually!</p>"},{"location":"en/manual-guides/Postfix/u_e-postfix-trust_networks/#unauthenticated-relaying","title":"Unauthenticated relaying","text":"<p>Warning</p> <p>Incorrect setup of <code>mynetworks</code> will allow your server to be used as an open relay. If abused, this will affect your ability to send emails and can take some time to be resolved.</p>"},{"location":"en/manual-guides/Postfix/u_e-postfix-trust_networks/#ipv4-hostssubnets","title":"IPv4 hosts/subnets","text":"<p>To add the subnet <code>192.168.2.0/24</code> to the trusted networks you may use the following configuration, depending on your IPV4_NETWORK and IPV6_NETWORK scopes:</p> <p>Edit <code>data/conf/postfix/extra.cf</code>:</p> <pre><code>mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 [fe80::]/10 172.22.1.0/24 [fd4d:6169:6c63:6f77::]/64 192.168.2.0/24\n</code></pre> <p>Run <code>docker compose restart postfix-mailcow</code> to apply your new settings.</p>"},{"location":"en/manual-guides/Postfix/u_e-postfix-trust_networks/#ipv6-hostssubnets","title":"IPv6 hosts/subnets","text":"<p>Adding IPv6 hosts is done the same as IPv4, however the subnet needs to be placed in brackets <code>[]</code> with the netmask appended.</p> <p>To add the subnet 2001:db8::/32 to the trusted networks you may use the following configuration, depending on your IPV4_NETWORK and IPV6_NETWORK scopes:</p> <p>Edit <code>data/conf/postfix/extra.cf</code>:</p> <pre><code>mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 [fe80::]/10 172.22.1.0/24 [fd4d:6169:6c63:6f77::]/64 [2001:db8::]/32\n</code></pre> <p>Run <code>docker compose restart postfix-mailcow</code> to apply your new settings.</p> <p>Info</p> <p>More information about mynetworks can be found in the Postfix documentation.</p>"},{"location":"en/manual-guides/Redis/u_e-redis/","title":"Redis","text":"<p>Redis is used as a key-value store for rspamd's and (some of) mailcow's settings and data. If you are unfamiliar with redis please read the introduction to redis and maybe visit this wonderful guide on how to use it.</p>"},{"location":"en/manual-guides/Redis/u_e-redis/#client","title":"Client","text":"<p>To connect to the redis cli execute:</p> <pre><code>docker compose exec redis-mailcow redis-cli\n</code></pre>"},{"location":"en/manual-guides/Redis/u_e-redis/#debugging","title":"Debugging","text":"<p>Here are some useful commands for the redis-cli for debugging:</p>"},{"location":"en/manual-guides/Redis/u_e-redis/#monitor","title":"MONITOR","text":"<p>Listens for all requests received by the server in real time:</p> <pre><code># docker compose exec redis-mailcow redis-cli\n127.0.0.1:6379&gt; monitor\nOK\n1494077286.401963 [0 172.22.1.253:41228] \"SMEMBERS\" \"BAYES_SPAM_keys\"\n1494077288.292970 [0 172.22.1.253:41229] \"SMEMBERS\" \"BAYES_SPAM_keys\"\n[...]\n</code></pre>"},{"location":"en/manual-guides/Redis/u_e-redis/#keys","title":"KEYS","text":"<p>Get all keys matching your pattern:</p> <pre><code>KEYS *\n</code></pre>"},{"location":"en/manual-guides/Redis/u_e-redis/#ping","title":"PING","text":"<p>Test a connection:</p> <pre><code>127.0.0.1:6379&gt; PING\nPONG\n</code></pre> <p>If you want to know more, here is a cheat sheet.</p>"},{"location":"en/manual-guides/Rspamd/u_e-rspamd/","title":"Rspamd","text":"<p>Rspamd is used for AV handling, DKIM signing and SPAM handling. It's a powerful and fast filter system. For a more in-depth documentation on Rspamd please visit its own documentation.</p>"},{"location":"en/manual-guides/Rspamd/u_e-rspamd/#learn-spam-ham","title":"Learn Spam &amp; Ham","text":"<p>Rspamd learns mail as spam or ham when you move a message in or out of the junk folder to any mailbox besides trash. This is achieved by using the Sieve plugin \"sieve_imapsieve\" and parser scripts.</p> <p>Rspamd also auto-learns mail when a high or low score is detected (see https://rspamd.com/doc/configuration/statistic.html#autolearning). We configured the plugin to keep a sane ratio between spam and ham learns.</p> <p>The bayes statistics are written to Redis as keys <code>BAYES_HAM</code> and <code>BAYES_SPAM</code>.</p> <p>Besides bayes, a local fuzzy storage is used to learn recurring patterns in text or images that indicate ham or spam.</p> <p>You can also use Rspamd's web UI to learn ham and / or spam or to adjust certain settings of Rspamd.</p>"},{"location":"en/manual-guides/Rspamd/u_e-rspamd/#learn-spam-or-ham-from-existing-directory","title":"Learn Spam or Ham from existing directory","text":"<p>You can use a one-liner to learn mail in plain-text (uncompressed) format:</p> <pre><code># Ham\nfor file in /my/folder/cur/*; do docker exec -i $(docker compose ps -q rspamd-mailcow) rspamc learn_ham &lt; $file; done\n# Spam\nfor file in /my/folder/.Junk/cur/*; do docker exec -i $(docker compose ps -q rspamd-mailcow) rspamc learn_spam &lt; $file; done\n</code></pre> <p>Consider attaching a local folder as new volume to <code>rspamd-mailcow</code> in <code>docker-compose.yml</code> and learn given files inside the container. This can be used as workaround to parse compressed data with zcat. Example:</p> <pre><code>for file in /data/old_mail/.Junk/cur/*; do rspamc learn_spam &lt; zcat $file; done\n</code></pre>"},{"location":"en/manual-guides/Rspamd/u_e-rspamd/#reset-learned-data-bayes-neural","title":"Reset learned data (Bayes, Neural)","text":"<p>You need to delete keys in Redis to reset learned data, so create a copy of your Redis database now:</p> <p>Backup database</p> <pre><code># It is better to stop Redis before you copy the file.\ncp /var/lib/docker/volumes/mailcowdockerized_redis-vol-1/_data/dump.rdb /root/\n</code></pre> <p>Reset Bayes data</p> <pre><code>docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern BAYES_* | xargs redis-cli del'\ndocker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern RS* | xargs redis-cli del'\n</code></pre> <p>Reset Neural data</p> <pre><code>docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern rn_* | xargs redis-cli del'\n</code></pre> <p>Reset Fuzzy data</p> <pre><code># We need to enter the redis-cli first:\ndocker compose exec redis-mailcow redis-cli\n# In redis-cli:\n127.0.0.1:6379&gt; EVAL \"for i, name in ipairs(redis.call('KEYS', ARGV[1])) do redis.call('DEL', name); end\" 0 fuzzy*\n</code></pre> <p>Info</p> <p>If redis-cli complains about...</p> <pre><code>(error) ERR wrong number of arguments for 'del' command\n</code></pre> <p>...the key pattern was not found and thus no data is available to delete - it is fine.</p>"},{"location":"en/manual-guides/Rspamd/u_e-rspamd/#cli-tools","title":"CLI tools","text":"<pre><code>docker compose exec rspamd-mailcow rspamc --help\ndocker compose exec rspamd-mailcow rspamadm --help\n</code></pre>"},{"location":"en/manual-guides/Rspamd/u_e-rspamd/#disable-greylisting","title":"Disable Greylisting","text":"<p>Only messages with a higher score will be considered to be greylisted (soft rejected). It is bad practice to disable greylisting.</p> <p>You can disable greylisting server-wide by editing:</p> <p><code>{mailcow-dir}/data/conf/rspamd/local.d/greylist.conf</code></p> <p>Add the line:</p> <pre><code>enabled = false;\n</code></pre> <p>Save the file and restart \"rspamd-mailcow\": <code>docker compose restart rspamd-mailcow</code></p>"},{"location":"en/manual-guides/Rspamd/u_e-rspamd/#spam-filter-thresholds-global","title":"Spam filter thresholds (global)","text":"<p>Each user is able to change their spam rating individually. To define a new server-wide limit, edit <code>data/conf/rspamd/local.d/actions.conf</code>:</p> <pre><code>reject = 15;\nadd_header = 8;\ngreylist = 7;\n</code></pre> <p>Save the file and restart \"rspamd-mailcow\": <code>docker compose restart rspamd-mailcow</code></p> <p>Existing settings of users will not be overwritten!</p> <p>To reset custom defined thresholds, run:</p> <pre><code>source mailcow.conf\ndocker compose exec mysql-mailcow mysql -umailcow -p$DBPASS mailcow -e \"delete from filterconf where option = 'highspamlevel' or option = 'lowspamlevel';\"\n# or:\n# docker compose exec mysql-mailcow mysql -umailcow -p$DBPASS mailcow -e \"delete from filterconf where option = 'highspamlevel' or option = 'lowspamlevel' and object = 'only-this-mailbox@example.org';\"\n</code></pre>"},{"location":"en/manual-guides/Rspamd/u_e-rspamd/#custom-reject-messages","title":"Custom reject messages","text":"<p>The default spam reject message can be changed by adding a new file <code>data/conf/rspamd/override.d/worker-proxy.custom.inc</code> with the following content:</p> <pre><code>reject_message = \"My custom reject message\";\n</code></pre> <p>Save the file and restart Rspamd: <code>docker compose restart rspamd-mailcow</code>.</p> <p>While the above works for rejected mails with a high spam score, prefilter reject actions will ignore this setting. For these maps, the multimap module in Rspamd needs to be adjusted:</p> <ol> <li> <p>Find prefilet reject symbol for which you want change message, to do it run: <code>grep -R \"SYMBOL_YOU_WANT_TO_ADJUST\" /opt/mailcow-dockerized/data/conf/rspamd/</code></p> </li> <li> <p>Add your custom message as new line:</p> </li> </ol> <pre><code>GLOBAL_RCPT_BL {\n type = \"rcpt\";\n map = \"${LOCAL_CONFDIR}/custom/global_rcpt_blacklist.map\";\n regexp = true;\n prefilter = true;\n action = \"reject\";\n message = \"Sending mail to this recipient is prohibited by postmaster@your.domain\";\n}\n</code></pre> <ol> <li>Save the file and restart Rspamd: <code>docker compose restart rspamd-mailcow</code>.</li> </ol>"},{"location":"en/manual-guides/Rspamd/u_e-rspamd/#discard-instead-of-reject","title":"Discard instead of reject","text":"<p>If you want to silently drop a message, create or edit the file <code>data/conf/rspamd/override.d/worker-proxy.custom.inc</code> and add the following content:</p> <pre><code>discard_on_reject = true;\n</code></pre> <p>Restart Rspamd:</p> <pre><code>docker compose restart rspamd-mailcow\n</code></pre>"},{"location":"en/manual-guides/Rspamd/u_e-rspamd/#wipe-all-ratelimit-keys","title":"Wipe all ratelimit keys","text":"<p>If you don't want to use the UI and instead wipe all keys in the Redis database, you can use redis-cli for that task:</p> <pre><code>docker compose exec redis-mailcow sh\n# Unlink (available in Redis &gt;=4.) will delete in the backgronud\nredis-cli --scan --pattern RL* | xargs redis-cli unlink\n</code></pre> <p>Restart Rspamd:</p> <pre><code>docker compose restart rspamd-mailcow\n</code></pre>"},{"location":"en/manual-guides/Rspamd/u_e-rspamd/#trigger-a-resend-of-quarantine-notifications","title":"Trigger a resend of quarantine notifications","text":"<p>Should be used for debugging only!</p> <pre><code>docker compose exec dovecot-mailcow bash\nmysql -umailcow -p$DBPASS mailcow -e \"update quarantine set notified = 0;\"\nredis-cli -h redis DEL Q_LAST_NOTIFIED\nquarantine_notify.py\n</code></pre>"},{"location":"en/manual-guides/Rspamd/u_e-rspamd/#increase-history-retention","title":"Increase history retention","text":"<p>By default Rspamd keeps 1000 elements in the history.</p> <p>The history is stored compressed.</p> <p>It is recommended not to use a disproportionate high value here, try something along 5000 or 10000 and see how your server handles it:</p> <p>Edit <code>data/conf/rspamd/local.d/history_redis.conf</code>:</p> <pre><code>nrows = 1000; # change this value\n</code></pre> <p>Restart Rspamd afterwards: <code>docker compose restart rspamd-mailcow</code></p>"},{"location":"en/manual-guides/SOGo/u_e-sogo/","title":"SOGo","text":"<p>SOGo is used for accessing your mails via a webbrowser, adding and sharing your contacts or calendars. For a more in-depth documentation on SOGo please visit its own documentation.</p>"},{"location":"en/manual-guides/SOGo/u_e-sogo/#apply-custom-sogo-theme","title":"Apply custom SOGo theme","text":"<p>mailcow builds after 28 January 2021 can change SOGo's theme by editing <code>data/conf/sogo/custom-theme.js</code>. Please check the AngularJS Material intro and documentation as well as the material style guideline to learn how this works. </p> <p>You can use the provided <code>custom-theme.js</code> as an example starting point by removing the comments. After you modified <code>data/conf/sogo/custom-theme.js</code> and made changes to your new SOGo theme you need to </p> <ol> <li>edit <code>data/conf/sogo/sogo.conf</code> and append/set <code>SOGoUIxDebugEnabled = YES;</code></li> <li>restart SOGo and Memcached containers by executing <code>docker compose restart memcached-mailcow sogo-mailcow</code>.</li> <li>open SOGo in browser</li> <li>open browser developer console, usually shortcut is F12</li> <li>only if you use Firefox: write by hands in dev console <code>allow pasting</code> and press enter</li> <li>paste java script snipet in dev console: <pre><code>copy([].slice.call(document.styleSheets)\n .map(e =&gt; e.ownerNode)\n .filter(e =&gt; e.hasAttribute('md-theme-style'))\n .map(e =&gt; e.textContent)\n .join('\\n')\n)\n</code></pre></li> <li>open text editor and paste data from clipboard (Ctrl+V), you should get minified CSS, save it</li> <li>copy CSS file to mailcow server <code>data/conf/sogo/custom-theme.css</code></li> <li>edit <code>data/conf/sogo/sogo.conf</code> and set <code>SOGoUIxDebugEnabled = NO;</code></li> <li>append/create <code>docker-compose.override.yml</code> with: <pre><code>version: '2.1'\n\nservices:\n sogo-mailcow:\n volumes:\n - ./data/conf/sogo/custom-theme.css:/usr/lib/GNUstep/SOGo/WebServerResources/css/theme-default.css:z\n</code></pre></li> <li>run <code>docker compose up -d</code></li> <li>run <code>docker compose restart memcached-mailcow</code></li> </ol>"},{"location":"en/manual-guides/SOGo/u_e-sogo/#reset-to-sogo-default-theme","title":"Reset to SOGo default theme","text":"<ol> <li>checkout <code>data/conf/sogo/custom-theme.js</code> by executing <code>git fetch ; git checkout origin/master data/conf/sogo/custom-theme.js data/conf/sogo/custom-theme.js</code></li> <li>find in <code>data/conf/sogo/custom-theme.js</code>: <pre><code>// Apply new palettes to the default theme, remap some of the hues\n $mdThemingProvider.theme('default')\n .primaryPalette('green-cow', {\n 'default': '400', // background color of top toolbars\n 'hue-1': '400',\n 'hue-2': '600', // background color of sidebar toolbar\n 'hue-3': 'A700'\n })\n .accentPalette('green', {\n 'default': '600', // background color of fab buttons and login screen\n 'hue-1': '300', // background color of center list toolbar\n 'hue-2': '300', // highlight color for selected mail and current day calendar\n 'hue-3': 'A700'\n })\n .backgroundPalette('frost-grey');\n</code></pre> and replace it with: <pre><code> $mdThemingProvider.theme('default');\n</code></pre></li> <li>remove from <code>docker-compose.override.yml</code> volume mount in <code>sogo-mailcow</code>: <pre><code>- ./data/conf/sogo/custom-theme.css:/usr/lib/GNUstep/SOGo/WebServerResources/css/theme-default.css:z\n</code></pre></li> <li>run <code>docker compose up -d</code></li> <li>run <code>docker compose restart memcached-mailcow</code></li> </ol>"},{"location":"en/manual-guides/SOGo/u_e-sogo/#change-favicon","title":"Change favicon","text":"<p>mailcow builds after 31 January 2021 can change SOGo's favicon by replacing <code>data/conf/sogo/custom-favicon.ico</code> for SOGo and <code>data/web/favicon.png</code> for mailcow UI. Note: You can use <code>.png</code> favicons for SOGo by renaming them to <code>custom-favicon.ico</code>. For both SOGo and mailcow UI favicons you need use one of the standard dimensions: 16x16, 32x32, 64x64, 128x128 and 256x256. After you replaced said file you need to restart SOGo and Memcached containers by executing <code>docker compose restart memcached-mailcow sogo-mailcow</code>.</p>"},{"location":"en/manual-guides/SOGo/u_e-sogo/#change-logo","title":"Change logo","text":"<p>mailcow builds after 21 December 2018 can change SOGo's logo by replacing or creating (if missing) <code>data/conf/sogo/sogo-full.svg</code>. After you replaced said file you need to restart SOGo and Memcached containers by executing <code>docker compose restart memcached-mailcow sogo-mailcow</code>.</p>"},{"location":"en/manual-guides/SOGo/u_e-sogo/#connect-domains","title":"Connect domains","text":"<p>Domains are usually isolated from eachother.</p> <p>You can change that by modifying <code>data/conf/sogo/sogo.conf</code>:</p> <p>Search... <pre><code> // SOGoDomainsVisibility = (\n // (domain1.tld, domain5.tld),\n // (domain3.tld, domain2.tld)\n // );\n</code></pre> ...and replace it by - for example:</p> <pre><code> SOGoDomainsVisibility = (\n (example.org, example.com, example.net)\n );\n</code></pre> <p>Restart SOGo: <code>docker compose restart sogo-mailcow</code></p>"},{"location":"en/manual-guides/SOGo/u_e-sogo/#disable-password-changing","title":"Disable password changing","text":"<p>Edit <code>data/conf/sogo/sogo.conf</code> and change <code>SOGoPasswordChangeEnabled</code> to <code>NO</code>. Please do not add a new parameter.</p> <p>Run <code>docker compose restart memcached-mailcow sogo-mailcow</code> to activate the changes.</p>"},{"location":"en/manual-guides/SOGo/u_e-sogo/#reset-totp-disable-totp","title":"Reset TOTP / Disable TOTP","text":"<p>Run <code>docker compose exec -u sogo sogo-mailcow sogo-tool user-preferences set defaults user@example.com SOGoTOTPEnabled '{\"SOGoTOTPEnabled\":0}'</code> from within the mailcow directory.</p>"},{"location":"en/manual-guides/Unbound/u_e-unbound-fwd/","title":"Using an external DNS service","text":"<p>If you want or have to use an external DNS service, you can either set a forwarder in Unbound or copy an override file to define external DNS servers:</p> <p>Warning</p> <p>Please do not use a public resolver like we did in the example above. Many - if not all - blacklist lookups will fail with public resolvers, because blacklist server has limits on how much requests can be done from one IP and public resolvers usually reach this limits. Important: Only DNSSEC validating DNS services will work.</p>"},{"location":"en/manual-guides/Unbound/u_e-unbound-fwd/#method-a-unbound","title":"Method A, Unbound","text":"<p>Edit <code>data/conf/unbound/unbound.conf</code> and append the following parameters:</p> <pre><code>forward-zone:\n name: \".\"\n forward-addr: 8.8.8.8 # DO NOT USE PUBLIC DNS SERVERS - JUST AN EXAMPLE\n forward-addr: 8.8.4.4 # DO NOT USE PUBLIC DNS SERVERS - JUST AN EXAMPLE\n</code></pre> <p>Restart Unbound:</p> <pre><code>docker compose restart unbound-mailcow\n</code></pre>"},{"location":"en/manual-guides/Unbound/u_e-unbound-fwd/#method-b-override-file","title":"Method B, Override file","text":"<pre><code>cd /opt/mailcow-dockerized\ncp helper-scripts/docker-compose.override.yml.d/EXTERNAL_DNS/docker-compose.override.yml .\n</code></pre> <p>Edit <code>docker-compose.override.yml</code> and adjust the IP.</p> <p>Run <code>docker compose down ; docker compose up -d</code>.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/","title":"Thresholds","text":"<p>Watchdog uses default values for all thresholds defined in <code>docker-compose.yml</code>.</p> <p>The default values will work for most setups. Example: <pre><code>- NGINX_THRESHOLD=${NGINX_THRESHOLD:-5}\n- UNBOUND_THRESHOLD=${UNBOUND_THRESHOLD:-5}\n- REDIS_THRESHOLD=${REDIS_THRESHOLD:-5}\n- MYSQL_THRESHOLD=${MYSQL_THRESHOLD:-5}\n- MYSQL_REPLICATION_THRESHOLD=${MYSQL_REPLICATION_THRESHOLD:-1}\n- SOGO_THRESHOLD=${SOGO_THRESHOLD:-3}\n- POSTFIX_THRESHOLD=${POSTFIX_THRESHOLD:-8}\n- CLAMD_THRESHOLD=${CLAMD_THRESHOLD:-15}\n- DOVECOT_THRESHOLD=${DOVECOT_THRESHOLD:-12}\n- DOVECOT_REPL_THRESHOLD=${DOVECOT_REPL_THRESHOLD:-20}\n- PHPFPM_THRESHOLD=${PHPFPM_THRESHOLD:-5}\n- RATELIMIT_THRESHOLD=${RATELIMIT_THRESHOLD:-1}\n- FAIL2BAN_THRESHOLD=${FAIL2BAN_THRESHOLD:-1}\n- ACME_THRESHOLD=${ACME_THRESHOLD:-1}\n- RSPAMD_THRESHOLD=${RSPAMD_THRESHOLD:-5}\n- OLEFY_THRESHOLD=${OLEFY_THRESHOLD:-5}\n- MAILQ_THRESHOLD=${MAILQ_THRESHOLD:-20}\n- MAILQ_CRIT=${MAILQ_CRIT:-30}\n</code></pre></p> <p>To adjust them just add necessary threshold variables (e.g. <code>MAILQ_THRESHOLD=10</code>) to <code>mailcow.conf</code> and run <code>docker compose up -d</code>.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#thresholds-descriptions","title":"Thresholds descriptions","text":""},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#nginx_threshold","title":"NGINX_THRESHOLD","text":"<p>Notifies administrators if watchdog can not establish a connection to Nginx on port 8081 and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#unbound_threshold","title":"UNBOUND_THRESHOLD","text":"<p>Notifies administrators if Unbound can not resolve/valide external domains/DNSSEC and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#redis_threshold","title":"REDIS_THRESHOLD","text":"<p>Notifies administrators if watchdog can not establish a connection to Redis on port 6379 and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#mysql_threshold","title":"MYSQL_THRESHOLD","text":"<p>Notifies administrators if watchdog can not establish a connection to MySQL or can not query a table and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#mysql_replication_threshold","title":"MYSQL_REPLICATION_THRESHOLD","text":"<p>Notifies administrators if the MySQL replication fails.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#sogo_threshold","title":"SOGO_THRESHOLD","text":"<p>Notifies administrators if watchdog can not establish a connection to SOGo on port 20000 and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#postfix_threshold","title":"POSTFIX_THRESHOLD","text":"<p>Notifies administrators if watchdog can not sent a test mail via port 589 and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#clamd_threshold","title":"CLAMD_THRESHOLD","text":"<p>Notifies administrators if watchdog can not establish a connection to Clamd and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#dovecot_threshold","title":"DOVECOT_THRESHOLD","text":"<p>Notifies administrators if watchdog fails with various tests with Dovecot container and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#dovecot_repl_threshold","title":"DOVECOT_REPL_THRESHOLD","text":"<p>Notifies administrators if the Dovecot replication fails.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#phpfpm_threshold","title":"PHPFPM_THRESHOLD","text":"<p>Notifies administrators if watchdog can not establish a connection to PHP-FPM on port 9001/9002 and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#ratelimit_threshold","title":"RATELIMIT_THRESHOLD","text":"<p>Notifies administrators if a ratelimit got hit.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#fail2ban_threshold","title":"FAIL2BAN_THRESHOLD","text":"<p>Notifies administrators if a fail2ban banned an IP.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#acme_threshold","title":"ACME_THRESHOLD","text":"<p>Notifies administrators if something is wrong with the acme-mailcow container. You may check its logs.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#rspamd_threshold","title":"RSPAMD_THRESHOLD","text":"<p>Notifies administrators if watchdog fails with various tests with Rspamd container and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#olefy_threshold","title":"OLEFY_THRESHOLD","text":"<p>Notifies administrators if watchdog can not establish a connection to olefy on port 10005 and it will restart the container automatically when issues were found and the threshold has been reached.</p>"},{"location":"en/manual-guides/Watchdog/u_e-watchdog-thresholds/#mailq_crit-and-mailq_threshold","title":"MAILQ_CRIT and MAILQ_THRESHOLD","text":"<p>Notifies administrators if number of emails in the postfix queue is greater then <code>MAILQ_CRIT</code> for period of <code>MAILQ_THRESHOLD * (60\u00b130)</code> seconds.</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-bl_wl/","title":"Blacklist / Whitelist","text":"<p>To add or edit an entry to your domain-wide filter table, log in to your mailcow UI as (domain) administrator and go to: <code>Configuration &gt; Email Setup &gt; Domains &gt; Edit Domain &gt; Spam Filter</code>.</p> <p>Info</p> <p>Be aware that a user can override this setting by setting their own blacklist and whitelist!</p> <p>There is also a global filter table in <code>Configuration &gt; Configuration &amp; Details &gt; Global filter maps</code> to configure a server wide filter for multiple regex maps (todo: screenshots).</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-config/","title":"Configuration","text":"<p>Several configuration parameters of the mailcow UI can be changed by creating a file <code>data/web/inc/vars.local.inc.php</code> which overrides defaults settings found in <code>data/web/inc/vars.inc.php</code>.</p> <p>The local configuration file is persistent over updates of mailcow. Try not to change values inside <code>data/web/inc/vars.inc.php</code>, but use them as template for the local override.</p> <p>mailcow UI configuration parameters can be used to...</p> <ul> <li>...change the default language1</li> <li>...change the default bootstrap theme</li> <li>...set a password complexity regex</li> <li>...enable DKIM private key visibility</li> <li>...set a pagination trigger size</li> <li>...set default mailbox attributes</li> <li>...change session lifetimes</li> <li>...create fixed app menus (which cannot be changed in mailcow UI)</li> <li>...set a default \"To\" field for relayhost tests</li> <li>...set a timeout for Docker API requests</li> <li>...toggle IP anonymization</li> </ul> <ol> <li> <p>To change SOGos default language, you will need to edit <code>data/conf/sogo/sogo.conf</code> and replace \"English\" by your preferred language.\u00a0\u21a9</p> </li> </ol>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-css/","title":"CSS overrides","text":"<p>For custom overrides of specific elements via CSS, use <code>data/web/css/build/0081-custom-mailcow.css</code>.</p> <p>The file is excluded from tracking and persists over updates.</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-fido/","title":"WebAuthn / FIDO2","text":""},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-fido/#how-is-uv-handled-in-mailcow","title":"How is UV handled in mailcow?","text":"<p>The UV flag (as in \"user verification\") enforces WebAuthn to verify the user before it allows access to the key (think of a PIN). We don't enforce UV to allow logins via iOS and NFC (YubiKey).</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-fido/#login-and-key-processing","title":"Login and key processing","text":"<p>mailcow uses client-side key processing. We ask the authenticator (i.e. YubiKey) to save the registration in its memory.</p> <p>A user does not need to enter a username. The available credentials - if any - will be shown to the user when selecting the \"key login\" via mailcow UI login.</p> <p>When calling the login process, the authenticator is not given any credential IDs. This will force it to lookup credentials in its own memory.</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-fido/#who-can-use-webauthn-to-login-to-mailcow","title":"Who can use WebAuthn to login to mailcow?","text":"<p>As of today, only administrators and domain administrators are able to setup WebAuthn/FIDO2.</p> <p>You want to use WebAuthn/Fido as 2FA? Check it out here: Two-Factor Authentication</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-netfilter/","title":"Netfilter","text":""},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-netfilter/#change-netfilter-ban-settings","title":"Change Netfilter Ban Settings","text":"<p>To change the Netfilter settings in general please navigate to: <code>Configuration -&gt; Configuration &amp; Details -&gt; Configuration -&gt; Fail2ban parameters</code>.</p> <p>You should now see a familar interface:</p> <p>Here you can set several options regarding the bans itself. For example the max. Ban time or the max. attempts before a ban is executed.</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-netfilter/#change-netfilter-regex","title":"Change Netfilter Regex","text":"<p>Danger</p> <p>The following area requires at least basic regex knowledge. If you are not sure what you are doing there, we can only advise you not to attempt a reconfiguration.</p> <p>In addition to the ban settings, you can also define what exactly should be used from the mailcow container logs to ban a possible attacker.</p> <p>To do this, you must first expand the regex field, which will look something like this:</p> <p>There you can now create various new filter rules.</p> <p>Info</p> <p>As updates progress, it is possible that new Netfilter regex rules will be added or removed. If this is the case, it is recommended to reset the Netfilter regex rules by clicking on <code>Reset to default</code>.</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-pushover/","title":"Pushover","text":"<p>Info</p> <p>Pushover makes it easy to get real-time notifications on your Android, iPhone, iPad, and Desktop</p> <p>You can use Pushover to get a push notification on every mail you receive for each mailbox where you enabled this feature.</p> <p>1. As admin open your mailbox' settings and scroll down to the Pushover settings</p> <p>2. Register yourself on Pushover</p> <p>3. Put your 'User Key' in the 'User/Group Key' field in your mailbox settings</p> <p>4. Create an Applications to get the API Token/Key which you also need to put in your mailbox settings</p> <p>5. Optional you can edit the notification title/text and define certain sender email addresses where a push notification is triggered</p> <p>6. Save everything and then you can verify your credentials</p> <p>If everything is done you can test sending a mail and you will receive a push message on your phone</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-spamalias/","title":"Temporary email aliases","text":"<p>These temporary email aliases are mostly used for places where we need to provide an email address but don't want future correspondence with. They are also called spam alias.</p> <p>To create, delete or extend a temporary email aliases you need to login to mailcow's UI as a mailbox user and navigate to the tab Temporary email aliases:</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-spamfilter/","title":"Spamfilter","text":"<p>A mailbox user may adjust the spam filter and black- / whitelist settings for his mailbox individually by navigating to the Spam filter tab in the users mailcow UI.</p> <p>Info</p> <p>For global adjustments on your spam filter please check our section on Rspamd. For a domain wide black- and whitelist please check our guide on Black / Whitelist</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-sub_addressing/","title":"Sub-addressing","text":"<p>Mailbox users can tag their mail address like in <code>me+facebook@example.org</code>. They can control the tag handling in the users mailcow UI panel under <code>Mailbox &gt; Settings</code>. </p> <p><code>sub-addressing</code> (RFC 5233) or <code>plus addressing</code> also known as tagging (do not mix with Tags)</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-sub_addressing/#available-actions","title":"Available Actions","text":"<p>1. Move this message to a sub folder \"facebook\" (will be created lower case if not existing)</p> <p>2. Prepend the tag to the subject: \"[facebook] Subject\"</p> <p>Please note: Uppercase tags are converted to lowercase except for the first letter. If you want to keep the tag as it is, please apply the following diff and restart mailcow: <pre><code>diff --git a/data/conf/dovecot/global_sieve_after b/data/conf/dovecot/global_sieve_after\nindex e047136e..933c4137 100644\n--- a/data/conf/dovecot/global_sieve_after\n+++ b/data/conf/dovecot/global_sieve_after\n@@ -15,7 +15,7 @@ if allof (\n envelope :detail :matches \"to\" \"*\",\n header :contains \"X-Moo-Tag\" \"YES\"\n ) {\n- set :lower :upperfirst \"tag\" \"${1}\";\n+ set \"tag\" \"${1}\";\n if mailboxexists \"INBOX/${1}\" {\n fileinto \"INBOX/${1}\";\n } else {\n</code></pre></p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-tags/","title":"Tags (for Domains and Mailboxes)","text":"<p>Info</p> <p>You need the mailcow Version 2022-05 at least for this feature. If you don\u00b4t have the Version installed please consider a update. For more informations about a mailcow update please take a look at the Update section here in the docs.</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-tags/#what-are-tags-designed-for","title":"What are Tags designed for?","text":"<p>With the Tags you can easily sort your Domains and Mailboxes by the tags instead of their name.</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-tags/#where-are-the-tags-located","title":"Where are the Tags located?","text":"<p>The Tags are located in the Domain/Mailbox section of the mailcow UI. To view them simply click on the small plus symbol on the left of your Domain/Mailbox (following picture is showing the domain ribbon menu): </p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-tags/#how-can-i-addremove-a-tag","title":"How can i add/remove a Tag?","text":"<p>You can simply add/remove a Tag during the creation of a new Domain/Mailbox. You also can add/remove them if you edit your desired Domain/Mailbox.</p> <p>It looks similar to this (following picture showing the domain edit section):</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-tags/#how-can-i-search-for-a-tag","title":"How can i search for a tag?","text":"<p>Simply type the Tag Name in the search bar in the Domain/Mailbox Section and wait for it to complete.</p> <p>You can even specify if you want to search for tags only.</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/","title":"Two-Factor Authentication","text":"<p>So far three methods for Two-Factor Authentication are implemented: WebAuthn (replacing U2F since February 2022), Yubi OTP, and TOTP</p> <ul> <li>For WebAuthn to work, you need an encrypted connection to the server (HTTPS) as well as a FIDO security key.</li> <li>Both WebAuthn and Yubi OTP work well with the fantastic Yubikey.</li> <li>While Yubi OTP needs an active internet connection and an API ID + key, WebAuthn will work with any Fido Security Key out of the box, but can only be used when mailcow is accessed over HTTPS.</li> <li>WebAuthn and Yubi OTP support multiple keys per user.</li> <li>As the third TFA method mailcow uses TOTP: time-based one-time passwords. Those passwords can be generated with apps like \"Google Authenticator\" after initially scanning a QR code or entering the given secret manually.</li> </ul> <p>As administrator you are able to temporary disable a domain administrators TFA login until they successfully logged in.</p> <p>The key used to login will be displayed in green, while other keys remain grey.</p> <p>Information on how to remove 2FA can be found here.</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#yubi-otp","title":"Yubi OTP","text":"<p>The Yubi API ID and Key will be checked against the Yubico Cloud API. When setting up TFA you will be asked for your personal API account for this key. The API ID, API key and the first 12 characters (your YubiKeys ID in modhex) are stored in the MySQL table as secret.</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#example-setup","title":"Example setup","text":"<p>First of all, the YubiKey must be configured for use as an OTP Generator. To do this, download the <code>YubiKey Manager</code> from the Yubico website: here</p> <p>In the following you configure the YubiKey for OTP. Via the menu item <code>Applications</code> -&gt; <code>OTP</code> and a click on the <code>Configure</code> button. In the following menu select <code>Credential Type</code> -&gt; <code>Yubico OTP</code> and click on <code>Next</code>.</p> <p>Set a checkmark in the <code>Use serial</code> checkbox, generate a <code>Private ID</code> and a <code>Secret key</code> via the buttons. So that the YubiKey can be validated later, the checkmark in the <code>Upload</code> checkbox must also be set and then click on <code>Finish</code>.</p> <p>Now a new browser window will open in which you have to enter an OTP of your YubiKey at the bottom of the form (click on the field and then tap on your YubiKey). Confirm the captcha and upload the information to the Yubico server by clicking 'Upload'. The processing of the data will take a moment.</p> <p>After the generation was successful, you will be shown a <code>Client ID</code> and a <code>Secret key</code>, make a note of this information in a safe place.</p> <p>Now you can select <code>Yubico OTP authentication</code> from the dropdown menu in the mailcow UI on the start page under <code>Access</code> -&gt; <code>Two-factor authentication</code>. In the dialog that opened now you can enter a name for this YubiKey and insert the <code>Client ID</code> you noted before as well as the <code>Secret key</code> into the fields provided. Finally, enter your current account password and, after selecting the <code>Touch Yubikey</code> field, touch your YubiKey button.</p> <p>Congratulations! You can now log in to the mailcow UI using your YubiKey!</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#webauthn-u2f-replacement","title":"WebAuthn (U2F, replacement)","text":"<p>Warning</p> <p>Since February 2022 Google Chrome has discarded support for U2F and standardized the use of WebAuthn. The WebAuthn (U2F removal) is part of mailcow since 21th January 2022, so if you want to use the Key past February 2022 please consider a update with the <code>update.sh</code> </p> <p>To use WebAuthn, the browser must support this standard.</p> <p>The following desktop browsers support this authentication type:</p> <ul> <li>Edge (&gt;=18)</li> <li>Firefox (&gt;=60)</li> <li>Chrome (&gt;=67)</li> <li>Safari (&gt;=13)</li> <li>Opera (&gt;=54)</li> </ul> <p>The following mobile browsers support this authentication type:</p> <ul> <li>Safari on iOS (&gt;=14.5)</li> <li>Android Browser (&gt;=97)</li> <li>Opera Mobile (&gt;=64)</li> <li>Chrome for Android (&gt;=97)</li> </ul> <p>Sources: caniuse.com, blog.mozilla.org</p> <p>WebAuthn works without an internet connection.</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#what-will-happen-to-my-registered-fido-security-key-after-the-update-from-u2f-to-webauthn","title":"What will happen to my registered Fido Security Key after the Update from U2F to WebAuthn?","text":"<p>Warning</p> <p>With this new U2F replacement (WebAuthn) you have to re-register your Fido Security Key, thankfully WebAuthn is backwards compatible and supports the U2F protocol.</p> <p>Ideally, the next time you log in (with the key), you should get a text box saying that your Fido Security Key has been removed due to the update to WebAuthn and deleted as a 2-factor authenticator.</p> <p>But don't worry! You can simply re-register your existing key and use it as usual, you probably won't even notice a difference, except that your browser won't show the U2F deactivation message anymore.</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#disable-unofficial-supported-fido-security-keys","title":"Disable unofficial supported Fido Security Keys","text":"<p>With WebAuthn there is the possibility to use only official Fido Security Keys (from the big brands like: Yubico, Apple, Nitro, Google, Huawei, Microsoft, etc.).</p> <p>This is primarily for security purposes, as it allows administrators to ensure that only official hardware can be used in their environment.</p> <p>To enable this feature, change the value <code>WEBAUTHN_ONLY_TRUSTED_VENDORS</code> in mailcow.conf from <code>n</code> to <code>y</code> and restart the affected containers with <code>docker compose up -d</code>.</p> <p>The mailcow will now use the Vendor Certificates located in your mailcow directory under <code>data/web/inc/lib/WebAuthn/rootCertificates</code>. </p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#example","title":"Example:","text":"<p>If you want to limit the official Vendor devices to Apple only you only need the Apple Vendor Certificate inside the <code>data/web/inc/lib/WebAuthn/rootCertificates</code>. After you deleted all other certs you now only can activate WebAuthn 2FA with Apple devices.</p> <p>That\u00b4s for every vendor the same, so choose what you like (if you want to).</p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#use-own-certificates-for-webauthn","title":"Use own certificates for WebAuthn","text":"<p>If you have a valid certificate from the vendor of your key you can also add it to your mailcow!</p> <p>Just copy the certificate into the <code>data/web/inc/lib/WebAuthn/rootCertificates</code> folder and restart your mailcow.</p> <p>Now you should be able to register this device as well, even though the verification for the vendor certificates is enabled, since you just added the certificate manually. </p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#is-it-dangerous-to-keep-the-vendor-check-disabled","title":"Is it dangerous to keep the Vendor Check disabled?","text":"<p>No, it isn\u00b4t! These vendor certificates are only used to verify original hardware, not to secure the registration process.</p> <p>As you can read in these articles, the deactivation is not software security related: - https://developers.yubico.com/U2F/Attestation_and_Metadata/ - https://medium.com/webauthnworks/webauthn-fido2-demystifying-attestation-and-mds-efc3b3cb3651 - https://medium.com/webauthnworks/sorting-fido-ctap-webauthn-terminology-7d32067c0b01</p> <p>In the end, however, it is of course your decision to leave this check disabled or enabled. </p>"},{"location":"en/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#totp","title":"TOTP","text":"<p>The best known TFA method mostly used with a smartphone.</p> <p>To setup the TOTP method login to the Admin UI and select <code>Time-based OTP (TOTP)</code> from the list.</p> <p>Now a modal will open in which you have to type in a name for your 2FA \"device\" (example: John Deer\u00b4s Smartphone) and the password of the affected Admin account (you are currently logged in with).</p> <p>You have two seperate methods to register TOTP to your account: 1. Scan the QR-Code with your Authenticator App on a Smartphone or Tablet. 2. Use the TOTP Code (under the QR Code) in your TOTP Program or App (if you can\u00b4t scan a QR Code).</p> <p>After you have registered the QR or TOTP code in the TOTP app/program of your choice you only need to enter the now generated TOTP token (in the app/program) as confirmation in the mailcow UI to finally activate the TOTP 2FA, otherwise it will not be activated even though the TOTP token is already generated in your app/program.</p>"},{"location":"en/models/model-acl/","title":"ACL","text":"<p>Editing a domain administrator or a mailbox user allows to set restrictions to that account.</p> <p>Important: For overlapping modules like sync jobs, which both domain administrators and mailbox users can be granted access to, the domain administrators permissions are inherited, when logging in as mailbox user.</p> <p>Some examples:</p> <p>1.</p> <ul> <li>A domain administror has not access to sync jobs but can login as mailbox user</li> <li>When logging in as mailbox user, he does not gain access to sync jobs, even if the given mailbox user has access when logging in directly</li> </ul> <p>2.</p> <ul> <li>A domain administror has access to sync jobs and can login as mailbox user</li> <li>The mailbox user he tries to login as has not access to sync jobs</li> <li>The domain administrator, now logged in as mailbox user, inherits its permission to the mailbox user and can access sync jobs</li> </ul> <p>3.</p> <ul> <li>A domain administrator logs in as mailbox user</li> <li>Every permission, that does not exist in a domain administrators ACL, is automatically granted (example: time-limited alias, TLS policy etc.)</li> </ul>"},{"location":"en/models/model-passwd/","title":"Password hashing","text":""},{"location":"en/models/model-passwd/#fully-supported-hashing-methods","title":"Fully supported hashing methods","text":"<p>The most current mailcow fully supports the following hashing methods. The default hashing method is written in bold:</p> <ul> <li>BLF-CRYPT</li> <li>SSHA</li> <li>SSHA256</li> <li>SSHA512</li> </ul> <p>The methods above can be used in <code>mailcow.conf</code> as <code>MAILCOW_PASS_SCHEME</code> value.</p>"},{"location":"en/models/model-passwd/#read-only-hashing-methods","title":"Read-only hashing methods","text":"<p>The following methods are supported read only. If you plan to use SOGo (as per default), you need a SOGo compatible hashing method. Please see the note at the bottom of this page how to update the view if necessary. With SOGo disabled, all hashing methods below will be able to be read by mailcow and Dovecot.</p> <ul> <li>ARGON2I (SOGo compatible)</li> <li>ARGON2ID (SOGo compatible)</li> <li>CLEAR</li> <li>CLEARTEXT</li> <li>CRYPT (SOGo compatible)</li> <li>DES-CRYPT</li> <li>LDAP-MD5 (SOGo compatible)</li> <li>MD5 (SOGo compatible)</li> <li>MD5-CRYPT (SOGo compatible)</li> <li>PBKDF2 (SOGo compatible)</li> <li>PLAIN (SOGo compatible)</li> <li>PLAIN-MD4</li> <li>PLAIN-MD5</li> <li>PLAIN-TRUNC</li> <li>SHA (SOGo compatible)</li> <li>SHA1 (SOGo compatible)</li> <li>SHA256 (SOGo compatible)</li> <li>SHA256-CRYPT (SOGo compatible)</li> <li>SHA512 (SOGo compatible)</li> <li>SHA512-CRYPT (SOGo compatible)</li> <li>SMD5 (SOGo compatible)</li> </ul> <p>That means mailcow is able to verify users with a hash like <code>{MD5}1a1dc91c907325c69271ddf0c944bc72</code> from the database.</p> <p>The value of <code>MAILCOW_PASS_SCHEME</code> will always be used to encrypt new passwords.</p> <p>I changed the password hashes in the \"mailbox\" SQL table and cannot login.</p> <p>A \"view\" needs to be updated. You can trigger this by restarting sogo-mailcow: <code>docker compose restart sogo-mailcow</code></p>"},{"location":"en/models/model-sender_rcv/","title":"Sender and receiver model","text":"<p>When a mailbox is created, a user is allowed to send mail from and receive mail for his own mailbox address.</p> <pre><code>Mailbox me@example.org is created. example.org is a primary domain.\nNote: a mailbox cannot be created in an alias domain.\n\nme@example.org is only known as me@example.org.\nme@example.org is allowed to send as me@example.org.\n</code></pre> <p>We can add an alias domain for example.org:</p> <pre><code>Alias domain alias.com is added and assigned to primary domain example.org.\nme@example.org is now known as me@example.org and me@alias.com.\nme@example.org is now allowed to send as me@example.org and me@alias.com.\n</code></pre> <p>We can add aliases for a mailbox to receive mail for and to send from this new address.</p> <p>It is important to know, that you are not able to receive mail for <code>my-alias@my-alias-domain.tld</code>. You would need to create this particular alias.</p> <pre><code>me@example.org is assigned the alias alias@example.org\nme@example.org is now known as me@example.org, me@alias.com, alias@example.org\n\nme@example.org is NOT known as alias@alias.com.\n</code></pre> <p>Please note that this does not apply to catch-all aliases:</p> <pre><code>Alias domain alias.com is added and assigned to primary domain example.org\nme@example.org is assigned the catch-all alias @example.org\nme@example.org is still just known as me@example.org, which is the only available send-as option\n\nAny email send to alias.com will match the catch-all alias for example.org\n</code></pre> <p>Administrators and domain administrators can edit mailboxes to allow specific users to send as other mailbox users (\"delegate\" them).</p> <p>You can choose between mailbox users or completely disable the sender check for domains.</p>"},{"location":"en/models/model-sender_rcv/#sogo-mail-from-addresses","title":"SOGo \"mail from\" addresses","text":"<p>Mailbox users can, obviously, select their own mailbox address, as well as all alias addresses and aliases that exist through alias domains.</p> <p>If you want to select another existing mailbox user as your \"mail from\" address, this user has to delegate you access through SOGo (see SOGo documentation). Moreover a mailcow (domain) administrator needs to grant you access as described above.</p>"},{"location":"en/post_installation/firststeps-disable_ipv6/","title":"Disable IPv6","text":"<p>This is ONLY recommended if you do not have an IPv6 enabled network on your host!</p> <p>If you really need to, you can disable the usage of IPv6 in the compose file. Additionally, you can also disable the startup of container \"ipv6nat-mailcow\", as it's not needed if you won't use IPv6.</p> <p>Instead of editing docker-compose.yml directly, it is preferable to create an override file for it and implement your changes to the service there. Unfortunately, this right now only seems to work for services, not for network settings.</p> <p>To disable IPv6 on the mailcow network, open docker-compose.yml with your favourite text editor and search for the network section (it's near the bottom of the file). </p> <p>1. Modify docker-compose.yml</p> <p>Change <code>enable_ipv6: true</code> to <code>enable_ipv6: false</code>:</p> <pre><code>networks:\n mailcow-network:\n [...]\n enable_ipv6: true # &lt;&lt;&lt; set to false\n [...]\n</code></pre> <p>2. Disable ipv6nat-mailcow</p> <p>To disable the ipv6nat-mailcow container as well, go to your mailcow directory and create a new file called \"docker-compose.override.yml\": </p> <p>NOTE: If you already have an override file, of course don't recreate it, but merge the lines below into your existing one accordingly!</p> <pre><code># cd /opt/mailcow-dockerized\n# touch docker-compose.override.yml\n</code></pre> <p>Open the file in your favourite text editor and fill in the following:</p> <pre><code>version: '2.1'\nservices:\n\n ipv6nat-mailcow:\n image: bash:latest\n restart: \"no\"\n entrypoint: [\"echo\", \"ipv6nat disabled in compose.override.yml\"]\n</code></pre> <p>For these changes to be effective, you need to fully stop and then restart the stack, so containers and networks are recreated:</p> <pre><code>docker compose down\ndocker compose up -d\n</code></pre> <p>3. Disable IPv6 in unbound-mailcow</p> <p>Edit <code>data/conf/unbound/unbound.conf</code> and set <code>do-ip6</code> to \"no\":</p> <pre><code>server:\n [...]\n do-ip6: no\n [...]\n</code></pre> <p>Restart Unbound:</p> <pre><code>docker compose restart unbound-mailcow\n</code></pre> <p>4. Disable IPv6 in postfix-mailcow</p> <p>Create <code>data/conf/postfix/extra.cf</code> and set <code>smtp_address_preference</code> to <code>ipv4</code>:</p> <pre><code>smtp_address_preference = ipv4\ninet_protocols = ipv4\n</code></pre> <p>Restart Postfix:</p> <pre><code>docker compose restart postfix-mailcow\n</code></pre> <p>5. If your docker daemon completly disabled IPv6:</p> <p>Fix the following NGINX, Dovecot and php-fpm config files</p> <pre><code>sed -i '/::/d' data/conf/nginx/listen_*\nsed -i '/::/d' data/conf/nginx/templates/listen*\nsed -i '/::/d' data/conf/nginx/dynmaps.conf\nsed -i 's/,\\[::\\]//g' data/conf/dovecot/dovecot.conf\nsed -i 's/\\[::\\]://g' data/conf/phpfpm/php-fpm.d/pools.conf\n</code></pre>"},{"location":"en/post_installation/firststeps-dmarc_reporting/","title":"DMARC Reporting","text":"<p>DMARC Reporting done via Rspamd DMARC Module.</p> <p>Rspamd documentation can be found here: https://rspamd.com/doc/modules/dmarc.html</p> <p>Important:</p> <ol> <li> <p>Change <code>example.com</code>, <code>mail.example.com</code> and <code>Example</code> to reflect your setup</p> </li> <li> <p>DMARC reporting requires additional attention, especially over the first few days</p> </li> <li> <p>All receiving domains hosted on mailcow send from one reporting domain. It is recommended to use the parent domain of your <code>MAILCOW_HOSTNAME</code>:</p> <ul> <li>If your <code>MAILCOW_HOSTNAME</code> is <code>mail.example.com</code> change the following config to <code>domain = \"example.com\";</code></li> <li>Set <code>email</code> equally, e.g. <code>email = \"noreply-dmarc@example.com\";</code></li> </ul> </li> <li> <p>It is optional but recommended to create an email user <code>noreply-dmarc</code> in mailcow to handle bounces.</p> </li> </ol>"},{"location":"en/post_installation/firststeps-dmarc_reporting/#enable-dmarc-reporting","title":"Enable DMARC reporting","text":"<p>Create the file <code>data/conf/rspamd/local.d/dmarc.conf</code> and set the following content:</p> <pre><code>reporting {\n enabled = true;\n email = 'noreply-dmarc@example.com';\n domain = 'example.com';\n org_name = 'Example';\n helo = 'rspamd';\n smtp = 'postfix';\n smtp_port = 25;\n from_name = 'Example DMARC Report';\n msgid_from = 'rspamd.mail.example.com';\n max_entries = 2k;\n keys_expire = 2d;\n}\n</code></pre> <p>Create or modify <code>docker-compose.override.yml</code> in the mailcow-dockerized base directory:</p> <pre><code>version: '2.1'\n\nservices:\n rspamd-mailcow:\n environment:\n - MASTER=${MASTER:-y}\n labels:\n ofelia.enabled: \"true\"\n ofelia.job-exec.rspamd_dmarc_reporting_yesterday.schedule: \"@every 24h\"\n ofelia.job-exec.rspamd_dmarc_reporting_yesterday.command: \"/bin/bash -c \\\"[[ $${MASTER} == y ]] &amp;&amp; /usr/bin/rspamadm dmarc_report $(date --date yesterday '+%Y%m%d') &gt; /var/lib/rspamd/dmarc_reports_last_log 2&gt;&amp;1 || exit 0\\\"\"\n ofelia-mailcow:\n depends_on:\n - rspamd-mailcow\n</code></pre> <p>Run <code>docker compose up -d</code></p>"},{"location":"en/post_installation/firststeps-dmarc_reporting/#send-a-copy-reports-to-yourself","title":"Send a copy reports to yourself","text":"<p>To receive a hidden copy of reports generated by Rspamd you can set a <code>bcc_addrs</code> list in the <code>reporting</code> config section of <code>data/conf/rspamd/local.d/dmarc.conf</code>:</p> <pre><code>reporting {\n enabled = true;\n email = 'noreply-dmarc@example.com';\n bcc_addrs = [\"noreply-dmarc@example.com\",\"parsedmarc@example.com\"];\n[...]\n</code></pre> <p>Rspamd will load changes in real time, so you won't need to restart the container at this point.</p> <p>This can be useful if you...</p> <ul> <li>...want to check that your DMARC reports are sent correctly and authenticated.</li> <li>...want to analyze your own reports to get statistics, i.e. to use with ParseDMARC or other analytic systems.</li> </ul>"},{"location":"en/post_installation/firststeps-dmarc_reporting/#troubleshooting","title":"Troubleshooting","text":"<p>Check when the report schedule last ran:</p> <pre><code>docker compose exec rspamd-mailcow date -r /var/lib/rspamd/dmarc_reports_last_log\n</code></pre> <p>See the latest report output:</p> <pre><code>docker compose exec rspamd-mailcow cat /var/lib/rspamd/dmarc_reports_last_log\n</code></pre> <p>Manually trigger a DMARC report:</p> <pre><code>docker compose exec rspamd-mailcow rspamadm dmarc_report\n</code></pre> <p>Validate that Rspamd has recorded data in Redis: Change <code>20220428</code> to date which you interested in.</p> <p><pre><code>docker compose exec redis-mailcow redis-cli SMEMBERS \"dmarc_idx;20220428\"\n</code></pre> Take one of the lines from output you interested in and request it, f.e.: <pre><code>docker compose exec redis-mailcow redis-cli ZRANGE \"dmarc_rpt;microsoft.com;mailto:d@rua.agari.com;20220428\" 0 49\n</code></pre></p>"},{"location":"en/post_installation/firststeps-dmarc_reporting/#change-dmarc-reporting-frequency","title":"Change DMARC reporting frequency","text":"<p>In the example above reports are sent once every 24 hours and send reports for yesterday. This will be okay for most setups.</p> <p>If you have a large mail volume and want to run the DMARC reporting more than once a day you need create second schedule and run it with <code>dmarc_report $(date '+%Y%m%d')</code> to process the current day. You have to make sure that the first run on each day also processes the last report from the day before, so it needs to be started twice, one time with <code>$(date --date yesterday '+%Y%m%d')</code> at <code>0 5 0 * * *</code> (00:05 AM) and then with <code>$(date '+%Y%m%d')</code> with desired interval.</p> <p>The Ofelia schedule has the same implementation as <code>cron</code> in Go, supported syntax described at cron Documentation</p> <p>To change schedule:</p> <ol> <li>Edit <code>docker-compose.override.yml</code>:</li> </ol> <pre><code>version: '2.1'\n\nservices:\n rspamd-mailcow:\n environment:\n - MASTER=${MASTER:-y}\n labels:\n ofelia.enabled: \"true\"\n ofelia.job-exec.rspamd_dmarc_reporting_yesterday.schedule: \"0 5 0 * * *\"\n ofelia.job-exec.rspamd_dmarc_reporting_yesterday.command: \"/bin/bash -c \\\"[[ $${MASTER} == y ]] &amp;&amp; /usr/bin/rspamadm dmarc_report $(date --date yesterday '+%Y%m%d') &gt; /var/lib/rspamd/dmarc_reports_last_log 2&gt;&amp;1 || exit 0\\\"\"\n ofelia.job-exec.rspamd_dmarc_reporting_today.schedule: \"@every 12h\"\n ofelia.job-exec.rspamd_dmarc_reporting_today.command: \"/bin/bash -c \\\"[[ $${MASTER} == y ]] &amp;&amp; /usr/bin/rspamadm dmarc_report $(date '+%Y%m%d') &gt; /var/lib/rspamd/dmarc_reports_last_log 2&gt;&amp;1 || exit 0\\\"\"\n ofelia-mailcow:\n depends_on:\n - rspamd-mailcow\n</code></pre> <ol> <li> <p>Run <code>docker compose up -d</code></p> </li> <li> <p>Run <code>docker compose restart ofelia-mailcow</code></p> </li> </ol>"},{"location":"en/post_installation/firststeps-dmarc_reporting/#disable-dmarc-reporting","title":"Disable DMARC Reporting","text":"<p>To disable reporting:</p> <ol> <li> <p>Set <code>enabled</code> to <code>false</code> in <code>data/conf/rspamd/local.d/dmarc.conf</code></p> </li> <li> <p>Revert changes done in <code>docker-compose.override.yml</code> to <code>rspamd-mailcow</code> and <code>ofelia-mailcow</code></p> </li> <li> <p>Run <code>docker compose up -d</code></p> </li> </ol>"},{"location":"en/post_installation/firststeps-ip_bindings/","title":"IP bindings","text":"<p>Warning</p> <p>Changing the binding does not affect source NAT. See SNAT for required steps.</p>"},{"location":"en/post_installation/firststeps-ip_bindings/#ipv4-binding","title":"IPv4 binding","text":"<p>To adjust one or multiple IPv4 bindings, open <code>mailcow.conf</code> and edit one, multiple or all variables as per your needs:</p> <pre><code># For technical reasons, http bindings are a bit different from other service bindings.\n# You will find the following variables, separated by a bind address and its port:\n# Example: HTTP_BIND=1.2.3.4\n\nHTTP_PORT=80\nHTTP_BIND=\nHTTPS_PORT=443\nHTTPS_BIND=\n\n# Other services are bound by using the following format:\n# SMTP_PORT=1.2.3.4:25 will bind SMTP to the IP 1.2.3.4 on port 25\n# Important! Specifying an IPv4 address will skip all IPv6 bindings since Docker 20.x.\n# doveadm, SQL as well as Solr are bound to local ports only, please do not change that, unless you know what you are doing.\n\nSMTP_PORT=25\nSMTPS_PORT=465\nSUBMISSION_PORT=587\nIMAP_PORT=143\nIMAPS_PORT=993\nPOP_PORT=110\nPOPS_PORT=995\nSIEVE_PORT=4190\nDOVEADM_PORT=127.0.0.1:19991\nSQL_PORT=127.0.0.1:13306\nSOLR_PORT=127.0.0.1:18983\n</code></pre> <p>To apply your changes, run <code>docker compose down</code> followed by <code>docker compose up -d</code>.</p>"},{"location":"en/post_installation/firststeps-ip_bindings/#ipv6-binding","title":"IPv6 binding","text":"<p>Changing IPv6 bindings is different from IPv4. Again, this has a technical background.</p> <p>A <code>docker-compose.override.yml</code> file will be used instead of editing the <code>docker-compose.yml</code> file directly. This is to maintain updatability, as the <code>docker-compose.yml</code> file gets updated regularly and your changes will most likely be overwritten.</p> <p>Edit to create a file <code>docker-compose.override.yml</code> with the following content. Its content will be merged with the productive <code>docker-compose.yml</code> file.</p> <p>An example IPv6 2001:db8:dead:beef::123 is given. The first suffix <code>:PORT1</code> defines the external port, while the second suffix <code>:PORT2</code> routes to the corresponding port inside the container and must not be changed.</p> <pre><code>version: '2.1'\nservices:\n\n dovecot-mailcow:\n ports:\n - '[2001:db8:dead:beef::123]:143:143'\n - '[2001:db8:dead:beef::123]:993:993'\n - '[2001:db8:dead:beef::123]:110:110'\n - '[2001:db8:dead:beef::123]:995:995'\n - '[2001:db8:dead:beef::123]:4190:4190'\n\n postfix-mailcow:\n ports:\n - '[2001:db8:dead:beef::123]:25:25'\n - '[2001:db8:dead:beef::123]:465:465'\n - '[2001:db8:dead:beef::123]:587:587'\n\n nginx-mailcow:\n ports:\n - '[2001:db8:dead:beef::123]:80:80'\n - '[2001:db8:dead:beef::123]:443:443'\n</code></pre> <p>To apply your changes, run <code>docker compose down</code> followed by <code>docker compose up -d</code>.</p>"},{"location":"en/post_installation/firststeps-local_mta/","title":"Local MTA on Docker host","text":"<p>The easiest option would be to disable the listener on port 25/tcp.</p> <p>Postfix users disable the listener by commenting the following line (starting with <code>smtp</code> or <code>25</code>) in <code>/etc/postfix/master.cf</code>: <pre><code>#smtp inet n - - - - smtpd\n</code></pre></p> <p>Furthermore, to relay over a dockerized mailcow, you may want to add <code>172.22.1.1</code> as relayhost and remove the Docker interface from \"inet_interfaces\":</p> <pre><code>postconf -e 'relayhost = 172.22.1.1'\npostconf -e \"mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128\"\npostconf -e \"inet_interfaces = loopback-only\"\npostconf -e \"relay_transport = relay\"\npostconf -e \"default_transport = smtp\"\n</code></pre> <p>Now it is important to not have the same FQDN in <code>myhostname</code> as you use for your dockerized mailcow. Check your local (non-Docker) Postfix' main.cf for <code>myhostname</code> and set it to something different, for example <code>local.my.fqdn.tld</code>.</p> <p>\"172.22.1.1\" is the mailcow created network gateway in Docker. Relaying over this interface is necessary (instead of - for example - relaying directly over ${MAILCOW_HOSTNAME}) to relay over a known internal network.</p> <p>Restart Postfix after applying your changes.</p>"},{"location":"en/post_installation/firststeps-logging/","title":"Logging","text":"<p>Logging in mailcow: dockerized consists of multiple stages, but is, after all, much more flexible and easier to integrate into a logging daemon than before.</p> <p>In Docker the containerized application (PID 1) writes its output to stdout. For real one-application containers this works just fine. Run <code>docker compose logs --help</code> to learn more. </p> <p>Some containers log or stream to multiple destinations.</p> <p>No container will keep persistent logs in it. Containers are transient items!</p> <p>In the end, every line of logs will reach the Docker daemon - unfiltered.</p> <p>The default logging driver is \"json\".</p>"},{"location":"en/post_installation/firststeps-logging/#filtered-logs","title":"Filtered logs","text":"<p>Some logs are filtered and written to Redis keys but also streamed to a Redis channel.</p> <p>The Redis channel is used to stream logs with failed authentication attempts to be read by netfilter-mailcow.</p> <p>The Redis keys are persistent and will keep 10000 lines of logs for the web UI.</p> <p>This mechanism makes it possible to use whatever Docker logging driver you want to, without losing the ability to read logs from the UI or ban suspicious clients with netfilter-mailcow.</p> <p>Redis keys will only hold logs from applications and filter out system messages (think of cron etc.).</p>"},{"location":"en/post_installation/firststeps-logging/#logging-drivers","title":"Logging drivers","text":""},{"location":"en/post_installation/firststeps-logging/#via-docker-composeoverrideyml","title":"Via docker-compose.override.yml","text":"<p>Here is the good news: Since Docker has some great logging drivers, you can integrate mailcow: dockerized into your existing logging environment with ease.</p> <p>Create a <code>docker-compose.override.yml</code> and add, for example, this block to use the \"gelf\" logging plugin for <code>postfix-mailcow</code>:</p> <pre><code>version: '2.1'\nservices:\n postfix-mailcow: # or any other\n logging:\n driver: \"gelf\"\n options:\n gelf-address: \"udp://graylog:12201\"\n</code></pre> <p>Another example for Syslog:</p> <pre><code>version: '2.1'\nservices:\n\n postfix-mailcow: # or any other\n logging:\n driver: \"syslog\"\n options:\n syslog-address: \"udp://127.0.0.1:514\"\n syslog-facility: \"local3\"\n\n dovecot-mailcow: # or any other\n logging:\n driver: \"syslog\"\n options:\n syslog-address: \"udp://127.0.0.1:514\"\n syslog-facility: \"local3\"\n\n rspamd-mailcow: # or any other\n logging:\n driver: \"syslog\"\n options:\n syslog-address: \"udp://127.0.0.1:514\"\n syslog-facility: \"local3\"\n</code></pre>"},{"location":"en/post_installation/firststeps-logging/#for-rsyslog-only","title":"For Rsyslog only:","text":"<p>Make sure the following lines aren't commented out in <code>/etc/rsyslog.conf</code>:</p> <pre><code># provides UDP syslog reception\nmodule(load=\"imudp\")\ninput(type=\"imudp\" port=\"514\")\n</code></pre> <p>To move <code>local3</code> input to <code>/var/log/mailcow.log</code> and stop processing, create a file <code>/etc/rsyslog.d/docker.conf</code>:</p> <pre><code>local3.* /var/log/mailcow.log\n&amp; stop\n</code></pre> <p>Restart rsyslog afterwards.</p>"},{"location":"en/post_installation/firststeps-logging/#via-daemonjson-globally","title":"via daemon.json (globally)","text":"<p>If you want to change the logging driver globally, edit Dockers daemon configuration file <code>/etc/docker/daemon.json</code> and restart the Docker service:</p> <pre><code>{\n...\n \"log-driver\": \"gelf\",\n \"log-opts\": {\n \"gelf-address\": \"udp://graylog:12201\"\n }\n...\n}\n</code></pre> <p>For Syslog:</p> <pre><code>{\n...\n \"log-driver\": \"syslog\",\n \"log-opts\": {\n \"syslog-address\": \"udp://1.2.3.4:514\"\n }\n...\n}\n</code></pre> <p>Restart the Docker daemon and run <code>docker compose down &amp;&amp; docker compose up -d</code> to recreate the containers with the new logging driver.</p>"},{"location":"en/post_installation/firststeps-logging/#log-rotation","title":"Log rotation","text":"<p>As those logs can get quite big, it is a good idea to use logrotate to compress and delete them after a certain time period.</p> <p>Create <code>/etc/logrotate.d/mailcow</code> with the following content:</p> <pre><code>/var/log/mailcow.log {\n rotate 7\n daily\n compress\n delaycompress\n missingok\n notifempty\n create 660 root root\n}\n</code></pre> <p>With this configuration, logrotate will run daily and keep a maximum of 7 archives.</p> <p>To rotate the logfile weekly or monthly replace <code>daily</code> with <code>weekly</code> or <code>monthly</code> respectively.</p> <p>To keep more archives, set the desired number of <code>rotate</code>.</p> <p>Afterwards, logrotate can be restarted.</p>"},{"location":"en/post_installation/firststeps-rp/","title":"Reverse Proxy","text":"<p>You don't need to change the Nginx site that comes with mailcow: dockerized. mailcow: dockerized trusts the default gateway IP 172.22.1.1 as proxy.</p> <p>1. Make sure you change HTTP_BIND and HTTPS_BIND in <code>mailcow.conf</code> to a local address and set the ports accordingly, for example: <pre><code>HTTP_BIND=127.0.0.1\nHTTP_PORT=8080\nHTTPS_BIND=127.0.0.1\nHTTPS_PORT=8443\n</code></pre></p> <p>This will also change the bindings inside the Nginx container! This is important, if you decide to use a proxy within Docker.</p> <p>IMPORTANT: Do not use port 8081, 9081 or 65510!</p> <p>Recreate affected containers by running <code>docker compose up -d</code>.</p> <p>Important information, please read them carefully!</p> <p>Info</p> <p>If you plan to use a reverse proxy and want to use another server name that is not MAILCOW_HOSTNAME, you need to read Adding additional server names for mailcow UI at the bottom of this page.</p> <p>Warning</p> <p>Make sure you run <code>generate_config.sh</code> before you enable any site configuration examples below. The script <code>generate_config.sh</code> copies snake-oil certificates to the correct location, so the services will not fail to start due to missing files.</p> <p>Warning</p> <p>If you enable TLS SNI (<code>ENABLE_TLS_SNI</code> in mailcow.conf), the certificate paths in your reverse proxy must match the correct paths in data/assets/ssl/{hostname}. The certificates will be split into <code>data/assets/ssl/{hostname1,hostname2,etc}</code> and therefore will not work when you copy the examples from below pointing to <code>data/assets/ssl/cert.pem</code> etc.</p> <p>Info</p> <p>Using the site configs below will forward ACME requests to mailcow and let it handle certificates itself. The downside of using mailcow as ACME client behind a reverse proxy is, that you will need to reload your webserver after acme-mailcow changed/renewed/created the certificate. You can either reload your webserver daily or write a script to watch the file for changes. On many servers logrotate will reload the webserver daily anyway.</p> <p>If you want to use a local certbot installation, you will need to change the SSL certificate parameters accordingly. Make sure you run a post-hook script when you decide to use external ACME clients. You will find an example at the bottom of this page.</p> <p>2. Configure your local webserver as reverse proxy:</p>"},{"location":"en/post_installation/firststeps-rp/#apache-24","title":"Apache 2.4","text":"<p>Required modules: <pre><code>a2enmod rewrite proxy proxy_http headers ssl\n</code></pre></p> <p>Let's Encrypt will follow our rewrite, certificate requests in mailcow will work fine.</p> <p>Take care of highlighted lines.</p> <pre><code>&lt;VirtualHost *:80&gt;\n ServerName CHANGE_TO_MAILCOW_HOSTNAME\n ServerAlias autodiscover.*\n ServerAlias autoconfig.*\n RewriteEngine on\n\n RewriteCond %{HTTPS} off\n RewriteRule ^/?(.*) https://%{HTTP_HOST}/$1 [R=301,L]\n\n ProxyPass / http://127.0.0.1:8080/\n ProxyPassReverse / http://127.0.0.1:8080/\n ProxyPreserveHost On\n ProxyAddHeaders On\n RequestHeader set X-Forwarded-Proto \"http\"\n&lt;/VirtualHost&gt;\n&lt;VirtualHost *:443&gt;\n ServerName CHANGE_TO_MAILCOW_HOSTNAME\n ServerAlias autodiscover.*\n ServerAlias autoconfig.*\n\n # You should proxy to a plain HTTP session to offload SSL processing\n ProxyPass /Microsoft-Server-ActiveSync http://127.0.0.1:8080/Microsoft-Server-ActiveSync connectiontimeout=4000\n ProxyPassReverse /Microsoft-Server-ActiveSync http://127.0.0.1:8080/Microsoft-Server-ActiveSync\n ProxyPass / http://127.0.0.1:8080/\n ProxyPassReverse / http://127.0.0.1:8080/\n ProxyPreserveHost On\n ProxyAddHeaders On\n RequestHeader set X-Forwarded-Proto \"https\"\n\n SSLCertificateFile MAILCOW_PATH/data/assets/ssl/cert.pem\n SSLCertificateKeyFile MAILCOW_PATH/data/assets/ssl/key.pem\n\n # If you plan to proxy to a HTTPS host:\n #SSLProxyEngine On\n\n # If you plan to proxy to an untrusted HTTPS host:\n #SSLProxyVerify none\n #SSLProxyCheckPeerCN off\n #SSLProxyCheckPeerName off\n #SSLProxyCheckPeerExpire off\n&lt;/VirtualHost&gt;\n</code></pre>"},{"location":"en/post_installation/firststeps-rp/#nginx","title":"Nginx","text":"<p>Let's Encrypt will follow our rewrite, certificate requests will work fine.</p> <p>Take care of highlighted lines.</p> <pre><code>server {\n listen 80 default_server;\n listen [::]:80 default_server;\n server_name CHANGE_TO_MAILCOW_HOSTNAME autodiscover.* autoconfig.*;\n return 301 https://$host$request_uri;\n}\nserver {\n listen 443 ssl http2;\n listen [::]:443 ssl http2;\n server_name CHANGE_TO_MAILCOW_HOSTNAME autodiscover.* autoconfig.*;\n\n ssl_certificate MAILCOW_PATH/data/assets/ssl/cert.pem;\n ssl_certificate_key MAILCOW_PATH/data/assets/ssl/key.pem;\n ssl_session_timeout 1d;\n ssl_session_cache shared:SSL:50m;\n ssl_session_tickets off;\n\n # See https://ssl-config.mozilla.org/#server=nginx for the latest ssl settings recommendations\n # An example config is given below\n ssl_protocols TLSv1.2;\n ssl_ciphers HIGH:!aNULL:!MD5:!SHA1:!kRSA;\n ssl_prefer_server_ciphers off;\n\n location /Microsoft-Server-ActiveSync {\n proxy_pass http://127.0.0.1:8080/Microsoft-Server-ActiveSync;\n proxy_set_header Host $http_host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n proxy_connect_timeout 75;\n proxy_send_timeout 3650;\n proxy_read_timeout 3650;\n proxy_buffers 64 512k; # Needed since the 2022-04 Update for SOGo\n client_body_buffer_size 512k;\n client_max_body_size 0;\n }\n\n location / {\n proxy_pass http://127.0.0.1:8080/;\n proxy_set_header Host $http_host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n client_max_body_size 0;\n # The following Proxy Buffers has to be set if you want to use SOGo after the 2022-04 (April 2022) Update\n # Otherwise a Login will fail like this: https://github.com/mailcow/mailcow-dockerized/issues/4537\n proxy_buffer_size 128k;\n proxy_buffers 64 512k;\n proxy_busy_buffers_size 512k;\n }\n}\n</code></pre>"},{"location":"en/post_installation/firststeps-rp/#haproxy-community-supported","title":"HAProxy (community supported)","text":"<p>Warning</p> <p>This is an unsupported community contribution. Feel free to provide fixes.</p> <p>Important/Fixme: This example only forwards HTTPS traffic and does not use mailcows built-in ACME client.</p> <pre><code>frontend https-in\n bind :::443 v4v6 ssl crt mailcow.pem\n default_backend mailcow\n\nbackend mailcow\n option forwardfor\n http-request set-header X-Forwarded-Proto https if { ssl_fc }\n http-request set-header X-Forwarded-Proto http if !{ ssl_fc }\n server mailcow 127.0.0.1:8080 check\n</code></pre>"},{"location":"en/post_installation/firststeps-rp/#traefik-v2-community-supported","title":"Traefik v2 (community supported)","text":"<p>Warning</p> <p>This is an unsupported community contribution. Feel free to provide fixes.</p> <p>Important: This config only covers the \"reverseproxing\" of the webpannel (nginx-mailcow) using Traefik v2, if you also want to reverseproxy the mail services such as dovecot, postfix... you'll just need to adapt the following config to each container and create an EntryPoint on your <code>traefik.toml</code> or <code>traefik.yml</code> (depending which config you use) for each port. </p> <p>For this section we'll assume you have your Traefik 2 <code>[certificatesresolvers]</code> properly configured on your traefik configuration file, and also using acme, also, the following example uses Lets Encrypt, but feel free to change it to your own cert resolver. You can find a basic Traefik 2 toml config file with all the above implemented which can be used for this example here traefik.toml if you need one, or a hint on how to adapt your config.</p> <p>So, first of all, we are going to disable the acme-mailcow container since we'll use the certs that traefik will provide us. For this we'll have to set <code>SKIP_LETS_ENCRYPT=y</code> on our <code>mailcow.conf</code>, and run <code>docker compose up -d</code> to apply the changes.</p> <p>Then we'll create a <code>docker-compose.override.yml</code> file in order to override the main <code>docker-compose.yml</code> found in your mailcow root folder. </p> <pre><code>version: '2.1'\n\nservices:\n nginx-mailcow:\n networks:\n # Add Traefik's network\n web:\n labels:\n - traefik.enable=true\n # Creates a router called \"moo\" for the container, and sets up a rule to link the container to certain rule,\n # in this case, a Host rule with our MAILCOW_HOSTNAME var.\n - traefik.http.routers.moo.rule=Host(`${MAILCOW_HOSTNAME}`)\n # Enables tls over the router we created before.\n - traefik.http.routers.moo.tls=true\n # Specifies which kind of cert resolver we'll use, in this case le (Lets Encrypt).\n - traefik.http.routers.moo.tls.certresolver=le\n # Creates a service called \"moo\" for the container, and specifies which internal port of the container\n # should traefik route the incoming data to.\n - traefik.http.services.moo.loadbalancer.server.port=${HTTP_PORT}\n # Specifies which entrypoint (external port) should traefik listen to, for this container.\n # websecure being port 443, check the traefik.toml file liked above.\n - traefik.http.routers.moo.entrypoints=websecure\n # Make sure traefik uses the web network, not the mailcowdockerized_mailcow-network\n - traefik.docker.network=web\n\n certdumper:\n image: humenius/traefik-certs-dumper\n command: --restart-containers ${COMPOSE_PROJECT_NAME}-postfix-mailcow-1,${COMPOSE_PROJECT_NAME}-nginx-mailcow-1,${COMPOSE_PROJECT_NAME}-dovecot-mailcow-1\n network_mode: none\n volumes:\n # Mount the volume which contains Traefik's `acme.json' file\n # Configure the external name in the volume definition\n - acme:/traefik:ro\n # Mount mailcow's SSL folder\n - ./data/assets/ssl/:/output:rw\n # Mount docker socket to restart containers\n - /var/run/docker.sock:/var/run/docker.sock:ro\n restart: always\n environment:\n # only change this, if you're using another domain for mailcow's web frontend compared to the standard config\n - DOMAIN=${MAILCOW_HOSTNAME}\n\nnetworks:\n web:\n external: true\n # Name of the external network\n name: traefik_web\n\nvolumes:\n acme:\n external: true\n # Name of the external docker volume which contains Traefik's `acme.json' file\n name: traefik_acme\n</code></pre> <p>Start the new containers with <code>docker compose up -d</code>.</p> <p>Now, there's only one thing left to do, which is setup the certs so that the mail services can use them as well, since Traefik 2 uses an acme v2 format to save ALL the license from all the domains we have, we'll need to find a way to dump the certs, lucky we have this tiny container which grabs the <code>acme.json</code> file trough a volume, and a variable <code>DOMAIN=example.org</code>, and with these, the container will output the <code>cert.pem</code> and <code>key.pem</code> files, for this we'll simply run the <code>traefik-certs-dumper</code> container binding the <code>/traefik</code> volume to the folder where our <code>acme.json</code> is saved, bind the <code>/output</code> volume to our mailcow <code>data/assets/ssl/</code> folder, and set up the <code>DOMAIN=example.org</code> variable to the domain we want the certs dumped from. </p> <p>This container will watch over the <code>acme.json</code> file for any changes, and regenerate the <code>cert.pem</code> and <code>key.pem</code> files directly into <code>data/assets/ssl/</code> being the path binded to the container's <code>/output</code> path.</p> <p>You can use the command line to run it, or use the docker compose shown here.</p> <p>After we have the certs dumped, we'll have to reload the configs from our postfix and dovecot containers, and check the certs, you can see how here.</p> <p>Aaand that should be it \ud83d\ude0a, you can check if the Traefik router works fine trough Traefik's dashboard / traefik logs / accessing the setted domain trough https, or / and check HTTPS, SMTP and IMAP trough the commands shown on the page linked before.</p>"},{"location":"en/post_installation/firststeps-rp/#caddy-v2-supported-by-the-community","title":"Caddy v2 (supported by the community)","text":"<p>Warning</p> <p>This is an unsupported community contribution. Feel free to provide fixes.</p> <p>The configuration of Caddy with mailcow is very simple.</p> <p>In the caddyfile you just have to create a section for the mailserver.</p> <p>For example <pre><code>MAILCOW_HOSTNAME autodiscover.MAILCOW_HOSTNAME autoconfig.MAILCOW_HOSTNAME {\n log {\n output file /var/log/caddy/MAILCOW_HOSTNAME.log {\n roll_disabled\n roll_size 512M\n roll_uncompressed\n roll_local_time\n roll_keep 3\n roll_keep_for 48h\n }\n }\n\n reverse_proxy 127.0.0.1:HTTP_BIND\n}\n</code></pre></p> <p>This allows Caddy to automatically create the certificates and accept traffic for these mentioned domains and forward them to mailcow.</p> <p>Important: The ACME client of mailcow must be disabled, otherwise mailcow will fail.</p> <p>Since Caddy takes care of the certificates itself, we can use the following script to include the Caddy generated certificates into mailcow:</p> <pre><code>#!/bin/bash\nMD5SUM_CURRENT_CERT=($(md5sum /opt/mailcow-dockerized/data/assets/ssl/cert.pem))\nMD5SUM_NEW_CERT=($(md5sum /var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/your.domain.tld/your.domain.tld.crt))\n\nif [ $MD5SUM_CURRENT_CERT != $MD5SUM_NEW_CERT ]; then\n cp /var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/your.domain.tld/your.domain.tld.crt /opt/mailcow-dockerized/data/assets/ssl/cert.pem\n cp /var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/your.domain.tld/your.domain.tld.key /opt/mailcow-dockerized/data/assets/ssl/key.pem\n postfix_c=$(docker ps -qaf name=postfix-mailcow)\n dovecot_c=$(docker ps -qaf name=dovecot-mailcow)\n nginx_c=$(docker ps -qaf name=nginx-mailcow)\n docker restart ${postfix_c} ${dovecot_c} ${nginx_c}\n\nelse\n echo \"Certs not copied from Caddy (Not needed)\"\nfi\n</code></pre> <p>Attention</p> <p>Caddy's certificate path varies depending on the installation type. In this installation example, Caddy was installed using the Caddy repo (more informations here). To find out the Caddy certificate path on your system, just run a <code>find / -name \"certificates\"</code>.</p> <p>This script could be called as a cronjob every hour:</p> <pre><code>0 * * * * /bin/bash /path/to/script/deploy-certs.sh &gt;/dev/null 2&gt;&amp;1\n</code></pre>"},{"location":"en/post_installation/firststeps-rp/#optional-post-hook-script-for-non-mailcow-acme-clients","title":"Optional: Post-hook script for non-mailcow ACME clients","text":"<p>Using a local certbot (or any other ACME client) requires to restart some containers, you can do this with a post-hook script. Make sure you change the paths accordingly: <pre><code>#!/bin/bash\ncp /etc/letsencrypt/live/my.domain.tld/fullchain.pem /opt/mailcow-dockerized/data/assets/ssl/cert.pem\ncp /etc/letsencrypt/live/my.domain.tld/privkey.pem /opt/mailcow-dockerized/data/assets/ssl/key.pem\npostfix_c=$(docker ps -qaf name=postfix-mailcow)\ndovecot_c=$(docker ps -qaf name=dovecot-mailcow)\nnginx_c=$(docker ps -qaf name=nginx-mailcow)\ndocker restart ${postfix_c} ${dovecot_c} ${nginx_c}\n</code></pre></p>"},{"location":"en/post_installation/firststeps-rp/#adding-additional-server-names-for-mailcow-ui","title":"Adding additional server names for mailcow UI","text":"<p>If you plan to use a server name that is not <code>MAILCOW_HOSTNAME</code> in your reverse proxy, make sure to populate that name in mailcow.conf via <code>ADDITIONAL_SERVER_NAMES</code> first. Names must be separated by commas and must not contain spaces. If you skip this step, mailcow may respond to your reverse proxy with an incorrect site.</p> <pre><code>ADDITIONAL_SERVER_NAMES=webmail.domain.tld,other.example.tld\n</code></pre> <p>Run <code>docker compose up -d</code> to apply.</p>"},{"location":"en/post_installation/firststeps-rspamd_ui/","title":"Rspamd UI","text":"<p>Rspamd is an easy to use spam filtering tool presently installed with mailcow.</p> <ol> <li>Go to the mailcow web admin interface</li> <li>Navigate to the Access tab. (Access &gt; Rspamd UI)</li> <li>Modify the Rspamd UI password</li> <li>Go to https://${MAILCOW_HOSTNAME}/rspamd in a browser and log in!</li> </ol> <p>Additional configuration options and documentation can be found here : https://rspamd.com/webui/</p>"},{"location":"en/post_installation/firststeps-snat/","title":"SNAT","text":"<p>SNAT is used to change the source address of the packets sent by mailcow. It can be used to change the outgoing IP address on systems with multiple IP addresses.</p> <p>Open <code>mailcow.conf</code>, set either or both of the following parameters:</p> <pre><code># Use this IPv4 for outgoing connections (SNAT)\nSNAT_TO_SOURCE=1.2.3.4\n\n# Use this IPv6 for outgoing connections (SNAT)\nSNAT6_TO_SOURCE=dead:beef\n</code></pre> <p>Run <code>docker compose up -d</code>.</p> <p>The values are read by netfilter-mailcow. netfilter-mailcow will make sure, the post-routing rules are on position 1 in the netfilter table. It does automatically delete and re-create them if they are found on another position than 1.</p> <p>Check the output of <code>docker compose logs --tail=200 netfilter-mailcow</code> to ensure the SNAT settings have been applied.</p>"},{"location":"en/post_installation/firststeps-ssl/","title":"Advanced SSL","text":""},{"location":"en/post_installation/firststeps-ssl/#lets-encrypt-out-of-the-box","title":"Let's Encrypt (out-of-the-box)","text":"<p>The \"acme-mailcow\" container will try to obtain a LE certificate for <code>${MAILCOW_HOSTNAME}</code>, <code>autodiscover.ADDED_MAIL_DOMAIN</code> and <code>autoconfig.ADDED_MAIL_DOMAIN</code>.</p> <p>Warning</p> <p>mailcow must be available on port 80 for the acme-client to work. Our reverse proxy example configurations do cover that. You can also use any external ACME client (certbot for example) to obtain certificates, but you will need to make sure, that they are copied to the correct location and a post-hook reloads affected containers. See more in the Reverse Proxy documentation.</p> <p>By default, which means 0 domains are added to mailcow, it will try to obtain a certificate for <code>${MAILCOW_HOSTNAME}</code>.</p> <p>For each domain you add, it will try to resolve <code>autodiscover.ADDED_MAIL_DOMAIN</code> and <code>autoconfig.ADDED_MAIL_DOMAIN</code> to its IPv6 address or - if IPv6 is not configured in your domain - IPv4 address. If it succeeds, a name will be added as SAN to the certificate request.</p> <p>Only names that can be validated, will be added as SAN.</p> <p>For every domain you remove, the certificate will be moved and a new certificate will be requested. It is not possible to keep domains in a certificate, when we are not able validate the challenge for those.</p> <p>If you want to re-run the ACME client, use <code>docker compose restart acme-mailcow</code> and monitor its logs with <code>docker compose logs --tail=200 -f acme-mailcow</code>.</p>"},{"location":"en/post_installation/firststeps-ssl/#additional-domain-names","title":"Additional domain names","text":"<p>Edit \"mailcow.conf\" and add a parameter <code>ADDITIONAL_SAN</code> like this:</p> <p>Do not use quotes (<code>\"</code>) and do not use spaces between the names!</p> <pre><code>ADDITIONAL_SAN=smtp.*,cert1.example.com,cert2.example.org,whatever.*\n</code></pre> <p>Each name will be validated against its IPv6 address or - if IPv6 is not configured in your domain - IPv4 address.</p> <p>A wildcard name like <code>smtp.*</code> will try to obtain a smtp.DOMAIN_NAME SAN for each domain added to mailcow.</p> <p>Run <code>docker compose up -d</code> to recreate affected containers automatically.</p> <p>Info</p> <p>Using names other name <code>MAILCOW_HOSTNAME</code> to access the mailcow UI may need further configuration.</p> <p>If you plan to use a server name that is not <code>MAILCOW_HOSTNAME</code> to access the mailcow UI (for example by adding <code>mail.*</code> to <code>ADDITIONAL_SAN</code> make sure to populate that name in mailcow.conf via <code>ADDITIONAL_SERVER_NAMES</code>. Names must be separated by commas and must not contain spaces. If you skip this step, mailcow may respond with an incorrect site.</p> <pre><code>ADDITIONAL_SERVER_NAMES=webmail.domain.tld,other.example.tld\n</code></pre> <p>Run <code>docker compose up -d</code> to apply.</p>"},{"location":"en/post_installation/firststeps-ssl/#force-renewal","title":"Force renewal","text":"<p>To force a renewal, you need to create a file named <code>force_renew</code> and restart the <code>acme-mailcow</code> container:</p> <pre><code>cd /opt/mailcow-dockerized\ntouch data/assets/ssl/force_renew\ndocker compose restart acme-mailcow\n# Now check the logs for a renewal\ndocker compose logs --tail=200 -f acme-mailcow\n</code></pre> <p>The file will be deleted automatically.</p>"},{"location":"en/post_installation/firststeps-ssl/#validation-errors-and-how-to-skip-validation","title":"Validation errors and how to skip validation","text":"<p>You can skip the IP verification by setting <code>SKIP_IP_CHECK=y</code> in mailcow.conf (no quotes). Be warned that a misconfiguration will get you ratelimited by Let's Encrypt! This is primarily useful for multi-IP setups where the IP check would return the incorrect source IP address. Due to using dynamic IPs for acme-mailcow, source NAT is not consistent over restarts.</p> <p>If you encounter problems with \"HTTP validation\", but your IP address confirmation succeeds, you are most likely using firewalld, ufw or any other firewall, that disallows connections from <code>br-mailcow</code> to your external interface. Both firewalld and ufw disallow this by default. It is often not enough to just stop these firewall services. You'd need to stop mailcow (<code>docker compose down</code>), stop the firewall service, flush the chains and restart Docker.</p> <p>You can also skip this validation method by setting <code>SKIP_HTTP_VERIFICATION=y</code> in \"mailcow.conf\". Be warned that this is discouraged. In most cases, the HTTP verification is skipped to workaround unknown NAT reflection issues, which are not resolved by ignoring this specific network misconfiguration. If you encounter problems generating TLSA records in the DNS overview within mailcow, you are most likely having issues with NAT reflection you should fix.</p> <p>If you changed a SKIP_* parameter, run <code>docker compose up -d</code> to apply your changes.</p>"},{"location":"en/post_installation/firststeps-ssl/#disable-lets-encrypt","title":"Disable Let's Encrypt","text":""},{"location":"en/post_installation/firststeps-ssl/#disable-lets-encrypt-completely","title":"Disable Let's Encrypt completely","text":"<p>Set <code>SKIP_LETS_ENCRYPT=y</code> in \"mailcow.conf\" and recreate \"acme-mailcow\" by running <code>docker compose up -d</code>.</p>"},{"location":"en/post_installation/firststeps-ssl/#skip-all-names-but-mailcow_hostname","title":"Skip all names but ${MAILCOW_HOSTNAME}","text":"<p>Add <code>ONLY_MAILCOW_HOSTNAME=y</code> to \"mailcow.conf\" and recreate \"acme-mailcow\" by running <code>docker compose up -d</code>.</p>"},{"location":"en/post_installation/firststeps-ssl/#the-lets-encrypt-subjectaltname-limit-of-100-domains","title":"The Let's Encrypt subjectAltName limit of 100 domains","text":"<p>Let's Encrypt currently has a limit of 100 Domain Names per Certificate.</p> <p>By default, \"acme-mailcow\" will create a single SAN certificate for all validated domains (see the first section and Additional domain names). This provides best compatibility but means the Let's Encrypt limit exceeds if you add too many domains to a single mailcow installation.</p> <p>To solve this, you can configure <code>ENABLE_SSL_SNI</code> to generate:</p> <ul> <li>A main server certificate with <code>MAILCOW_HOSTNAME</code> and all fully qualified domain names in the <code>ADDITIONAL_SAN</code> config</li> <li>One additional certificate for each domain found in the database with autodiscover., autoconfig. and any other <code>ADDITIONAL_SAN</code> configured in this format (subdomain.*).</li> <li>Limitations: A certificate name <code>ADDITIONAL_SAN=test.example.com</code> will be added as SAN to the main certificate. A separate certificate/key pair will not be generated for this format.</li> </ul> <p>Postfix, Dovecot and Nginx will then serve these certificates with SNI.</p> <p>Set <code>ENABLE_SSL_SNI=y</code> in \"mailcow.conf\" and recreate \"acme-mailcow\" by running <code>docker compose up -d</code>.</p> <p>Warning</p> <p>Not all clients support SNI, see Dovecot documentation or Wikipedia. You should make sure these clients use the <code>MAILCOW_HOSTNAME</code> for secure connections if you enable this feature.</p> <p>Here is an example:</p> <ul> <li><code>MAILCOW_HOSTNAME=server.email.tld</code></li> <li><code>ADDITIONAL_SAN=webmail.email.tld,mail.*</code></li> <li>Mailcow email domains: \"domain1.tld\" and \"domain2.tld\"</li> </ul> <p>The following certificates will be generated:</p> <ul> <li><code>server.email.tld, webmail.email.tld</code> -&gt; this is the default certificate, all clients can connect with these domains</li> <li><code>mail.domain1.tld, autoconfig.domain1.tld, autodiscover.domain1.tld</code> -&gt; individual certificate for domain1.tld, cannot be used by clients without SNI support</li> <li><code>mail.domain2.tld, autoconfig.domain2.tld, autodiscover.domain2.tld</code> -&gt; individual certificate for domain2.tld, cannot be used by clients without SNI support</li> </ul>"},{"location":"en/post_installation/firststeps-ssl/#how-to-use-your-own-certificate","title":"How to use your own certificate","text":"<p>Make sure you disable mailcows internal LE client (see above).</p> <p>To use your own certificates, just save the combined certificate (containing the certificate and intermediate CA/CA if any) to <code>data/assets/ssl/cert.pem</code> and the corresponding key to <code>data/assets/ssl/key.pem</code>.</p> <p>IMPORTANT: Do not use symbolic links! Make sure you copy the certificates and do not link them to <code>data/assets/ssl</code>.</p> <p>Restart affected services afterwards:</p> <pre><code>docker restart $(docker ps -qaf name=postfix-mailcow)\ndocker restart $(docker ps -qaf name=nginx-mailcow)\ndocker restart $(docker ps -qaf name=dovecot-mailcow)\n</code></pre> <p>See Post-hook script for non-mailcow ACME clients for a full example script.</p>"},{"location":"en/post_installation/firststeps-ssl/#test-against-staging-acme-directory","title":"Test against staging ACME directory","text":"<p>Edit <code>mailcow.conf</code> and add <code>LE_STAGING=y</code>.</p> <p>Run <code>docker compose up -d</code> to activate your changes.</p>"},{"location":"en/post_installation/firststeps-ssl/#custom-directory-url","title":"Custom directory URL","text":"<p>Edit <code>mailcow.conf</code> and add the corresponding directory URL to the new variable <code>DIRECTORY_URL</code>:</p> <pre><code>DIRECTORY_URL=https://acme-custom-v9000.api.letsencrypt.org/directory\n</code></pre> <p>You cannot use <code>LE_STAGING</code> with <code>DIRECTORY_URL</code>. If both are set, only <code>LE_STAGING</code> is used.</p> <p>Run <code>docker compose up -d</code> to activate your changes.</p>"},{"location":"en/post_installation/firststeps-ssl/#check-your-configuration","title":"Check your configuration","text":"<p>Run <code>docker compose logs acme-mailcow</code> to find out why a validation fails.</p> <p>To check if nginx serves the correct certificate, simply use a browser of your choice and check the displayed certificate.</p> <p>To check the certificate served by Postfix, Dovecot and Nginx we will use <code>openssl</code>:</p> <pre><code># Connect via SMTP (587)\necho \"Q\" | openssl s_client -starttls smtp -crlf -connect mx.mailcow.email:587\n# Connect via IMAP (143)\necho \"Q\" | openssl s_client -starttls imap -showcerts -connect mx.mailcow.email:143\n# Connect via HTTPS (443)\necho \"Q\" | openssl s_client -connect mx.mailcow.email:443\n</code></pre> <p>To validate the expiry dates as returned by openssl against MAILCOW_HOSTNAME, you are able to use our helper script:</p> <pre><code>cd /opt/mailcow-dockerized\nbash helper-scripts/expiry-dates.sh\n</code></pre>"},{"location":"en/post_installation/firststeps-sync_jobs_migration/","title":"Sync job migration","text":"<p>Sync jobs are used to copy or move existing emails from an external IMAP server or within mailcow's existing mailboxes.</p> <p>Info</p> <p>Depending on your mailbox's ACL you may not have the option to add a sync job. Please contact your domain administrator if so.</p>"},{"location":"en/post_installation/firststeps-sync_jobs_migration/#setup-a-sync-job","title":"Setup a Sync Job","text":"<ol> <li> <p>In the \"Configuration &gt; Mail Setup\" or \"User Settings\" interface, create a new sync job.</p> </li> <li> <p>If you are an administrator, select the username of the downstream mailcow mailbox in the \"Username\" dropdown.</p> </li> <li> <p>Fill in the \"Host\" and \"Port\" fields with their respective correct values from the upstream IMAP server.</p> </li> <li> <p>In the \"Username\" and \"Password\" fields, supply the correct access credentials from the upstream IMAP server.</p> </li> <li> <p>Select the \"Encryption Method\". If the upstream IMAP server uses port 143, it is likely that the encryption method is TLS and SSL for port 993. Nevertheless, you can use PLAIN authentication, but it is stongly discouraged.</p> </li> <li> <p>For all ther other fields, you can leave them as is or modify them as desired.</p> </li> <li> <p>Make sure to tick \"Active\" and click \"Add\".</p> </li> </ol> <p>Info</p> <p>Once Completed, log into the mailbox and check if all emails are imported correctly. If all goes well, all your mails shall end up in your new mailbox. And don't forget to delete or deactivate the sync job after it is used.</p>"},{"location":"en/prerequisite/prerequisite-dns/","title":"DNS setup","text":"<p>Below you can find a list of recommended DNS records. While some are mandatory for a mail server (A, MX), others are recommended to build a good reputation score (TXT/SPF) or used for auto-configuration of mail clients (SRV).</p>"},{"location":"en/prerequisite/prerequisite-dns/#references","title":"References","text":"<ul> <li>A good article covering all relevant topics: \"3 DNS Records Every Email Marketer Must Know\"</li> <li>Another great one, but Zimbra as an example platform: \"Best Practices on Email Protection: SPF, DKIM and DMARC\"</li> <li>An in-depth discussion of SPF, DKIM and DMARC: \"How to eliminate spam and protect your name with DMARC\"</li> <li>A thorough guide on understanding DMARC: \"Demystifying DMARC: A guide to preventing email spoofing\"</li> </ul>"},{"location":"en/prerequisite/prerequisite-dns/#reverse-dns-of-your-ip-address","title":"Reverse DNS of your IP address","text":"<p>Make sure that the PTR record of your IP address matches the FQDN of your mailcow host: <code>${MAILCOW_HOSTNAME}</code> 1. This record is usually set at the provider you leased the IP address (server) from.</p>"},{"location":"en/prerequisite/prerequisite-dns/#the-minimal-dns-configuration","title":"The minimal DNS configuration","text":"<p>This example shows you a set of records for one domain managed by mailcow. Each domain that is added to mailcow needs at least this set of records to function correctly.</p> <pre><code># Name Type Value\nmail IN A 1.2.3.4\nautodiscover IN CNAME mail.example.org. (your ${MAILCOW_HOSTNAME})\nautoconfig IN CNAME mail.example.org. (your ${MAILCOW_HOSTNAME})\n@ IN MX 10 mail.example.org. (your ${MAILCOW_HOSTNAME})\n</code></pre> <p>Note: The <code>mail</code> DNS record which binds the subdomain to the given ip address must only be set for the domain on which mailcow is running and that is used to access the web interface. For every other mailcow managed domain, the <code>MX</code> record will route the traffic.</p>"},{"location":"en/prerequisite/prerequisite-dns/#dkim-spf-and-dmarc","title":"DKIM, SPF and DMARC","text":"<p>In the example DNS zone file snippet below, a simple SPF TXT record is used to only allow THIS server (the MX) to send mail for your domain. Every other server is disallowed but able to (\"<code>~all</code>\"). Please refer to SPF Project for further reading.</p> <pre><code># Name Type Value\n@ IN TXT \"v=spf1 mx a -all\"\n</code></pre> <p>It is highly recommended to create a DKIM TXT record in your mailcow UI and set the corresponding TXT record in your DNS records. Please refer to OpenDKIM for further reading.</p> <pre><code># Name Type Value\ndkim._domainkey IN TXT \"v=DKIM1; k=rsa; t=s; s=email; p=...\"\n</code></pre> <p>The last step in protecting yourself and others is the implementation of a DMARC TXT record, for example by using the DMARC Assistant (check).</p> <pre><code># Name Type Value\n_dmarc IN TXT \"v=DMARC1; p=reject; rua=mailto:mailauth-reports@example.org\"\n</code></pre>"},{"location":"en/prerequisite/prerequisite-dns/#the-advanced-dns-configuration","title":"The advanced DNS configuration","text":"<p>SRV records specify the server(s) for a specific protocol on your domain. If you want to explicitly announce a service as not provided, give \".\" as the target address (instead of \"mail.example.org.\"). Please refer to RFC 2782.</p> <pre><code># Name Type Priority Weight Port Value\n_autodiscover._tcp IN SRV 0 1 443 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_caldavs._tcp IN SRV 0 1 443 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_caldavs._tcp IN TXT \"path=/SOGo/dav/\"\n_carddavs._tcp IN SRV 0 1 443 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_carddavs._tcp IN TXT \"path=/SOGo/dav/\"\n_imap._tcp IN SRV 0 1 143 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_imaps._tcp IN SRV 0 1 993 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_pop3._tcp IN SRV 0 1 110 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_pop3s._tcp IN SRV 0 1 995 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_sieve._tcp IN SRV 0 1 4190 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_smtps._tcp IN SRV 0 1 465 mail.example.org. (your ${MAILCOW_HOSTNAME})\n_submission._tcp IN SRV 0 1 587 mail.example.org. (your ${MAILCOW_HOSTNAME})\n</code></pre>"},{"location":"en/prerequisite/prerequisite-dns/#testing","title":"Testing","text":"<p>Here are some tools you can use to verify your DNS configuration:</p> <ul> <li>MX Toolbox (DNS, SMTP, RBL)</li> <li>port25.com (DKIM, SPF)</li> <li>Mail-tester (DKIM, DMARC, SPF)</li> <li>DMARC Analyzer (DMARC, SPF)</li> <li>MultiRBL.valli.org (DNSBL, RBL, FCrDNS)</li> </ul>"},{"location":"en/prerequisite/prerequisite-dns/#misc","title":"Misc","text":""},{"location":"en/prerequisite/prerequisite-dns/#optional-dmarc-statistics","title":"Optional DMARC Statistics","text":"<p>If you are interested in statistics, you can additionally register with some of the many below DMARC statistic services - or self-host your own.</p> <p>Tip</p> <p>It is worth considering that if you request DMARC statistic reports to your mailcow server and your mailcow server is not configured correctly to receive these reports, you may not get accurate and complete results. Please consider using an alternative email domain for receiving DMARC reports.</p> <p>It is worth mentioning, that the following suggestions are not a comprehensive list of all services and tools available, but only a small few of the many choices.</p> <ul> <li>Postmaster Tool</li> <li>parsedmarc (self-hosted)</li> <li>Fraudmarc</li> <li>Postmark</li> <li>Dmarcian</li> </ul> <p>Tip</p> <p>These services may provide you with a TXT record you need to insert into your DNS records as the provider specifies. Please ensure you read the provider's documentation from the service you choose as this process may vary.</p>"},{"location":"en/prerequisite/prerequisite-dns/#email-test-for-spf-dkim-and-dmarc","title":"Email test for SPF, DKIM and DMARC:","text":"<p>To run a rudimentary email authentication check, send a mail to <code>check-auth at verifier.port25.com</code> and wait for a reply. You will find a report similar to the following:</p> <pre><code>==========================================================\nSummary of Results\n==========================================================\nSPF check: pass\n\"iprev\" check: pass\nDKIM check: pass\nDKIM check: pass\nSpamAssassin check: ham\n\n==========================================================\nDetails:\n==========================================================\n....\n</code></pre> <p>The full report will contain more technical details.</p>"},{"location":"en/prerequisite/prerequisite-dns/#fully-qualified-domain-name-fqdn","title":"Fully Qualified Domain Name (FQDN)","text":"<ol> <li> <p>A Fully Qualified Domain Name (FQDN) is the complete (absolute) domain name for a specific computer or host, on the Internet. The FQDN consists of at least three parts divided by a dot: the hostname, the domain name, and the Top Level Domain (TLD for short). In the example of <code>mx.mailcow.email</code> the hostname would be <code>mx</code>, the domain name <code>mailcow</code> and the TLD <code>email</code>.\u00a0\u21a9</p> </li> </ol>"},{"location":"en/prerequisite/prerequisite-system/","title":"Prepare your system","text":"<p>Before you run mailcow: dockerized, there are a few requirements that you should check:</p> <p>Warning</p> <p>Do not try to install mailcow on a Synology/QNAP device (any NAS), OpenVZ, LXC or other container platforms. KVM, ESX, Hyper-V and other full virtualization platforms are supported.</p> <p>Info</p> <ul> <li>mailcow: dockerized requires some ports to be open for incoming connections, so make sure that your firewall is not blocking these.</li> <li>Make sure that no other application is interfering with mailcow's configuration, such as another mail service</li> <li>A correct DNS setup is crucial to every good mailserver setup, so please make sure you got at least the basics covered before you begin!</li> <li>Make sure that your system has a correct date and time setup. This is crucial for various components like two factor TOTP authentication.</li> </ul>"},{"location":"en/prerequisite/prerequisite-system/#minimum-system-resources","title":"Minimum System Resources","text":"<p>Not supported</p> <p>OpenVZ, Virtuozzo and LXC</p> <p>Please make sure that your system has at least the following resources:</p> Resource mailcow: dockerized CPU 1 GHz RAM Minimum 6 GiB + 1 GiB swap (default config) Disk 20 GiB (without emails) System Type x86_64 <p>ClamAV and Solr can be greedy with RAM. You may disable them in <code>mailcow.conf</code> by settings <code>SKIP_CLAMD=y</code> and <code>SKIP_SOLR=y</code>.</p> <p>Info</p> <p>We are aware that a pure MTA can run on 128 MiB RAM. mailcow is a full-grown and ready-to-use groupware with many extras making life easier. mailcow comes with a webserver, webmailer, ActiveSync (MS), antivirus, antispam, indexing (Solr), document scanner (Oletools), SQL (MariaDB), Cache (Redis), MDA, MTA, various web services etc.</p> <p>A single SOGo worker can acquire ~350 MiB RAM before it gets purged. The more ActiveSync connections you plan to use, the more RAM you will need. A default configuration spawns 20 workers.</p>"},{"location":"en/prerequisite/prerequisite-system/#ram-usage-examples","title":"RAM usage examples","text":"<p>A company with 15 phones (EAS enabled) and about 50 concurrent IMAP connections should plan 16 GiB RAM.</p> <p>6 GiB RAM + 1 GiB swap are fine for most private installations while 8 GiB RAM are recommended for ~5 to 10 users.</p> <p>We can help to correctly plan your setup as part of our support.</p>"},{"location":"en/prerequisite/prerequisite-system/#supported-os","title":"Supported OS","text":"<p>Basically, mailcow can be used on any distribution that is supported by Docker CE (see https://docs.docker.com/install/). However, in some cases there may be incompatibilities between the operating systems and the mailcow components.</p> <p>The following table contains all operating systems officially supported and tested by us (as of November 2022):</p> OS Compatibility Alpine 3.16 and older \u26a0\ufe0f Centos 7 \u2705 Debian 10, 11 \u2705 Ubuntu 18.04, 20.04, 22.04 \u2705 Rocky Linux 9 \u2754 <p>Legend<p>\u2705 = Works out of the box using the instructions. \u26a0\ufe0f = Requires some manual adjustments otherwise usable. \u274c = In general NOT Compatible. \u2754 = Pending.</p> </p> <p>Note: All other operating systems (not mentioned) may also work, but have not been officially tested.</p>"},{"location":"en/prerequisite/prerequisite-system/#firewall-ports","title":"Firewall &amp; Ports","text":"<p>Please check if any of mailcow's standard ports are open and not in use by other applications:</p> <pre><code>ss -tlpn | grep -E -w '25|80|110|143|443|465|587|993|995|4190'\n# or:\nnetstat -tulpn | grep -E -w '25|80|110|143|443|465|587|993|995|4190'\n</code></pre> <p>Danger</p> <p>There are several problems with running mailcow on a firewalld/ufw enabled system. You should disable it (if possible) and move your ruleset to the DOCKER-USER chain, which is not cleared by a Docker service restart, instead. See this (blog.donnex.net) or this (unrouted.io) guide for information about how to use iptables-persistent with the DOCKER-USER chain. As mailcow runs dockerized, INPUT rules have no effect on restricting access to mailcow. Use the FORWARD chain instead.</p> <p>If this command returns any results please remove or stop the application running on that port. You may also adjust mailcows ports via the <code>mailcow.conf</code> configuration file.</p>"},{"location":"en/prerequisite/prerequisite-system/#default-ports","title":"Default Ports","text":"<p>If you have a firewall in front of mailcow, please make sure that these ports are open for incoming connections:</p> Service Protocol Port Container Variable Postfix SMTP TCP 25 postfix-mailcow <code>${SMTP_PORT}</code> Postfix SMTPS TCP 465 postfix-mailcow <code>${SMTPS_PORT}</code> Postfix Submission TCP 587 postfix-mailcow <code>${SUBMISSION_PORT}</code> Dovecot IMAP TCP 143 dovecot-mailcow <code>${IMAP_PORT}</code> Dovecot IMAPS TCP 993 dovecot-mailcow <code>${IMAPS_PORT}</code> Dovecot POP3 TCP 110 dovecot-mailcow <code>${POP_PORT}</code> Dovecot POP3S TCP 995 dovecot-mailcow <code>${POPS_PORT}</code> Dovecot ManageSieve TCP 4190 dovecot-mailcow <code>${SIEVE_PORT}</code> HTTP(S) TCP 80/443 nginx-mailcow <code>${HTTP_PORT}</code> / <code>${HTTPS_PORT}</code> <p>To bind a service to an IP address, you can prepend the IP like this: <code>SMTP_PORT=1.2.3.4:25</code></p> <p>Important: You cannot use IP:PORT bindings in HTTP_PORT and HTTPS_PORT. Please use <code>HTTP_PORT=1234</code> and <code>HTTP_BIND=1.2.3.4</code> instead.</p>"},{"location":"en/prerequisite/prerequisite-system/#important-for-hetzner-firewalls","title":"Important for Hetzner firewalls","text":"<p>Quoting https://github.com/chermsen via https://github.com/mailcow/mailcow-dockerized/issues/497#issuecomment-469847380 (THANK YOU!):</p> <p>For all who are struggling with the Hetzner firewall:</p> <p>Port 53 unimportant for the firewall configuration in this case. According to the documentation unbound uses the port range 1024-65535 for outgoing requests. Since the Hetzner Robot Firewall is a static firewall (each incoming packet is checked isolated) - the following rules must be applied:</p> <p>For TCP <pre><code>SRC-IP: ---\nDST IP: ---\nSRC Port: ---\nDST Port: 1024-65535\nProtocol: tcp\nTCP flags: ack\nAction: Accept\n</code></pre></p> <p>For UDP <pre><code>SRC-IP: ---\nDST IP: ---\nSRC Port: ---\nDST Port: 1024-65535\nProtocol: udp\nAction: Accept\n</code></pre></p> <p>If you want to apply a more restrictive port range you have to change the config of unbound first (after installation):</p> <p>{mailcow-dockerized}/data/conf/unbound/unbound.conf: <pre><code>outgoing-port-avoid: 0-32767\n</code></pre></p> <p>Now the firewall rules can be adjusted as follows:</p> <pre><code>[...]\nDST Port: 32768-65535\n[...]\n</code></pre>"},{"location":"en/prerequisite/prerequisite-system/#date-and-time","title":"Date and Time","text":"<p>To ensure that you have the correct date and time setup on your system, please check the output of <code>timedatectl status</code>:</p> <pre><code>$ timedatectl status\n Local time: Sat 2017-05-06 02:12:33 CEST\n Universal time: Sat 2017-05-06 00:12:33 UTC\n RTC time: Sat 2017-05-06 00:12:32\n Time zone: Europe/Berlin (CEST, +0200)\n NTP enabled: yes\nNTP synchronized: yes\n RTC in local TZ: no\n DST active: yes\n Last DST change: DST began at\n Sun 2017-03-26 01:59:59 CET\n Sun 2017-03-26 03:00:00 CEST\n Next DST change: DST ends (the clock jumps one hour backwards) at\n Sun 2017-10-29 02:59:59 CEST\n Sun 2017-10-29 02:00:00 CET\n</code></pre> <p>The lines <code>NTP enabled: yes</code> and <code>NTP synchronized: yes</code> indicate whether you have NTP enabled and if it's synchronized.</p> <p>To enable NTP you need to run the command <code>timedatectl set-ntp true</code>. You also need to edit your <code>/etc/systemd/timesyncd.conf</code>:</p> <pre><code># vim /etc/systemd/timesyncd.conf\n[Time]\nNTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org\n</code></pre>"},{"location":"en/prerequisite/prerequisite-system/#hetzner-cloud-and-probably-others","title":"Hetzner Cloud (and probably others)","text":"<p>Check <code>/etc/network/interfaces.d/50-cloud-init.cfg</code> and change the IPv6 interface from eth0:0 to eth0:</p> <pre><code># Wrong:\nauto eth0:0\niface eth0:0 inet6 static\n# Right:\nauto eth0\niface eth0 inet6 static\n</code></pre> <p>Reboot or restart the interface. You may want to disable cloud-init network changes.</p>"},{"location":"en/prerequisite/prerequisite-system/#mtu","title":"MTU","text":"<p>Especially relevant for OpenStack users: Check your MTU and set it accordingly in docker-compose.yml. See Troubleshooting in our Installation guide.</p>"},{"location":"en/third_party/borgmatic/third_party-borgmatic/","title":"Borgmatic Backup","text":""},{"location":"en/third_party/borgmatic/third_party-borgmatic/#introduction","title":"Introduction","text":"<p>Borgmatic is a great way to run backups on your Mailcow setup as it securely encrypts your data and is extremely easy to set up.</p> <p>Due to it's deduplication capabilities you can store a great number of backups without wasting large amounts of disk space. This allows you to run backups in very short intervals to ensure minimal data loss when the need arises to recover data from a backup.</p> <p>This document guides you through the process to enable continuous backups for mailcow with borgmatic. The borgmatic functionality is provided by the borgmatic Docker image. Check out the <code>README</code> in that repository to find out about the other options (such as push notifications) that are available. This guide only covers the basics.</p>"},{"location":"en/third_party/borgmatic/third_party-borgmatic/#setting-up-borgmatic","title":"Setting up borgmatic","text":""},{"location":"en/third_party/borgmatic/third_party-borgmatic/#create-or-amend-docker-composeoverrideyml","title":"Create or amend <code>docker-compose.override.yml</code>","text":"<p>In the mailcow-dockerized root folder create or edit <code>docker-compose.override.yml</code> and insert the following configuration:</p> <pre><code>version: '2.1'\n\nservices:\n borgmatic-mailcow:\n image: ghcr.io/borgmatic-collective/borgmatic\n hostname: mailcow\n restart: always\n dns: ${IPV4_NETWORK:-172.22.1}.254\n volumes:\n - vmail-vol-1:/mnt/source/vmail:ro\n - crypt-vol-1:/mnt/source/crypt:ro\n - redis-vol-1:/mnt/source/redis:ro,z\n - rspamd-vol-1:/mnt/source/rspamd:ro,z\n - postfix-vol-1:/mnt/source/postfix:ro,z\n - mysql-socket-vol-1:/var/run/mysqld/:z\n - borg-config-vol-1:/root/.config/borg:Z\n - borg-cache-vol-1:/root/.cache/borg:Z\n - ./data/conf/borgmatic/etc:/etc/borgmatic.d:Z\n - ./data/conf/borgmatic/ssh:/root/.ssh:Z\n environment:\n - TZ=${TZ}\n - BORG_PASSPHRASE=YouBetterPutSomethingRealGoodHere\n networks:\n mailcow-network:\n aliases:\n - borgmatic\n\nvolumes:\n borg-cache-vol-1:\n borg-config-vol-1:\n</code></pre> <p>Ensure that you change the <code>BORG_PASSPHRASE</code> to a secure passphrase of your choosing.</p> <p>For security reasons we mount the maildir as read-only. If you later want to restore data you will need to remove the <code>ro</code> flag prior to restoring the data. This is described in the section on restoring backups.</p>"},{"location":"en/third_party/borgmatic/third_party-borgmatic/#create-dataconfborgmaticetcconfigyaml","title":"Create <code>data/conf/borgmatic/etc/config.yaml</code>","text":"<p>Next, we need to create the borgmatic configuration.</p> <pre><code>source mailcow.conf\ncat &lt;&lt;EOF &gt; data/conf/borgmatic/etc/config.yaml\nlocation:\n source_directories:\n - /mnt/source\n repositories:\n - ssh://user@rsync.net:22/./mailcow\n exclude_patterns:\n - '/mnt/source/postfix/public/'\n - '/mnt/source/postfix/private/'\n - '/mnt/source/rspamd/rspamd.sock'\n\nretention:\n keep_hourly: 24\n keep_daily: 7\n keep_weekly: 4\n keep_monthly: 6\n prefix: \"\"\n\nhooks:\n mysql_databases:\n - name: ${DBNAME}\n username: ${DBUSER}\n password: ${DBPASS}\n options: --default-character-set=utf8mb4\nEOF\n</code></pre> <p>Creating the file in this way ensures the correct MySQL credentials are pulled in from <code>mailcow.conf</code>.</p> <p>This file is a minimal example for using borgmatic with an account <code>user</code> on the cloud storage provider <code>rsync.net</code> for a repository called <code>mailcow</code> (see <code>repositories</code> setting). It will backup both the maildir and MySQL database, which is all you should need to restore your mailcow setup after an incident. The retention settings will keep one archive for each hour of the past 24 hours, one per day of the week, one per week of the month and one per month of the past half year.</p> <p>Check the borgmatic documentation on how to use other types of repositories or configuration options. If you choose to use a local filesystem as a backup destination make sure to mount it into the container. The container defines a volume called <code>/mnt/borg-repository</code> for this purpose.</p> <p>Note</p> <p>If you do not use rsync.net you can most likely drop the <code>remote_path</code> element from your config.</p>"},{"location":"en/third_party/borgmatic/third_party-borgmatic/#create-a-crontab","title":"Create a crontab","text":"<p>Create a new text file in <code>data/conf/borgmatic/etc/crontab.txt</code> with the following content:</p> <pre><code>14 * * * * PATH=$PATH:/usr/local/bin /usr/local/bin/borgmatic --stats -v 0 2&gt;&amp;1\n</code></pre> <p>This file expects crontab syntax. The example shown here will trigger the backup to run every hour at 14 minutes past the hour and log some nice stats at the end.</p>"},{"location":"en/third_party/borgmatic/third_party-borgmatic/#place-ssh-keys-in-folder","title":"Place SSH keys in folder","text":"<p>Place the SSH keys you intend to use for remote repository connections in <code>data/conf/borgmatic/ssh</code>. OpenSSH expects the usual <code>id_rsa</code>, <code>id_ed25519</code> or similar to be in this directory. Ensure the file is <code>chmod 600</code> and not world readable or OpenSSH will refuse to use the SSH key.</p>"},{"location":"en/third_party/borgmatic/third_party-borgmatic/#bring-up-the-container","title":"Bring up the container","text":"<p>For the next step we need the container to be up and running in a configured state. To do that run:</p> <pre><code>docker compose up -d\n</code></pre>"},{"location":"en/third_party/borgmatic/third_party-borgmatic/#initialize-the-repository","title":"Initialize the repository","text":"<p>By now your borgmatic container is up and running, but the backups will currently fail due to the repository not being initialized.</p> <p>To initialize the repository run:</p> <pre><code>docker compose exec borgmatic-mailcow borgmatic init --encryption repokey-blake2\n</code></pre> <p>You will be asked you to authenticate the SSH host key of your remote repository server. See if it matches and confirm the prompt by entering <code>yes</code>. The repository will be initialized with the passphrase you set in the <code>BORG_PASSPHRASE</code> environment variable earlier.</p> <p>When using any of the <code>repokey</code> encryption methods the encryption key will be stored in the repository itself and not on the client, so there is no further action required in this regard. If you decide to use a <code>keyfile</code> instead of a <code>repokey</code> make sure you export the key and back it up separately. Check the Exporting Keys section for how to retrieve the key.</p>"},{"location":"en/third_party/borgmatic/third_party-borgmatic/#restart-container","title":"Restart container","text":"<p>Now that we finished configuring and initializing the repository restart the container to ensure it is in a defined state:</p> <pre><code>docker compose restart borgmatic-mailcow\n</code></pre>"},{"location":"en/third_party/borgmatic/third_party-borgmatic/#restoring-from-a-backup","title":"Restoring from a backup","text":"<p>Restoring a backup assumes you are starting off with a fresh installation of mailcow, and you currently do not have any custom data in your maildir or your mailcow database.</p>"},{"location":"en/third_party/borgmatic/third_party-borgmatic/#restore-maildir","title":"Restore maildir","text":"<p>Warning</p> <p>Doing this will overwrite files in your maildir! Do not run this unless you actually intend to recover mail files from a backup.</p> <p>If you use SELinux in Enforcing mode</p> <p>If you are using mailcow on a host with SELinux in Enforcing mode you will have to temporarily disable it during extraction of the archive as the mailcow setup labels the vmail volume as private, belonging to the dovecot container exclusively. SELinux will (rightfully) prevent any other container, such as the borgmatic container, from writing to this volume.</p> <p>Before running a restore you must make the vmail volume writeable in <code>docker-compose.override.yml</code> by removing the <code>ro</code> flag from the volume. Then you can use the following command to restore the maildir from a backup:</p> <pre><code>docker compose exec borgmatic-mailcow borgmatic extract --path mnt/source --archive latest\n</code></pre> <p>Alternatively you can specify any archive name from the list of archives (see Listing all available archives)</p>"},{"location":"en/third_party/borgmatic/third_party-borgmatic/#restore-mysql","title":"Restore MySQL","text":"<p>Warning</p> <p>Running this command will delete and recreate the mailcow database! Do not run this unless you actually intend to recover the mailcow database from a backup.</p> <p>To restore the MySQL database from the latest archive use this command:</p> <pre><code>docker compose exec borgmatic-mailcow borgmatic restore --archive latest\n</code></pre> <p>Alternatively you can specify any archive name from the list of archives (see Listing all available archives)</p>"},{"location":"en/third_party/borgmatic/third_party-borgmatic/#after-restoring","title":"After restoring","text":"<p>After restoring you need to restart mailcow. If you disabled SELinux enforcing mode now would be a good time to re-enable it.</p> <p>To restart mailcow use the follwing command:</p> <pre><code>docker compose down &amp;&amp; docker compose up -d\n</code></pre> <p>If you use SELinux this will also trigger the re-labeling of all files in your vmail volume. Be patient, as this may take a while if you have lots of files.</p>"},{"location":"en/third_party/borgmatic/third_party-borgmatic/#useful-commands","title":"Useful commands","text":""},{"location":"en/third_party/borgmatic/third_party-borgmatic/#manual-archiving-run-with-debugging-output","title":"Manual archiving run (with debugging output)","text":"<pre><code>docker compose exec borgmatic-mailcow borgmatic -v 2\n</code></pre>"},{"location":"en/third_party/borgmatic/third_party-borgmatic/#listing-all-available-archives","title":"Listing all available archives","text":"<pre><code>docker compose exec borgmatic-mailcow borgmatic list\n</code></pre>"},{"location":"en/third_party/borgmatic/third_party-borgmatic/#break-lock","title":"Break lock","text":"<p>When borg is interrupted during an archiving run it will leave behind a stale lock that needs to be cleared before any new operations can be performed:</p> <pre><code>docker compose exec borgmatic-mailcow borg break-lock user@rsync.net:mailcow\n</code></pre> <p>Where <code>user@rsync.net:mailcow</code> is the URI to your repository.</p> <p>Now would be a good time to do a manual archiving run to ensure it can be successfully performed.</p>"},{"location":"en/third_party/borgmatic/third_party-borgmatic/#exporting-keys","title":"Exporting keys","text":"<p>When using any of the <code>keyfile</code> methods for encryption you MUST take care of backing up the key files yourself. The key files are generated when you initialize the repository. The <code>repokey</code> methods store the key file within the repository, so a manual backup isn't as essential.</p> <p>Note that in either case you also must have the passphrase to decrypt any archives.</p> <p>To fetch the keyfile run:</p> <pre><code>docker compose exec borgmatic-mailcow borg key export --paper user@rsync.net:mailcow\n</code></pre> <p>Where <code>user@rsync.net:mailcow</code> is the URI to your repository.</p>"},{"location":"en/third_party/checkmk/u_e-checkmk/","title":"CheckMK","text":"<p>Mailcow provides the ability to check for updates using its own update script.</p> <p>If you want to check for mailcow updates using checkmk, you can create an executable file in the <code>local</code> directory of the checkmk agent (typically <code>/usr/lib/check_mk_agent/local/</code>) with the name <code>mailcow_update</code> and the following content:</p> <pre><code>#!/bin/bash\ncd /opt/mailcow-dockerized/ &amp;&amp; ./update.sh -c &gt;/dev/null\nstatus=$?\nif [ $status -eq 3 ]; then\n echo \"0 \\\"mailcow_update\\\" mailcow_update=0;1;;0;1 No updates available.\"\nelif [ $status -eq 0 ]; then\n echo \"1 \\\"mailcow_update\\\" mailcow_update=1;1;;0;1 Updated code is available.\\nThe changes can be found here: https://github.com/mailcow/mailcow-dockerized/commits/master\"\nelse\n echo \"3 \\\"mailcow_update\\\" - Unknown output from update script ...\"\nfi\nexit\n</code></pre> <p>If the mailcow installation directory is not <code>/opt/</code>, adjust this in the 2nd line.</p> <p>After that re-inventory the services for your mailcow host in checmk and a new check named <code>mailcow_update</code> should be selectable.</p> <p>This will run the <code>mailcow_update</code> everytime checkmk agent is checked, you can cache the result by placing the script in a subfolder named the number of seconds you wish to cache it. \\ <code>/usr/lib/check_mk_agent/local/3600/</code> will cache the response for an 3600 seconds (1 hour).</p>"},{"location":"en/third_party/checkmk/u_e-checkmk/#screenshots","title":"Screenshots","text":""},{"location":"en/third_party/checkmk/u_e-checkmk/#no-updates-available","title":"No updates available","text":"<p>If there are no updates available, <code>OK</code> is displayed.</p>"},{"location":"en/third_party/checkmk/u_e-checkmk/#new-updates-available","title":"New updates available","text":"<p>If updates are available, <code>WARN</code> is displayed.</p> <p>If <code>CRIT</code> is desired instead, replace the 7th line with the following:</p> <pre><code> echo \"2 \\\"mailcow_update\\\" mailcow_update=1;1;;0;1 Updated code is available.\\nThe changes can be found here: https://github.com/mailcow/mailcow-dockerized/commits/master\"\n</code></pre>"},{"location":"en/third_party/checkmk/u_e-checkmk/#detailed-check-output","title":"Detailed check output","text":"<ul> <li>This provides a link to mailcow's GitHub commits, if updates are available.</li> <li>Metrics are also displayed ( not only when updates are available):</li> <li>0 = No updates available</li> <li>1 = New updates available</li> </ul>"},{"location":"en/third_party/exchange_onprem/third_party-exchange_onprem/","title":"Exchange Hybrid Setup","text":"<p>Using Microsoft Exchange in a hybrid setup is possible with mailcow. With this setup you can add mailboxes on your mailcow and still use Exchange Online Protection. All mailboxes setup in Exchange will receive their mails as usual, while with the hybrid approach additional Mailboxes can be setup in mailcow without any further configuration.</p> <p>This setup becomes very handy if you have enabled the Office 365 security defaults and third party applications can no longer login into your mailboxes by any of the supported methods.</p>"},{"location":"en/third_party/exchange_onprem/third_party-exchange_onprem/#requirements","title":"Requirements","text":"<ul> <li>The mx Record of your domain needs to point at the Exchange mail service. Log into your Admin center and look out for the dns settings of your domain to find your personalized gateway domain. It should look like this <code>contoso-com.mail.protection.outlook.com</code>. Contact your domain registrant to get further information on how to change mx record.</li> <li>The domain you want to have additional mailboxes for must be setup as <code>internal relay domain</code> in Exchange.<ol> <li>Log in to your Exchange Admin Center</li> <li>Select the <code>mail flow</code> pane and click on <code>accepted domains</code></li> <li>Select the domain and switch it from <code>authorative</code> to <code>internal relay</code></li> </ol> </li> </ul>"},{"location":"en/third_party/exchange_onprem/third_party-exchange_onprem/#set-up-the-mailcow","title":"Set up the mailcow","text":"<p>Your mailcow needs to relay all mails to your personalized Exchange Host. It is the same host address we already looked up for the mx Record.</p> <ol> <li>Add the domain to your mailcow</li> <li>Add your personalized Exchange Host address as relayhost</li> <li>Add your personalized Exchange Host address as forwarding host to unconditionally accepted all relayed mails from Exchange. (Admin &gt; Configuration &amp; Details &gt; Configuration Dropdown &gt; Forwarding Hosts)</li> <li>Go to the domain settings and select the newly added host on the <code>Sender-dependent transports</code> dropdown. Enable relaying by ticking the <code>Relay this domain</code>, <code>Relay all recipients</code> and the <code>Relay non-existing mailboxes only.</code> checkboxes</li> </ol> <p>Info</p> <p>From now on your mailcow will accept all mails relayed from Exchange. The inbound filtering and so the neural learning of your cow will no longer work. Because all mails are routed through Exchange the filtering process is handled there.</p>"},{"location":"en/third_party/exchange_onprem/third_party-exchange_onprem/#set-up-connectors-in-exchange","title":"Set up Connectors in Exchange","text":"<p>All mail traffic now goes through Exchange. At this point the Exchange Online Protection already filters all incoming and outgoing mails. Now we need to set up two connectors to relay incoming mails from our Exchange Service to the mailcow and another one to allow mails relayed from the mailcow to our exchange service. You can follow the official guide from Microsoft.</p> <p>Warning</p> <p>For the connector that handles mails from your mailcow to Exchange Microsoft offers two ways of authenticating it. The recommended way is to use a tls certificate configured with a subject name that matches an accepted domain in Exchange. Otherwise you need to choose authentication with the static ip address of your mailcow.</p>"},{"location":"en/third_party/exchange_onprem/third_party-exchange_onprem/#validating","title":"Validating","text":"<p>The easiest way to validate the hybrid setup is by sending a mail from the internet to a mailbox that only exists on the mailcow and vice versa.</p>"},{"location":"en/third_party/exchange_onprem/third_party-exchange_onprem/#common-issues","title":"Common Issues","text":"<ul> <li>The connector validation from Exchange to your mailcow failed with <code>550 5.1.10 RESOLVER.ADR.RecipientNotFound; Recipient test@contoso.com not found by SMTP address lookup</code> Possible Solution: Your domain is not set up as <code>internal relay</code>. Exchange therefore cannot find the recipient</li> <li>Mails sent from the mailcow to a mailbox in the internet cannot be sent. Non Delivery Report with error <code>550 5.7.64 TenantAttribution; Relay Access Denied</code> Possible Solution: The authentication method failed. Make sure the certificate subject matches an accepted domain in Exchange. Try authenticating by static ip instead.</li> </ul> <p>Microsoft Guide for the connector setup and additional requirements: https://docs.microsoft.com/exchange/mail-flow-best-practices/use-connectors-to-configure-mail-flow/set-up-connectors-to-route-mail#prerequisites-for-your-on-premises-email-environment</p>"},{"location":"en/third_party/gitea/third_party-gitea/","title":"Gitea","text":"<p>With Gitea' ability to authenticate over SMTP it is trivial to integrate it with mailcow. Few changes are needed:</p> <p>1. Open <code>docker-compose.override.yml</code> and add gitea:</p> <pre><code>version: '2.1'\nservices:\n\n gitea-mailcow:\n image: gitea/gitea:1\n volumes:\n - ./data/gitea:/data\n networks:\n mailcow-network:\n aliases:\n - gitea\n ports:\n - \"${GITEA_SSH_PORT:-127.0.0.1:4000}:22\"\n</code></pre> <p>2. Create <code>data/conf/nginx/site.gitea.custom</code>, add: <pre><code>location /gitea/ {\n proxy_pass http://gitea:3000/;\n}\n</code></pre></p> <p>3. Open <code>mailcow.conf</code> and define the binding you want gitea to use for SSH. Example:</p> <pre><code>GITEA_SSH_PORT=127.0.0.1:4000\n</code></pre> <p>5. Run <code>docker compose up -d</code> to bring up the gitea container and run <code>docker compose restart nginx-mailcow</code> afterwards.</p> <p>6. If you forced mailcow to https, execute step 9 and restart gitea with <code>docker compose restart gitea-mailcow</code> . Go head with step 7 (Remember to use https instead of http, <code>https://mx.example.org/gitea/</code> </p> <p>7. Open <code>http://${MAILCOW_HOSTNAME}/gitea/</code>, for example <code>http://mx.example.org/gitea/</code>. For database details set <code>mysql</code> as database host. Use the value of DBNAME found in mailcow.conf as database name, DBUSER as database user and DBPASS as database password.</p> <p>8. Once the installation is complete, login as admin and set \"settings\" -&gt; \"authorization\" -&gt; \"enable SMTP\". SMTP Host should be <code>postfix</code> with port <code>587</code>, set <code>Skip TLS Verify</code> as we are using an unlisted SAN (\"postfix\" is most likely not part of your certificate).</p> <p>9. Create <code>data/gitea/gitea/conf/app.ini</code> and set following values. You can consult gitea cheat sheet for their meaning and other possible values.</p> <pre><code>[server]\nSSH_LISTEN_PORT = 22\n# For GITEA_SSH_PORT=127.0.0.1:4000 in mailcow.conf, set:\nSSH_DOMAIN = 127.0.0.1\nSSH_PORT = 4000\n# For MAILCOW_HOSTNAME=mx.example.org in mailcow.conf (and default ports for HTTPS), set:\nROOT_URL = https://mx.example.org/gitea/\n</code></pre> <p>10. Restart gitea with <code>docker compose restart gitea-mailcow</code>. Your users should be able to login with mailcow managed accounts.</p>"},{"location":"en/third_party/gogs/third_party-gogs/","title":"Gogs","text":"<p>With Gogs' ability to authenticate over SMTP it is trivial to integrate it with mailcow. Few changes are needed:</p> <p>1. Open <code>docker-compose.override.yml</code> and add Gogs:</p> <pre><code>version: '2.1'\nservices:\n\n gogs-mailcow:\n image: gogs/gogs\n volumes:\n - ./data/gogs:/data\n networks:\n mailcow-network:\n aliases:\n - gogs\n ports:\n - \"${GOGS_SSH_PORT:-127.0.0.1:4000}:22\"\n</code></pre> <p>2. Create <code>data/conf/nginx/site.gogs.custom</code>, add: <pre><code>location /gogs/ {\n proxy_pass http://gogs:3000/;\n}\n</code></pre></p> <p>3. Open <code>mailcow.conf</code> and define the binding you want Gogs to use for SSH. Example:</p> <pre><code>GOGS_SSH_PORT=127.0.0.1:4000\n</code></pre> <p>5. Run <code>docker compose up -d</code> to bring up the Gogs container and run <code>docker compose restart nginx-mailcow</code> afterwards.</p> <p>6. Open <code>http://${MAILCOW_HOSTNAME}/gogs/</code>, for example <code>http://mx.example.org/gogs/</code>. For database details set <code>mysql</code> as database host. Use the value of DBNAME found in mailcow.conf as database name, DBUSER as database user and DBPASS as database password.</p> <p>7. Once the installation is complete, login as admin and set \"settings\" -&gt; \"authorization\" -&gt; \"enable SMTP\". SMTP Host should be <code>postfix</code> with port <code>587</code>, set <code>Skip TLS Verify</code> as we are using an unlisted SAN (\"postfix\" is most likely not part of your certificate).</p> <p>8. Create <code>data/gogs/gogs/conf/app.ini</code> and set following values. You can consult Gogs cheat sheet for their meaning and other possible values.</p> <pre><code>[server]\nSSH_LISTEN_PORT = 22\n# For GOGS_SSH_PORT=127.0.0.1:4000 in mailcow.conf, set:\nSSH_DOMAIN = 127.0.0.1\nSSH_PORT = 4000\n# For MAILCOW_HOSTNAME=mx.example.org in mailcow.conf (and default ports for HTTPS), set:\nROOT_URL = https://mx.example.org/gogs/\n</code></pre> <p>9. Restart Gogs with <code>docker compose restart gogs-mailcow</code>. Your users should be able to login with mailcow managed accounts.</p>"},{"location":"en/third_party/mailman3/third_party-mailman3/","title":"Installing mailcow and Mailman 3 based on dockerized versions","text":"<p>Info</p> <p>This guide is a copy from dockerized-mailcow-mailman. Please post issues, questions and improvements in the issue tracker there.</p> <p>Warning</p> <p>mailcow is not responsible for any data loss, hardware damage or broken keyboards. This guide comes without any warranty. Make backups before starting, 'coze: No backup no pity!</p>"},{"location":"en/third_party/mailman3/third_party-mailman3/#introduction","title":"Introduction","text":"<p>This guide aims to install and configure mailcow-dockerized with docker-mailman and to provide some useful scripts. An essential condition is, to preserve mailcow and Mailman in their own installations for independent updates.</p> <p>There are some guides and projects on the internet, but they are not up to date and/or incomplete in documentation or configuration. This guide is based on the work of:</p> <ul> <li>mailcow-mailman3-dockerized by Shadowghost</li> <li>mailman-mailcow-integration</li> </ul> <p>After finishing this guide, mailcow-dockerized and docker-mailman will run and Apache as a reverse proxy will serve the web frontends.</p> <p>The operating system used is an Ubuntu 20.04 LTS.</p>"},{"location":"en/third_party/mailman3/third_party-mailman3/#installation","title":"Installation","text":"<p>This guide is based on different steps:</p> <ol> <li>DNS setup</li> <li>Install Apache as a reverse proxy</li> <li>Obtain SSL certificates with Let's Encrypt</li> <li>Install mailcow with Mailman integration</li> <li>Install Mailman</li> <li>\ud83c\udfc3 Run</li> </ol>"},{"location":"en/third_party/mailman3/third_party-mailman3/#dns-setup","title":"DNS setup","text":"<p>Most of the configuration is covered by mailcows DNS setup. After finishing this setup add another subdomain for Mailman, e.g. <code>lists.example.org</code> that points to the same server:</p> <pre><code># Name Type Value\nlists IN A 1.2.3.4\nlists IN AAAA dead:beef\n</code></pre>"},{"location":"en/third_party/mailman3/third_party-mailman3/#install-apache-as-a-reverse-proxy","title":"Install Apache as a reverse proxy","text":"<p>Install Apache, e.g. with this guide from Digital Ocean: How To Install the Apache Web Server on Ubuntu 20.04.</p> <p>Activate certain Apache modules (as root or sudo):</p> <pre><code>a2enmod rewrite proxy proxy_http headers ssl wsgi proxy_uwsgi http2\n</code></pre> <p>Maybe you have to install further packages to get these modules. This PPA by Ond\u0159ej Sur\u00fd may help you.</p>"},{"location":"en/third_party/mailman3/third_party-mailman3/#vhost-configuration","title":"vHost configuration","text":"<p>Copy the mailcow.conf and the mailman.conf in the Apache conf folder <code>sites-available</code> (e.g. under <code>/etc/apache2/sites-available</code>).</p> <p>Change in <code>mailcow.conf</code>: - <code>MAILCOW_HOSTNAME</code> to your MAILCOW_HOSTNAME</p> <p>Change in <code>mailman.conf</code>: - <code>MAILMAN_DOMAIN</code> to your Mailman domain (e.g. <code>lists.example.org</code>)</p> <p>Don't activate the configuration, as the ssl certificates and directories are missing yet.</p>"},{"location":"en/third_party/mailman3/third_party-mailman3/#obtain-ssl-certificates-with-lets-encrypt","title":"Obtain SSL certificates with Let's Encrypt","text":"<p>Check if your DNS config is available over the internet and points to the right IP addresses, e.g. with MXToolBox:</p> <ul> <li>https://mxtoolbox.com/SuperTool.aspx?action=a%3aMAILCOW_HOSTNAME</li> <li>https://mxtoolbox.com/SuperTool.aspx?action=aaaa%3aMAILCOW_HOSTNAME</li> <li>https://mxtoolbox.com/SuperTool.aspx?action=a%3aMAILMAN_DOMAIN</li> <li>https://mxtoolbox.com/SuperTool.aspx?action=aaaa%3aMAILMAN_DOMAIN</li> </ul> <p>Install certbot (as root or sudo):</p> <pre><code>apt install certbot\n</code></pre> <p>Get the desired certificates (as root or sudo):</p> <pre><code>certbot certonly -d MAILCOW_HOSTNAME\ncertbot certonly -d MAILMAN_DOMAIN\n</code></pre>"},{"location":"en/third_party/mailman3/third_party-mailman3/#install-mailcow-with-mailman-integration","title":"Install mailcow with Mailman integration","text":""},{"location":"en/third_party/mailman3/third_party-mailman3/#install-mailcow","title":"Install mailcow","text":"<p>Follow the mailcow installation. Omit step 5 and do not pull and up with <code>docker compose</code>!</p>"},{"location":"en/third_party/mailman3/third_party-mailman3/#configure-mailcow","title":"Configure mailcow","text":"<p>This is also Step 4 in the official mailcow installation (<code>nano mailcow.conf</code>). So change to your needs and alter the following variables:</p> <pre><code>HTTP_PORT=18080 # don't use 8080 as mailman needs it\nHTTP_BIND=127.0.0.1 #\nHTTPS_PORT=18443 # you may use 8443\nHTTPS_BIND=127.0.0.1 #\n\nSKIP_LETS_ENCRYPT=y # reverse proxy will do the SSL termination\n\nSNAT_TO_SOURCE=1.2.3.4 # change this to your IPv4\nSNAT6_TO_SOURCE=dead:beef # change this to your global IPv6\n</code></pre>"},{"location":"en/third_party/mailman3/third_party-mailman3/#add-mailman-integration","title":"Add Mailman integration","text":"<p>Create the file <code>/opt/mailcow-dockerized/docker-compose.override.yml</code> (e.g. with <code>nano</code>) and add the following lines:</p> <p><pre><code>version: '2.1'\n\nservices:\n postfix-mailcow:\n volumes:\n - /opt/mailman:/opt/mailman\n networks:\n - docker-mailman_mailman\n\nnetworks:\n docker-mailman_mailman:\n external: true\n</code></pre> The additional volume is used by Mailman to generate additional config files for mailcow postfix. The external network is build and used by Mailman. mailcow needs it to deliver incoming list mails to Mailman.</p> <p>Create the file <code>/opt/mailcow-dockerized/data/conf/postfix/extra.cf</code> (e.g. with <code>nano</code>) and add the following lines:</p> <p><pre><code># mailman\n\nrecipient_delimiter = +\nunknown_local_recipient_reject_code = 550\nowner_request_special = no\n\nlocal_recipient_maps =\n regexp:/opt/mailman/core/var/data/postfix_lmtp,\n proxy:unix:passwd.byname,\n $alias_maps\nvirtual_mailbox_maps =\n proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_mailbox_maps.cf,\n regexp:/opt/mailman/core/var/data/postfix_lmtp\ntransport_maps =\n pcre:/opt/postfix/conf/custom_transport.pcre,\n pcre:/opt/postfix/conf/local_transport,\n proxy:mysql:/opt/postfix/conf/sql/mysql_relay_ne.cf,\n proxy:mysql:/opt/postfix/conf/sql/mysql_transport_maps.cf,\n regexp:/opt/mailman/core/var/data/postfix_lmtp\nrelay_domains =\n proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_relay_domain_maps.cf,\n regexp:/opt/mailman/core/var/data/postfix_domains\nrelay_recipient_maps =\n proxy:mysql:/opt/postfix/conf/sql/mysql_relay_recipient_maps.cf,\n regexp:/opt/mailman/core/var/data/postfix_lmtp\n</code></pre> As we overwrite mailcow postfix configuration here, this step may break your normal mail transports. Check the original configuration files if anything changed.</p>"},{"location":"en/third_party/mailman3/third_party-mailman3/#ssl-certificates","title":"SSL certificates","text":"<p>As we proxying mailcow, we need to copy the SSL certificates into the mailcow file structure. This task will do the script renew-ssl.sh for us:</p> <ul> <li>Copy the file to <code>/opt/mailcow-dockerized</code></li> <li>Change mailcow_HOSTNAME to your mailcow hostname</li> <li>Make it executable (<code>chmod a+x renew-ssl.sh</code>)</li> <li>Do not run it yet, as we first need Mailman</li> </ul> <p>You have to create a cronjob, so that new certificates will be copied. Execute as root or sudo:</p> <pre><code>crontab -e\n</code></pre> <p>To run the script every day at 5am, add:</p> <pre><code>0 5 * * * /opt/mailcow-dockerized/renew-ssl.sh\n</code></pre>"},{"location":"en/third_party/mailman3/third_party-mailman3/#install-mailman","title":"Install Mailman","text":"<p>Basicly follow the instructions at docker-mailman. As they are a lot, here is in a nuthshell what to do:</p> <p>As root or sudo:</p> <pre><code>cd /opt\nmkdir -p mailman/core\nmkdir -p mailman/web\ngit clone https://github.com/maxking/docker-mailman\ncd docker-mailman\n</code></pre>"},{"location":"en/third_party/mailman3/third_party-mailman3/#configure-mailman","title":"Configure Mailman","text":"<p>Create a long key for Hyperkitty, e.g. with the linux command <code>cat /dev/urandom | tr -dc a-zA-Z0-9 | head -c30; echo</code>. Save this key for a moment as HYPERKITTY_KEY.</p> <p>Create a long password for the database, e.g. with the linux command <code>cat /dev/urandom | tr -dc a-zA-Z0-9 | head -c30; echo</code>. Save this password for a moment as DBPASS.</p> <p>Create a long key for Django, e.g. with the linux command <code>cat /dev/urandom | tr -dc a-zA-Z0-9 | head -c30; echo</code>. Save this key for a moment as DJANGO_KEY.</p> <p>Create the file <code>/opt/docker-mailman/docker compose.override.yaml</code> and replace <code>HYPERKITTY_KEY</code>, <code>DBPASS</code> and <code>DJANGO_KEY</code> with the generated values:</p> <pre><code>version: '2'\n\nservices:\n mailman-core:\n environment:\n - DATABASE_URL=postgres://mailman:DBPASS@database/mailmandb\n - HYPERKITTY_API_KEY=HYPERKITTY_KEY\n - TZ=Europe/Berlin\n - MTA=postfix\n restart: always\n networks:\n - mailman\n\n mailman-web:\n environment:\n - DATABASE_URL=postgres://mailman:DBPASS@database/mailmandb\n - HYPERKITTY_API_KEY=HYPERKITTY_KEY\n - TZ=Europe/Berlin\n - SECRET_KEY=DJANGO_KEY\n - SERVE_FROM_DOMAIN=MAILMAN_DOMAIN # e.g. lists.example.org\n - MAILMAN_ADMIN_USER=admin # the admin user\n - MAILMAN_ADMIN_EMAIL=admin@example.org # the admin mail address\n - UWSGI_STATIC_MAP=/static=/opt/mailman-web-data/static\n restart: always\n\n database:\n environment:\n - POSTGRES_PASSWORD=DBPASS\n restart: always\n</code></pre> <p>At <code>mailman-web</code> fill in correct values for <code>SERVE_FROM_DOMAIN</code> (e.g. <code>lists.example.org</code>), <code>MAILMAN_ADMIN_USER</code> and <code>MAILMAN_ADMIN_EMAIL</code>. You need the admin credentials to log into the web interface (Postorius). For setting the password for the first time use the Forgot password function in the web interface.</p> <p>About other configuration options read Mailman-web and Mailman-core documentation.</p>"},{"location":"en/third_party/mailman3/third_party-mailman3/#configure-mailman-core-and-mailman-web","title":"Configure Mailman core and Mailman web","text":"<p>Create the file <code>/opt/mailman/core/mailman-extra.cfg</code> with the following content. <code>mailman@example.org</code> should be pointing to a valid mail box or redirection.</p> <pre><code>[mailman]\ndefault_language: de\nsite_owner: mailman@example.org\n</code></pre> <p>Create the file <code>/opt/mailman/web/settings_local.py</code> with the following content. <code>mailman@example.org</code> should be pointing to a valid mail box or redirection.</p> <p><pre><code># locale\nLANGUAGE_CODE = 'de-de'\n\n# disable social authentication\nMAILMAN_WEB_SOCIAL_AUTH = []\n\n# change it\nDEFAULT_FROM_EMAIL = 'mailman@example.org'\n\nDEBUG = False\n</code></pre> You can change <code>LANGUAGE_CODE</code> and <code>SOCIALACCOUNT_PROVIDERS</code> to your needs.</p>"},{"location":"en/third_party/mailman3/third_party-mailman3/#run","title":"\ud83c\udfc3 Run","text":"<p>Run (as root or sudo)</p> <pre><code>a2ensite mailcow.conf\na2ensite mailman.conf\nsystemctl restart apache2\n\ncd /opt/docker-mailman\ndocker compose pull\ndocker compose up -d\n\ncd /opt/mailcow-dockerized/\ndocker compose pull\n./renew-ssl.sh\n</code></pre> <p>Wait a few minutes! The containers have to create there databases and config files. This can last up to 1 minute and more.</p>"},{"location":"en/third_party/mailman3/third_party-mailman3/#remarks","title":"Remarks","text":""},{"location":"en/third_party/mailman3/third_party-mailman3/#new-lists-arent-recognized-by-postfix-instantly","title":"New lists aren't recognized by postfix instantly","text":"<p>When you create a new list and try to immediately send an e-mail, postfix responses with <code>User doesn't exist</code>, because postfix won't deliver it to Mailman yet. The configuration at <code>/opt/mailman/core/var/data/postfix_lmtp</code> is not instantly updated. If you need the list instantly, restart postifx manually:</p> <pre><code>cd /opt/mailcow-dockerized\ndocker compose restart postfix-mailcow\n</code></pre>"},{"location":"en/third_party/mailman3/third_party-mailman3/#update","title":"Update","text":"<p>mailcow has it's own update script in <code>/opt/mailcow-dockerized/update.sh</code>, see the docs.</p> <p>For Mailman just fetch the newest version from the github repository.</p>"},{"location":"en/third_party/mailman3/third_party-mailman3/#backup","title":"Backup","text":"<p>mailcow has an own backup script. Read the docs for further informations.</p> <p>Mailman won't state backup instructions in the README.md. In the gitbucket of pgollor is a script that may be helpful.</p>"},{"location":"en/third_party/mailman3/third_party-mailman3/#todo","title":"ToDo","text":""},{"location":"en/third_party/mailman3/third_party-mailman3/#install-script","title":"install script","text":"<p>Write a script like in mailman-mailcow-integration/mailman-install.sh as many of the steps are automatable.</p> <ol> <li>Ask for all the configuration variables and create passwords and keys.</li> <li>Do a (semi-)automatic installation.</li> <li>Have fun!</li> </ol>"},{"location":"en/third_party/mailpiler/third_party-mailpiler_integration/","title":"Mailpiler Integration","text":"<p>This is a simple integration of mailcow aliases and the mailbox name into mailpiler when using IMAP authentication.</p> <p>Disclaimer: This is not officially maintained nor supported by the mailcow project nor its contributors. No warranty or support is being provided, however you're free to open issues on GitHub for filing a bug or provide further ideas. GitHub repo can be found here.</p> <p>Info</p> <p>Support for domain wildcards were implemented in Piler 1.3.10 which was released on 03.01.2021. Prior versions basically do work, but after logging in you won't see emails sent from or to the domain alias. (e.g. when @example.com is an alias for admin@example.com)</p>"},{"location":"en/third_party/mailpiler/third_party-mailpiler_integration/#the-problem-to-solve","title":"The problem to solve","text":"<p>mailpiler offers the authentication based on IMAP, for example:</p> <pre><code>$config['ENABLE_IMAP_AUTH'] = 1;\n$config['IMAP_HOST'] = 'mail.example.com';\n$config['IMAP_PORT'] = 993;\n$config['IMAP_SSL'] = true;\n</code></pre> <ul> <li>So when you log in using <code>patrik@example.com</code>, you will only see delivered emails sent from or to this specific email address.</li> <li>When additional aliases are defined in mailcow, like <code>team@example.com</code>, you won't see emails sent to or from this email address even the fact you're a recipient of mails sent to this alias address.</li> </ul> <p>By hooking into the authentication process of mailpiler, we are able to get required data via the mailcow API during login. This fires API requests to the mailcow API (requiring read-only API access) to read out the aliases your email address participates and also the \"Name\" of the mailbox specified to display it on the top-right of mailpiler after login.</p> <p>Permitted email addresses can be seen in the mailpiler settings top-right after logging in.</p> <p>Info</p> <p>This is only pulled once during the authentication process. The authorized aliases and the realname are valid for the whole duration of the user session as mailpiler sets them in the session data. If user is removed from specific alias, this will only take effect after next login.</p>"},{"location":"en/third_party/mailpiler/third_party-mailpiler_integration/#the-solution","title":"The solution","text":"<p>Note: File paths might vary depending on your setup.</p>"},{"location":"en/third_party/mailpiler/third_party-mailpiler_integration/#requirements","title":"Requirements","text":"<ul> <li>A working mailcow instance</li> <li>A working mailpiler instance (You can find an installation guide here, check supported versions here)</li> <li>An mailcow API key (read-only works just fine): <code>Configuration &amp; Details - Access - Read-Only Access</code>. Don't forget to allow API access from your mailpiler IP.</li> </ul> <p>Warning</p> <p>As mailpiler authenticates against mailcow, our IMAP server, failed logins of users or bots might trigger a block for your mailpiler instance. Therefore you might want to consider whitelisting the IP address of the mailpiler instance within mailcow: <code>Configuration &amp; Details - Configuration - Fail2ban parameters - Whitelisted networks/hosts</code>.</p>"},{"location":"en/third_party/mailpiler/third_party-mailpiler_integration/#setup","title":"Setup","text":"<ol> <li> <p>Set the custom query function of mailpiler and append this to <code>/usr/local/etc/piler/config-site.php</code>:</p> <pre><code>$config['MAILCOW_API_KEY'] = 'YOUR_READONLY_API_KEY';\n$config['MAILCOW_SET_REALNAME'] = true; // when not specified, then default is false\n$config['CUSTOM_EMAIL_QUERY_FUNCTION'] = 'query_mailcow_for_email_access';\ninclude('auth-mailcow.php');\n</code></pre> <p>You can also change the mailcow hostname, if required: <pre><code>$config['MAILCOW_HOST'] = 'mail.domain.tld'; // defaults to $config['IMAP_HOST']\n</code></pre></p> </li> <li> <p>Download the PHP file with the functions from the GitHub repo:</p> <pre><code>curl -o /usr/local/etc/piler/auth-mailcow.php https://raw.githubusercontent.com/patschi/mailpiler-mailcow-integration/master/auth-mailcow.php\n</code></pre> </li> <li> <p>Done!</p> </li> </ol> <p>Make sure to re-login with your IMAP credentials for changes to take effect.</p> <p>If it doesn't work, most likely something's wrong with the API query itself. Consider debugging by sending manual API requests to the API. (Tip: Open <code>https://mail.domain.tld/api</code> on your instance)</p>"},{"location":"en/third_party/nextcloud/third_party-nextcloud/","title":"Nextcloud","text":""},{"location":"en/third_party/nextcloud/third_party-nextcloud/#manage-nextcloud-using-the-helper-script","title":"Manage Nextcloud using the helper script","text":"<p>Nextcloud can be set up (parameter <code>-i</code>) and removed (parameter <code>-p</code>) with the helper script included with mailcow. In order to install Nextcloud simply navigate to your mailcow-dockerized root folder and run the helper script as follows:</p> <p><code>./helper-scripts/nextcloud.sh -i</code></p> <p>In case you have forgotten the password (e.g. for admin) and can't request a new one via the password reset link on the login screen calling the helper script with <code>-r</code> as parameter allows you to set a new password. Only use this option if your Nextcloud isn't configured to use mailcow for authentication as described in the next section.</p> <p>In order for mailcow to generate a a certificate for the nextcloud domain you need to add \"nextcloud.domain.tld\" to ADDITIONAL_SAN in mailcow.conf and run <code>docker compose up -d</code> to apply. For more informaton refer to: Advanced SSL.</p>"},{"location":"en/third_party/nextcloud/third_party-nextcloud/#background-jobs","title":"Background jobs","text":"<p>To use the recommended setting (cron) to execute the background jobs following lines need to be added to the <code>docker-compose.override.yml</code>:</p> <pre><code>version: '2.1'\nservices:\n php-fpm-mailcow:\n labels:\n ofelia.enabled: \"true\"\n ofelia.job-exec.nextcloud-cron.schedule: \"@every 5m\"\n ofelia.job-exec.nextcloud-cron.command: \"su www-data -s /bin/bash -c \\\"/usr/local/bin/php -f /web/nextcloud/cron.php\\\"\"\n</code></pre> <p>After adding these lines the <code>docker compose up -d</code> command must be executed to update the docker image and also the docker scheduler image must be restarted to pick up the new job definition by executing <code>docker compose restart ofelia-mailcow</code>. To check if the job was successfully picked up by <code>ofelia</code> the command <code>docker compose logs ofelia-mailcow</code> will contain a line similar to <code>New job registered \"nextcloud-cron\" - ...</code>.</p> <p>By adding these lines the background jobs will be executed every 5 minutes. To verify that the execution works correctly, the only way is to see it in the basic settings when logged in as an admin in Nextcloud. If everything is correct the first scheduled execution will change the background jobs processing setting to <code>(X) Cron</code> and the timestamp after <code>Last job ran</code> will be updated every 5 minutes.</p>"},{"location":"en/third_party/nextcloud/third_party-nextcloud/#configure-nextcloud-to-use-mailcow-for-authentication","title":"Configure Nextcloud to use mailcow for authentication","text":"<p>The following describes how set up authentication via mailcow using the OAuth2 protocol. We will only assume that you have already set up Nextcloud at cloud.example.com and that your mailcow is running at mail.example.com. It does not matter if your Nextcloud is running on a different server, you can still use mailcow for authentication.</p> <p>1. Log into mailcow as administrator.</p> <p>2. Scroll down to OAuth2 Apps and click the Add button. Specify the redirect URI as <code>https://cloud.example.com/index.php/apps/sociallogin/custom_oauth2/Mailcow</code> and click Add. Save the client ID and secret for later.</p> <p>Info</p> <p>Some installations, including those setup using the helper script of mailcow, need to remove index.php/ from the URL to get a successful redirect: <code>https://cloud.example.com/apps/sociallogin/custom_oauth2/Mailcow</code></p> <p>3. Log into Nextcloud as administrator.</p> <p>4. Click the button in the top right corner and select Apps. Click the search button in the toolbar, search for the Social Login plugin and click Download and enable next to it.</p> <p>5. Click the button in the top right corner and select Settings. Scroll down to the Administration section on the left and click Social login.</p> <p>6. Uncheck the following items:</p> <ul> <li>\"Disable auto create new users\"</li> <li>\"Allow users to connect social logins with their accounts\"</li> <li>\"Do not prune not available user groups on login\"</li> <li>\"Automatically create groups if they do not exists\"</li> <li>\"Restrict login for users without mapped groups\"</li> </ul> <p>7. Check the following items:</p> <ul> <li>\"Prevent creating an account if the email address exists in another account\"</li> <li>\"Update user profile every login\"</li> <li>\"Disable notify admins about new users\"</li> </ul> <p>Click the Save button.</p> <p>8. Scroll down to Custom OAuth2 and click the + button. 9. Configure the parameters as follows:</p> <ul> <li>Internal name: <code>Mailcow</code></li> <li>Title: <code>Mailcow</code></li> <li>API Base URL: <code>https://mail.example.com</code></li> <li>Authorize URL: <code>https://mail.example.com/oauth/authorize</code></li> <li>Token URL: <code>https://mail.example.com/oauth/token</code></li> <li>Profile URL: <code>https://mail.example.com/oauth/profile</code></li> <li>Logout URL: (leave blank)</li> <li>Client ID: (what you obtained in step 1)</li> <li>Client Secret: (what you obtained in step 1)</li> <li>Scope: <code>profile</code></li> </ul> <p>Click the Save button at the very bottom of the page.</p> <p>If you have previously used Nextcloud with mailcow authentication via user_external/IMAP, you need to perform some additional steps to link your existing user accounts with OAuth2.</p> <p>1. Click the button in the top right corner and select Apps. Scroll down to the External user authentication app and click Remove next to it. 2. Run the following queries in your Nextcloud database (if you set up Nextcloud using mailcow's script, you can run <code>source mailcow.conf &amp;&amp; docker compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME</code>): <pre><code>INSERT INTO nc_users (uid, uid_lower) SELECT DISTINCT uid, LOWER(uid) FROM nc_users_external;\nINSERT INTO nc_sociallogin_connect (uid, identifier) SELECT DISTINCT uid, CONCAT(\"Mailcow-\", uid) FROM nc_users_external;\n</code></pre></p> <p>If you have previously used Nextcloud without mailcow authentication, but with the same usernames as mailcow, you can also link your existing user accounts with OAuth2.</p> <p>1. Run the following queries in your Nextcloud database (if you set up Nextcloud using mailcow's script, you can run <code>source mailcow.conf &amp;&amp; docker compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME</code>): <pre><code>INSERT INTO nc_sociallogin_connect (uid, identifier) SELECT DISTINCT uid, CONCAT(\"Mailcow-\", uid) FROM nc_users;\n</code></pre></p>"},{"location":"en/third_party/nextcloud/third_party-nextcloud/#update","title":"Update","text":"<p>The Nextcloud instance can be updated easily with the web update mechanism. In the case of larger updates, there may be further changes to be made after the update. After the Nextcloud instance has been checked, problems are shown. This can be e.g. missing indices in the DB or similar. It shows which commands have to be executed, these have to be placed in the php-fpm-mailcow container.</p> <p>As an an example run the following command to add the missing indices. <code>docker exec -it -u www-data $(docker ps -f name=php-fpm-mailcow -q) bash -c \"php /web/nextcloud/occ db:add-missing-indices\"</code></p>"},{"location":"en/third_party/nextcloud/third_party-nextcloud/#debugging-troubleshooting","title":"Debugging &amp; Troubleshooting","text":"<p>It may happen that you cannot reach the Nextcloud instance from your network. This may be due to the fact that the entry of your subnet in the array 'trusted_proxies' is missing. You can make changes in the Nextcloud config.php in <code>data/web/nextcloud/config/*</code>.</p> <pre><code>'trusted_proxies' =&gt;\n array (\n 0 =&gt; 'fd4d:6169:6c63:6f77::/64',\n 1 =&gt; '172.22.1.0/24',\n 2 =&gt; 'NewSubnet/24',\n ),\n</code></pre> <p>After the changes have been made, the nginx container must be restarted. <code>docker compose restart nginx-mailcow</code></p>"},{"location":"en/third_party/portainer/third_party-portainer/","title":"Portainer","text":"<p>In order to enable Portainer, the docker-compose.yml and site.conf for Nginx must be modified.</p> <p>1. Create a new file <code>docker-compose.override.yml</code> in the mailcow-dockerized root folder and insert the following configuration <pre><code>version: '2.1'\nservices:\n portainer-mailcow:\n image: portainer/portainer-ce\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock\n - ./data/conf/portainer:/data\n restart: always\n dns:\n - 172.22.1.254\n dns_search: mailcow-network\n networks:\n mailcow-network:\n aliases:\n - portainer\n</code></pre> 2a. Create <code>data/conf/nginx/portainer.conf</code>: <pre><code>upstream portainer {\n server portainer-mailcow:9000;\n}\n\nmap $http_upgrade $connection_upgrade {\n default upgrade;\n '' close;\n}\n</code></pre></p> <p>2b. Insert a new location to the default mailcow site by creating the file <code>data/conf/nginx/site.portainer.custom</code>: <pre><code> location /portainer/ {\n proxy_http_version 1.1;\n proxy_set_header Host $http_host; # required for docker client's sake\n proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n proxy_read_timeout 900;\n\n proxy_set_header Connection \"\";\n proxy_buffers 32 4k;\n proxy_pass http://portainer/;\n }\n\n location /portainer/api/websocket/ {\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection $connection_upgrade;\n proxy_pass http://portainer/api/websocket/;\n }\n</code></pre></p> <p>3. Apply your changes: <pre><code>docker compose up -d &amp;&amp; docker compose restart nginx-mailcow\n</code></pre></p> <p>Now you can simply navigate to https://${MAILCOW_HOSTNAME}/portainer/ to view your Portainer container monitoring page. You\u2019ll then be prompted to specify a new password for the admin account. After specifying your password, you\u2019ll then be able to connect to the Portainer UI.</p>"},{"location":"en/third_party/portainer/third_party-portainer/#reverse-proxy","title":"Reverse Proxy","text":"<p>If you are using a reverse proxy you will have to configure it to properly forward websocket requests.</p> <p>This needs to be done for the docker console and other components to work.</p> <p>Here is an example for Apache:</p> <pre><code>&lt;Location /portainer/api/websocket/&gt;\n RewriteEngine on\n RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]\n RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]\n RewriteRule /portainer/api/websocket/(.*) ws://127.0.0.1:8080/portainer/api/websocket/$1 [P]\n&lt;/Location&gt;\n</code></pre>"},{"location":"en/third_party/roundcube/third_party-roundcube/","title":"Roundcube","text":""},{"location":"en/third_party/roundcube/third_party-roundcube/#installing-roundcube","title":"Installing Roundcube","text":"<p>Download Roundcube 1.6.x to the web htdocs directory and extract it (here <code>rc/</code>): <pre><code># Check for a newer release!\ncd data/web\nwget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz | tar xfvz -\n\n# Change folder name\nmv roundcubemail-1.6.0 rc\n\n# Change permissions\nchown -R root: rc/\n</code></pre></p> <p>If you need spell check features, create a file <code>data/hooks/phpfpm/aspell.sh</code> with the following content, then <code>chmod +x data/hooks/phpfpm/aspell.sh</code>. This installs a local spell check engine. Note, most modern web browsers have built in spell check, so you may not want/need this. <pre><code>#!/bin/bash\napk update\napk add aspell-en # or any other language\n</code></pre></p> <p>Create a file <code>data/web/rc/config/config.inc.php</code> with the following content. - Change the <code>des_key</code> parameter to a random value. It is used to temporarily store your IMAP password. - The <code>db_prefix</code> is optional but recommended. - If you didn't install spell check in the above step, remove <code>spellcheck_engine</code> parameter and replace it with <code>$config['enable_spellcheck'] = false;</code>. <pre><code>&lt;?php\nerror_reporting(0);\nif (!file_exists('/tmp/mime.types')) {\nfile_put_contents(\"/tmp/mime.types\", fopen(\"http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types\", 'r'));\n}\n$config = array();\n$config['db_dsnw'] = 'mysql://' . getenv('DBUSER') . ':' . getenv('DBPASS') . '@mysql/' . getenv('DBNAME');\n$config['imap_host'] = 'tls://dovecot:143';\n$config['smtp_host'] = 'tls://postfix:587';\n$config['smtp_user'] = '%u';\n$config['smtp_pass'] = '%p';\n$config['support_url'] = '';\n$config['product_name'] = 'Roundcube Webmail';\n$config['des_key'] = 'yourrandomstring_changeme';\n$config['log_dir'] = '/dev/null';\n$config['temp_dir'] = '/tmp';\n$config['plugins'] = array(\n 'archive',\n 'managesieve'\n);\n$config['spellcheck_engine'] = 'aspell';\n$config['mime_types'] = '/tmp/mime.types';\n$config['imap_conn_options'] = array(\n 'ssl' =&gt; array('verify_peer' =&gt; false, 'verify_peer_name' =&gt; false, 'allow_self_signed' =&gt; true)\n);\n$config['enable_installer'] = true;\n$config['smtp_conn_options'] = array(\n 'ssl' =&gt; array('verify_peer' =&gt; false, 'verify_peer_name' =&gt; false, 'allow_self_signed' =&gt; true)\n);\n$config['db_prefix'] = 'mailcow_rc1';\n</code></pre></p> <p>Point your browser to <code>https://myserver/rc/installer</code> and follow the instructions. Initialize the database and leave the installer.</p> <p>Delete the directory <code>data/web/rc/installer</code> after a successful installation!</p>"},{"location":"en/third_party/roundcube/third_party-roundcube/#configure-managesieve-filtering","title":"Configure ManageSieve filtering","text":"<p>Open <code>data/web/rc/config/config.inc.php</code> and change the following parameters (or add them at the bottom of that file): <pre><code>$config['managesieve_host'] = 'tls://dovecot:4190';\n$config['managesieve_conn_options'] = array(\n 'ssl' =&gt; array('verify_peer' =&gt; false, 'verify_peer_name' =&gt; false, 'allow_self_signed' =&gt; true)\n);\n// Enables separate management interface for vacation responses (out-of-office)\n// 0 - no separate section (default),\n// 1 - add Vacation section,\n// 2 - add Vacation section, but hide Filters section\n$config['managesieve_vacation'] = 1;\n</code></pre></p>"},{"location":"en/third_party/roundcube/third_party-roundcube/#enable-change-password-function-in-roundcube","title":"Enable change password function in Roundcube","text":"<p>Open <code>data/web/rc/config/config.inc.php</code> and enable the password plugin:</p> <pre><code>...\n$config['plugins'] = array(\n 'archive',\n 'password',\n);\n...\n</code></pre> <p>Open <code>data/web/rc/plugins/password/password.php</code>, search for <code>case 'ssha':</code> and add above:</p> <pre><code> case 'ssha256':\n $salt = rcube_utils::random_bytes(8);\n $crypted = base64_encode( hash('sha256', $password . $salt, TRUE ) . $salt );\n $prefix = '{SSHA256}';\n break;\n</code></pre> <p>Open <code>data/web/rc/plugins/password/config.inc.php</code> and change the following parameters (or add them at the bottom of that file):</p> <pre><code>$config['password_driver'] = 'sql';\n$config['password_algorithm'] = 'ssha256';\n$config['password_algorithm_prefix'] = '{SSHA256}';\n$config['password_query'] = \"UPDATE mailbox SET password = %P WHERE username = %u\";\n</code></pre>"},{"location":"en/third_party/roundcube/third_party-roundcube/#integrate-carddav-addressbooks-in-roundcube","title":"Integrate CardDAV addressbooks in Roundcube","text":"<p>Download the latest release of RCMCardDAV to the Roundcube plugin directory and extract it (here <code>rc/plugins</code>): <pre><code>cd data/web/rc/plugins\nwget -O - https://github.com/mstilkerich/rcmcarddav/releases/download/v4.4.1/carddav-v4.4.1-roundcube16.tar.gz | tar xfvz -\nchown -R root: carddav/\n</code></pre></p> <p>Copy the file <code>config.inc.php.dist</code> to <code>config.inc.php</code> (here in <code>rc/plugins/carddav</code>) and append the following preset to the end of the file - don't forget to replace <code>mx.example.org</code> with your own hostname: <pre><code>$prefs['SOGo'] = array(\n 'name' =&gt; 'SOGo',\n 'username' =&gt; '%u',\n 'password' =&gt; '%p',\n 'url' =&gt; 'https://mx.example.org/SOGo/dav/%u/',\n 'carddav_name_only' =&gt; true,\n 'use_categories' =&gt; true,\n 'active' =&gt; true,\n 'readonly' =&gt; false,\n 'refresh_time' =&gt; '02:00:00',\n 'fixed' =&gt; array( 'active', 'name', 'username', 'password', 'refresh_time' ),\n 'hide' =&gt; false,\n);\n</code></pre> Please note, that this preset only integrates the default addressbook (the one that's named \"Personal Address Book\" and can't be deleted). Additional addressbooks are currently not automatically detected but can be manually added within the roundecube settings.</p> <p>Enable the plugin by adding <code>carddav</code> to <code>$config['plugins']</code> in <code>rc/config/config.inc.php</code>.</p> <p>If you want to remove the default addressbooks (stored in the Roundcube database), so that only the CardDAV addressbooks are accessible, append <code>$config['address_book_type'] = '';</code> to the config file <code>data/web/rc/config/config.inc.php</code>.</p> <p>Optionally, you can add Roundcube's link to the mailcow Apps list. To do this, open or create <code>data/web/inc/vars.local.inc.php</code> and add the following code-block:</p> <p>NOTE: Don't forget to add the <code>&lt;?php</code> delimiter on the first line</p> <pre><code>...\n$MAILCOW_APPS = array(\n array(\n 'name' =&gt; 'SOGo',\n 'link' =&gt; '/SOGo/'\n ),\n array(\n 'name' =&gt; 'Roundcube',\n 'link' =&gt; '/rc/'\n )\n);\n...\n</code></pre>"},{"location":"en/third_party/roundcube/third_party-roundcube/#upgrading-roundcube","title":"Upgrading Roundcube","text":"<p>Upgrading Roundcube is rather simple, go to the Github releases page for Roundcube and get the link for the \"complete.tar.gz\" file for the wanted release. Then follow the below commands and change the URL and Roundcube folder name if needed. </p> <pre><code># Enter a bash session of the mailcow PHP container\ndocker exec -it mailcowdockerized-php-fpm-mailcow-1 bash\n\n# Install required upgrade dependency, then upgrade Roundcube to wanted release\napk add rsync\ncd /tmp\nwget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz | tar xfvz -\ncd roundcubemail-1.6.0\nbin/installto.sh /web/rc\n\n# Type 'Y' and press enter to upgrade your install of Roundcube\n# Type 'N' to \"Do you want me to fix your local configuration\" if prompted\n\n# If you see \"NOTICE: Update dependencies by running php composer.phar update --no-dev\" just download composer.phar and run it:\ncd /web/rc\nwget https://getcomposer.org/download/2.4.2/composer.phar\nphp composer.phar update --no-dev\n# When asked \"Do you trust \"roundcube/plugin-installer\" to execute code and wish to enable it now? (writes \"allow-plugins\" to composer.json) [y,n,d,?] \" hit y and continue.\n\n\n# Remove leftover files\ncd /tmp\nrm -rf roundcube*\n\n# If you're going from 1.5 to 1.6 please run the config file changes below\nsed -i \"s/\\$config\\['default_host'\\].*$/\\$config\\['imap_host'\\]\\ =\\ 'tls:\\/\\/dovecot:143'\\;/\" /web/rc/config/config.inc.php\nsed -i \"/\\$config\\['default_port'\\].*$/d\" /web/rc/config/config.inc.php\nsed -i \"s/\\$config\\['smtp_server'\\].*$/\\$config\\['smtp_host'\\]\\ =\\ 'tls:\\/\\/postfix:587'\\;/\" /web/rc/config/config.inc.php\nsed -i \"/\\$config\\['smtp_port'\\].*$/d\" /web/rc/config/config.inc.php\nsed -i \"s/\\$config\\['managesieve_host'\\].*$/\\$config\\['managesieve_host'\\]\\ =\\ 'tls:\\/\\/dovecot:4190'\\;/\" /web/rc/config/config.inc.php\nsed -i \"/\\$config\\['managesieve_port'\\].*$/d\" /web/rc/config/config.inc.php\n</code></pre>"},{"location":"en/third_party/roundcube/third_party-roundcube/#let-admins-log-into-roundcube-without-password","title":"Let admins log into Roundcube without password","text":"<p>First, install plugin dovecot_impersonate and add Roundcube as an app (see above).</p> <p>Edit <code>mailcow.conf</code> and add the following:</p> <pre><code># Allow admins to log into Roundcube as email user (without any password)\n# Roundcube with plugin dovecot_impersonate must be installed first\n\nALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE=y\n</code></pre> <p>Edit <code>docker-compose.override.yml</code> and crate/extend the section for <code>php-fpm-mailcow</code>:</p> <pre><code>version: '2.1'\nservices:\n php-fpm-mailcow:\n environment:\n - ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE=${ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE:-n}\n</code></pre> <p>Edit <code>data/web/js/site/mailbox.js</code> and the following code after <code>if (ALLOW_ADMIN_EMAIL_LOGIN) { ... }</code></p> <pre><code>if (ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE) {\n item.action += '&lt;a href=\"/rc-auth.php?login=' + encodeURIComponent(item.username) + '\" class=\"login_as btn btn-xs ' + btnSize + ' btn-primary\" target=\"_blank\"&gt;&lt;i class=\"bi bi-envelope-fill\"&gt;&lt;/i&gt; Roundcube&lt;/a&gt;';\n}\n</code></pre> <p>Edit <code>data/web/mailbox.php</code> and add this line to array <code>$template_data</code>:</p> <pre><code> 'allow_admin_email_login_roundcube' =&gt; (preg_match(\"/^(yes|y)+$/i\", $_ENV[\"ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE\"])) ? 'true' : 'false',\n</code></pre> <p>Edit <code>data/web/templates/mailbox.twig</code> and add this code to the bottom of the javascript section:</p> <pre><code> var ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE = {{ allow_admin_email_login_roundcube }};\n</code></pre> <p>Copy the contents of the following files from this Snippet:</p> <ul> <li><code>data/web/inc/lib/RoundcubeAutoLogin.php</code></li> <li><code>data/web/rc-auth.php</code></li> </ul> <p>Finally, restart mailcow</p> <pre><code>docker compose down\ndocker compose up -d\n</code></pre>"},{"location":"en/troubleshooting/debug-admin_login_sogo/","title":"Admin login to SOGo","text":"<p>This is an experimental feature that allows admins and domain admins to directly log into SOGo as a mailbox user, without knowing the users password.</p> <p>For this, an additional link to SOGo is displayed in the mailbox list (mailcow UI).</p> <p>Multiple concurrent admin-logins to different mailboxes are also possible when using this feature.</p>"},{"location":"en/troubleshooting/debug-admin_login_sogo/#enabling-the-feature","title":"Enabling the feature","text":"<p>The feature is disabled by default. It can be enabled in the <code>mailcow.conf</code> by setting: <pre><code>ALLOW_ADMIN_EMAIL_LOGIN=y\n</code></pre> and recreating the affected containers with <pre><code>docker compose up -d\n</code></pre></p>"},{"location":"en/troubleshooting/debug-admin_login_sogo/#drawbacks-when-enabled","title":"Drawbacks when enabled","text":"<ul> <li>Each SOGo page-load and each Active-Sync request will cause an additional execution of an internal PHP script. This might impact load-times of SOGo / EAS. In most cases, this should not be noticeable but should be kept in mind if you face any performance issues.</li> <li>SOGo will not display a logout link for admin-logins, to login normally one has to logout from the mailcow UI so the PHP session is destroyed.</li> <li>Subscribing to another user's calendar or address book while logged in as admin does not work. Neither does inviting other users to calendar events. The page will reload when these things are attempted.</li> </ul>"},{"location":"en/troubleshooting/debug-admin_login_sogo/#technical-details","title":"Technical details","text":"<p>SOGoTrustProxyAuthentication option is set to YES which makes SOGo trust the x-webobjects-remote-user header.</p> <p>Dovecot will receive a random master-password which is valid for all mailboxes when used by the SOGo container.</p> <p>Clicking on the SOGo button in the mailbox list will open sogo-auth.php which checks permissions, sets session variables and redirects to the SOGo mailbox.</p> <p>Each SOGo, CardDAV, CalDAV and EAS http request will cause an additional, nginx internal auth_request call to sogo-auth.php with the following behavior:</p> <ul> <li> <p>If a basic_auth header is present, the script will validate the credentials in place of SOGo and provide the following headers: <code>x-webobjects-remote-user</code>, <code>Authorization</code> and <code>x-webobjects-auth-type</code>.</p> </li> <li> <p>If no basic_auth header is present, the script will check for an active mailcow admin session for the requested email user and provide the same headers but with the dovecot master password used in the <code>Authorization</code> header.</p> </li> <li> <p>If both fails the headers will be set empty, which makes SOGo use its standard authentication methods.</p> </li> </ul> <p>All of these options / behaviors are disabled if the <code>ALLOW_ADMIN_EMAIL_LOGIN</code> is not enabled in the config.</p>"},{"location":"en/troubleshooting/debug-attach_service/","title":"Attach to a Container","text":""},{"location":"en/troubleshooting/debug-attach_service/#attaching-a-container-to-your-shell","title":"Attaching a Container to your Shell","text":"<p>To attach a container to your shell you can simply run</p> <pre><code>docker compose exec $Service_Name /bin/bash\n</code></pre>"},{"location":"en/troubleshooting/debug-attach_service/#connecting-to-services","title":"Connecting to Services","text":"<p>If you want to connect to a service / application directly it is always a good idea to <code>source mailcow.conf</code> to get all relevant variables into your environment.</p>"},{"location":"en/troubleshooting/debug-attach_service/#mysql","title":"MySQL","text":"<pre><code>source mailcow.conf\ndocker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}\n</code></pre>"},{"location":"en/troubleshooting/debug-attach_service/#redis","title":"Redis","text":"<pre><code>docker compose exec redis-mailcow redis-cli\n</code></pre>"},{"location":"en/troubleshooting/debug-attach_service/#service-descriptions","title":"Service Descriptions","text":"<p>Here is a brief overview of what container / service does what:</p> Service Name Service Descriptions unbound-mailcow Local (DNSSEC) DNS Resolver mysql-mailcow Stores SOGo's and most of mailcow's settings postfix-mailcow Receives and sends mails dovecot-mailcow User logins and sieve filter redis-mailcow Storage back-end for DKIM keys and Rspamd rspamd-mailcow Mail filtering system. Used for av handling, dkim signing, spam handling clamd-mailcow Scans attachments for viruses olefy-mailcow Scans attached office documents for macro-viruses solr-mailcow Provides full-text search in Dovecot sogo-mailcow Webmail client that handles Microsoft ActiveSync and Cal- / CardDav nginx-mailcow Nginx remote proxy that handles all mailcow related HTTP / HTTPS requests acme-mailcow Automates HTTPS (SSL/TLS) certificate deployment memcached-mailcow Internal caching system for mailcow services watchdog-mailcow Allows the monitoring of docker containers / services php-fpm-mailcow Powers the mailcow web UI netfilter-mailcow Fail2Ban like integration"},{"location":"en/troubleshooting/debug-common_problems/","title":"Common Problems","text":"<p>Here we list common problems and possible solutions:</p>"},{"location":"en/troubleshooting/debug-common_problems/#mail-loops-back-to-myself","title":"Mail loops back to myself","text":"<p>Please check in your mailcow UI if you made the domain a backup MX:</p>"},{"location":"en/troubleshooting/debug-common_problems/#i-can-receive-but-not-send-mails","title":"I can receive but not send mails","text":"<p>There are a lot of things that could prevent you from sending mail:</p> <ul> <li>Check if your IP address is on any blacklists. You could use dnsbl.info or any other similar service to check for your IP address.</li> <li>There are some consumer ISP routers out there, that block mail ports for non whitelisted domains. Please check if you can reach your server on the ports <code>465</code> or <code>587</code>:</li> </ul> <pre><code># telnet 74.125.133.27 465\nTrying 74.125.133.27...\nConnected to 74.125.133.27.\nEscape character is '^]'.\n</code></pre>"},{"location":"en/troubleshooting/debug-common_problems/#my-mails-are-identified-as-spam","title":"My mails are identified as Spam","text":"<p>Please read our guide on DNS configuration.</p>"},{"location":"en/troubleshooting/debug-common_problems/#docker-compose-throws-weird-errors","title":"docker compose throws weird errors","text":"<p>... like:</p> <ul> <li><code>ERROR: Invalid interpolation format ...</code></li> <li><code>AttributeError: 'NoneType' object has no attribute 'keys'</code>.</li> <li><code>ERROR: In file './docker-compose.yml' service 'version' doesn't have any configuration options</code>.</li> </ul> <p>When you encounter one or similar messages while trying to run mailcow: dockerized please check if you have the latest version of Docker and docker compose</p>"},{"location":"en/troubleshooting/debug-common_problems/#container-xy-is-unhealthy","title":"Container XY is unhealthy","text":"<p>This error tries to tell you that one of the (health) conditions for a certain container are not met. Therefore it can't be started. This can have several reasons, the most common one is an updated git clone but old docker image or vice versa.</p> <p>A wrong configured firewall could also cause such a failure. The containers need to be able to talk to each other over the network 172.22.1.1/24.</p> <p>It might also be wrongly linked file (i.e. SSL certificate) that prevents a crucial container (nginx) from starting, so always check your logs to get an idea where your problem is coming from.</p>"},{"location":"en/troubleshooting/debug-common_problems/#address-already-in-use","title":"Address already in use","text":"<p>If you get an error message like:</p> <pre><code>ERROR: for postfix-mailcow Cannot start service postfix-mailcow: driver failed programming external connectivity on endpoint mailcowdockerized_postfix-mailcow_1: Error starting userland proxy: listen tcp 0.0.0.0:25: bind: address already in use\n</code></pre> <p>while trying to start / install mailcow: dockerized, make sure you've followed our section on the prerequisites.</p>"},{"location":"en/troubleshooting/debug-common_problems/#xyz-cant-connect-to","title":"XYZ can't connect to ...","text":"<p>Please check your local firewall! Docker and iptables-based firewalls sometimes create conflicting rules, so disable the firewall on your host to determine whether your connection issues are caused by such conflicts. If they are, you need to manually create appropriate rules in your host firewall to permit the necessary connections.</p> <p>If you experience connection problems from home, please check your ISP router's firewall too, some of them block mail traffic on the SMTP (587) or SMTPS (465) ports. It could also be, that your ISP is blocking the ports for SUBMISSION (25).</p> <p>While Linux users can chose from a variety of tools1 to check if a port is open, the Windows user has only the PowerShell command <code>Test-NetConnection -ComputerName host -Port port</code> available by default.</p> <p>To enable telnet on a Windows after Vista please check this guide or enter the following command in an terminal with administrator privileges:</p> <pre><code>dism /online /Enable-Feature /FeatureName:TelnetClient\n</code></pre>"},{"location":"en/troubleshooting/debug-common_problems/#inotify-instance-limit-for-user-5000-uid-vmail-exceeded-see-453","title":"Inotify instance limit for user 5000 (UID vmail) exceeded (see #453)","text":"<p>Docker containers use the Docker hosts inotify limits. Setting them on your Docker host will pass them to the container.</p>"},{"location":"en/troubleshooting/debug-common_problems/#dovecot-keeps-restarting-see-2672","title":"Dovecot keeps restarting (see #2672)","text":"<p>Check that you have at least the following files in <code>data/assets/ssl</code>:</p> <pre><code>cert.pem\ndhparams.pem\nkey.pem\n</code></pre> <p>If <code>dhparams.pem</code> is missing, you can generate it with</p> <pre><code>openssl dhparam -out data/assets/ssl/dhparams.pem 4096\n</code></pre> <ol> <li> <p>netcat, nmap, openssl, telnet, etc.\u00a0\u21a9</p> </li> </ol>"},{"location":"en/troubleshooting/debug-logs/","title":"Logs","text":"<p>Warning</p> <p>This section only applies for Dockers default logging driver (JSON).</p> <p>To view the logs of all mailcow: dockerized related containers, you can use <code>docker compose logs</code> inside your mailcow-dockerized folder that contains your <code>mailcow.conf</code>. This is usually a bit much, but you could trim the output with <code>--tail=100</code> to the last 100 lines per container, or add a <code>-f</code> to follow the live output of all your services.</p> <p>To view the logs of a specific service you can use <code>docker compose logs [options] $service_name</code></p> <p>Info</p> <p>The available options for the command docker compose logs are:</p> <ul> <li>--no-color: Produce monochrome output.</li> <li>-f: Follow the log output.</li> <li>-t: Show timestamps.</li> <li>--tail=\"all\": Number of lines to show from the end of the logs for each container.</li> </ul>"},{"location":"en/troubleshooting/debug-mysql_aria/","title":"Recover crashed Aria storage engine","text":""},{"location":"en/troubleshooting/debug-mysql_aria/#mariadb-aria-recovery-after-crash","title":"MariaDB: Aria recovery after crash","text":"<p>If your server crashed and MariaDB logs an error similar to <code>[ERROR] mysqld: Aria recovery failed. Please run aria_chk -r on all Aria tables (*.MAI) and delete all aria_log.######## files</code> you may want to try the following to recover the database to a healthy state:</p> <p>Start the stack and wait until mysql-mailcow begins to report a restarting state. Check by running <code>docker compose ps</code>.</p> <p>Now run the following commands:</p> <pre><code># Stop the stack, don't run \"down\"\ndocker compose stop\n# Run a bash in the stopped container as user mysql\ndocker compose run --rm --entrypoint '/bin/sh -c \"gosu mysql bash\"' mysql-mailcow\n# cd to the SQL data directory\ncd /var/lib/mysql\n# Run aria_chk\naria_chk --check --force */*.MAI\n# Delete aria log files\nrm aria_log.*\n</code></pre> <p>Now run <code>docker compose down</code> followed by <code>docker compose up -d</code>.</p>"},{"location":"en/troubleshooting/debug-mysql_upgrade/","title":"Manual MySQL upgrade","text":""},{"location":"en/troubleshooting/debug-mysql_upgrade/#run-a-manual-mysql_upgrade","title":"Run a manual mysql_upgrade","text":"<p>This step is usually not necessary. </p> <pre><code>docker compose stop mysql-mailcow watchdog-mailcow\ndocker compose run --rm --entrypoint '/bin/sh -c \"gosu mysql mysqld --skip-grant-tables &amp; sleep 10 &amp;&amp; bash &amp;&amp; exit 0\"' mysql-mailcow\n</code></pre> <p>As soon as the SQL shell spawned, run <code>mysql_upgrade</code> and exit the container:</p> <pre><code>mysql_upgrade\nexit\n</code></pre>"},{"location":"en/troubleshooting/debug-reset_pw/","title":"Reset Passwords (incl. SQL)","text":""},{"location":"en/troubleshooting/debug-reset_pw/#mailcow-admin-account","title":"mailcow Admin Account","text":"<p>Resets the mailcow admin account to a random password. Older mailcow: dockerized installations may find the <code>mailcow-reset-admin.sh</code> script in their mailcow root directory (mailcow_path).</p> <pre><code>cd mailcow_path\n./helper-scripts/mailcow-reset-admin.sh\n</code></pre>"},{"location":"en/troubleshooting/debug-reset_pw/#reset-mysql-passwords","title":"Reset MySQL Passwords","text":"<p>Stop the stack by running <code>docker compose stop</code>.</p> <p>When the containers came to a stop, run this command:</p> <pre><code>docker compose run --rm --entrypoint '/bin/sh -c \"gosu mysql mysqld --skip-grant-tables &amp; sleep 10 &amp;&amp; mysql -hlocalhost -uroot &amp;&amp; exit 0\"' mysql-mailcow\n</code></pre>"},{"location":"en/troubleshooting/debug-reset_pw/#1-find-database-name","title":"1. Find database name","text":"<pre><code># source mailcow.conf\n# docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}\nMariaDB [(none)]&gt; show databases;\n+--------------------+\n| Database |\n+--------------------+\n| information_schema |\n| mailcow_database | &lt;=====\n| mysql |\n| performance_schema |\n+--------------------+\n4 rows in set (0.00 sec)\n</code></pre>"},{"location":"en/troubleshooting/debug-reset_pw/#2-reset-one-or-more-users","title":"2. Reset one or more users","text":""},{"location":"en/troubleshooting/debug-reset_pw/#21-maria-db-104-older-mailcow-installations","title":"2.1 Maria DB &lt; 10.4 (older mailcow installations)","text":"<p>Both \"password\" and \"authentication_string\" exist. Currently \"password\" is used, but better set both.</p> <pre><code>MariaDB [(none)]&gt; SELECT user FROM mysql.user;\n+--------------+\n| user |\n+--------------+\n| mailcow | &lt;=====\n| root |\n+--------------+\n2 rows in set (0.00 sec)\n\nMariaDB [(none)]&gt; FLUSH PRIVILEGES;\nMariaDB [(none)]&gt; UPDATE mysql.user SET authentication_string = PASSWORD('gotr00t'), password = PASSWORD('gotr00t') WHERE User = 'root';\nMariaDB [(none)]&gt; UPDATE mysql.user SET authentication_string = PASSWORD('mookuh'), password = PASSWORD('mookuh') WHERE User = 'mailcow' AND Host = '%';\nMariaDB [(none)]&gt; FLUSH PRIVILEGES;\n</code></pre>"},{"location":"en/troubleshooting/debug-reset_pw/#22-maria-db-104-current-mailcows","title":"2.2 Maria DB &gt;= 10.4 (current mailcows)","text":"<pre><code>MariaDB [(none)]&gt; SELECT user FROM mysql.user;\n+--------------+\n| user |\n+--------------+\n| mailcow | &lt;=====\n| root |\n+--------------+\n2 rows in set (0.00 sec)\n\nMariaDB [(none)]&gt; FLUSH PRIVILEGES;\nMariaDB [(none)]&gt; ALTER USER 'mailcow'@'%' IDENTIFIED BY 'mookuh';\nMariaDB [(none)]&gt; ALTER USER 'root'@'%' IDENTIFIED BY 'gotr00t';\nMariaDB [(none)]&gt; ALTER USER 'root'@'localhost' IDENTIFIED BY 'gotr00t';\nMariaDB [(none)]&gt; FLUSH PRIVILEGES;\n</code></pre>"},{"location":"en/troubleshooting/debug-reset_pw/#remove-two-factor-authentication","title":"Remove Two-Factor Authentication","text":""},{"location":"en/troubleshooting/debug-reset_pw/#for-mailcow-webui","title":"For mailcow WebUI:","text":"<p>This works similar to resetting a MySQL password, now we do it from the host without connecting to the MySQL CLI:</p> <pre><code>source mailcow.conf\ndocker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e \"DELETE FROM tfa WHERE username='YOUR_USERNAME';\"\n</code></pre>"},{"location":"en/troubleshooting/debug-reset_pw/#for-sogo","title":"For SOGo:","text":"<pre><code>docker compose exec -u sogo sogo-mailcow sogo-tool user-preferences set defaults user@example.com SOGoGoogleAuthenticatorEnabled '{\"SOGoGoogleAuthenticatorEnabled\":0}'\n</code></pre>"},{"location":"en/troubleshooting/debug-reset_tls/","title":"Reset TLS certificates","text":"<p>In case you encounter problems with your certificate, key or Let's Encrypt account, please try to reset the TLS assets:</p> <pre><code>source mailcow.conf\ndocker compose down\nrm -rf data/assets/ssl\nmkdir data/assets/ssl\nopenssl req -x509 -newkey rsa:4096 -keyout data/assets/ssl-example/key.pem -out data/assets/ssl-example/cert.pem -days 365 -subj \"/C=DE/ST=NRW/L=Willich/O=mailcow/OU=mailcow/CN=${MAILCOW_HOSTNAME}\" -sha256 -nodes\ncp -n -d data/assets/ssl-example/*.pem data/assets/ssl/\ndocker compose up -d\n</code></pre> <p>This will stop mailcow, source the variables we need, create a self-signed certificate and start mailcow.</p> <p>If you use Let's Encrypt you should be careful as you will create a new account and a new set of certificates. You will run into a ratelimit sooner or later.</p> <p>Please also note that previous TLSA records will be invalid.</p>"},{"location":"en/troubleshooting/debug-rm_volumes/","title":"Remove Persistent Data","text":"<p>You may want to remove a set of persistent data to resolve a conflict or to start over.</p> <p><code>mailcowdockerized</code> can vary and depends on your compose project name (if it's unchanged, <code>mailcowdockerized</code> is the correct value). If you are unsure about volume names, run <code>docker volume ls</code> for a full list.</p> <p>Delete a single volume:</p> <pre><code>docker volume rm mailcowdockerized_${VOLUME_NAME}\n</code></pre> <ul> <li>Remove volume <code>mysql-vol-1</code> to remove all MySQL data.</li> <li>Remove volume <code>redis-vol-1</code> to remove all Redis data.</li> <li>Remove volume <code>vmail-vol-1</code> to remove all contents of <code>/var/vmail</code> mounted to <code>dovecot-mailcow</code>.</li> <li>Remove volume <code>rspamd-vol-1</code> to remove all Rspamd data.</li> <li>Remove volume <code>crypt-vol-1</code> to remove all crypto data. This will render all mails unreadable.</li> </ul> <p>Alternatively, running <code>docker compose down -v</code> will destroy all mailcow: dockerized volumes and delete any related containers and networks.</p>"},{"location":"en/troubleshooting/debug-rspamd_memory_leaks/","title":"Advanced: Find memory leaks in Rspamd","text":"<p>A quick guide to deeply analyze a malfunctioning Rspamd.</p> <pre><code>docker compose exec rspamd-mailcow bash\n\nif ! grep -qi 'apt-stable-asan' /etc/apt/sources.list.d/rspamd.list; then\n sed -i 's/apt-stable/apt-stable-asan/i' /etc/apt/sources.list.d/rspamd.list\nfi\n\napt-get update ; apt-get upgrade rspamd\n\nnano /docker-entrypoint.sh\n\n# Before \"exec \"$@\"\" add the following lines:\n\nexport G_SLICE=always-malloc\nexport ASAN_OPTIONS=new_delete_type_mismatch=0:detect_leaks=1:detect_odr_violation=0:log_path=/tmp/rspamd-asan:quarantine_size_mb=2048:malloc_context_size=8:fast_unwind_on_malloc=0\n</code></pre> <p>Restart Rspamd: <code>docker compose restart rspamd-mailcow</code></p> <p>Your memory consumption will increase by a lot, it will also steadily grow, which is not related to a possible memory leak you are looking for.</p> <p>Leave the container running for a few minutes, hours or days (it should match the time you usually wait for the leak to \"happen\") and restart it: <code>docker compose restart rspamd-mailcow</code>.</p> <p>Now enter the container by running <code>docker compose exec rspamd-mailcow bash</code>, change the directory to /tmp and copy the asan Files to your desired location or upload them via termbin.com (<code>cat /tmp/rspamd-asan.* | nc termbin.com 9999</code>).</p>"},{"location":"en/troubleshooting/debug/","title":"Introduction","text":"<p>When a problem occurs, then always for a reason! What you want to do in such a case is:</p> <ol> <li>Read your logs; follow them to see what the reason for your problem is.</li> <li>Follow the leads given to you in your logfiles and start investigating.</li> <li>Restarting the troubled service or the whole stack to see if the problem persists.</li> <li>Read the documentation of the troubled service and search it's bugtracker for your problem.</li> <li>Search our issues for your problem.</li> <li>Create an issue over at our GitHub repository if you think your problem might be a bug or a missing feature you badly need. But please make sure, that you include all the logs and a full description to your problem. Please do not ask for support on Git.</li> <li>Join our Telegram community or find the official support packages at Servercow.Alternatively ask Twitter and tag us with @mailcow_email</li> </ol>"},{"location":"de/","title":"\ud83d\udc2e + \ud83d\udc0b = \ud83d\udc95","text":""},{"location":"de/#unterstutzen-sie-das-mailcow-projekt","title":"Unterst\u00fctzen Sie das mailcow Projekt","text":"<p>Bitte erw\u00e4gen Sie einen Supportvertrag gegen eine geringe monatliche Geb\u00fchr unter Servercow, um die weitere Entwicklung zu unterst\u00fctzen. Wir unterst\u00fctzen Sie, w\u00e4hrend Sie uns unterst\u00fctzen. :)</p> <p>Wenn Sie super toll sind und uns ohne Vertrag unterst\u00fctzen m\u00f6chten, k\u00f6nnen Sie eine SAL-Lizenz erhalten, die Ihre Unterst\u00fctzung best\u00e4tigt (kaufbar als flexible Einmalzahlung) bei Servercow.</p>"},{"location":"de/#support-erhalten","title":"Support erhalten","text":"<p>Es gibt zwei M\u00f6glichkeiten, Support f\u00fcr Ihre mailcow-Installation zu erhalten.</p>"},{"location":"de/#kommerzieller-support","title":"Kommerzieller Support","text":"<p>F\u00fcr professionellen und priorisierten kommerziellen Support k\u00f6nnen Sie ein Basis-Support-Abonnement unter Servercow abschlie\u00dfen. F\u00fcr kundenspezifische Anfragen oder Fragen kontaktieren Sie uns stattdessen bitte unter info@servercow.de.</p> <p>Dar\u00fcber hinaus bieten wir auch eine voll ausgestattete und verwaltete managed mailcow an. Auf diese Weise k\u00fcmmern wir uns um alles technische und Sie k\u00f6nnen Ihr ganzes Mail-Erlebnis auf eine problemlose Weise genie\u00dfen.</p>"},{"location":"de/#community-unterstutzung-und-chat","title":"Community-Unterst\u00fctzung und Chat","text":"<p>Die andere Alternative ist unser kostenloser Community-Support auf unseren verschiedenen Kan\u00e4len unten. Bitte beachten Sie, dass dieser Support von unserer gro\u00dfartigen Community rund um mailcow betrieben wird. Diese Art von Support ist best-effort, freiwillig und es gibt keine Garantie f\u00fcr irgendetwas.</p> <ul> <li> <p>Unsere mailcow Community @ community.mailcow.email</p> </li> <li> <p>Telegram (Support) @ t.me/mailcow.</p> </li> <li> <p>Telegram (Off-Topic) @ t.me/mailcowOfftopic.</p> </li> <li> <p>Twitter @mailcow_email</p> </li> </ul> <p>Telegram Desktop-Clients sind f\u00fcr mehrere Plattformen verf\u00fcgbar. Sie k\u00f6nnen den Gruppenverlauf nach Stichworten durchsuchen.</p> <p>Nur f\u00fcr Bug Tracking, Feature Requests und Codebeitr\u00e4ge:</p> <ul> <li>GitHub @ mailcow/mailcow-dockerized</li> </ul>"},{"location":"de/#demos","title":"Demos","text":"<p>Seit September 2022 stellen wir zwei Verschiedene Demos bereit: </p> <ul> <li>demo.mailcow.email ist die altbekannte Demo, welche sich am Stabilen Stand der mailcow orrientiert. </li> <li>nightly-demo.mailcow.email ist die neue Nightly Demo, welche Testfunktionen beherbergt. (Also insbesondere f\u00fcr alle interessant, die keine M\u00f6glichkeit haben sich eine Testinstanz selbst zu erstellen.)</li> </ul> <p>Die folgenden Anmeldedaten f\u00fcrs Login funktionieren bei beiden Varianten:</p> <ul> <li>Administrator: admin / moohoo</li> <li>Dom\u00e4nen-Administrator: department / moohoo</li> <li>Mailbox: demo@440044.xyz / moohoo</li> </ul> <p>Besonderheit</p> <p>Die Demo Instanzen erhalten die neusten Updates direkt nach Release von GitHub. Vollautomatisch, ohne Downtime!</p>"},{"location":"de/#uberblick","title":"\u00dcberblick","text":"<p>Die integrierte mailcow UI erm\u00f6glicht administrative Arbeiten auf Ihrer Mailserver-Instanz sowie einen getrennten Domain-Administrator- und Mailbox-Benutzer-Zugriff:</p> <ul> <li>DKIM und ARC Unterst\u00fctzung</li> <li>Black- und Whitelists pro Domain und pro Benutzer</li> <li>Spam-Score-Verwaltung pro Benutzer (Spam ablehnen, Spam markieren, Greylist)</li> <li>Erlauben Sie Mailbox-Benutzern, tempor\u00e4re Spam-Aliase zu erstellen</li> <li>Voranstellen von E-Mail-Tags an den Betreff oder Verschieben von E-Mails in Unterordner (pro Benutzer)</li> <li>Mailbox-Benutzer k\u00f6nnen die TLS-Durchsetzung f\u00fcr eingehende und ausgehende Nachrichten umschalten</li> <li>Benutzer k\u00f6nnen die Caches von SOGo ActiveSync-Ger\u00e4ten zur\u00fccksetzen</li> <li>imapsync, um entfernte Postf\u00e4cher regelm\u00e4\u00dfig zu migrieren oder abzurufen</li> <li>TFA: Yubikey OTP und U2F USB (nur Google Chrome und Derivate), TOTP</li> <li>Hinzuf\u00fcgen von Dom\u00e4nen, Postf\u00e4chern, Aliasen, Dom\u00e4nenaliasen und SOGo-Ressourcen</li> <li>Hinzuf\u00fcgen von Whitelist-Hosts zur Weiterleitung von Mails an mailcow</li> <li>Fail2ban-\u00e4hnliche Integration</li> <li>Quarant\u00e4ne-System</li> <li>Antivirus-Scanning inkl. Makro-Scanning in Office-Dokumenten</li> <li>Integrierte Basis\u00fcberwachung</li> <li>Eine Menge mehr...</li> </ul> <p>mailcow: dockerized kommt mit mehreren Containern, die in einem \u00fcberbr\u00fcckten Netzwerk verbunden sind. Jeder Container repr\u00e4sentiert eine einzelne Anwendung.</p> <ul> <li>ACME</li> <li>ClamAV (optional)</li> <li>Dovecot</li> <li>MariaDB</li> <li>Memcached</li> <li>Netfilter (Fail2ban-\u00e4hnliche Integration von @mkuron)</li> <li>Nginx</li> <li>Oletools \u00fcber Olefy</li> <li>PHP</li> <li>Postfix</li> <li>Redis</li> <li>Rspamd</li> <li>SOGo</li> <li>Solr (optional)</li> <li>Unbound</li> <li>Ein Watchdog f\u00fcr die grundlegende \u00dcberwachung</li> </ul> <p>Achtung</p> <p>Die Mails werden komprimiert und verschl\u00fcsselt gespeichert. Das Schl\u00fcsselpaar ist in crypt-vol-1 zu finden. Bitte vergessen Sie nicht, dieses zu sichern.</p> <p>Docker-Volumes zur Aufbewahrung dynamischer Daten - k\u00fcmmern Sie sich um sie!</p> <ul> <li>clamd-db-vol-1</li> <li>crypt-vol-1</li> <li>mysql-socket-vol-1</li> <li>mysql-vol-1</li> <li>postfix-vol-1</li> <li>redis-vol-1</li> <li>rspamd-vol-1</li> <li>sogo-userdata-backup-vol-1</li> <li>sogo-web-vol-1</li> <li>solr-vol-1</li> <li>vmail-index-vol-1</li> <li>vmail-vol-1</li> </ul>"},{"location":"de/backup_restore/b_n_r-accidental_deletion/","title":"Versehentlich gel\u00f6schte Daten wiederherstellen","text":"<p>Sie haben also ein Postfach gel\u00f6scht und haben keine Sicherungskopien?</p> <p>Wenn Sie Ihren Fehler innerhalb von ein paar Stunden bemerken, k\u00f6nnen Sie die Daten des Benutzers wahrscheinlich wiederherstellen.</p>"},{"location":"de/backup_restore/b_n_r-accidental_deletion/#sogo","title":"SOGo","text":"<p>Wir erstellen automatisch t\u00e4gliche Backups (24 Stunden Intervall ab dem Hochfahren -d) in <code>/var/lib/docker/volumes/mailcowdockerized_sogo-userdata-backup-vol-1/_data/</code>.</p> <p>Stellen Sie sicher, dass der Benutzer, den Sie wiederherstellen wollen, in Ihrem Mailcow-Backend existiert. Legen Sie diesen neu an, falls nicht mehr existent.</p> <p>Kopieren Sie die Datei mit dem Namen des Benutzers, den Sie wiederherstellen wollen, nach <code>__MAILCOW_DIRECTORY__/data/conf/sogo</code>.</p> <p>1. Kopieren Sie die Sicherung: <code>cp /var/lib/docker/volumes/mailcowdockerized_sogo-userdata-backup-vol-1/_data/restoreme@example.org __MAILCOW_DIRECTORY__/data/conf/sogo</code></p> <p>2. Starten Sie <code>docker compose exec -u sogo sogo-mailcow sogo-tool restore -F ALL /etc/sogo restoreme@example.org</code>.</p> <p>F\u00fchren Sie <code>sogo-tool</code> ohne Parameter aus, um nach m\u00f6glichen Wiederherstellungsoptionen zu suchen.</p> <p>3. L\u00f6schen Sie die kopierte Sicherung, indem Sie <code>rm __MAILCOW_DIRECTORY__/data/conf/sogo</code> ausf\u00fchren</p> <p>4. Starten Sie SOGo und Memcached neu: <code>docker compose restart sogo-mailcow memcached-mailcow</code></p>"},{"location":"de/backup_restore/b_n_r-accidental_deletion/#mail","title":"Mail","text":"<p>Im Falle einer versehentlichen L\u00f6schung einer Mailbox, k\u00f6nnen Sie diese (standardm\u00e4\u00dfig) 5 Tage lang wiederherstellen. Dies h\u00e4ngt von dem <code>MAILDIR_GC_TIME</code> Parameter in <code>mailcow.conf</code> ab.</p> <p>Eine gel\u00f6schte Mailbox wird in ihrer verschl\u00fcsselten Form nach <code>/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/_garbage</code> kopiert.</p> <p>Der Ordner innerhalb von <code>_garbage</code> folgt der Struktur <code>[timestamp]_[domain_sanitized][user_sanitized]</code>, zum Beispiel <code>1629109708_exampleorgtest</code> im Falle von test@example.org, das am 1629109708 gel\u00f6scht wurde.</p> <p>Um die Mailbox wiederherzustellen, stellen Sie sicher, dass Sie tats\u00e4chlich auf die gleiche Mailcow wiederherstellen, von der sie gel\u00f6scht wurde, oder Sie die gleichen Verschl\u00fcsselungsschl\u00fcssel in <code>crypt-vol-1</code> verwenden.</p> <p>Stellen Sie sicher, dass der Benutzer, den Sie wiederherstellen wollen, in Ihrer Mailcow existiert. Legen Sie diesen neu an, wenn der Benutzer fehlt.</p> <p>Kopieren Sie die Ordner von <code>/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/_garbage/[timestamp]_[domain_sanitized][user_sanitized]</code> zur\u00fcck nach <code>/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/[domain]/[user]</code> und synchronisieren Sie die Ordner neu und berechnen Sie die Quota (Speicherplatz) neu:</p> <pre><code>docker compose exec dovecot-mailcow doveadm force-resync -u restoreme@example.net '*'\ndocker compose exec dovecot-mailcow doveadm quota recalc -u restoreme@example.net\n</code></pre>"},{"location":"de/backup_restore/b_n_r-backup/","title":"Sicherung","text":""},{"location":"de/backup_restore/b_n_r-backup/#sicherung","title":"Sicherung","text":""},{"location":"de/backup_restore/b_n_r-backup/#anleitung","title":"Anleitung","text":"<p>Sie k\u00f6nnen das mitgelieferte Skript <code>helper-scripts/backup_and_restore.sh</code> verwenden, um mailcow automatisch zu sichern.</p> <p>Bitte kopieren Sie dieses Skript nicht an einen anderen Ort.</p> <p>Um ein Backup zu starten, geben Sie \"backup\" als ersten Parameter an und entweder eine oder mehrere zu sichernde Komponenten als folgende Parameter. Sie k\u00f6nnen auch \"all\" als zweiten Parameter verwenden, um alle Komponenten zu sichern. F\u00fcgen Sie <code>--delete-days n</code> an, um Sicherungen zu l\u00f6schen, die \u00e4lter als n Tage sind.</p> <pre><code># Syntax:\n# ./helper-scripts/backup_and_restore.sh backup (vmail|crypt|redis|rspamd|postfix|mysql|all|--delete-days)\n\n# Alles sichern, Sicherungen \u00e4lter als 3 Tage l\u00f6schen\n./helper-scripts/backup_and_restore.sh backup all --delete-days 3\n\n# vmail-, crypt- und mysql-Daten sichern, Sicherungen l\u00f6schen, die \u00e4lter als 30 Tage sind\n./helper-scripts/backup_and_restore.sh backup vmail crypt mysql --delete-days 30\n\n# vmail sichern\n./helper-scripts/backup_and_restore.sh backup vmail\n</code></pre>"},{"location":"de/backup_restore/b_n_r-backup/#variablen-fur-backuprestore-skript","title":"Variablen f\u00fcr Backup/Restore Skript","text":""},{"location":"de/backup_restore/b_n_r-backup/#multithreading","title":"Multithreading","text":"<p>Seit dem 2022-10 Update ist es m\u00f6glich das Skript mit Multithreading Support laufen zu lassen. Dies l\u00e4sst sich sowohl f\u00fcr Backups aber auch f\u00fcr Restores nutzen.</p> <p>Um das Backup/den Restore mit Multithreading zu starten muss <code>THREADS</code> als Umgebungsvariable vor dem Befehl zum starten hinzugef\u00fcgt werden.</p> <p><pre><code>THREADS=14 /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all\n</code></pre> Die Anzahl hinter dem <code>=</code> Zeichen gibt dabei dann die Thread Anzahl an. Nehmen Sie bitte immer ihre Kernanzahl -2 um mailcow selber noch genug CPU Leistung zu lassen.</p>"},{"location":"de/backup_restore/b_n_r-backup/#backup-pfad","title":"Backup Pfad","text":"<p>Das Skript wird Sie nach einem Speicherort f\u00fcr die Sicherung fragen. Innerhalb dieses Speicherortes wird es Ordner im Format \"mailcow_DATE\" erstellen. Sie sollten diese Ordner nicht umbenennen, um den Wiederherstellungsprozess nicht zu st\u00f6ren.</p> <p>Um ein Backup unbeaufsichtigt durchzuf\u00fchren, definieren Sie MAILCOW_BACKUP_LOCATION als Umgebungsvariable, bevor Sie das Skript starten:</p> <pre><code>MAILCOW_BACKUP_LOCATION=/opt/backup /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all\n</code></pre> <p>Tipp<p>Beide oben genannten Variablen k\u00f6nnen auch kombiniert werden! Bsp: <pre><code>MAILCOW_BACKUP_LOCATION=/opt/backup THREADS=14 /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup all\n</code></pre></p> </p>"},{"location":"de/backup_restore/b_n_r-backup/#cronjob","title":"Cronjob","text":"<p>Sie k\u00f6nnen das Backup-Skript regelm\u00e4\u00dfig \u00fcber einen Cronjob laufen lassen. Stellen Sie sicher, dass <code>BACKUP_LOCATION</code> existiert:</p> <pre><code>PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n5 4 * * * cd /opt/mailcow-dockerized/; MAILCOW_BACKUP_LOCATION=/mnt/mailcow_backups /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup mysql crypt redis --delete-days 3\n</code></pre> <p>Standardm\u00e4\u00dfig sendet Cron das komplette Ergebnis jeder Backup-Operation per E-Mail. Wenn Sie m\u00f6chten, dass cron nur im Fehlerfall (Exit-Code ungleich Null) eine E-Mail sendet, k\u00f6nnen Sie den folgenden Ausschnitt verwenden. Die Pfade m\u00fcssen entsprechend Ihrer Einrichtung angepasst werden (dieses Skript ist ein Beitrag eines Benutzers).</p> <p>Das folgende Skript kann in <code>/etc/cron.daily/mailcow-backup</code> platziert werden - vergessen Sie nicht, es mit <code>chmod +x</code> als ausf\u00fchrbar zu markieren:</p> <pre><code>#!/bin/sh\n\n# Backup mailcow data\n# https://mailcow.github.io/mailcow-dockerized-docs/b_n_r_backup/\n\nset -e\n\nOUT=\"$(mktemp)\"\nexport MAILCOW_BACKUP_LOCATION=\"/opt/backup\"\nSCRIPT=\"/opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh\"\nPARAMETERS=\"backup all\"\nOPTIONS=\"--delete-days 30\"\n\n# run command\nset +e\n\"${SCRIPT}\" ${PARAMETERS} ${OPTIONS} 2&gt;&amp;1 &gt; \"$OUT\"\nRESULT=$?\n\nif [ $RESULT -ne 0 ]\n then\n echo \"${SCRIPT} ${PARAMETERS} ${OPTIONS} encounters an error:\"\n echo \"RESULT=$RESULT\"\n echo \"STDOUT / STDERR:\"\n cat \"$OUT\"\nfi\n</code></pre>"},{"location":"de/backup_restore/b_n_r-backup/#backup-strategie-mit-rsync-und-mailcow-backup-skript","title":"Backup-Strategie mit rsync und mailcow Backup-Skript","text":"<p>Erstellen Sie das Zielverzeichnis f\u00fcr mailcows Hilfsskript: <pre><code>mkdir -p /external_share/backups/backup_script\n</code></pre></p> <p>Cronjobs erstellen: <pre><code>PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n25 1 * * * rsync -aH --delete /opt/mailcow-dockerized /external_share/backups/mailcow-dockerized\n40 2 * * * rsync -aH --delete /var/lib/docker/volumes /external_share/backups/var_lib_docker_volumes\n5 4 * * * cd /opt/mailcow-dockerized/; BACKUP_LOCATION=/external_share/backups/backup_script /opt/mailcow-dockerized/helper-scripts/backup_and_restore.sh backup mysql crypt redis --delete-days 3\n# Wenn Sie wollen, benutzen Sie das Werkzeug acl, um die Berechtigungen einiger/aller Ordner/Dateien zu sichern: getfacl -Rn /path\n</code></pre></p> <p>Am Zielort (in diesem Fall <code>/external_share/backups</code>) m\u00f6chten Sie vielleicht Snapshot-M\u00f6glichkeiten haben (ZFS, Btrfs usw.). Machen Sie t\u00e4glich einen Snapshot und bewahren Sie ihn f\u00fcr n Tage auf, um ein konsistentes Backup zu erhalten. F\u00fchren Sie kein rsync auf eine Samba-Freigabe durch, Sie m\u00fcssen die richtigen Berechtigungen behalten!</p> <p>Zum Wiederherstellen m\u00fcssen Sie rsync einfach in umgekehrter Richtung ausf\u00fchren und Docker neu starten, um die Volumes erneut zu lesen. F\u00fchren Sie <code>docker compose pull</code> und <code>docker compose up -d</code> aus.</p> <p>Wenn Sie Gl\u00fcck haben, k\u00f6nnen Redis und MariaDB die inkonsistenten Datenbanken automatisch reparieren (wenn sie inkonsistent sind). Im Falle einer besch\u00e4digten Datenbank m\u00fcssen Sie das Hilfsskript verwenden, um die inkonsistenten Elemente wiederherzustellen. Wenn die Wiederherstellung fehlschl\u00e4gt, versuchen Sie, die Sicherungen zu extrahieren und die Dateien manuell zur\u00fcck zu kopieren. Behalten Sie die Dateiberechtigungen bei!</p>"},{"location":"de/backup_restore/b_n_r-backup_restore-maildir/","title":"Mail-Verzeichnis","text":""},{"location":"de/backup_restore/b_n_r-backup_restore-maildir/#sicherung","title":"Sicherung","text":"<p>Diese Zeile sichert das vmail-Verzeichnis in eine Datei backup_vmail.tar.gz im mailcow-Root-Verzeichnis: <pre><code>cd /pfad/zu/mailcow-dockerized\ndocker run --rm -i -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination \"/var/vmail\" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:stretch-slim tar cvfz /backup/backup_vmail.tar.gz /vmail\n</code></pre></p> <p>Sie k\u00f6nnen den Pfad \u00e4ndern, indem Sie ${PWD} (das dem aktuellen Verzeichnis entspricht) zu einem beliebigen Pfad \u00e4ndern, auf den Sie Schreibzugriff haben. Setzen Sie den Dateinamen <code>backup_vmail.tar.gz</code> auf einen beliebigen Namen, aber lassen Sie den Pfad so wie er ist. Beispiel: <code>[...] tar cvfz /backup/mein_eigener_dateiname_.tar.gz</code></p>"},{"location":"de/backup_restore/b_n_r-backup_restore-maildir/#wiederherstellen","title":"Wiederherstellen","text":"<pre><code>cd /pfad/zu/mailcow-dockerized\ndocker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .Destination \"/var/vmail\" }}{{ .Name }}{{ end }}{{ end }}' $(docker compose ps -q dovecot-mailcow)):/vmail -v ${PWD}:/backup debian:stretch-slim tar xvfz /backup/backup_vmail.tar.gz\n</code></pre>"},{"location":"de/backup_restore/b_n_r-backup_restore-mysql/","title":"MySQL (mysqldump)","text":""},{"location":"de/backup_restore/b_n_r-backup_restore-mysql/#sicherung","title":"Sicherung","text":"<pre><code>cd /pfad/zu/mailcow-dockerized\nsource mailcow.conf\nDATE=$(date +\"%Y%m%d_%H%M%S\")\ndocker compose exec -T mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} &gt; backup_${DBNAME}_${DATE}.sql\n</code></pre>"},{"location":"de/backup_restore/b_n_r-backup_restore-mysql/#wiederherstellen","title":"Wiederherstellen","text":"<p>Warning</p> <p>Sie sollten den SQL-Dump ohne <code>docker compose</code> umleiten, um Parsing-Fehler zu vermeiden.</p> <pre><code>cd /pfad/zu/mailcow-dockerized\nsource mailcow.conf\ndocker exec -i $(docker compose ps -q mysql-mailcow) mysql -u${DBUSER} -p${DBPASS} ${DBNAME} &lt; backup_file.sql\n</code></pre>"},{"location":"de/backup_restore/b_n_r-coldstandby/","title":"Cold-standby-Backup","text":"<p>mailcow bietet eine einfache M\u00f6glichkeit, eine konsistente Kopie von sich selbst zu erstellen, die per rsync an einen entfernten Ort ohne Ausfallzeit \u00fcbertragen werden kann.</p> <p>Dies kann auch verwendet werden, um Ihre mailcow auf einen neuen Server zu \u00fcbertragen.</p>"},{"location":"de/backup_restore/b_n_r-coldstandby/#das-sollten-sie-wissen","title":"Das sollten Sie wissen","text":"<p>Das bereitgestellte Skript funktioniert auf Standardinstallationen.</p> <p>Es kann versagen, wenn Sie nicht unterst\u00fctzte Volume Overrides verwenden. Wir unterst\u00fctzen das nicht und wir werden keine Hacks einbauen, die das unterst\u00fctzen. Bitte erstellen und pflegen Sie einen Fork, wenn Sie Ihre \u00c4nderungen beibehalten wollen.</p> <p>Das Skript wird die gleichen Pfade wie Ihre Standard-Mailcow-Installation verwenden. Das ist das mailcow-Basisverzeichnis - f\u00fcr die meisten Nutzer <code>/opt/mailcow-dockerized</code> - sowie die Mountpoints.</p> <p>Um die Pfade Ihrer Quellvolumes zu finden, verwenden wir <code>docker inspect</code> und lesen das Zielverzeichnis jedes Volumes, das mit Ihrem mailcow compose Projekt verbunden ist. Das bedeutet, dass wir auch Volumes \u00fcbertragen, die Sie in einer Override-Datei hinzugef\u00fcgt haben. Lokale Bind-Mounts k\u00f6nnen funktionieren, m\u00fcssen aber nicht.</p> <p>Das Skript verwendet rsync mit dem <code>--delete</code> Flag. Das Ziel wird eine exakte Kopie der Quelle sein.</p> <p><code>mariabackup</code> wird verwendet, um eine konsistente Kopie des SQL-Datenverzeichnisses zu erstellen.</p> <p>Nach dem Rsync der Daten f\u00fchren wir <code>docker compose pull</code> aus und entfernen alte Image-Tags aus dem Ziel.</p> <p>Ihre Quelle wird zu keinem Zeitpunkt ver\u00e4ndert.</p> <p>Sie sollten sicherstellen, dass Sie die gleiche <code>/etc/docker/daemon.json</code> auf dem entfernten Ziel verwenden.</p> <p>Sie sollten keine Festplatten-Snapshots (z. B. \u00fcber ZFS, LVM usw.) auf dem Ziel ausf\u00fchren, w\u00e4hrend dieses Skript ausgef\u00fchrt wird.</p> <p>Die Versionierung ist nicht Teil dieses Skripts, wir verlassen uns auf das Ziel (Snapshots oder Backups). Sie k\u00f6nnen daf\u00fcr auch jedes andere Tool verwenden.</p>"},{"location":"de/backup_restore/b_n_r-coldstandby/#vorbereiten","title":"Vorbereiten","text":"<p>Sie ben\u00f6tigen ein SSH-f\u00e4higes Ziel und eine Schl\u00fcsseldatei, um sich mit diesem Ziel zu verbinden. Der Schl\u00fcssel sollte nicht durch ein Passwort gesch\u00fctzt sein, damit das Skript unbeaufsichtigt arbeiten kann.</p> <p>In Ihrem mailcow-Basisverzeichnis, z.B. <code>/opt/mailcow-dockerized</code>, finden Sie eine Datei <code>create_cold_standby.sh</code>.</p> <p>Bearbeiten Sie diese Datei und \u00e4ndern Sie die exportierten Variablen:</p> <pre><code>export REMOTE_SSH_KEY=/pfad/zum/keyfile\nexport REMOTE_SSH_PORT=22\nexport REMOTE_SSH_HOST=mailcow-backup.host.name\n</code></pre> <p>Der Schl\u00fcssel muss im Besitz von root sein und darf nur von diesem gelesen werden k\u00f6nnen.</p> <p>Sowohl die Quelle als auch das Ziel ben\u00f6tigen <code>rsync</code> &gt;= v3.1.0. Das Ziel muss \u00fcber Docker und docker compose v2 verf\u00fcgen.</p> <p>Das Skript wird Fehler automatisch erkennen und sich beenden.</p> <p>Sie k\u00f6nnen die Verbindung testen, indem Sie <code>ssh mailcow-backup.host.name -p22 -i /path/to/keyfile</code> ausf\u00fchren.</p>"},{"location":"de/backup_restore/b_n_r-coldstandby/#backup-und-aktualisierung-des-cold-standby","title":"Backup und Aktualisierung des Cold-Standby","text":"<p>Starten Sie das erste Backup, dies kann je nach Verbindung eine Weile dauern:</p> <pre><code>bash /opt/mailcow-dockerized/create_cold_standby.sh\n</code></pre> <p>Das war einfach, nicht wahr?</p> <p>Das Aktualisieren des Cold-Standby ist genauso einfach:</p> <pre><code>bash /opt/mailcow-dockerized/create_cold_standby.sh\n</code></pre> <p>Es ist derselbe Befehl.</p>"},{"location":"de/backup_restore/b_n_r-coldstandby/#automatisierte-backups-mit-cron","title":"Automatisierte Backups mit cron","text":"<p>Stellen Sie zun\u00e4chst sicher, dass der <code>cron</code> Dienst aktiviert ist und l\u00e4uft:</p> <pre><code>systemctl enable cron.service &amp;&amp; systemctl start cron.service\n</code></pre> <p>Um die Backups auf dem Cold-Standby-Server zu automatisieren, k\u00f6nnen Sie einen Cron-Job verwenden. Um die Cron-Jobs f\u00fcr den Root-Benutzer zu bearbeiten, f\u00fchren Sie aus:</p> <pre><code>crontab -e\n</code></pre> <p>F\u00fcgen Sie die folgenden Zeilen hinzu, um den Cold-Standby-Server t\u00e4glich um 03:00 Uhr zu synchronisieren. In diesem Beispiel werden Fehler der letzten Ausf\u00fchrung in einer Datei protokolliert.</p> <pre><code>PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin\n\n0 3 * * * bash /opt/mailcow-dockerized/create_cold_standby.sh 2&gt; /var/log/mailcow-coldstandby-sync.log\n</code></pre> <p>Wenn korrekt gespeichert, sollte der Cron-Job durch folgende Eingabe angezeigt werden:</p> <pre><code>crontab -l\n</code></pre>"},{"location":"de/backup_restore/b_n_r-restore/","title":"Wiederherstellung","text":""},{"location":"de/backup_restore/b_n_r-restore/#wiederherstellung","title":"Wiederherstellung","text":"<p>Bitte kopieren Sie dieses Skript nicht an einen anderen Ort.</p> <p>Um eine Wiederherstellung durchzuf\u00fchren, starten Sie mailcow, verwenden Sie das Skript mit \"restore\" als ersten Parameter.</p> <pre><code># Syntax:\n# ./helper-scripts/backup_and_restore.sh restore\n</code></pre> <p>Das Skript wird Sie nach einem Speicherort f\u00fcr die Sicherung der mailcow_DATE-Ordner fragen.</p>"},{"location":"de/client/client-android/","title":"Android","text":"<ol> <li>\u00d6ffnen Sie die App Email.</li> <li>Wenn dies Ihr erstes E-Mail-Konto ist, tippen Sie auf Konto hinzuf\u00fcgen; wenn nicht, tippen Sie auf Mehr und Einstellungen und dann Konto hinzuf\u00fcgen.</li> <li>W\u00e4hlen Sie Microsoft Exchange ActiveSync.</li> <li>Geben Sie Ihre E-Mail Adresse () und Ihr Passwort ein.</li> <li>Tippen Sie auf Anmelden.</li> </ol>"},{"location":"de/client/client-apple/","title":"Apple macOS / iOS","text":""},{"location":"de/client/client-apple/#methode-1-uber-mobileconfig","title":"Methode 1 \u00fcber Mobileconfig","text":"<p>E-Mail, Kontakte und Kalender k\u00f6nnen auf Apple-Ger\u00e4ten automatisch konfiguriert werden, indem ein Profil installiert wird. Um ein Profil herunterzuladen, m\u00fcssen Sie sich zuerst in der mailcow UI anmelden.</p>"},{"location":"de/client/client-apple/#methode-11-imap-smtp-und-calcarddav","title":"Methode 1.1: IMAP, SMTP und Cal/CardDAV","text":"<p>Diese Methode konfiguriert IMAP, CardDAV und CalDAV.</p> <ol> <li>Downloaden und \u00f6ffnen die Datei von https://${MAILCOW_HOSTNAME}/mobileconfig.phpmailcow.mobileconfig.</li> <li>Geben Sie den Entsperrungscode (iPhone) oder das Computerpasswort (Mac) ein.</li> <li>Geben Sie Ihr E-Mail-Passwort dreimal ein, wenn Sie dazu aufgefordert werden.</li> </ol>"},{"location":"de/client/client-apple/#methode-12-imap-smtp-kein-dav","title":"Methode 1.2: IMAP, SMTP (kein DAV)","text":"<p>Diese Methode konfiguriert nur IMAP und SMTP.</p> <ol> <li>Downloaden und \u00f6ffnen Sie die Datei von https://${MAILCOW_HOSTNAME}/mobileconfig.php?only_emailmailcow.mobileconfig.</li> <li>Geben Sie den Entsperrungscode (iPhone) oder das Computerpasswort (Mac) ein.</li> <li>Geben Sie Ihr E-Mail-Passwort dreimal ein, wenn Sie dazu aufgefordert werden.</li> </ol>"},{"location":"de/client/client-apple/#methode-2-exchange-activesync-emulation","title":"Methode 2 (Exchange ActiveSync-Emulation)","text":"<p>Unter iOS wird auch Exchange ActiveSync als Alternative zum obigen Verfahren unterst\u00fctzt. Es hat den Vorteil, dass es Push-E-Mail unterst\u00fctzt (d. h. Sie werden sofort \u00fcber eingehende Nachrichten benachrichtigt), hat aber einige Einschr\u00e4nkungen, z. B. unterst\u00fctzt es nicht mehr als drei E-Mail-Adressen pro Kontakt in Ihrem Adressbuch. Befolgen Sie die folgenden Schritte, wenn Sie stattdessen Exchange verwenden m\u00f6chten.</p> <ol> <li>\u00d6ffnen Sie die App Einstellungen, tippen Sie auf Mail, tippen Sie auf Konten, tippen Sie auf Konto hinzuf\u00fcgen, w\u00e4hlen Sie Exchange.</li> <li>Geben Sie Ihre E-Mail Adresse () ein und tippen Sie auf Weiter.</li> <li>Geben Sie Ihr Passwort ein und tippen Sie erneut auf Weiter.</li> <li>Tippen Sie abschlie\u00dfend auf Speichern.</li> </ol>"},{"location":"de/client/client-emclient/","title":"eM Client","text":"<ol> <li>Starten Sie eM Client.</li> <li>Wenn Sie eM Client zum ersten Mal starten, werden Sie aufgefordert, Ihr Konto einzurichten. Fahren Sie mit Schritt 4 fort.</li> <li>Gehen Sie oben auf Men\u00fc, w\u00e4hlen Sie Tools und Konten.</li> <li>Geben Sie Ihre E-Mail Adresse ein () und klicken Sie auf Jetzt starten.</li> <li>Geben Sie Ihr Passwort ein und klicken Sie auf Weiter.</li> <li>Geben Sie Ihren Namen ein () und klicken Sie auf Weiter.</li> <li>Klicken Sie auf Fertigstellen.</li> </ol>"},{"location":"de/client/client-kontact/","title":"KDE Kontact","text":"<ol> <li>Starten Sie Kontact.</li> <li>Wenn Sie Kontact oder KMail zum ersten Mal gestartet haben, werden Sie aufgefordert, Ihr Konto einzurichten. Fahren Sie mit Schritt 4 fort.</li> <li>Gehen Sie zu Mail in der Seitenleiste. Gehen Sie zum Men\u00fc Tools und w\u00e4hlen Sie Account Wizard.</li> <li>Geben Sie Ihren Namen (), E-Mail Adresse () und Ihr Passwort ein. Klicken Sie auf Weiter.</li> <li>Klicken Sie auf Konto erstellen. Wenn Sie dazu aufgefordert werden, geben Sie Ihr Passwort erneut ein und klicken Sie auf OK.</li> <li>Schlie\u00dfen Sie das Fenster, indem Sie auf Beenden klicken.</li> <li>Gehen Sie zu Kalender in der Seitenleiste.</li> <li>Gehen Sie zum Men\u00fc Einstellungen und w\u00e4hlen Sie Konfigurieren Sie KOrganizer.</li> <li>Gehen Sie zur Registerkarte Kalender und klicken Sie auf die Schaltfl\u00e4che Hinzuf\u00fcgen.</li> <li>W\u00e4hlen Sie DAV-Groupware-Ressource und klicken Sie auf OK.</li> <li>Geben Sie Ihre E-Mail Adresse () und Ihr Passwort ein. Klicken Sie auf Weiter.</li> <li>W\u00e4hlen Sie ScalableOGo aus dem Dropdown-Men\u00fc und klicken Sie auf Weiter.</li> <li>Geben Sie den mailcow Hostname in das Feld Host ein und klicken Sie auf Weiter.</li> <li>Klicken Sie auf Verbindung testen und dann auf Fertigstellen. Klicken Sie abschlie\u00dfend zweimal auf OK.</li> </ol> <p>Sobald Sie Kontact eingerichtet haben, k\u00f6nnen Sie KMail, KOrganizer und KAddressBook auch einzeln verwenden.</p>"},{"location":"de/client/client-manual/","title":"Manuelle Konfiguration","text":"<p>Diese Anweisungen gelten nur f\u00fcr unver\u00e4nderte Portbindungen!</p>"},{"location":"de/client/client-manual/#e-mail","title":"E-Mail","text":"Dienst Verschl\u00fcsselung Host Port IMAP STARTTLS mailcow hostname 143 IMAPS SSL mailcow hostname 993 POP3 STARTTLS mailcow hostname 110 POP3S SSL mailcow hostname 995 SMTP STARTTLS mailcow hostname 587 SMTPS SSL mailcow hostname 465 <p>Bitte verwenden Sie \"plain\" als Authentifizierungsmechanismus. Entgegen der Annahme werden keine Passw\u00f6rter im Klartext \u00fcbertragen, da ohne TLS keine Authentifizierung stattfinden darf.</p>"},{"location":"de/client/client-manual/#kontakte-und-kalender","title":"Kontakte und Kalender","text":"<p>SOGos Standard-URLs f\u00fcr Kalender (CalDAV) und Kontakte (CardDAV):</p> <ol> <li> <p>CalDAV https://mail.example.com/SOGo/dav/user@example.com/Calendar/personal/https:///SOGo/dav//Calendar/personal/</p> </li> <li> <p>CardDAV https://mail.example.com/SOGo/dav/user@example.com/Contacts/personal/https:///SOGo/dav//Contacts/personal/</p> </li> </ol> <p>Einige Anwendungen verlangen m\u00f6glicherweise die Verwendung von https://mail.example.com/SOGo/dav/https:///SOGo/dav/ oder den vollst\u00e4ndigen Pfad zu Ihrem Kalender, der in SOGo gefunden und kopiert werden kann.</p>"},{"location":"de/client/client-outlook/","title":"Microsoft Outlook","text":""},{"location":"de/client/client-outlook/#outlook-2016-oder-hoher-von-office-365-unter-windows","title":"Outlook 2016 oder h\u00f6her von Office 365 unter Windows","text":"<p>Dies gilt nur, wenn Ihr Serveradministrator EAS f\u00fcr Outlook nicht deaktiviert hat. Wenn es deaktiviert ist, folgen Sie bitte stattdessen der Anleitung f\u00fcr Outlook 2007.</p> <p>Outlook 2016 hat ein Problem mit der automatischen Erkennung. Nur Outlook von Office 365 ist betroffen. Wenn Sie Outlook aus einer anderen Quelle installiert haben, folgen Sie bitte der Anleitung f\u00fcr Outlook 2013 oder h\u00f6her. </p> <p>F\u00fcr EAS m\u00fcssen Sie den alten Assistenten verwenden, indem Sie <code>C:\\Program Files (x86)\\Microsoft Office\\root\\Office16\\OLCFG.EXE</code> starten. Wenn diese Anwendung ge\u00f6ffnet wird, k\u00f6nnen Sie mit Schritt 4 der Anleitung f\u00fcr Outlook 2013 unten fortfahren.</p> <p>Wenn die Anwendung nicht ge\u00f6ffnet wird, k\u00f6nnen Sie den Assistenten zum Erstellen eines neuen Kontos vollst\u00e4ndig deaktivieren und die nachstehende Anleitung f\u00fcr Outlook 2013 befolgen.</p>"},{"location":"de/client/client-outlook/#outlook-2007-oder-hoher-auf-windows-kalenderkontakte-via-caldav-synchronizer","title":"Outlook 2007 oder h\u00f6her auf Windows (Kalender/Kontakte via CalDav Synchronizer)","text":"<ol> <li>Downloaden und installieren Sie Outlook CalDav Synchronizer.</li> <li>Starten Sie Outlook.</li> <li>Wenn Sie Outlook zum ersten Mal gestartet haben, werden Sie aufgefordert, Ihr Konto einzurichten. Fahren Sie mit Schritt 5 fort.</li> <li>Gehen Sie zum Men\u00fc Datei und klicken Sie auf Konto hinzuf\u00fcgen.</li> <li>Geben Sie Ihren Namen (), Ihre E-Mail Adresse () und Ihr Passwort ein. Klicken Sie auf Weiter.</li> <li>Klicken Sie auf Finish.</li> <li>Gehen Sie zur Multifunktionsleiste CalDav Synchronizer und klicken Sie auf Synchronisationsprofile.</li> <li>Klicken Sie auf die zweite Schaltfl\u00e4che oben (Mehrere Profile hinzuf\u00fcgen), w\u00e4hlen Sie Sogo und klicken Sie auf Ok.</li> <li>Klicken Sie auf die Schaltfl\u00e4che IMAP/POP3-Kontoeinstellungen abrufen.</li> <li>Klicken Sie auf Ressourcen erkennen und Outlook-Ordnern zuweisen.</li> <li>W\u00e4hlen Sie im Fenster Ressource ausw\u00e4hlen Ihren Hauptkalender (in der Regel Pers\u00f6nlicher Kalender), klicken Sie auf die Schaltfl\u00e4che ..., weisen Sie ihn dem Ordner Kalender zu, und klicken Sie auf OK. Gehen Sie zu den Registerkarten Adressb\u00fccher und Aufgaben und wiederholen Sie den Vorgang entsprechend. Weisen Sie nicht mehreren Kalendern, Adressb\u00fcchern oder Aufgabenlisten zu!</li> <li>Schlie\u00dfen Sie alle Fenster mit den Tasten OK.</li> </ol>"},{"location":"de/client/client-outlook/#outlook-2013-oder-hoher-unter-windows-active-sync-nicht-empfohlen","title":"Outlook 2013 oder h\u00f6her unter Windows (Active Sync - nicht empfohlen)","text":"<p>Dies gilt nur, wenn Ihr Serveradministrator EAS f\u00fcr Outlook nicht deaktiviert hat. Wenn es deaktiviert ist, folgen Sie bitte stattdessen der Anleitung f\u00fcr Outlook 2007.</p> <ol> <li>Starten Sie Outlook.</li> <li>Wenn Sie Outlook zum ersten Mal gestartet haben, werden Sie aufgefordert, Ihr Konto einzurichten. Fahren Sie mit Schritt 4 fort.</li> <li>\u00d6ffnen Sie das Men\u00fc Datei und klicken Sie auf Konto hinzuf\u00fcgen.</li> <li>Geben Sie Ihren Namen (), Ihre E-Mail Adresse () und Ihr Passwort ein. Klicken Sie auf Weiter.</li> <li>Wenn Sie dazu aufgefordert werden, geben Sie Ihr Passwort erneut ein, markieren Sie Meine Anmeldedaten speichern und klicken Sie auf OK.</li> <li>Klicken Sie auf die Schaltfl\u00e4che Zulassen.</li> <li>Klicken Sie auf Fertigstellen.</li> </ol>"},{"location":"de/client/client-outlook/#outlook-2011-oder-hoher-unter-macos","title":"Outlook 2011 oder h\u00f6her unter macOS","text":"<p>Die Mac-Version von Outlook synchronisiert keine Kalender und Kontakte und wird daher nicht unterst\u00fctzt.</p>"},{"location":"de/client/client-thunderbird/","title":"Mozilla Thunderbird","text":"<ol> <li> Starten Sie Thunderbird. </li> <li> Wenn Sie Thunderbird zum ersten Mal starten, werden Sie gefragt, ob Sie eine neue E-Mail-Adresse haben m\u00f6chten. Klicken Sie auf \u00dcberspringen und eine bereits vorhandene E-Mail verwenden und fahren Sie mit Schritt 4 fort. </li> <li> Gehen Sie zum Datei Men\u00fc und w\u00e4hlen Sie Neu, Bestehendes Mail-Konto.... </li> <li> Geben Sie Ihren Namen (), Ihre E-Mail-Adresse () und Ihr Passwort ein. Stellen Sie sicher, dass Passwort merken aktiviert ist und klicken Sie auf Weiter. </li> <li> Sobald die Konfiguration automatisch erkannt wurde, stellen Sie sicher, dass IMAP ausgew\u00e4hlt ist und klicken Sie auf Fertig. </li> <li> Um Ihre Kontakte vom Server zu verwenden, klicken Sie auf den Pfeil neben \"Adressb\u00fccher\" und auf die Schaltfl\u00e4che Verbinden f\u00fcr jedes Adressbuch, das Sie verwenden m\u00f6chten. </li> <li> Um Ihre Kalender vom Server zu verwenden, klicken Sie auf den Pfeil neben \"Kalender\" und dann auf die Schaltfl\u00e4che Verbinden f\u00fcr jeden Kalender, den Sie verwenden m\u00f6chten. </li> <li> Klicken Sie auf Beenden, um das Fenster Account Setup zu schlie\u00dfen. </li> </ol>"},{"location":"de/client/client-windows/","title":"Windows Mail","text":"<p>Windows 8 und h\u00f6her unterst\u00fctzen E-Mail, Kontakte und Kalender \u00fcber Exchange ActiveSync.</p> <ol> <li>\u00d6ffnen Sie die App Mail.</li> <li>Wenn Sie Mail noch nicht verwendet haben, k\u00f6nnen Sie im Hauptfenster auf Konto hinzuf\u00fcgen klicken. Fahren Sie mit Schritt 4 fort.</li> <li>Klicken Sie auf Konten in der Seitenleiste links und dann auf Konto hinzuf\u00fcgen ganz rechts.</li> <li>W\u00e4hlen Sie Exchange.</li> <li>Geben Sie Ihre E-Mail Adresse () ein und klicken Sie auf Weiter..</li> <li>Geben Sie Ihr Passwort ein und klicken Sie auf Anmelden.</li> </ol> <p>Sobald Sie die Mail-App eingerichtet haben, k\u00f6nnen Sie auch die Apps \"Kontakte\" und \"Kalender\" verwenden.</p>"},{"location":"de/client/client/","title":"\u00dcbersicht","text":"<p>mailcow unterst\u00fctzt eine Vielzahl von E-Mail-Clients, sowohl auf Desktop-Computern als auch auf Smartphones. Im Folgenden finden Sie eine Reihe von Konfigurationsanleitungen, die erkl\u00e4ren, wie Sie Ihr mailcow-Konto konfigurieren k\u00f6nnen.</p> <p>Tipp</p> Wenn Sie auf diese Seite zugreifen, indem Sie sich bei Ihrem mailcow-Server anmelden und auf den Link \"Konfigurationsanleitungen f\u00fcr E-Mail-Clients und Smartphones anzeigen\" klicken, werden alle Anleitungen mit Ihrer E-Mail-Adresse und Ihrem Servernamen personalisiert. <p>Erfolgreich</p> Da Sie diese Seite aufgerufen haben, nachdem Sie sich in Ihren Mailcow-Server eingeloggt haben, wurden alle Anleitungen mit Ihrer E-Mail-Adresse und Ihrem Servernamen personalisiert. <ul> <li>Android</li> <li>Apple iOS / macOS</li> <li>eM Client</li> <li>KDE Kontact / KMail</li> <li>Microsoft Outlook</li> <li>Mozilla Thunderbird</li> <li>Windows Mail</li> <li>Manual configuration</li> </ul>"},{"location":"de/i_u_m/i_u_m_deinstall/","title":"Deinstallation","text":"<p>Um mailcow: dockerized mit all seinen Volumes, Images und Containern zu entfernen, tun Sie dies:</p> <pre><code>docker compose down -v --rmi all --remove-orphans\n</code></pre> <p>Info</p> <ul> <li>-v Entfernt benannte Volumes, die im Abschnitt <code>volumes</code> der Compose-Datei deklariert sind, und anonyme Volumes, die an Container angeh\u00e4ngt sind.</li> <li>--rmi Images entfernen. Der Typ muss einer der folgenden sein: <code>all</code>: Entfernt alle Images, die von einem beliebigen Dienst verwendet werden. <code>local</code>: Entfernt nur Bilder, die kein benutzerdefiniertes Tag haben, das durch das Feld \"image\" gesetzt wurde. <li>--remove-orphans Entfernt Container f\u00fcr Dienste, die nicht in der Compose-Datei definiert sind.</li> <li>Standardm\u00e4\u00dfig entfernt <code>docker compose down</code> nur derzeit aktive Container und Netzwerke, die in der Datei <code>docker-compose.yml</code> definiert sind.</li>"},{"location":"de/i_u_m/i_u_m_install/","title":"Installation","text":""},{"location":"de/i_u_m/i_u_m_install/#docker-und-docker-compose-installation","title":"Docker und Docker Compose Installation","text":"<p>Sie ben\u00f6tigen Docker (eine Version &gt;= <code>20.10.2</code> ist erforderlich) und Docker Compose (eine Version <code>&gt;= 2.0</code> ist erforderlich).</p> <p>Erfahren Sie, wie Sie Docker und Docker Compose installieren.</p> <p>Schnelle Installation f\u00fcr die meisten Betriebssysteme:</p>"},{"location":"de/i_u_m/i_u_m_install/#docker","title":"Docker","text":"<p><pre><code>curl -sSL https://get.docker.com/ | CHANNEL=stable sh\n# Nachdem der Installationsprozess abgeschlossen ist, m\u00fcssen Sie eventuell den Dienst aktivieren und sicherstellen, dass er gestartet ist (z. B. CentOS 7)\nsystemctl enable --now docker\n</code></pre> Bitte verwenden Sie die neueste verf\u00fcgbare Docker-Engine und nicht die Engine, die mit Ihrem Distros-Repository ausgeliefert wird.</p>"},{"location":"de/i_u_m/i_u_m_install/#docker-compose","title":"docker compose","text":"<p>Achtung</p> <p>mailcow ben\u00f6tigt eine Version von Docker Compose &gt;= v2. Sollte die Installation von Docker \u00fcber das obenstehende Skript erfolgt sein wird das Docker Compose Plugin bereits automatisch in einer Version &gt;=2.0 installiert. Ist die mailcow Installation \u00e4lter oder Docker wurde auf einem anderen Weg installiert, muss das Compose Plugin bzw. die Standalone Version von Docker manuell installiert werden.</p>"},{"location":"de/i_u_m/i_u_m_install/#installation-via-paketmanager-plugin","title":"Installation via Paketmanager (Plugin)","text":"<p>Hinweis</p> <p>Diese Vorgehensweise mit den Paketquellen ist nur dann m\u00f6glich, wenn das Docker Repository eingebunden wurde. Dies kann entweder durch die Anleitung oben (siehe Docker) oder durch eine manuelle Einbindung passieren.</p> <p>Auf Debian/Ubuntu Systemen: <pre><code>apt update\napt install docker-compose-plugin\n</code></pre></p> <p>Auf Centos 7 Systemen: <pre><code>yum update\nyum install docker-compose-plugin\n</code></pre></p> <p>Achtung</p> <p>Die Syntax der Docker Compose Befehle lautet <code>docker compose</code> bei der Plugin Variante von Docker Compose!!</p>"},{"location":"de/i_u_m/i_u_m_install/#installation-via-script-standalone","title":"Installation via Script (Standalone)","text":"<p>Hinweis</p> <p>Diese Installation ist die alt bekannte Weise. Sie installiert Docker Compose als Standalone Programm und ist nicht auf die Art und weise der Docker Installation angewiesen.</p> <pre><code>curl -L https://github.com/docker/compose/releases/download/v$(curl -Ls https://www.servercow.de/docker-compose/latest.php)/docker-compose-$(uname -s)-$(uname -m) &gt; /usr/local/bin/docker-compose\nchmod +x /usr/local/bin/docker-compose\n</code></pre> <p>Achtung</p> <p>Die Syntax der Docker Compose Befehle lautet <code>docker-compose</code> bei der Standalone Variante von Docker Compose!!</p>"},{"location":"de/i_u_m/i_u_m_install/#selinux-besonderheiten-prufen","title":"SELinux Besonderheiten pr\u00fcfen","text":"<p>Auf SELinux-aktivierten Systemen, z.B. CentOS 7:</p> <ul> <li>Pr\u00fcfen Sie, ob das Paket \"container-selinux\" auf Ihrem System vorhanden ist:</li> </ul> <pre><code>rpm -qa | grep container-selinux\n</code></pre> <p>Wenn der obige Befehl eine leere oder keine Ausgabe liefert, sollten Sie es \u00fcber Ihren Paketmanager installieren.</p> <ul> <li>Pr\u00fcfen Sie, ob Docker SELinux-Unterst\u00fctzung aktiviert hat:</li> </ul> <pre><code>docker info | grep selinux\n</code></pre> <p>Wenn der obige Befehl eine leere oder keine Ausgabe liefert, erstellen oder bearbeiten Sie <code>/etc/docker/daemon.json</code> und f\u00fcgen Sie <code>\"selinux-enabled\": true</code> hinzu. Beispielhafter Inhalt der Datei:</p> <pre><code>{\n \"selinux-enabled\": true\n}\n</code></pre> <p>Starten Sie den Docker-Daemon neu und \u00fcberpr\u00fcfen Sie, ob SELinux nun aktiviert ist.</p> <p>Dieser Schritt ist erforderlich, um sicherzustellen, dass die mailcows-Volumes richtig gekennzeichnet sind, wie in der Compose-Datei angegeben. Wenn Sie daran interessiert sind, wie das funktioniert, k\u00f6nnen Sie sich die Readme-Datei von https://github.com/containers/container-selinux ansehen, die auf viele n\u00fctzliche Informationen zu diesem Thema verweist.</p>"},{"location":"de/i_u_m/i_u_m_install/#mailcow-installieren","title":"mailcow Installieren","text":"<p>Klonen Sie den Master-Zweig des Repositorys und stellen Sie sicher, dass Ihre umask gleich 0022 ist. Bitte klonen Sie das Repository als root-Benutzer und kontrollieren Sie auch den Stack als root. Wir werden die Attribute - wenn n\u00f6tig - \u00e4ndern, w\u00e4hrend wir die Container automatisch bereitstellen und sicherstellen, dass alles gesichert ist. Das update.sh-Skript muss daher ebenfalls als root ausgef\u00fchrt werden. Es kann notwendig sein, den Besitzer und andere Attribute von Dateien zu \u00e4ndern, auf die Sie sonst keinen Zugriff haben. Wir geben die Berechtigungen f\u00fcr jede exponierte Anwendung auf und f\u00fchren einen exponierten Dienst nicht als root aus! Wenn Sie den Docker-Daemon als Nicht-Root-Benutzer steuern, erhalten Sie keine zus\u00e4tzliche Sicherheit. Der unprivilegierte Benutzer wird die Container ebenfalls als root spawnen. Das Verhalten des Stacks ist identisch.</p> <pre><code>$ su\n# umask\n0022 # &lt;- \u00dcberpr\u00fcfen, dass es 0022 ist\n# cd /opt\n# git clone https://github.com/mailcow/mailcow-dockerized\n# cd mailcow-dockerized\n</code></pre>"},{"location":"de/i_u_m/i_u_m_install/#mailcow-initialisieren","title":"mailcow Initialisieren","text":"<p>Erzeugen Sie eine Konfigurationsdatei. Verwenden Sie einen FQDN (<code>host.domain.tld</code>) als Hostname, wenn Sie gefragt werden. <pre><code>./generate_config.sh\n</code></pre></p> <p>\u00c4ndern Sie die Konfiguration, wenn Sie wollen oder m\u00fcssen. <pre><code>nano mailcow.conf\n</code></pre> Wenn Sie planen, einen Reverse Proxy zu verwenden, k\u00f6nnen Sie zum Beispiel HTTPS an 127.0.0.1 auf Port 8443 und HTTP an 127.0.0.1 auf Port 8080 binden.</p> <p>M\u00f6glicherweise m\u00fcssen Sie einen vorinstallierten MTA stoppen, der Port 25/tcp blockiert. Siehe dieses Kapitel, um zu erfahren, wie man Postfix rekonfiguriert, um nach einer erfolgreichen Installation neben mailcow laufen zu lassen.</p> <p>Einige Updates modifizieren mailcow.conf und f\u00fcgen neue Parameter hinzu. Es ist schwer, in der Dokumentation den \u00dcberblick zu behalten. Bitte \u00fcberpr\u00fcfen Sie deren Beschreibung und fragen Sie, wenn Sie unsicher sind, in den bekannten Kan\u00e4len nach Rat.</p>"},{"location":"de/i_u_m/i_u_m_install/#problembehandlungen","title":"Problembehandlungen","text":""},{"location":"de/i_u_m/i_u_m_install/#benutzer-mit-einer-mtu-ungleich-1500-zb-openstack","title":"Benutzer mit einer MTU ungleich 1500 (z.B. OpenStack)","text":"<p>Wenn Sie auf Probleme und seltsame Ph\u00e4nomene sto\u00dfen, \u00fcberpr\u00fcfen Sie bitte Ihre MTU.</p> <p>Bearbeiten Sie <code>docker-compose.yml</code> und \u00e4ndern Sie die Netzwerkeinstellungen entsprechend Ihrer MTU. F\u00fcgen Sie den neuen Parameter driver_opts wie folgt hinzu: <pre><code>networks:\n mailcow-network:\n ...\n driver_opts:\n com.docker.network.driver.mtu: 1450\n ...\n</code></pre></p>"},{"location":"de/i_u_m/i_u_m_install/#benutzer-ohne-ein-ipv6-aktiviertes-netzwerk-auf-ihrem-hostsystem","title":"Benutzer ohne ein IPv6-aktiviertes Netzwerk auf ihrem Hostsystem","text":"<p>Schalten Sie IPv6 bitte nicht ab, auch wenn es Ihnen nicht gef\u00e4llt. IPv6 ist die Zukunft und sollte nicht ignoriert werden.</p> <p>Sollten Sie jedoch kein IPv6-f\u00e4higes Netzwerk auf Ihrem Host haben und Sie sich nicht um ein besseres Internet k\u00fcmmern wollen (hehe), ist es empfehlenswert, IPv6 f\u00fcr das mailcow-Netzwerk zu deaktivieren, um unvorhergesehene Probleme zu vermeiden.</p>"},{"location":"de/i_u_m/i_u_m_install/#mailcow-starten","title":"mailcow starten","text":"<p>Laden Sie die Images herunter und f\u00fchren Sie die Compose-Datei aus. Der Parameter <code>-d</code> wird ihre mailcow dann im Hintergrund starten: <pre><code>docker compose pull\ndocker compose up -d\n</code></pre></p> <p>Geschafft!</p> <p>Sie k\u00f6nnen nun auf https://${MAILCOW_HOSTNAME} mit den Standard-Zugangsdaten <code>admin</code> + Passwort <code>moohoo</code> zugreifen.</p> <p>Info</p> <p>Wenn Sie mailcow nicht hinter einem Reverse Proxy verwenden, sollten Sie alle HTTP-Anfragen auf HTTPS umleiten.</p> <p>Die Datenbank wird sofort initialisiert, nachdem eine Verbindung zu MySQL hergestellt werden kann.</p> <p>Ihre Daten bleiben in mehreren Docker-Volumes erhalten, die nicht gel\u00f6scht werden, wenn Sie Container neu erstellen oder l\u00f6schen. F\u00fchren Sie <code>docker volume ls</code> aus, um eine Liste aller Volumes zu sehen. Sie k\u00f6nnen <code>docker compose down</code> sicher ausf\u00fchren, ohne persistente Daten zu entfernen.</p>"},{"location":"de/i_u_m/i_u_m_migration/","title":"Migration","text":"<p>Warning</p> <p>Diese Anleitung geht davon aus, dass Sie beabsichtigen, einen bestehenden Mailcow-Server (Quelle) auf einen brandneuen, leeren Server (Ziel) zu migrieren. Sie k\u00fcmmert sich nicht um die Erhaltung bestehender Daten auf dem Zielserver und l\u00f6scht alles innerhalb von <code>/var/lib/docker/volumes</code> und somit alle Docker-Volumes, die Sie bereits eingerichtet haben.</p> <p>Tip</p> <p>Alternativ k\u00f6nnen Sie das Skript <code>./helper-scripts/backup_and_restore.sh</code> verwenden, um ein vollst\u00e4ndiges Backup auf der Quellmaschine zu erstellen, dann installieren Sie mailcow auf der Zielmaschine wie gewohnt, kopieren Sie Ihre <code>mailcow.conf</code> und verwenden Sie das gleiche Skript, um Ihr Backup auf der Zielmaschine wiederherzustellen.</p> <p>1. Befolgen Sie die Installationsanleitung von Docker und Compose.</p> <p>2. Stoppen Sie Docker und stellen Sie sicher, dass Docker gestoppt wurde: <pre><code>systemctl stop docker.service\nsystemctl status docker.service\n</code></pre></p> <p>3. F\u00fchren Sie die folgenden Befehle auf dem Quellcomputer aus (achten Sie darauf, die abschlie\u00dfenden Schr\u00e4gstriche im ersten Pfadparameter wie unten gezeigt hinzuzuf\u00fcgen!) - WARNUNG: Dieser Befehl l\u00f6scht alles, was bereits unter <code>/var/lib/docker/volumes</code> auf dem Zielrechner existiert: <pre><code>rsync -aHhP --numeric-ids --delete /opt/mailcow-dockerized/ root@target-machine.example.com:/opt/mailcow-dockerized\nrsync -aHhP --numeric-ids --delete /var/lib/docker/volumes/ root@target-machine.example.com:/var/lib/docker/volumes\n</code></pre></p> <p>4. Schalten Sie mailcow ab und stoppen Sie Docker auf dem Quellrechner. <pre><code>cd /opt/mailcow-dockerized\ndocker compose down\nsystemctl stop docker.service\n</code></pre></p> <p>**Wiederholen Sie Schritt 3 mit denselben Befehlen. Dies wird viel schneller gehen als beim ersten Mal.</p> <p>6. Wechseln Sie auf den Zielrechner und starten Sie Docker. <pre><code>systemctl start docker.service\n</code></pre></p> <p>7. Ziehen Sie nun die mailcow Docker-Images auf den Zielrechner. <pre><code>cd /opt/mailcow-dockerized\ndocker compose pull\n</code></pre></p> <p>8. Starten Sie den gesamten mailcow-Stack und alles sollte fertig sein! <pre><code>docker compose up -d\n</code></pre></p> <p>9. Zum Schluss \u00e4ndern Sie Ihre DNS-Einstellungen so, dass sie auf den Zielserver zeigen. Pr\u00fcfen und \u00e4ndern Sie gegebenenfalls die <code>SNAT_TO_SOURCE</code> Variable in der <code>mailcow.conf</code> im mailcow-dockerized Ordner, da andernfalls SOGo nicht richtig funktioniert, wenn die ausgehende IP eine andere ist.</p>"},{"location":"de/i_u_m/i_u_m_update/","title":"Update","text":""},{"location":"de/i_u_m/i_u_m_update/#mailcow-automatisch-updaten","title":"mailcow automatisch Updaten","text":"<p>Ein Update-Skript in Ihrem mailcow-dockerized Verzeichnis k\u00fcmmert sich um Updates.</p> <p>Aber benutzen Sie es mit Bedacht! Wenn Sie denken, dass Sie viele \u00c4nderungen am mailcow-Code vorgenommen haben, sollten Sie die manuelle Update-Anleitung unten verwenden.</p> <p>F\u00fchren sie das Update-Skript aus: <pre><code>./update.sh\n</code></pre></p> <p>Wenn es n\u00f6tig ist, wird es Sie fragen, wie Sie fortfahren m\u00f6chten. Merge-Fehler werden gemeldet. Einige kleinere Konflikte werden automatisch korrigiert (zugunsten des mailcow-dockerized repository code).</p>"},{"location":"de/i_u_m/i_u_m_update/#optionen","title":"Optionen","text":"<pre><code># Optionen k\u00f6nnen kombiniert werden\n\n# - Pr\u00fcft auf Updates und zeigt \u00c4nderungen an\n./update.sh --check\n\n# - Starten Sie mailcow nicht, nachdem Sie ein Update durchgef\u00fchrt haben\n./update.sh --skip-start\n\n# - \u00dcberspringt den ICMP Check auf die \u00f6ffentlichen DNS Resolver (Bitte nur nutzen, wenn keinerlei ICMP Verbindungen von und zur mailcow erlaubt sind)\n./update.sh --skip-ping-check\n\n# - Wechselt die Update Quellen der mailcow auf nightly (unstabile) Inhalte.\nNUR ZUM TESTEN VERWENDEN!! KEIN PRODUKTIV BETRIEB!!!\n./update.sh --nightly\n\n# - Wechselt die Update Quellen der mailcow auf stable (stabile) Inhalte (standard).\n./update.sh --stable\n\n# - Erzwinge Update (unbeaufsichtigt, aber nicht unterst\u00fctzt, Benutzung auf eigenes Risiko)\n./update.sh --force\n\n# - Garbage Collector ausf\u00fchren, um alte Image-Tags zu bereinigen und beenden\n./update.sh --gc\n\n# - Update mit der Merge-Strategie-Option \"ours\" statt \"theirs\"\n# Dies wird **Konflikte** beim Zusammenf\u00fchren zugunsten Ihrer lokalen \u00c4nderungen l\u00f6sen und sollte vermieden werden. Lokale \u00c4nderungen werden immer beibehalten, es sei denn, wir haben auch die Datei XY ge\u00e4ndert.\n./update.sh --ours\n\n# - Nicht aktualisieren, nur holen von Docker Images\n./update.sh --prefetch\n</code></pre>"},{"location":"de/i_u_m/i_u_m_update/#ich-habe-vergessen-was-ich-vor-dem-ausfuhren-von-updatesh-geandert-habe","title":"Ich habe vergessen, was ich vor dem Ausf\u00fchren von update.sh ge\u00e4ndert habe.","text":"<p>Siehe <code>git log --pretty=oneline | grep -i \"before update\"</code>, Sie werden eine Ausgabe \u00e4hnlich dieser haben:</p> <pre><code>22cd00b5e28893ef9ddef3c2b5436453cc5223ab Before update on 2020-09-28_19_25_45\ndacd4fb9b51e9e1c8a37d84485b92ffaf6c59353 Before update on 2020-08-07_13_31_31\n</code></pre> <p>F\u00fchren Sie <code>git diff 22cd00b5e28893ef9ddef3c2b5436453cc5223ab</code> aus, um zu sehen, was sich ge\u00e4ndert hat.</p>"},{"location":"de/i_u_m/i_u_m_update/#kann-ich-ein-rollback-durchfuhren","title":"Kann ich ein Rollback durchf\u00fchren?","text":"<p>Ja.</p> <p>Siehe das obige Thema, anstelle eines Diffs f\u00fchren Sie checkout aus:</p> <pre><code>docker compose down\n# Ersetzen Sie die Commit-ID 22cd00b5e28893ef9ddef3c2b5436453cc5223ab durch Ihre ID\ngit checkout 22cd00b5e28893ef9ddef3c2b5436453cc5223ab\ndocker compose pull\ndocker compose up -d\n</code></pre>"},{"location":"de/i_u_m/i_u_m_update/#hooks","title":"Hooks","text":"<p>Sie k\u00f6nnen sich in den Update-Mechanismus einklinken, indem Sie Skripte namens <code>pre_commit_hook.sh</code> und <code>post_commit_hook.sh</code> zu Ihrem mailcows-Root-Verzeichnis hinzuf\u00fcgen. Siehe hier f\u00fcr weitere Details.</p>"},{"location":"de/i_u_m/i_u_m_update/#update-zyklus","title":"Update-Zyklus","text":"<ul> <li>Wir planen an jedem ersten Dienstag eines Monats ein neues Hauptupdate zu ver\u00f6ffentlichen.</li> <li>Die Updates sind wie folgt nummeriert: <code>JJJJ-MM</code> (Beispiel: <code>2022-05</code>).</li> <li>Fehlerkorrekturen eines Hauptupdates werden bei uns als \"Revisionen\" wie a,b,c (Beispiele: <code>2022-05a</code>, <code>2022-05b</code> usw.) erscheinen.</li> </ul>"},{"location":"de/i_u_m/i_u_m_update/#update-varianten","title":"Update-Varianten","text":"<p>stable (stabile Updates): Diese Updates sind f\u00fcr den Produktivbetrieb geeignet. Sie erscheinen in einem Zyklus von mindest 1x im Monat.</p> <p>nightly (instabile Updates): Diese Updates sind NICHT f\u00fcr den Produktivbetrieb geeignet und dienen lediglich dem Testen. Die nightly Updates sind den stabilen Updates vorraus, da in diesen neue und auch umfangreichere Funktionen getestet werden bevor diese f\u00fcr alle User Live gehen.</p>"},{"location":"de/i_u_m/i_u_m_update/#neu-nightly-updates-beziehen","title":"NEU: Nightly Updates beziehen","text":""},{"location":"de/i_u_m/i_u_m_update/#infos-zu-den-nightly-updates","title":"Infos zu den Nightly Updates","text":"<p>Seit dem 2022-08 Update gibt es die M\u00f6glichkeit die Update quellen zu \u00e4ndern. Bisher diente der master Branch auf GitHub als einzige (offizieller) Update Quelle. Mit dem August 2022 Update gibt es aber nun noch den Nightly Branch welcher instabile und gr\u00f6\u00dfere \u00c4nderungen zum testen und Feedback geben enth\u00e4lt.</p> <p>Dabei bekommt der Nightly Branch immer dann neue Updates, wenn irgendetwas am mailcow Projekt fertig gemacht wurde was in die neue Hauptversion reinkommt.</p> <p>Neben den offensichtlichen neuerungen welche sowieso im n\u00e4chsten Major Update enthalten sein werden enth\u00e4lt er ebenfalls erstmal exklusive Features welche eine l\u00e4ngere Testzeit brauchen (bspw. das UI Update auf Bootstrap 5).</p>"},{"location":"de/i_u_m/i_u_m_update/#wie-bekomme-ich-nightly-updates","title":"Wie bekomme ich Nightly Updates?","text":"<p>Der Vorgang ist relativ simpel. Mit dem 2022-08 Update (ein Update auf die Version voraussgesetzt) ist es m\u00f6glich die <code>update.sh</code> mit dem Parameter <code>--nightly</code> zu starten.</p> <p>Achtung<p>Bitte machen Sie vorher ein Backup oder folgen Sie dem Abschnitt Best Practice Nightly Update bevor Sie auf die Nightly Builds von mailcow wechseln. Wir sind f\u00fcr keinerlei Datenverluste/korruptionen verantwortlich, also arbeiten Sie mit bedacht!</p> </p> <p>Das Skript wird nun den Branch wechseln mit <code>git checkout nightly</code> d.h. es wird auch wieder nach den IPv6 Einstellungen fragen. Das ist aber normal.</p> <p>Sollte alles problemlos geklappt haben (wof\u00fcr wir ja auch vorsichtshalber ein Backup vorher gemacht haben) sollte nun in der mailcow UI unten rechts die aktuelle Versionsnummer samt Datumsstempel abgebildet sein: </p>"},{"location":"de/i_u_m/i_u_m_update/#best-practice-nightly-update","title":"Best Practice Nightly Update","text":"<p>Info<p>Wir empfehlen die Benutzung des Nightly Updates nur dann, wenn Ihr eine weitere Maschine oder VM besitzt und diese NICHT Produktiv nutzt.</p> </p> <ol> <li>Das Cold-Standby Skript nutzen um die Maschine vor dem Schwenk auf die Nightly Builds auf ein anderes System zu kopieren.</li> <li>Das <code>update.sh</code> Skript auf der neuen Maschine mit dem Parameter <code>--nightly</code> ausf\u00fchren und best\u00e4tigen.</li> <li>Die Nightly Updates auf der sekund\u00e4ren Maschine erleben/testen.</li> </ol>"},{"location":"de/manual-guides/u_e-80_to_443/","title":"HTTP auf HTTPS umleiten","text":"<p>Seit dem 28. Februar 2017 wird mailcow mit aktivierten Ports 80 und 443 geliefert.</p> <p>Verwenden Sie die untenstehende Konfiguration nicht f\u00fcr Reverse-Proxy-Setups, bitte lesen Sie dazu unsere Reverse-Proxy-Anleitung, die einen Redirect von HTTP zu HTTPS beinhaltet.</p> <p>\u00d6ffne <code>mailcow.conf</code> und setze <code>HTTP_BIND=</code> - falls nicht bereits gesetzt.</p> <p>Erstellen Sie eine neue Datei <code>data/conf/nginx/redirect.conf</code> und f\u00fcgen Sie die folgende Serverkonfiguration in die Datei ein:</p> <pre><code>server {\n root /web;\n listen 80 default_server;\n listen [::]:80 default_server;\n include /etc/nginx/conf.d/server_name.active;\n if ( $request_uri ~* \"%0A|%0D\" ) { return 403; }\n location ^~ /.well-known/acme-challenge/ {\n allow all;\n default_type \"text/plain\";\n }\n location / {\n return 301 https://$host$uri$is_args$args;\n }\n}\n</code></pre> <p>Falls Sie den Parameter HTTP_BIND ge\u00e4ndert haben, erstellen Sie den Container neu:</p> <pre><code>docker compose up -d\n</code></pre> <p>Andernfalls starten Sie Nginx neu:</p> <pre><code>docker compose restart nginx-mailcow\n</code></pre>"},{"location":"de/manual-guides/u_e-autodiscover_config/","title":"Autodiscover / Autoconfig","text":"<p>Sie brauchen diese Datei nicht zu \u00e4ndern oder zu erstellen, autodiscover funktioniert sofort. Diese Anleitung ist nur f\u00fcr Anpassungen des Autodiscover- oder Autokonfigurationsprozesses gedacht.</p> <p>Neuere Outlook-Clients (insbesondere solche, die mit O365 ausgeliefert werden) f\u00fchren keine automatische Erkennung von E-Mail-Profilen durch. Denken Sie daran, dass ActiveSync NICHT mit einem Desktop-Client verwendet werden sollte.</p> <p>\u00d6ffnen/erstellen Sie <code>data/web/inc/vars.local.inc.php</code> und f\u00fcgen Sie Ihre \u00c4nderungen in das Konfigurationsfeld ein.</p> <p>Die \u00c4nderungen werden mit \"$autodiscover_config\" in <code>data/web/inc/vars.inc.php</code> zusammengef\u00fchrt):</p> <pre><code>&lt;?php\n$autodiscover_config = array(\n // General autodiscover service type: \"activesync\" or \"imap\"\n // emClient uses autodiscover, but does not support ActiveSync. mailcow excludes emClient from ActiveSync.\n 'autodiscoverType' =&gt; 'activesync',\n // If autodiscoverType =&gt; activesync, also use ActiveSync (EAS) for Outlook desktop clients (&gt;= Outlook 2013 on Windows)\n // Outlook for Mac does not support ActiveSync\n 'useEASforOutlook' =&gt; 'yes',\n // Please don't use STARTTLS-enabled service ports in the \"port\" variable.\n // The autodiscover service will always point to SMTPS and IMAPS (TLS-wrapped services).\n // The autoconfig service will additionally announce the STARTTLS-enabled ports, specified in the \"tlsport\" variable.\n 'imap' =&gt; array(\n 'server' =&gt; $mailcow_hostname,\n 'port' =&gt; array_pop(explode(':', getenv('IMAPS_PORT'))),\n 'tlsport' =&gt; array_pop(explode(':', getenv('IMAP_PORT'))),\n ),\n 'pop3' =&gt; array(\n 'server' =&gt; $mailcow_hostname,\n 'port' =&gt; array_pop(explode(':', getenv('POPS_PORT'))),\n 'tlsport' =&gt; array_pop(explode(':', getenv('POP_PORT'))),\n ),\n 'smtp' =&gt; array(\n 'server' =&gt; $mailcow_hostname,\n 'port' =&gt; array_pop(explode(':', getenv('SMTPS_PORT'))),\n 'tlsport' =&gt; array_pop(explode(':', getenv('SUBMISSION_PORT'))),\n ),\n 'activesync' =&gt; array(\n 'url' =&gt; 'https://'.$mailcow_hostname.($https_port == 443 ? '' : ':'.$https_port).'/Microsoft-Server-ActiveSync',\n ),\n 'caldav' =&gt; array(\n 'server' =&gt; $mailcow_hostname,\n 'port' =&gt; $https_port,\n ),\n 'carddav' =&gt; array(\n 'server' =&gt; $mailcow_hostname,\n 'port' =&gt; $https_port,\n ),\n);\n</code></pre> <p>Um immer IMAP und SMTP anstelle von EAS zu verwenden, setzen Sie <code>'autodiscoverType' =&gt; 'imap'</code>.</p> <p>Deaktivieren Sie ActiveSync f\u00fcr Outlook-Desktop-Clients, indem Sie \"useEASforOutlook\" auf \"no\" setzen.</p>"},{"location":"de/manual-guides/u_e-reeanble-weak-protocols/","title":"TLS 1.0 und TLS 1.1 wieder aktivieren","text":"<p>Am 12. Februar 2020 haben wir die veralteten Protokolle TLS 1.0 und 1.1 in Dovecot (POP3, POP3S, IMAP, IMAPS) und Postfix (SMTPS, SUBMISSION) deaktiviert.</p> <p>Unauthentifizierte Mails \u00fcber SMTP an Port 25/tcp akzeptieren weiterhin &gt;= TLS 1.0 . Es ist besser, eine schwache Verschl\u00fcsselung zu akzeptieren als gar keine.</p> <p>Wie kann man schwache Protokolle wieder aktivieren?</p> <p>Bearbeiten Sie <code>data/conf/postfix/extra.cf</code>:</p> <pre><code>submission_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3\nsmtps_smtpd_tls_mandatory_protocols = !SSLv2, !SSLv3\n</code></pre> <p>Bearbeiten Sie <code>data/conf/dovecot/extra.conf</code>:</p> <pre><code>ssl_min_protocol = TLSv1\n</code></pre> <p>Starten Sie die betroffenen Dienste neu:</p> <pre><code>docker compose restart postfix-mailcow dovecot-mailcow\n</code></pre> <p>Tipp: Sie k\u00f6nnen TLS 1.2 in Windows 7 aktivieren.</p>"},{"location":"de/manual-guides/u_e-update-hooks/","title":"Skripte vor und nach Aktualisierungen ausf\u00fchren","text":"<p>Es ist m\u00f6glich, Pre- und Post-Update-Hooks zum <code>update.sh</code> Skript hinzuzuf\u00fcgen, das Ihre gesamte mailcow-Installation aktualisiert.</p> <p>Um dies zu tun, f\u00fcgen Sie einfach das entsprechende Bash-Skript in Ihr Mailcow-Root-Verzeichnis ein: </p> <ul> <li><code>pre_update_hook.sh</code> f\u00fcr Befehle, die vor dem Update laufen sollen</li> <li><code>post_update_hook.sh</code> f\u00fcr Befehle, die nach dem Update ausgef\u00fchrt werden sollen</li> </ul> <p>Beachten Sie, dass <code>pre_update_hook.sh</code> jedes Mal ausgef\u00fchrt wird, wenn Sie <code>update.sh</code> aufrufen, und <code>post_update_hook.sh</code> wird nur ausgef\u00fchrt, wenn die Aktualisierung erfolgreich war und das Skript nicht erneut ausgef\u00fchrt werden muss.</p> <p>Die Skripte werden von der Bash ausgef\u00fchrt, ein Interpreter (z.B. <code>#!/bin/bash</code>) sowie ein Execute Permission Flag (\"+x\") sind nicht erforderlich.</p>"},{"location":"de/manual-guides/u_e-why_unbound/","title":"Warum unbound?","text":"<p>F\u00fcr DNS-Blacklist-Lookups und DNSSEC.</p> <p>Die meisten Systeme verwenden entweder einen \u00f6ffentlichen oder einen lokalen DNS-Aufl\u00f6ser mit Zwischenspeicher. Das ist eine sehr schlechte Idee, wenn es darum geht, Spam mit DNS-basierten Blackhole-Listen (DNSBL) oder \u00e4hnlichen Techniken zu filtern. Die meisten, wenn nicht alle Anbieter wenden eine Ratenbegrenzung an, die auf dem DNS-Resolver basiert, der f\u00fcr die Abfrage ihres Dienstes verwendet wird. Wenn Sie einen \u00f6ffentlichen Resolver wie Google 4x8, OpenDNS oder einen anderen gemeinsam genutzten DNS-Resolver wie den Ihres Internetanbieters verwenden, werden Sie diese Grenze sehr bald erreichen.</p>"},{"location":"de/manual-guides/ClamAV/u_e-clamav-additional_dbs/","title":"Weitere Datenbanken","text":""},{"location":"de/manual-guides/ClamAV/u_e-clamav-additional_dbs/#weitere-datenbanken-fur-clamav","title":"Weitere Datenbanken f\u00fcr ClamAV","text":"<p>Die Standard ClamAV Datenbanken haben keine hohe Trefferquote, k\u00f6nnen aber durch kostenlose und kostenpflichtige Datenbanken erweitert werden.</p>"},{"location":"de/manual-guides/ClamAV/u_e-clamav-additional_dbs/#liste-von-bekannten-kostenfreien-datenbanken-stand-april-2022","title":"Liste von bekannten (kostenfreien) Datenbanken | Stand April 2022","text":"<ul> <li>SecurityInfo - kostenlose ClamAV DBs f\u00fcr Testzwecke. Registrierung der IP Adresse des Servers erforderlich (dann nutzbar f\u00fcr besagte IP).</li> <li>InterServer - kostenlose ClamAV DBs. F\u00fcr E-Mail Zwecke eher ungeeignet.</li> </ul>"},{"location":"de/manual-guides/ClamAV/u_e-clamav-additional_dbs/#securiteinfo-datenbank-aktivieren","title":"SecuriteInfo Datenbank aktivieren","text":"<ol> <li>Kostenfreien Account auf https://www.securiteinfo.com/clients/customers/signup erstellen.</li> <li>Sie erhalten eine E-Mail um Ihren Account zu aktivieren gefolgt von einer E-Mail mit Ihrem Login Namen.</li> <li>Loggen Sie sich ein und navigieren Sie zu Ihrem Account https://www.securiteinfo.com/clients/customers/account</li> <li>Klicken Sie auf den 'Setup' Reiter.</li> <li>Sie brauchen <code>your_id</code> von den Downloadlinks. Diese sind pro User individuell.</li> <li> <p>F\u00fcgen Sie diese wie folgt in die <code>data/conf/clamav/freshclam.conf</code> ein und ersetzen Sie den <code>your_id</code> Teil mit Ihrer ID: <pre><code>DatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/securiteinfo.hdb\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/securiteinfo.ign2\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/javascript.ndb\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/spam_marketing.ndb\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/securiteinfohtml.hdb\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/securiteinfoascii.hdb\nDatabaseCustomURL https://www.securiteinfo.com/get/signatures/your_id/securiteinfopdf.hdb\n</code></pre></p> </li> <li> <p>Bei den kostenlosen SecuriteInfo Datenbanken ist die Download-Geschwindigkeit auf 300 kB/s begrenzt. \u00c4ndern Sie in <code>data/conf/clamav/freshclam.conf</code> den Standardwert <code>ReceiveTimeout 20</code> auf <code>ReceiveTimeout 90</code> (Zeitangabe in Sekunden), da ansonsten einige der Datenbank-Downloads aufgrund ihrer Gr\u00f6\u00dfe abbrechen k\u00f6nnen.</p> </li> <li> <p>Passen Sie <code>data/conf/clamav/clamd.conf</code> mit den folgenden Einstellungen an: <pre><code>DetectPUA yes\nExcludePUA PUA.Win.Packer\nExcludePUA PUA.Win.Trojan.Packed\nExcludePUA PUA.Win.Trojan.Molebox\nExcludePUA PUA.Win.Packer.Upx\nExcludePUA PUA.Doc.Packed\nMaxScanSize 150M\nMaxFileSize 100M\nMaxRecursion 40\nMaxEmbeddedPE 100M\nMaxHTMLNormalize 50M\nMaxScriptNormalize 50M\nMaxZipTypeRcg 50M\n</code></pre></p> </li> <li>Starten Sie den ClamAV Container neu: <pre><code>docker compose restart clamd-mailcow\n</code></pre></li> </ol> <p>Bitte beachten Sie:</p> <ul> <li>Sie k\u00f6nnen <code>ExcludePUA</code> und <code>IncludePUA</code> in der <code>clamd.conf</code> nicht gleichzeitig nutzen! Kommentieren Sie bitte <code>IncludePUA</code> aus, sollte es nicht auskommentiert sein. </li> <li>Die Liste der Datenbanken genutzt in diesem Beispiel sollten f\u00fcr die meisten F\u00e4lle passen. SecuriteInfo bietet jedoch noch andere Datenbanken an. Bitte schauen Sie sich das SecuriteInfo FAQ f\u00fcr weitere Informationen an.</li> <li>Mit den neu eingestellten Datenbanken (und den Standard Datenbanken) ClamAV verbraucht ClamAV etwa 1,3 GB RAM des Servers.</li> <li>Sollten Sie <code>message_size_limit</code> in Postfix ver\u00e4ndert haben m\u00fcssen Sie die <code>MaxSize</code> Einstellung in ClamAV auf den selben Wert eintragen.</li> </ul>"},{"location":"de/manual-guides/ClamAV/u_e-clamav-additional_dbs/#interserver-datenbanken-aktivieren","title":"InterServer Datenbanken aktivieren","text":"<ol> <li>F\u00fcgen Sie folgendes in <code>data/conf/clamav/freshclam.conf</code> ein: <pre><code>DatabaseCustomURL http://sigs.interserver.net/interserver256.hdb\nDatabaseCustomURL http://sigs.interserver.net/interservertopline.db\nDatabaseCustomURL http://sigs.interserver.net/shell.ldb\nDatabaseCustomURL http://sigs.interserver.net/whitelist.fp\n</code></pre></li> <li>Starten Sie den ClamAV Container neu: <pre><code>docker compose restart clamd-mailcow\n</code></pre></li> </ol>"},{"location":"de/manual-guides/ClamAV/u_e-clamav-whitelist/","title":"Whitelist","text":""},{"location":"de/manual-guides/ClamAV/u_e-clamav-whitelist/#whitelist-fur-bestimmte-clamav-signaturen","title":"Whitelist f\u00fcr bestimmte ClamAV-Signaturen","text":"<p>Es kann vorkommen, dass legitime (saubere) Mails von ClamAV blockiert werden (Rspamd markiert die Mail mit <code>VIRUS_FOUND</code>). So werden beispielsweise interaktive PDF-Formularanh\u00e4nge standardm\u00e4\u00dfig blockiert, da der eingebettete Javascript-Code f\u00fcr sch\u00e4dliche Zwecke verwendet werden k\u00f6nnte. \u00dcberpr\u00fcfen Sie dies anhand der clamd-Protokolle, z.B.:</p> <pre><code>docker compose logs clamd-mailcow | grep \"FOUND\"\n</code></pre> <p>Diese Zeile best\u00e4tigt, dass ein solcher identifiziert wurde:</p> <pre><code>clamd-mailcow_1 | Sat Sep 28 07:43:24 2019 -&gt; instream(local): PUA.Pdf.Trojan.EmbeddedJavaScript-1(e887d2ac324ce90750768b86b63d0749:363325) FOUND\n</code></pre> <p>Um diese spezielle Signatur auf die Whitelist zu setzen (und den Versand dieses Dateityps im Anhang zu erm\u00f6glichen), f\u00fcgen Sie sie der ClamAV-Signatur-Whitelist-Datei hinzu:</p> <pre><code>echo 'PUA.Pdf.Trojan.EmbeddedJavaScript-1' &gt;&gt; data/conf/clamav/whitelist.ign2\n</code></pre> <p>Dann starten Sie den clamd-mailcow Service Container in der mailcow UI oder mit docker compose neu:</p> <pre><code>docker compose restart clamd-mailcow\n</code></pre> <p>Bereinigen Sie zwischengespeicherte ClamAV-Ergebnisse in Redis:</p> <pre><code># docker compose exec redis-mailcow /bin/sh\n/data # redis-cli KEYS rs_cl* | xargs redis-cli DEL\n/data # exit\n</code></pre>"},{"location":"de/manual-guides/Docker/u_e-docker-cust_dockerfiles/","title":"Dockerfiles anpassen","text":"<p>Sie m\u00fcssen die Override-Datei mit den entsprechenden Build-Tags in den mailcow: dockerized Root-Ordner (d.h. <code>/opt/mailcow-dockerized</code>) kopieren: <pre><code>cp helper-scripts/docker-compose.override.yml.d/BUILD_FLAGS/docker-compose.override.yml docker-compose.override.yml\n</code></pre></p> <p>Nehmen Sie Ihre \u00c4nderungen in <code>data/Dockerfiles/$service</code> vor und erstellen Sie das Image lokal: <pre><code>docker build data/Dockerfiles/$service -t mailcow/$service:$tag\n</code></pre> (Ohne pers\u00f6nlichen :$tag wird automatisch :latest verwendet.)</p> <p>Nun muss dieser gerade erstellte Container in docker-compose.override.yml aktiviert werden, z.B.: <pre><code>$service-mailcow:\n build: ./data/Dockerfiles/$service\n image: mailcow/$service:$tag\n</code></pre></p> <p>Abschliessend m\u00fcssen die ge\u00e4nderten Container automatisch neu erstellt werden: <pre><code>docker compose up -d\n</code></pre></p>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-any_acl/","title":"Aktivierung von \"any\" ACL-Einstellungen","text":"<p>Am 17. August haben wir die M\u00f6glichkeit, mit \"jedem\" oder \"allen authentifizierten Benutzern\" zu teilen, standardm\u00e4\u00dfig deaktiviert.</p> <p>Diese Funktion kann wieder aktiviert werden, indem <code>ACL_ANYONE</code> auf <code>allow</code> in mailcow.conf gesetzt wird:</p> <pre><code>ACL_ANYONE=allow\n</code></pre> <p>Wenden Sie die \u00c4nderungen an, indem Sie <code>docker compose up -d</code> ausf\u00fchren.</p>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-catchall_vacation/","title":"Urlaubsantworten f\u00fcr Catchall-Adressen","text":"<p>Der Dovecot-Parameter <code>sieve_vacation_dont_check_recipient</code> - der in mailcow-Konfigurationen vor dem 21. Juli 2021 standardm\u00e4\u00dfig auf <code>yes</code> gesetzt war - erlaubt Urlaubsantworten auch dann, wenn eine Mail an nicht existierende Mailboxen wie Catch-All-Adressen gesendet wird.</p> <p>Wir haben uns entschlossen, diesen Parameter wieder auf <code>nein</code> zu setzen und dem Benutzer zu erlauben, die Empf\u00e4ngeradresse zu spezifizieren, die eine Urlaubsantwort ausl\u00f6st. Die ausl\u00f6senden Empf\u00e4nger k\u00f6nnen auch in SOGos Autoresponder-Funktion konfiguriert werden.</p>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-expunge/","title":"L\u00f6schen der Mails eines Benutzers","text":"<p>Wenn Sie alte Mails aus den Ordnern <code>.Junk</code> oder <code>.Trash</code> l\u00f6schen wollen oder vielleicht alle gelesenen Mails, die \u00e4lter als eine bestimmte Zeitspanne sind, k\u00f6nnen Sie das dovecot-Tool doveadm man doveadm-expunge verwenden.</p>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-expunge/#der-manuelle-weg","title":"Der manuelle Weg","text":"<p>Dann wollen wir mal loslegen:</p> <p>L\u00f6schen Sie die Mails eines Benutzers im Junk-Ordner, die gelesen und \u00e4lter als 4 Stunden sind</p> <pre><code>docker compose exec dovecot-mailcow doveadm expunge -u 'mailbox@example.com' mailbox 'Junk' SEEN not SINCE 4h\n</code></pre> <p>L\u00f6sche alle Mails des Benutzers im Junk-Ordner, die \u00e4lter als 7 Tage sind</p> <pre><code>docker compose exec dovecot-mailcow doveadm expunge -A mailbox 'Junk' savedbefore 7d\n</code></pre> <p>L\u00f6scht alle Mails (aller Benutzer) in allen Ordnern, die \u00e4lter als 52 Wochen sind (internes Datum der Mail, nicht das Datum, an dem sie auf dem System gespeichert wurde =&gt; <code>before</code> statt <code>savedbefore</code>). N\u00fctzlich zum L\u00f6schen sehr alter Mails in allen Benutzern und Ordnern (daher besonders n\u00fctzlich f\u00fcr GDPR-Compliance).</p> <pre><code>docker compose exec dovecot-mailcow doveadm expunge -A mailbox % before 52w\n</code></pre> <p>L\u00f6schen von Mails in einem benutzerdefinierten Ordner innerhalb des Posteingangs eines Benutzers, die nicht gekennzeichnet und \u00e4lter als 2 Wochen sind</p> <pre><code>docker compose exec dovecot-mailcow doveadm expunge -u 'mailbox@example.com' mailbox 'INBOX/custom-folder' not FLAGGED not SINCE 2w\n</code></pre> <p>Info</p> <p>F\u00fcr m\u00f6gliche Zeitspannen oder SearchQuery schauen Sie bitte in man doveadm-search-query</p>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-expunge/#job-scheduler","title":"Job-Scheduler","text":""},{"location":"de/manual-guides/Dovecot/u_e-dovecot-expunge/#uber-das-host-system-cron","title":"\u00fcber das Host-System cron","text":"<p>Wenn Sie eine solche Aufgabe automatisieren wollen, k\u00f6nnen Sie einen Cron-Job auf Ihrem Rechner erstellen, der ein Skript wie das folgende aufruft:</p> <pre><code>#!/bin/bash\n# Pfad zu mailcow-dockerized, z.B. /opt/mailcow-dockerized\ncd /pfad/zu/ihrem/mailcow-dockerized\n\n/usr/local/bin/docker compose exec -T dovecot-mailcow doveadm expunge -A mailbox 'Junk' savedbefore 2w\n/usr/local/bin/docker compose exec -T dovecot-mailcow doveadm expunge -A mailbox 'Junk' SEEN not SINCE 12h\n[...]\n</code></pre> <p>Um einen Cronjob zu erstellen, k\u00f6nnen Sie <code>crontab -e</code> ausf\u00fchren und etwas wie das Folgende einf\u00fcgen, um ein Skript auszuf\u00fchren:</p> <pre><code># Jeden Tag um 04:00 Uhr morgens ausf\u00fchren.\n0 4 * * * /pfad/zu/ihr/expunge_mailboxes.sh\n</code></pre>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-expunge/#uber-docker-job-scheduler","title":"\u00fcber Docker Job Scheduler","text":"<p>Um dies mit einem Docker-Job-Scheduler zu archivieren, verwenden Sie diese docker-compose.override.yml mit Ihrer Mailcow: </p> <pre><code>version: '2.1'\n\nservices:\n\n ofelia:\n image: mcuadros/ofelia:latest\n restart: always\n command: daemon --docker\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock:ro \n network_mode: none\n\n dovecot-mailcow:\n labels:\n - \"ofelia.enabled=true\"\n - \"ofelia.job-exec.dovecot-expunge-trash.schedule=0 4 * * *\"\n - \"ofelia.job-exec.dovecot-expunge-trash.command=doveadm expunge -A mailbox 'Junk' savedbefore 2w\"\n - \"ofelia.job-exec.dovecot-expunge-trash.tty=false\"\n</code></pre> <p>Der Job-Controller braucht nur Zugriff auf den Docker Control Socket, um das Verhalten von \"exec\" zu emulieren. Dann f\u00fcgen wir unserem Dovecot-Container ein paar Labels hinzu, um den Job-Scheduler zu aktivieren und ihm in einem Cron-kompatiblen Scheduling-Format mitzuteilen, wann er laufen soll. Wenn Sie Probleme mit dem Scheduling-String haben, k\u00f6nnen Sie crontab guru verwenden. Diese docker-compose.override.yml l\u00f6scht jeden Tag um 4 Uhr morgens alle Mails, die \u00e4lter als 2 Wochen sind, aus dem Ordner \"Junk\". Um zu sehen, ob alles richtig gelaufen ist, k\u00f6nnen Sie nicht nur in Ihrer Mailbox nachsehen, sondern auch im Docker-Log von Ofelia, ob es etwa so aussieht:</p> <pre><code>common.go:124 \u25b6 NOTICE [Job \"dovecot-expunge-trash\" (8759567efa66)] Started - doveadm expunge -A mailbox 'Junk' savedbefore 2w,\ncommon.go:124 \u25b6 NOTICE [Job \"dovecot-expunge-trash\" (8759567efa66)] Finished in \"285.032291ms\", failed: false, skipped: false, error: none,\n</code></pre> <p>Wenn der Vorgang fehlgeschlagen ist, wird dies angegeben und die Ausgabe von doveadm im Protokoll aufgef\u00fchrt, um Ihnen die Fehlersuche zu erleichtern.</p> <p>Falls Sie weitere Jobs hinzuf\u00fcgen wollen, stellen Sie sicher, dass Sie den \"dovecot-expunge-trash\"-Teil nach \"ofelia.job-exec.\" in etwas anderes \u00e4ndern, er definiert den Namen des Jobs. Die Syntax der Labels finden Sie unter mcuadros/ofelia.</p>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-extra_conf/","title":"Anpassen/Erweitern von dovecot.conf","text":"<p>Erstellen Sie eine Datei <code>data/conf/dovecot/extra.conf</code> - falls nicht vorhanden - und f\u00fcgen Sie Ihren zus\u00e4tzlichen Inhalt hier ein.</p> <p>Starten Sie <code>dovecot-mailcow</code> neu, um Ihre \u00c4nderungen zu \u00fcbernehmen:</p> <pre><code>docker compose restart dovecot-mailcow\n</code></pre>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-fts/","title":"FTS (Solr)","text":""},{"location":"de/manual-guides/Dovecot/u_e-dovecot-fts/#fts-solr","title":"FTS Solr","text":"<p>Solr wird f\u00fcr Setups mit Speicher &gt;= 3,5 GiB verwendet, um eine Volltextsuche in Dovecot zu erm\u00f6glichen.</p> <p>Bitte beachten Sie, dass Anwendungen wie Solr vielleicht von Zeit zu Zeit gewartet werden m\u00fcssen.</p> <p>Au\u00dferdem verbraucht Solr eine Menge RAM, abh\u00e4ngig von der Nutzung Ihres Servers. Bitte vermeiden Sie es auf Maschinen mit weniger als 3 GB RAM.</p> <p>Die Standard-Heap-Gr\u00f6\u00dfe (1024 M) ist in mailcow.conf definiert.</p> <p>Da wir in Docker laufen und unsere Container mit dem \"restart: always\" Flag erstellen, wird eine oom Situation zumindest nur einen Neustart des Containers ausl\u00f6sen.</p>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-fts/#fts-bezogene-dovecot-befehle","title":"FTS-bezogene Dovecot-Befehle","text":"<p><pre><code># Einzelbenutzer\ndocker compose exec dovecot-mailcow doveadm fts rescan -u user@domain\n# alle Benutzer\ndocker compose exec dovecot-mailcow doveadm fts rescan -A\n</code></pre> Dovecot Wiki: \"Scannt, welche Mails im Volltextsuchindex vorhanden sind und vergleicht diese mit den tats\u00e4chlich in den Postf\u00e4chern vorhandenen Mails. Dies entfernt Mails aus dem Index, die bereits gel\u00f6scht wurden und stellt sicher, dass der n\u00e4chste doveadm-Index alle fehlenden Mails (falls vorhanden) indiziert.\"</p> <p>Dies indiziert nicht eine Mailbox neu. Es repariert im Grunde einen gegebenen Index.</p> <p>Wenn Sie die Daten sofort neu indizieren wollen, k\u00f6nnen Sie den folgenden Befehl ausf\u00fchren, wobei '*' auch eine Postfachmaske wie 'Sent' sein kann. Sie m\u00fcssen diese Befehle nicht ausf\u00fchren, aber es wird die Dinge ein wenig beschleunigen:</p> <pre><code># einzelner Benutzer\ndocker compose exec dovecot-mailcow doveadm index -u user@domain '*'\n# alle Benutzer, aber offensichtlich langsamer und gef\u00e4hrlicher\ndocker compose exec dovecot-mailcow doveadm index -A '*'\n</code></pre> <p>Dies wird einige Zeit in Anspruch nehmen, abh\u00e4ngig von Ihrer Maschine und Solr kann oom ausf\u00fchren, \u00fcberwachen Sie es!</p> <p>Da die Neuindizierung sehr sinnvoll ist, haben wir sie nicht in die mailcow UI integriert. Sie m\u00fcssen sich um eventuelle Fehler beim Re-Indizieren einer Mailbox k\u00fcmmern.</p>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-fts/#loschen-der-mailbox-daten","title":"L\u00f6schen der Mailbox-Daten","text":"<p>mailcow wird die Indexdaten eines Benutzers l\u00f6schen, wenn eine Mailbox gel\u00f6scht wird.</p>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-idle_interval/","title":"\u00c4ndern des IMAP-IDLE-Intervalls","text":""},{"location":"de/manual-guides/Dovecot/u_e-dovecot-idle_interval/#was-ist-das-idle-intervall","title":"Was ist das IDLE-Intervall?","text":"<p>Standardm\u00e4\u00dfig sendet Dovecot eine \"Ich bin noch da\"-Benachrichtigung an jeden Client, der eine offene Verbindung mit Dovecot hat, um Mails so schnell wie m\u00f6glich zu erhalten, ohne sie manuell abzufragen (IMAP PUSH). Diese Benachrichtigung wird durch die Einstellung <code>imap_idle_notify_interval</code> gesteuert, die standardm\u00e4\u00dfig auf 2 Minuten eingestellt ist. </p> <p>Ein kurzes Intervall f\u00fchrt dazu, dass der Client viele Nachrichten f\u00fcr diese Verbindung erh\u00e4lt, was f\u00fcr mobile Ger\u00e4te schlecht ist, da jedes Mal, wenn das Ger\u00e4t diese Nachricht erh\u00e4lt, die Mailing-App aufwachen muss. Dies kann zu einer unn\u00f6tigen Entladung der Batterie f\u00fchren.</p>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-idle_interval/#bearbeiten-sie-den-wert","title":"Bearbeiten Sie den Wert","text":""},{"location":"de/manual-guides/Dovecot/u_e-dovecot-idle_interval/#konfiguration-andern","title":"Konfiguration \u00e4ndern","text":"<p>Erstellen Sie eine neue Datei <code>data/conf/dovecot/extra.conf</code> (oder bearbeiten Sie sie, falls sie bereits existiert). F\u00fcgen Sie die Einstellung ein, gefolgt von dem neuen Wert. Um zum Beispiel das Intervall auf 5 Minuten zu setzen, k\u00f6nnen Sie Folgendes eingeben:</p> <pre><code>imap_idle_notify_interval = 5 mins\n</code></pre> <p>29 Minuten ist der maximale Wert, den der entsprechende RFC erlaubt.</p> <p>Warning</p> <p>Dies ist keine Standardeinstellung in mailcow, da wir nicht wissen, wie diese Einstellung das Verhalten anderer Clients ver\u00e4ndert. Seien Sie vorsichtig, wenn Sie dies \u00e4ndern und ein anderes Verhalten beobachten.</p>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-idle_interval/#dovecot-neu-laden","title":"Dovecot neu laden","text":"<p>Nun laden Sie Dovecot neu:</p> <pre><code>docker compose exec dovecot-mailcow dovecot reload\n</code></pre> <p>Info</p> <p>Sie k\u00f6nnen den Wert dieser Einstellung \u00fcberpr\u00fcfen mit <pre><code>docker compose exec dovecot-mailcow dovecot -a | grep \"imap_idle_notify_interval\"\n</code></pre> Wenn Sie den Wert nicht ge\u00e4ndert haben, sollte er auf 2m stehen. Wenn Sie ihn ge\u00e4ndert haben, sollten Sie den neuen Wert sehen.</p>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-mail-crypt/","title":"Mail crypt","text":"<p>Achtung</p> <p>Die Mails werden komprimiert (lz4) und verschl\u00fcsselt gespeichert. Das Schl\u00fcsselpaar ist in crypt-vol-1 zu finden.</p> <p>Wenn Sie vorhandene maildir-Dateien entschl\u00fcsseln/verschl\u00fcsseln wollen, k\u00f6nnen Sie das folgende Skript auf eigene Gefahr verwenden:</p> <p>Rufen Sie Dovecot auf, indem Sie <code>docker compose exec dovecot-mailcow /bin/bash</code> im mailcow-dockerisierten Verzeichnis ausf\u00fchren.</p> <pre><code># Entschl\u00fcsseln Sie /var/vmail\nfind /var/vmail/ -type f -regextype egrep -regex '.*S=.*W=.*' | while read -r file; do\nif [[ $(head -c7 \"$file\") == \"CRYPTED\" ]]; then\ndoveadm fs get compress lz4:1:crypt:private_key_path=/mail_crypt/ecprivkey.pem:public_key_path=/mail_crypt/ecpubkey.pem:posix:prefix=/ \\\n \"$file\" &gt; \"/tmp/$(basename \"$file\")\"\n if [[ -s \"/tmp/$(basename \"$file\")\" ]]; then\n chmod 600 \"/tmp/$(basename \"$file\")\"\n chown 5000:5000 \"/tmp/$(basename \"$file\")\"\n mv \"/tmp/$(basename \"$file\")\" \"$file\"\n else\n rm \"/tmp/$(basename \"$file\")\"\n fi\nfi\ndone\n\n\n# Verschl\u00fcsseln von /var/vmail\nfind /var/vmail/ -type f -regextype egrep -regex '.*S=.*W=.*' | while read -r file; do\nif [[ $(head -c7 \"$file\") != \"CRYPTED\" ]]; then\ndoveadm fs put crypt private_key_path=/mail_crypt/ecprivkey.pem:public_key_path=/mail_crypt/ecpubkey.pem:posix:prefix=/ \\\n \"$file\" \"$file\"\n chmod 600 \"$file\"\n chown 5000:5000 \"$file\"\nfi\ndone\n</code></pre>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-more/","title":"Weitere Beispiele mit DOVEADM","text":"<p>Hier ist nur eine unsortierte Liste von n\u00fctzlichen <code>doveadm</code>-Befehlen, die n\u00fctzlich sein k\u00f6nnten.</p>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-more/#doveadm-quota","title":"doveadm quota","text":"<p>Die Befehle <code>quota get</code> und <code>quota recalc</code>1 werden verwendet, um die Quota-Nutzung des aktuellen Benutzers anzuzeigen oder neu zu berechnen. Die angezeigten Werte sind in Kilobytes.</p> <p>Um den aktuellen Quota-Status f\u00fcr einen Benutzer / eine Mailbox aufzulisten, tun Sie folgendes:</p> <pre><code>doveadm quota get -u 'mailbox@example.org'\n</code></pre> <p>Um den Quota-Speicherwert f\u00fcr alle Benutzer aufzulisten, tun Sie folgendes:</p> <pre><code>doveadm quota get -A |grep \"STORAGE\"\n</code></pre> <p>Berechnen Sie die Quota-Nutzung eines einzelnen Benutzers neu:</p> <pre><code>doveadm quota recalc -u 'mailbox@example.org'\n</code></pre>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-more/#doveadm-search","title":"doveadm search","text":"<p>Der Befehl <code>doveadm search</code>2 wird verwendet, um Nachrichten zu finden, die Ihrer Anfrage entsprechen. Er kann den Benutzernamen, die Mailbox-GUID / -UID und die Nachrichten-GUIDs / -UIDs zur\u00fcckgeben.</p> <p>Um die Anzahl der Nachrichten im .Trash Ordner eines Benutzers zu sehen:</p> <pre><code>doveadm search -A mailbox 'Trash' | awk '{print $1}' | sort | uniq -c\n</code></pre> <p>Alle Nachrichten im Postfach eines Benutzers anzeigen, die \u00e4lter als 90 Tage sind:</p> <pre><code>doveadm search -u 'mailbox@example.org' mailbox 'INBOX' savedbefore 90d\n</code></pre> <p>Zeige alle Nachrichten in beliebigen Ordnern, die \u00e4lter sind als 30 Tage f\u00fcr <code>mailbox@example.org</code>:</p> <pre><code>doveadm search -u 'mailbox@example.org' mailbox \"*\" savedbefore 30d\n</code></pre> <ol> <li> <p>https://wiki.dovecot.org/Tools/Doveadm/Quota \u21a9</p> </li> <li> <p>https://wiki.dovecot.org/Tools/Doveadm/Search \u21a9</p> </li> </ol>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-public_folder/","title":"\u00d6ffentliche Ordner","text":"<p>Erstellen Sie einen neuen \u00f6ffentlichen Namespace \"Public\" und eine Mailbox \"Develcow\" innerhalb dieses Namespaces:</p> <p>Bearbeiten oder erstellen Sie <code>data/conf/dovecot/extra.conf</code>, f\u00fcgen Sie hinzu:</p> <pre><code>namespace {\n type = public\n separator = /\n prefix = Public/\n location = maildir:/var/vmail/public:INDEXPVT=~/public\n subscriptions = yes\n mailbox \"Develcow\" {\n auto = subscribe\n }\n}\n</code></pre> <p><code>:INDEXPVT=~/public</code> kann weggelassen werden, wenn die Flags, die pro Benutzer gesehen werden, nicht gew\u00fcnscht sind.</p> <p>Die neue Mailbox im \u00f6ffentlichen Namensraum wird von den Benutzern automatisch abonniert.</p> <p>Um allen authentifizierten Benutzern vollen Zugriff auf das neue Postfach (nicht auf den gesamten Namespace) zu gew\u00e4hren, f\u00fchren Sie aus:</p> <pre><code>docker compose exec dovecot-mailcow doveadm acl set -A \"Public/Develcow\" \"authenticated\" lookup read write write-seen write-deleted insert post delete expunge create\n</code></pre> <p>Passen Sie den Befehl an Ihre Bed\u00fcrfnisse an, wenn Sie detailliertere Rechte pro Benutzer vergeben m\u00f6chten (verwenden Sie z.B. <code>-u user@domain</code> anstelle von <code>-A</code>).</p>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-public_folder/#erlaube-authentifizierten-benutzern-den-zugriff-auf-den-gesamten-offentlichen-namespace","title":"Erlaube authentifizierten Benutzern den Zugriff auf den gesamten \u00f6ffentlichen Namespace","text":"<p>Um allen authentifizierten Benutzern vollen Zugriff auf den gesamten \u00f6ffentlichen Namespace und seine Unterordner zu gew\u00e4hren, erstellen Sie eine neue Datei <code>dovecot-acl</code> im Namespace-Stammverzeichnis:</p> <p>\u00d6ffnen/bearbeiten/erstellen Sie <code>/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data/public/dovecot-acl</code> (passen Sie den Pfad entsprechend an), um die globale ACL-Datei mit dem folgenden Inhalt zu erstellen:</p> <pre><code>authenticated kxeilprwts\n</code></pre> <p>kxeilprwts\" ist gleichbedeutend mit \"lookup read write write-seen write-deleted insert post delete expunge create\".</p> <p>Sie k\u00f6nnen <code>doveadm acl set -u user@domain \"Public/Develcow\" user=user@domain lookup read</code> verwenden, um den Zugriff f\u00fcr einen einzelnen Benutzer zu beschr\u00e4nken. Sie k\u00f6nnen es auch umdrehen und den Zugriff f\u00fcr alle Benutzer auf \"lr\" beschr\u00e4nken und nur einigen Benutzern vollen Zugriff gew\u00e4hren.</p> <p>Siehe Dovecot ACL f\u00fcr weitere Informationen \u00fcber ACL.</p>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-static_master/","title":"Statischer Hauptbenutzer","text":"<p>Zuf\u00e4llige Master-Benutzernamen und Passw\u00f6rter werden automatisch bei jedem Neustart von dovecot-mailcow erstellt.</p> <p>Das wird empfohlen und sollte nicht ge\u00e4ndert werden.</p> <p>Wenn der Benutzer trotzdem statisch sein soll, geben Sie bitte zwei Variablen in <code>mailcow.conf</code> an.</p> <p>Beide Parameter d\u00fcrfen nicht leer sein!</p> <pre><code>DOVECOT_MASTER_USER=mymasteruser\nDOVECOT_MASTER_PASS=mysecretpass\n</code></pre> <p>F\u00fchren Sie <code>docker compose up -d</code> aus, um Ihre \u00c4nderungen zu \u00fcbernehmen.</p> <p>Der statische Master-Benutzername wird zu <code>DOVECOT_MASTER_USER@mailcow.local</code> erweitert.</p> <p>Um sich als <code>test@example.org</code> anzumelden, w\u00fcrde dies <code>test@example.org*mymasteruser@mailcow.local</code> mit dem oben angegebenen Passwort entsprechen.</p> <p>Eine Anmeldung bei SOGo ist mit diesem Benutzernamen nicht m\u00f6glich. F\u00fcr Admins steht eine Click-to-Login-Funktion f\u00fcr SOGo zur Verf\u00fcgung, wie [hier] beschrieben (https://mailcow.github.io/mailcow-dockerized-docs/debug-admin_login_sogo/) Es wird kein Hauptbenutzer ben\u00f6tigt.</p>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-vmail-volume/","title":"Maildir verschieben (vmail)","text":""},{"location":"de/manual-guides/Dovecot/u_e-dovecot-vmail-volume/#der-neue-weg","title":"Der \"neue\" Weg","text":"<p>Warning</p> <p>Neuere Docker-Versionen scheinen sich \u00fcber bestehende Volumes zu beschweren. Man kann dies vor\u00fcbergehend beheben, indem man das bestehende Volume entfernt und mailcow mit der Override-Datei startet. Aber es scheint nach einem Neustart problematisch zu sein (muss best\u00e4tigt werden).</p> <p>Ein einfacher, schmutziger, aber stabiler Workaround ist es, mailcow zu stoppen (<code>docker compose down</code>), <code>/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data</code> zu entfernen und einen neuen Link zu Ihrem entfernten Dateisystem zu erstellen, zum Beispiel:</p> <pre><code>mv /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data_backup\nln -s /mnt/volume-xy/vmail_data /var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data\n</code></pre> <p>Starten Sie anschlie\u00dfend mailcow.</p>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-vmail-volume/#der-alte-weg","title":"Der \"alte\" Weg","text":"<p>Wenn man einen anderen Ordner f\u00fcr das vmail-Volume verwenden m\u00f6chte, kann man eine <code>docker-compose.override.yml</code> Datei erstellen und den folgenden Inhalt hinzuf\u00fcgen:</p> <pre><code>version: '2.1'\nvolumes:\n vmail-vol-1:\n driver_opts:\n type: none\n device: /data/mailcow/vmail \n o: bind\n</code></pre>"},{"location":"de/manual-guides/Dovecot/u_e-dovecot-vmail-volume/#verschieben-eines-bestehenden-vmail-ordners","title":"Verschieben eines bestehenden vmail-Ordners:","text":"<ul> <li>Finden Sie den aktuellen vmail-Ordner anhand seines \"Mountpoint\"-Attributs: <code>docker volume inspect mailcowdockerized_vmail-vol-1</code></li> </ul> <pre><code>[\n {\n \"CreatedAt\": \"2019-06-16T22:08:34+02:00\",\n \"Driver\": \"local\",\n \"Labels\": {\n \"com.docker.compose.project\": \"mailcowdockerized\",\n \"com.docker.compose.version\": \"1.23.2\",\n \"com.docker.compose.volume\": \"vmail-vol-1\"\n },\n \"Mountpoint\": \"/var/lib/docker/volumes/mailcowdockerized_vmail-vol-1/_data\",\n \"Name\": \"mailcowdockerized_vmail-vol-1\",\n \"Options\": null,\n \"Scope\": \"local\"\n }\n]\n</code></pre> <ul> <li>Kopieren Sie den Inhalt des <code>Mountpoint</code>-Ordners an den neuen Speicherort (z.B. <code>/data/mailcow/vmail</code>) mit <code>cp -a</code>, <code>rsync -a</code> oder einem \u00e4hnlichen, nicht strikten Kopierbefehl</li> <li>Stoppen Sie mailcow durch Ausf\u00fchren von <code>docker compose down</code> aus Ihrem mailcow-Stammverzeichnis (z.B. <code>/opt/mailcow-dockerized</code>)</li> <li>Erstellen Sie die Datei <code>docker-compose.override.yml</code>, bearbeiten Sie den Ger\u00e4tepfad entsprechend</li> <li>L\u00f6schen Sie den aktuellen vmail-Ordner: <code>docker volume rm mailcowdockerized_vmail-vol-1</code></li> <li>Starten Sie mailcow durch Ausf\u00fchren von <code>docker compose up -d</code> aus Ihrem mailcow-Stammverzeichnis (z.B. <code>/opt/mailcow-dockerized</code>)</li> </ul>"},{"location":"de/manual-guides/Nginx/u_e-nginx_custom/","title":"Benutzerdefinierte Seiten","text":""},{"location":"de/manual-guides/Nginx/u_e-nginx_custom/#ssl","title":"SSL","text":"<p>Bitte lesen Sie Erweitertes SSL und \u00fcberpr\u00fcfen Sie explizit <code>ADDITIONAL_SERVER_NAMES</code> f\u00fcr die SSL-Konfiguration.</p> <p>Bitte f\u00fcgen Sie ADDITIONAL_SERVER_NAMES nicht hinzu, wenn Sie planen, einen anderen Web-Root zu verwenden.</p>"},{"location":"de/manual-guides/Nginx/u_e-nginx_custom/#neue-website","title":"Neue Website","text":"<p>Um persistente (\u00fcber Updates) Sites zu erstellen, die von mailcow: dockerized gehostet werden, muss eine neue Site-Konfiguration in <code>data/conf/nginx/</code> platziert werden:</p> <p>Eine gute Vorlage, um damit zu beginnen:</p> <pre><code>nano data/conf/nginx/my_custom_site.conf\n</code></pre> <pre><code>server {\n ssl_certificate /etc/ssl/mail/cert.pem;\n ssl_certificate_key /etc/ssl/mail/key.pem;\n ssl_protocols TLSv1.2 TLSv1.3;\n ssl_prefer_server_ciphers on;\n ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;\n ssl_ecdh_curve X25519:X448:secp384r1:secp256k1;\n ssl_session_cache shared:SSL:50m;\n ssl_session_timeout 1d;\n ssl_session_tickets off;\n index index.php index.html;\n client_max_body_size 0;\n # Location: data/web\n root /web;\n # Location: data/web/mysite.com\n #root /web/mysite.com\n include /etc/nginx/conf.d/listen_plain.active;\n include /etc/nginx/conf.d/listen_ssl.active;\n server_name mysite.example.org;\n server_tokens off;\n\n # This allows acme to be validated even with a different web root\n location ^~ /.well-known/acme-challenge/ {\n default_type \"text/plain\";\n rewrite /.well-known/acme-challenge/(.*) /$1 break;\n root /web/.well-known/acme-challenge/;\n }\n\n if ($scheme = http) {\n return 301 https://$server_name$request_uri;\n }\n}\n</code></pre>"},{"location":"de/manual-guides/Nginx/u_e-nginx_custom/#neue-website-mit-proxy-zu-einem-entfernten-location","title":"Neue Website mit Proxy zu einem entfernten Location","text":"<p>Ein weiteres Beispiel mit einer Reverse-Proxy-Konfiguration:</p> <pre><code>nano data/conf/nginx/my_custom_site.conf\n</code></pre> <pre><code>server {\n ssl_certificate /etc/ssl/mail/cert.pem;\n ssl_certificate_key /etc/ssl/mail/key.pem;\n ssl_protocols TLSv1.2 TLSv1.3;\n ssl_prefer_server_ciphers on;\n ssl_ciphers ECDHE-ECDSA-AES256-GCM-SHA384:ECDHE-RSA-AES256-GCM-SHA384:ECDHE-ECDSA-AES128-GCM-SHA256:ECDHE-RSA-AES128-GCM-SHA256:ECDHE-ECDSA-CHACHA20-POLY1305:ECDHE-RSA-CHACHA20-POLY1305;\n ssl_ecdh_curve X25519:X448:secp384r1:secp256k1;\n ssl_session_cache shared:SSL:50m;\n ssl_session_timeout 1d;\n ssl_session_tickets off;\n index index.php index.html;\n client_max_body_size 0;\n root /web;\n include /etc/nginx/conf.d/listen_plain.active;\n include /etc/nginx/conf.d/listen_ssl.active;\n server_name example.domain.tld;\n server_tokens off;\n\n location ^~ /.well-known/acme-challenge/ {\n allow all;\n default_type \"text/plain\";\n }\n\n if ($scheme = http) {\n return 301 https://$host$request_uri;\n }\n\n location / {\n proxy_pass http://service:3000/;\n proxy_set_header Host $http_host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n client_max_body_size 0;\n }\n}\n</code></pre>"},{"location":"de/manual-guides/Nginx/u_e-nginx_custom/#konfig-erweiterung-in-mailcows-nginx","title":"Konfig-Erweiterung in mailcows Nginx","text":"<p>Der Dateiname, der f\u00fcr eine neue Site verwendet wird, ist nicht wichtig, solange der Dateiname eine .conf-Erweiterung tr\u00e4gt.</p> <p>Es ist auch m\u00f6glich, die Konfiguration der Standarddatei <code>site.conf</code> Datei zu erweitern:</p> <pre><code>nano data/conf/nginx/site.my_content.custom\n</code></pre> <p>Dieser Dateiname muss keine \".conf\"-Erweiterung haben, sondern folgt dem Muster <code>site.*.custom</code>, wobei <code>*</code> ein eigener Name ist.</p> <p>Wenn PHP in eine benutzerdefinierte Site eingebunden werden soll, verwenden Sie bitte den PHP-FPM-Listener auf phpfpm:9002 oder erstellen Sie einen neuen Listener in <code>data/conf/phpfpm/php-fpm.d/pools.conf</code>.</p> <p>Starten Sie Nginx neu (und PHP-FPM, falls ein neuer Listener erstellt wurde):</p> <pre><code>docker compose restart nginx-mailcow\ndocker compose restart php-fpm-mailcow\n</code></pre>"},{"location":"de/manual-guides/Nginx/u_e-nginx_webmail-site/","title":"Subdom\u00e4ne webmail.example.org erstellen","text":"<p>WICHTIG: Diese Anleitung gilt nur f\u00fcr Konfigurationen, bei denen SNI nicht aktiviert ist. Wenn SNI aktiviert ist, muss der Zertifikatspfad angepasst werden. Etwas wie <code>ssl_certificate,key /etc/ssl/mail/webmail.example.org/cert.pem,key.pem;</code> wird gen\u00fcgen. Aber: Das Zertifikat sollte zuerst bezogen werden und erst wenn das Zertifikat existiert, sollte eine Site Config erstellt werden. Nginx wird nicht starten, wenn es das Zertifikat und den Schl\u00fcssel nicht finden kann.</p> <p>Um eine Subdomain <code>webmail.example.org</code> zu erstellen und sie auf SOGo umzuleiten, m\u00fcssen Sie eine neue Nginx-Site erstellen. Achten Sie dabei auf \"CHANGE_TO_MAILCOW_HOSTNAME\"!</p> <p>nano data/conf/nginx/webmail.conf</p> <pre><code>server {\n ssl_certificate /etc/ssl/mail/cert.pem;\n ssl_certificate_key /etc/ssl/mail/key.pem;\n index index.php index.html;\n client_max_body_size 0;\n root /web;\n include /etc/nginx/conf.d/listen_plain.active;\n include /etc/nginx/conf.d/listen_ssl.active;\n server_name webmail.example.org;\n server_tokens off;\n location ^~ /.well-known/acme-challenge/ {\n allow all;\n default_type \"text/plain\";\n }\n\n location / {\n return 301 https://CHANGE_TO_MAILCOW_HOSTNAME/SOGo;\n }\n}\n</code></pre> <p>Speichern Sie und starten Sie Nginx neu: <code>docker compose restart nginx-mailcow</code>.</p> <p>\u00d6ffnen Sie nun <code>mailcow.conf</code> und suchen Sie <code>ADDITIONAL_SAN</code>. F\u00fcgen Sie <code>webmail.example.org</code> zu diesem Array hinzu, verwenden Sie keine Anf\u00fchrungszeichen!</p> <pre><code>ADDITIONAL_SAN=webmail.example.org\n</code></pre> <p>F\u00fchren Sie <code>docker compose up -d</code> aus. Siehe \"acme-mailcow\" und \"nginx-mailcow\" Logs, wenn etwas fehlschl\u00e4gt.</p>"},{"location":"de/manual-guides/Postfix/u_e-postfix-attachment_size/","title":"Maximale Nachrichtengr\u00f6\u00dfe (Gr\u00f6\u00dfe des Anhangs)","text":"<p>\u00d6ffnen Sie <code>data/conf/postfix/extra.cf</code> und setzen Sie das <code>message_size_limit</code> entsprechend in Bytes. Siehe <code>main.cf</code> f\u00fcr den Standardwert.</p> <p>Starten Sie Postfix neu:</p> <pre><code>docker compose restart postfix-mailcow\n</code></pre>"},{"location":"de/manual-guides/Postfix/u_e-postfix-custom_transport/","title":"Benutzerdefinierte Transportmaps","text":"<p>F\u00fcr Transport maps, die nicht in mailcow UI konfiguriert werden, verwenden Sie bitte <code>data/conf/postfix/custom_transport.pcre</code>, um zu verhindern, dass bestehende Maps oder Einstellungen durch Updates \u00fcberschrieben werden.</p> <p>In den meisten F\u00e4llen ist die Verwendung dieser Datei nicht notwendig. Bitte vergewissern Sie sich, dass mailcow UI nicht in der Lage ist, den gew\u00fcnschten Datenverkehr richtig zu routen, bevor Sie diese Datei verwenden.</p> <p>Die Datei ben\u00f6tigt g\u00fcltigen PCRE-Inhalt und kann Postfix zerst\u00f6ren, wenn sie falsch konfiguriert ist.</p>"},{"location":"de/manual-guides/Postfix/u_e-postfix-disable_sender_verification/","title":"\u00dcberpr\u00fcfung der Absenderadressen deaktivieren","text":""},{"location":"de/manual-guides/Postfix/u_e-postfix-disable_sender_verification/#neue-anleitung","title":"Neue Anleitung","text":"<p>Bearbeiten Sie ein Postfach und w\u00e4hlen Sie \"Senden als * zulassen\".</p> <p>Aus historischen Gr\u00fcnden haben wir die alte und veraltete Anleitung unten beibehalten:</p>"},{"location":"de/manual-guides/Postfix/u_e-postfix-disable_sender_verification/#veraltete-anleitung-nicht-fur-neuere-mailcows-verwenden","title":"Veraltete Anleitung (NICHT F\u00dcR NEUERE MAILCOWS VERWENDEN!)","text":"<p>Diese Option ist keine Best-Practice und sollte nur verwendet werden, wenn es keine andere M\u00f6glichkeit gibt, das zu erreichen, was Sie erreichen wollen.</p> <p>Erstellen Sie einfach eine Datei <code>data/conf/postfix/check_sasl_access</code> und tragen Sie den folgenden Inhalt ein. Dieser Benutzer muss in Ihrer Installation existieren und muss sich vor dem Versenden von Mails authentifizieren. <pre><code>user-to-allow-everything@example.com OK\n</code></pre></p> <p>\u00d6ffnen Sie <code>data/conf/postfix/main.cf</code> und suchen Sie <code>smtpd_sender_restrictions</code>. F\u00fcgen Sie <code>check_sasl_access hash:/opt/postfix/conf/check_sasl_access</code> wie folgt ein: <pre><code>smtpd_sender_restrictions = check_sasl_access hash:/opt/postfix/conf/check_sasl_access reject_authenticated_sender_login_mismatch [...]\n</code></pre></p> <p>Postmap auf check_sasl_access ausf\u00fchren:</p> <pre><code>docker compose exec postfix-mailcow postmap /opt/postfix/conf/check_sasl_access\n</code></pre> <p>Starten Sie den Postfix-Container neu.</p>"},{"location":"de/manual-guides/Postfix/u_e-postfix-extra_cf/","title":"main.cf anpassen/erweitern","text":"<p>Bitte erstellen Sie eine neue Datei <code>data/conf/postfix/extra.cf</code> f\u00fcr \u00dcberschreibungen oder zus\u00e4tzliche Inhalte zur <code>main.cf</code>.</p> <p>Postfix wird sich einmal nach dem Start von postfix-mailcow \u00fcber doppelte Werte beschweren, dies ist beabsichtigt.</p> <p>Syslog-ng wurde so konfiguriert, dass es diese Warnungen ausblendet, w\u00e4hrend Postfix l\u00e4uft, um die Log-Dateien nicht jedes Mal mit unn\u00f6tigen Informationen zu spammen, wenn ein Dienst benutzt wird.</p> <p>Starten Sie <code>postfix-mailcow</code> neu, um Ihre \u00c4nderungen zu \u00fcbernehmen:</p> <pre><code>docker compose restart postfix-mailcow\n</code></pre>"},{"location":"de/manual-guides/Postfix/u_e-postfix-pflogsumm/","title":"Statistik mit pflogsumm","text":"<p>Um pflogsumm mit dem Standard-Logging-Treiber zu verwenden, m\u00fcssen wir postfix-mailcow \u00fcber docker logs abfragen und die Ausgabe zu pflogsumm leiten:</p> <pre><code>docker logs --since 24h $(docker ps -qf name=postfix-mailcow) | pflogsumm\n</code></pre> <p>Die obige Log-Ausgabe ist auf die letzten 24 Stunden beschr\u00e4nkt.</p> <p>Es ist auch m\u00f6glich, einen t\u00e4glichen pflogsumm-Bericht \u00fcber cron zu erstellen. Erstellen Sie die Datei /etc/cron.d/pflogsumm mit dem folgenden Inhalt:</p> <pre><code>SHELL=/bin/bash\n59 23 * * * root docker logs --since 24h $(docker ps -qf name=postfix-mailcow) | /usr/sbin/pflogsumm -d today | mail -s \"Postfix Report of $(date)\" postmaster@example.net\n</code></pre> <p>Um zu funktionieren muss ein lokaler Postfix auf dem Server installiert werden, welcher an den Postfix der mailcow relayed.</p> <p>Genauere Informationen lassen sich unter Sektion Post-Installationsaufgaben -&gt; Lokaler MTA auf Dockerhost finden.</p> <p>Basierend auf den Postfix-Logs der letzten 24 Stunden sendet dieses Beispiel dann jeden Tag um 23:59:00 Uhr einen pflogsumm-Bericht an postmaster@example.net.</p>"},{"location":"de/manual-guides/Postfix/u_e-postfix-postscreen_whitelist/","title":"IP in Postscreen auf die Whitelist setzen","text":"<p>IPs k\u00f6nnen in der Datei <code>data/conf/postfix/custom_postscreen_whitelist.cidr</code> aus dem Postscreen und damit auch aus den RBL-Pr\u00fcfungen entfernt werden.</p> <p>Postscreen f\u00fchrt mehrere Pr\u00fcfungen durch, um b\u00f6sartige Absender zu identifizieren. In den meisten F\u00e4llen m\u00f6chten Sie eine IP-Adresse auf die Whitelist setzen, um sie von der Suche nach einer schwarzen Liste auszuschlie\u00dfen.</p> <p>Das Format der Datei ist wie folgt</p> <p><code>CIDR ACTION</code></p> <p>Dabei steht CIDR f\u00fcr eine einzelne IP-Adresse oder einen IP-Bereich in CIDR-Notation und action entweder f\u00fcr \"permit\" oder \"reject\".</p> <p>Beispiel:</p> <pre><code># Regeln werden in der angegebenen Reihenfolge ausgewertet.\n# Schwarze Liste 192.168.* au\u00dfer 192.168.0.1.\n192.168.0.1 permit\n192.168.0.0/16 reject\n</code></pre> <p>Die Datei wird spontan neu geladen, ein Neustart von Postfix ist nicht erforderlich.</p>"},{"location":"de/manual-guides/Postfix/u_e-postfix-relayhost/","title":"Relayhosts","text":"<p>Seit dem 12. September 2018 k\u00f6nnen Sie Relayhosts als Admin \u00fcber die mailcow UI einrichten.</p> <p>Dies ist n\u00fctzlich, wenn Sie ausgehende E-Mails f\u00fcr eine bestimmte Domain an einen Drittanbieter-Spamfilter oder einen Dienst wie Mailgun oder Sendgrid weiterleiten m\u00f6chten. Dies ist auch bekannt als ein smarthost. Falls nicht, \u00fcberpr\u00fcfen Sie den Fehler und beheben Sie ihn.</p>"},{"location":"de/manual-guides/Postfix/u_e-postfix-relayhost/#einen-neuen-relayhost-hinzufugen","title":"Einen neuen Relayhost hinzuf\u00fcgen","text":"<p>Gehen Sie auf die Registerkarte \"Routing\" im Abschnitt \"Konfiguration und Details\" der mailcow UI. Hier sehen Sie eine Liste der derzeit eingerichteten Relayhosts.</p> <p>Bl\u00e4ttern Sie zum Abschnitt \"Absenderabh\u00e4ngigen Transport hinzuf\u00fcgen\".</p> <p>F\u00fcgen Sie unter <code>Host</code> den Host hinzu, an den Sie weiterleiten m\u00f6chten. Beispiel: Wenn Sie Mailgun zum Senden von E-Mails anstelle Ihrer Server-IP verwenden m\u00f6chten, geben Sie smtp.mailgun.org ein.</p> <p>Wenn der Relay-Host zur Authentifizierung einen Benutzernamen und ein Passwort ben\u00f6tigt, geben Sie diese in die entsprechenden Felder ein. Beachten Sie, dass die Anmeldedaten im Klartext gespeichert werden.</p>"},{"location":"de/manual-guides/Postfix/u_e-postfix-relayhost/#testen-sie-einen-relayhost","title":"Testen Sie einen Relayhost","text":"<p>Um zu testen, ob die Verbindung zum Host funktioniert, klicken Sie in der Liste der Relayhosts auf <code>Test</code> und geben Sie eine Von:-Adresse ein. F\u00fchren Sie dann den Test aus.</p> <p>Sie sehen dann die Ergebnisse der SMTP-\u00dcbertragung. Wenn alles klappt, sollten Sie Folgendes sehen: <code>SERVER -&gt; CLIENT: 250 2.0.0 Ok: queued as A093B401D4</code> als eine der letzten Zeilen.</p> <p>Ist dies nicht der Fall, \u00fcberpr\u00fcfen Sie den angegebenen Fehler und beheben Sie ihn.</p> <p>Hinweis: Einige Hosts, insbesondere solche, die keine Authentifizierung verlangen, verweigern Verbindungen von Servern, die nicht zuvor in ihr System aufgenommen wurden. Lesen Sie unbedingt die Dokumentation des Relayhosts, um sicherzustellen, dass Sie Ihre Domain und/oder die Server-IP zu ihrem System hinzugef\u00fcgt haben.</p> <p>Tipp: Sie k\u00f6nnen die standardm\u00e4\u00dfige Von:-Adresse, die der Test verwendet, von null@mailcow.email auf eine beliebige E-Mail-Adresse \u00e4ndern, indem Sie die Variable $RELAY_TO in der Datei vars.inc.php unter /opt/mailcow-dockerized/data/web/inc \u00e4ndern. Auf diese Weise k\u00f6nnen Sie \u00fcberpr\u00fcfen, ob das Relay funktioniert hat, indem Sie das Zielpostfach \u00fcberpr\u00fcfen.</p>"},{"location":"de/manual-guides/Postfix/u_e-postfix-relayhost/#relayhost-fur-eine-domain-festlegen","title":"Relayhost f\u00fcr eine Domain festlegen","text":"<p>Wechseln Sie auf die Registerkarte \"Domains\" im Abschnitt \"E-Mail-Setup\" der mailcow UI.</p> <p>Bearbeiten Sie die gew\u00fcnschte Domain.</p> <p>W\u00e4hlen Sie den neu hinzugef\u00fcgten Host in der Dropdown-Liste \"Absenderabh\u00e4ngige Transporte\" aus und speichern Sie die \u00c4nderungen.</p> <p>Senden Sie eine E-Mail von einer Mailbox auf dieser Domain und Sie sollten in den Protokollen sehen, dass Postfix die Nachricht an den Relayhost weiterleitet.</p>"},{"location":"de/manual-guides/Postfix/u_e-postfix-trust_networks/","title":"Vertrauensw\u00fcrdige Netzwerke hinzuf\u00fcgen","text":"<p>Standardm\u00e4\u00dfig betrachtet mailcow alle Netzwerke als nicht vertrauensw\u00fcrdig, ausgenommen seine eigenen IPV4_NETWORK und IPV6_NETWORK Bereiche. Obwohl dies in den meisten F\u00e4llen vern\u00fcnftig ist, kann es Umst\u00e4nde geben, unter denen man diese Einschr\u00e4nkung lockern muss.</p> <p>Standardm\u00e4\u00dfig verwendet mailcow <code>mynetworks_style = subnet</code> um interne Subnetze zu bestimmen und l\u00e4sst <code>mynetworks</code> unkonfiguriert.</p> <p>Wenn Sie sich entscheiden, <code>mynetworks</code> zu setzen, ignoriert Postfix die mynetworks_style Einstellung. Das bedeutet, dass Sie die Bereiche IPV4_NETWORK und IPV6_NETWORK sowie die Loopback-Subnetze manuell hinzuf\u00fcgen m\u00fcssen!</p>"},{"location":"de/manual-guides/Postfix/u_e-postfix-trust_networks/#unauthentifiziertes-relaying","title":"Unauthentifiziertes Relaying","text":"<p>Warning</p> <p>Eine falsche Einstellung von <code>mynetworks</code> erlaubt es Ihrem Server, als offenes Relay verwendet zu werden. Wenn dies missbraucht wird, beeintr\u00e4chtigt dies Ihre F\u00e4higkeit, E-Mails zu versenden, und es kann einige Zeit dauern, bis dies behoben ist.</p>"},{"location":"de/manual-guides/Postfix/u_e-postfix-trust_networks/#ipv4-hostssubnetze","title":"IPv4-Hosts/Subnetze","text":"<p>Um das Subnetz <code>192.168.2.0/24</code> zu den vertrauensw\u00fcrdigen Netzwerken hinzuzuf\u00fcgen, k\u00f6nnen Sie die folgende Konfiguration verwenden, abh\u00e4ngig von Ihren IPV4_NETWORK und IPV6_NETWORK Bereichen:</p> <p>Bearbeiten Sie <code>data/conf/postfix/extra.cf</code>:</p> <pre><code>mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 [fe80::]/10 172.22.1.0/24 [fd4d:6169:6c63:6f77::]/64 192.168.2.0/24\n</code></pre> <p>F\u00fchren Sie <code>docker compose restart postfix-mailcow</code> aus, um Ihre neuen Einstellungen zu \u00fcbernehmen.</p>"},{"location":"de/manual-guides/Postfix/u_e-postfix-trust_networks/#ipv6-hostssubnets","title":"IPv6-Hosts/Subnets","text":"<p>Das Hinzuf\u00fcgen von IPv6-Hosts erfolgt auf die gleiche Weise wie bei IPv4, allerdings muss das Subnetz in eckige Klammern <code>[]</code> gesetzt und die Netzmaske angeh\u00e4ngt werden.</p> <p>Um das Subnetz 2001:db8::/32 zu den vertrauensw\u00fcrdigen Netzwerken hinzuzuf\u00fcgen, k\u00f6nnen Sie die folgende Konfiguration verwenden, abh\u00e4ngig von Ihren IPV4_NETWORK- und IPV6_NETWORK-Bereichen:</p> <p>Bearbeiten Sie <code>data/conf/postfix/extra.cf</code>:</p> <pre><code>mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 [fe80::]/10 172.22.1.0/24 [fd4d:6169:6c63:6f77::]/64 [2001:db8::]/32\n</code></pre> <p>F\u00fchren Sie <code>docker compose restart postfix-mailcow</code> aus, um Ihre neuen Einstellungen zu \u00fcbernehmen.</p> <p>Info</p> <p>Weitere Informationen \u00fcber mynetworks finden Sie in der Postfix-Dokumentation.</p>"},{"location":"de/manual-guides/Redis/u_e-redis/","title":"Redis","text":"<p>Redis wird als Key-Value-Speicher f\u00fcr die Einstellungen und Daten von rspamd und (einige von) mailcow verwendet. Wenn Sie mit Redis nicht vertraut sind, lesen Sie bitte die Einf\u00fchrung in Redis und besuchen Sie gegebenenfalls diese wunderbare Anleitung, um zu erfahren, wie man Redis benutzt.</p>"},{"location":"de/manual-guides/Redis/u_e-redis/#client","title":"Client","text":"<p>Um sich mit dem redis cli zu verbinden, f\u00fchren Sie aus:</p> <pre><code>docker compose exec redis-mailcow redis-cli\n</code></pre>"},{"location":"de/manual-guides/Redis/u_e-redis/#fehlersuche","title":"Fehlersuche","text":"<p>Hier sind einige n\u00fctzliche Befehle f\u00fcr den redis-cli zur Fehlersuche:</p>"},{"location":"de/manual-guides/Redis/u_e-redis/#monitor","title":"MONITOR","text":"<p>\u00dcberwacht alle vom Server empfangenen Anfragen in Echtzeit:</p> <pre><code># docker compose exec redis-mailcow redis-cli\n127.0.0.1:6379&gt; monitor\nOK\n1494077286.401963 [0 172.22.1.253:41228] \"SMEMBERS\" \"BAYES_SPAM_keys\"\n1494077288.292970 [0 172.22.1.253:41229] \"SMEMBERS\" \"BAYES_SPAM_keys\"\n[...]\n</code></pre>"},{"location":"de/manual-guides/Redis/u_e-redis/#schlussel-keys","title":"SCHL\u00dcSSEL (Keys)","text":"<p>Ermittelt alle Schl\u00fcssel, die dem Muster entsprechen:</p> <pre><code>KEYS *\n</code></pre>"},{"location":"de/manual-guides/Redis/u_e-redis/#ping","title":"PING","text":"<p>Testen Sie eine Verbindung:</p> <pre><code>127.0.0.1:6379&gt; PING\nPONG\n</code></pre> <p>Wenn Sie mehr wissen wollen, hier ist ein Cheat-Sheet.</p>"},{"location":"de/manual-guides/Rspamd/u_e-rspamd/","title":"Rspamd","text":"<p>Rspamd wird f\u00fcr die AV-Verarbeitung, DKIM-Signierung und SPAM-Verarbeitung verwendet. Es ist ein leistungsf\u00e4higes und schnelles Filtersystem. F\u00fcr eine ausf\u00fchrlichere Dokumentation \u00fcber Rspamd besuchen Sie bitte die [Rspamd Dokumentation] (https://rspamd.com/doc/index.html).</p>"},{"location":"de/manual-guides/Rspamd/u_e-rspamd/#spam-ham-lernen","title":"Spam &amp; Ham lernen","text":"<p>Rspamd lernt, ob es sich um Spam oder Ham handelt, wenn Sie eine Nachricht in oder aus dem Junk-Ordner in ein anderes Postfach als den Papierkorb verschieben. Dies wird durch die Verwendung des Sieve-Plugins \"sieve_imapsieve\" und Parser-Skripte erreicht.</p> <p>Rspamd liest auch automatisch Mails, wenn eine hohe oder niedrige Punktzahl erkannt wird (siehe https://rspamd.com/doc/configuration/statistic.html#autolearning). Wir haben das Plugin so konfiguriert, dass es ein vern\u00fcnftiges Verh\u00e4ltnis zwischen Spam- und Ham-Learnings beibeh\u00e4lt.</p> <p>Die Bayes-Statistiken werden in Redis als Schl\u00fcssel <code>BAYES_HAM</code> und <code>BAYES_SPAM</code> gespeichert.</p> <p>Neben Bayes wird ein lokaler Fuzzy-Speicher verwendet, um wiederkehrende Muster in Texten oder Bildern zu lernen, die auf Ham oder Spam hinweisen.</p> <p>Sie k\u00f6nnen auch die Web-UI von Rspamd verwenden, um Ham und/oder Spam zu lernen oder bestimmte Einstellungen von Rspamd anzupassen.</p>"},{"location":"de/manual-guides/Rspamd/u_e-rspamd/#spam-oder-ham-aus-bestehendem-verzeichnis-lernen","title":"Spam oder Ham aus bestehendem Verzeichnis lernen","text":"<p>Sie k\u00f6nnen einen Einzeiler verwenden, um Mails im Klartextformat (unkomprimiert) zu lernen:</p> <pre><code># Ham\nfor file in /my/folder/cur/*; do docker exec -i $(docker compose ps -q rspamd-mailcow) rspamc learn_ham &lt; $file; done\n# Spam\nfor file in /my/folder/.Junk/cur/*; do docker exec -i $(docker compose ps -q rspamd-mailcow) rspamc learn_spam &lt; $file; done\n</code></pre> <p>Erw\u00e4gen Sie, einen lokalen Ordner als neues Volume an <code>rspamd-mailcow</code> in <code>docker-compose.yml</code> anzuh\u00e4ngen und die gegebenen Dateien innerhalb des Containers zu lernen. Dies kann als Workaround verwendet werden, um komprimierte Daten mit zcat zu parsen. Beispiel:</p> <pre><code>for file in /data/old_mail/.Junk/cur/*; do rspamc learn_spam &lt; zcat $file; done\n</code></pre>"},{"location":"de/manual-guides/Rspamd/u_e-rspamd/#gelernte-daten-zurucksetzen-bayes-neural","title":"Gelernte Daten zur\u00fccksetzen (Bayes, Neural)","text":"<p>Sie m\u00fcssen die Schl\u00fcssel in Redis l\u00f6schen, um die gelernten Daten zur\u00fcckzusetzen, also erstellen Sie jetzt eine Kopie Ihrer Redis-Datenbank:</p> <p>Backup Datenbank</p> <pre><code># Es ist besser, Redis zu stoppen, bevor Sie die Datei kopieren.\ncp /var/lib/docker/volumes/mailcowdockerized_redis-vol-1/_data/dump.rdb /root/\n</code></pre> <p>Bayes-Daten zur\u00fccksetzen</p> <pre><code>docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern BAYES_* | xargs redis-cli del'\ndocker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern RS* | xargs redis-cli del'\n</code></pre> <p>Neurale Daten zur\u00fccksetzen</p> <pre><code>docker compose exec redis-mailcow sh -c 'redis-cli --scan --pattern rn_* | xargs redis-cli del'\n</code></pre> <p>Fuzzy-Daten zur\u00fccksetzen</p> <pre><code># Wir m\u00fcssen zuerst das redis-cli eingeben:\ndocker compose exec redis-mailcow redis-cli\n# In redis-cli:\n127.0.0.1:6379&gt; EVAL \"for i, name in ipairs(redis.call('KEYS', ARGV[1])) do redis.call('DEL', name); end\" 0 fuzzy*\n</code></pre> <p>Info</p> <p>Wenn redis-cli sich beschwert \u00fcber...</p> <pre><code>(error) ERR wrong number of arguments for 'del' command\n</code></pre> <p>...das Schl\u00fcsselmuster nicht gefunden wurde und somit keine Daten zum L\u00f6schen vorhanden sind - ist es in Ordnung.</p>"},{"location":"de/manual-guides/Rspamd/u_e-rspamd/#cli-werkzeuge","title":"CLI-Werkzeuge","text":"<pre><code>docker compose exec rspamd-mailcow rspamc --help\ndocker compose exec rspamd-mailcow rspamadm --help\n</code></pre>"},{"location":"de/manual-guides/Rspamd/u_e-rspamd/#greylisting-deaktivieren","title":"Greylisting deaktivieren","text":"<p>Nur Nachrichten mit einer h\u00f6heren Punktzahl werden als Greylisting betrachtet (soft rejected). Es ist schlechte Praxis, Greylisting zu deaktivieren.</p> <p>Sie k\u00f6nnen Greylisting serverweit durch Editieren deaktivieren:</p> <p><code>{mailcow-dir}/data/conf/rspamd/local.d/greylist.conf</code></p> <p>F\u00fcgen Sie die Zeile hinzu:</p> <pre><code>enabled = false;\n</code></pre> <p>Speichern Sie die Datei und starten Sie \"rspamd-mailcow\" neu: <code>docker compose restart rspamd-mailcow</code></p>"},{"location":"de/manual-guides/Rspamd/u_e-rspamd/#spamfilter-schwellenwerte-global","title":"Spamfilter-Schwellenwerte (global)","text":"<p>Jeder Benutzer kann seine Spam-Bewertung individuell \u00e4ndern. Um eine neue serverweite Grenze zu definieren, editieren Sie <code>data/conf/rspamd/local.d/actions.conf</code>:</p> <pre><code>reject = 15;\nadd_header = 8;\ngreylist = 7;\n</code></pre> <p>Speichern Sie die Datei und starten Sie \"rspamd-mailcow\" neu: <code>docker compose restart rspamd-mailcow</code></p> <p>Bestehende Einstellungen der Benutzer werden nicht \u00fcberschrieben!</p> <p>Um benutzerdefinierte Schwellenwerte zur\u00fcckzusetzen, f\u00fchren Sie aus:</p> <pre><code>source mailcow.conf\ndocker compose exec mysql-mailcow mysql -umailcow -p$DBPASS mailcow -e \"delete from filterconf where option = 'highspamlevel' or option = 'lowspamlevel';\"\n# oder:\n# docker compose exec mysql-mailcow mysql -umailcow -p$DBPASS mailcow -e \"delete from filterconf where option = 'highspamlevel' or option = 'lowspamlevel' and object = 'only-this-mailbox@example.org';\"\n</code></pre>"},{"location":"de/manual-guides/Rspamd/u_e-rspamd/#benutzerdefinierte-ablehnungsnachrichten","title":"Benutzerdefinierte Ablehnungsnachrichten","text":"<p>Die Standard-Spam-Reject-Meldung kann durch Hinzuf\u00fcgen einer neuen Datei <code>data/conf/rspamd/override.d/worker-proxy.custom.inc</code> mit dem folgenden Inhalt ge\u00e4ndert werden:</p> <pre><code>reject_message = \"Meine eigene Ablehnungsnachricht\";\n</code></pre> <p>Speichern Sie die Datei und starten Sie Rspamd neu: <code>docker compose restart rspamd-mailcow</code>.</p> <p>Waehrend das oben genannte fuer abgelehnte Mails mit einem hohen Spam-Score funktioniert, ignorieren Prefilter-Aktionen diese Einstellung. F\u00fcr diese Karten muss das Multimap-Modul in Rspamd angepasst werden:</p> <ol> <li> <p>Finden Sie das Prefilet-Reject-Symbol, f\u00fcr das Sie die Nachricht \u00e4ndern wollen, f\u00fchren Sie dazu aus: <code>grep -R \"SYMBOL_YOU_WANT_TO_ADJUST\" /opt/mailcow-dockerized/data/conf/rspamd/</code></p> </li> <li> <p>F\u00fcgen Sie Ihre eigene Nachricht als neue Zeile hinzu:</p> </li> </ol> <pre><code>GLOBAL_RCPT_BL {\n Typ = \"rcpt\";\n map = \"${LOCAL_CONFDIR}/custom/global_rcpt_blacklist.map\";\n regexp = true;\n prefilter = true;\n action = \"reject\";\n message = \"Der Versand von E-Mails an diesen Empf\u00e4nger ist durch postmaster@your.domain verboten\";\n}\n</code></pre> <ol> <li>Speichern Sie die Datei und starten Sie Rspamd neu: <code>docker compose restart rspamd-mailcow</code>.</li> </ol>"},{"location":"de/manual-guides/Rspamd/u_e-rspamd/#verwerfen-statt-zuruckweisen","title":"Verwerfen statt zur\u00fcckweisen","text":"<p>Wenn Sie eine Nachricht stillschweigend verwerfen wollen, erstellen oder bearbeiten Sie die Datei <code>data/conf/rspamd/override.d/worker-proxy.custom.inc</code> und f\u00fcgen Sie den folgenden Inhalt hinzu:</p> <pre><code>discard_on_reject = true;\n</code></pre> <p>Starten Sie Rspamd neu:</p> <pre><code>docker compose restart rspamd-mailcow\n</code></pre>"},{"location":"de/manual-guides/Rspamd/u_e-rspamd/#losche-alle-ratelimit-schlussel","title":"L\u00f6sche alle Ratelimit-Schl\u00fcssel","text":"<p>Wenn Sie das UI nicht verwenden wollen und stattdessen alle Schl\u00fcssel in der Redis-Datenbank l\u00f6schen wollen, k\u00f6nnen Sie redis-cli f\u00fcr diese Aufgabe verwenden:</p> <pre><code>docker compose exec redis-mailcow sh\n# Unlink (verf\u00fcgbar in Redis &gt;=4.) l\u00f6scht im Hintergrund\nredis-cli --scan --pattern RL* | xargs redis-cli unlink\n</code></pre> <p>Starten Sie Rspamd neu:</p> <pre><code>docker compose restart rspamd-mailcow\n</code></pre>"},{"location":"de/manual-guides/Rspamd/u_e-rspamd/#erneutes-senden-von-quarantane-benachrichtigungen-auslosen","title":"Erneutes Senden von Quarant\u00e4ne-Benachrichtigungen ausl\u00f6sen","text":"<p>Sollte nur zur Fehlersuche verwendet werden!</p> <pre><code>docker compose exec dovecot-mailcow bash\nmysql -umailcow -p$DBPASS mailcow -e \"update quarantine set notified = 0;\"\nredis-cli -h redis DEL Q_LAST_NOTIFIED\nquarantine_notify.py\n</code></pre>"},{"location":"de/manual-guides/Rspamd/u_e-rspamd/#speicherung-der-historie-erhohen","title":"Speicherung der Historie erh\u00f6hen","text":"<p>Standardm\u00e4\u00dfig speichert Rspamd 1000 Elemente in der Historie.</p> <p>Die Historie wird komprimiert gespeichert.</p> <p>Es wird empfohlen, hier keinen unverh\u00e4ltnism\u00e4\u00dfig hohen Wert zu verwenden, probieren Sie etwas in der Gr\u00f6\u00dfenordnung von 5000 oder 10000 und sehen Sie, wie Ihr Server damit umgeht:</p> <p>Bearbeiten Sie <code>data/conf/rspamd/local.d/history_redis.conf</code>:</p> <pre><code>nrows = 1000; # \u00c4ndern Sie diesen Wert\n</code></pre> <p>Starten Sie anschlie\u00dfend Rspamd neu: <code>docker compose restart rspamd-mailcow</code></p>"},{"location":"de/manual-guides/SOGo/u_e-sogo/","title":"SOGo","text":"<p>SOGo wird verwendet, um \u00fcber einen Webbrowser auf Ihre Mails zuzugreifen und Ihre Kontakte oder Kalender hinzuzuf\u00fcgen und zu teilen. F\u00fcr eine ausf\u00fchrlichere Dokumentation zu SOGo besuchen Sie bitte die [eigene Dokumentation] (http://wiki.sogo.nu/).</p>"},{"location":"de/manual-guides/SOGo/u_e-sogo/#benutzerdefiniertes-sogo-thema-css-anwenden","title":"Benutzerdefiniertes SOGo-Thema (CSS) anwenden","text":"<p>mailcow-Builds nach dem 28. Januar 2021 k\u00f6nnen das CSS-Thema von SOGo \u00e4ndern, indem sie <code>data/conf/sogo/custom-theme.js</code> bearbeiten. Bitte schauen Sie sich die AngularJS Material intro und documentation sowie die material style guideline an, um zu erfahren, wie das funktioniert. </p> <p>Sie k\u00f6nnen die mitgelieferte <code>custom-theme.js</code> als Beispiel verwenden, indem Sie die Kommentare entfernen. Nachdem Sie <code>data/conf/sogo/custom-theme.js</code> modifiziert und \u00c4nderungen an Ihrem neuen SOGo-Theme vorgenommen haben, m\u00fcssen Sie </p> <ol> <li>Bearbeiten Sie <code>data/conf/sogo/sogo.conf</code> und f\u00fcgen Sie <code>SOGoUIxDebugEnabled = YES;</code> ein.</li> <li>SOGo und Memcached Container neu starten, indem man <code>docker compose restart memcached-mailcow sogo-mailcow</code> ausf\u00fchrt.</li> <li>SOGo im Browser \u00f6ffnen</li> <li>\u00f6ffnen Sie die Entwicklerkonsole des Browsers, normalerweise ist die Tastenkombination F12</li> <li>nur wenn Sie Firefox benutzen: schreiben Sie mit der Hand in die Entwicklerkonsole <code>allow pasting</code> und dr\u00fccken Sie Enter</li> <li>f\u00fcgen Sie den Java-Script-Schnipsel in die Entwicklungskonsole ein: <pre><code>copy([].slice.call(document.styleSheets)\n .map(e =&gt; e.ownerNode)\n .filter(e =&gt; e.hasAttribute('md-theme-style'))\n .map(e =&gt; e.textInhalt)\n .join('\\n')\n)\n</code></pre></li> <li>\u00d6ffnen Sie den Texteditor und f\u00fcgen Sie die Daten aus der Zwischenablage ein (Strg+V), Sie sollten ein minimiertes CSS erhalten, speichern Sie es</li> <li>kopieren Sie die CSS-Datei auf den Mailcow-Server <code>data/conf/sogo/custom-theme.css</code></li> <li>editiere <code>data/conf/sogo/sogo.conf</code> und setze <code>SOGoUIxDebugEnabled = NO;</code></li> <li>Anh\u00e4ngen/Erstellen von <code>docker-compose.override.yml</code> mit: <pre><code>Version: '2.1'\n\nDienste:\n sogo-mailcow:\n volumes:\n - ./data/conf/sogo/custom-theme.css:/usr/lib/GNUstep/SOGo/WebServerResources/css/theme-default.css:z\n</code></pre></li> <li>f\u00fchren Sie <code>docker compose up -d</code> aus</li> <li>Ausf\u00fchren von <code>docker compose restart memcached-mailcow</code></li> </ol>"},{"location":"de/manual-guides/SOGo/u_e-sogo/#zurucksetzen-auf-das-sogo-standardthema","title":"Zur\u00fccksetzen auf das SOGo Standardthema","text":"<ol> <li>checken Sie <code>data/conf/sogo/custom-theme.js</code> aus, indem Sie <code>git fetch ; git checkout origin/master data/conf/sogo/custom-theme.js data/conf/sogo/custom-theme.js</code> ausf\u00fchren</li> <li>Suchen Sie in <code>data/conf/sogo/custom-theme.js</code>: <pre><code>// Neue Paletten auf das Standardthema anwenden, einige Farbt\u00f6ne neu zuordnen\n $mdThemingProvider.theme('default')\n .primaryPalette('green-cow', {\n 'default': '400', // Hintergrundfarbe der oberen Symbolleisten\n hue-1': '400',\n 'hue-2': '600', // Hintergrundfarbe der Seitenleiste\n 'hue-3': 'A700'\n })\n .accentPalette('green', {\n 'default': '600', // Hintergrundfarbe der Fab-Schaltfl\u00e4chen und des Anmeldebildschirms\n hue-1': '300', // Hintergrundfarbe der Symbolleiste der mittleren Liste\n hue-2': '300', // Hervorhebungsfarbe f\u00fcr ausgew\u00e4hlte Nachrichten und den aktuellen Tageskalender\n hue-3': 'A700'\n })\n .backgroundPalette('frost-grey');\n</code></pre> und ersetzen Sie es durch: <pre><code> $mdThemingProvider.theme('default');\n</code></pre></li> <li>Entfernen Sie aus <code>docker-compose.override.yml</code> Volume Mount in <code>sogo-mailcow</code>: <pre><code>- ./data/conf/sogo/custom-theme.css:/usr/lib/GNUstep/SOGo/WebServerResources/css/theme-default.css:z\n</code></pre></li> <li>f\u00fchren Sie <code>docker compose up -d</code> aus</li> <li>Starten Sie <code>docker compose restart memcached-mailcow</code>.</li> </ol>"},{"location":"de/manual-guides/SOGo/u_e-sogo/#favicon-andern","title":"Favicon \u00e4ndern","text":"<p>mailcow-Builds nach dem 31. Januar 2021 k\u00f6nnen SOGo's Favicon \u00e4ndern, indem sie <code>data/conf/sogo/custom-favicon.ico</code> f\u00fcr SOGo und <code>data/web/favicon.png</code> f\u00fcr mailcow UI ersetzen. Anmerkung: Sie k\u00f6nnen <code>.png</code> Favicons f\u00fcr SOGo verwenden, indem Sie sie in <code>custom-favicon.ico</code> umbenennen. F\u00fcr beide, SOGo und mailcow UI Favicons, m\u00fcssen Sie eine der Standardgr\u00f6\u00dfen verwenden: 16x16, 32x32, 64x64, 128x128 und 256x256. Nachdem Sie diese Datei ersetzt haben, m\u00fcssen Sie SOGo und Memcached Container neu starten, indem Sie <code>docker compose restart memcached-mailcow sogo-mailcow</code> ausf\u00fchren.</p>"},{"location":"de/manual-guides/SOGo/u_e-sogo/#logo-andern","title":"Logo \u00e4ndern","text":"<p>Mailcow-Builds nach dem 21. Dezember 2018 k\u00f6nnen das SOGo-Logo \u00e4ndern, indem sie die Datei <code>data/conf/sogo/sogo-full.svg</code> ersetzen oder erstellen (falls sie fehlt). Nachdem Sie diese Datei ersetzt haben, m\u00fcssen Sie SOGo und Memcached Container neu starten, indem Sie <code>docker compose restart memcached-mailcow sogo-mailcow</code> ausf\u00fchren.</p>"},{"location":"de/manual-guides/SOGo/u_e-sogo/#domains-verbinden-untereinander-sichtbar-machen","title":"Domains verbinden (untereinander sichtbar machen)","text":"<p>Domains sind normalerweise voneinander isoliert.</p> <p>Sie k\u00f6nnen das \u00e4ndern, indem Sie <code>data/conf/sogo/sogo.conf</code> modifizieren:</p> <p>Suche... <pre><code> // SOGoDomainsVisibility = (\n // (domain1.tld, domain5.tld),\n // (domain3.tld, domain2.tld)\n // );\n</code></pre> ...und ersetzen Sie diese durch - zum Beispiel:</p> <pre><code> SOGoDomainsVisibility = (\n (beispiel.org, beispiel.com, beispiel.net)\n );\n</code></pre> <p>SOGo neu starten: <code>docker compose restart sogo-mailcow</code></p>"},{"location":"de/manual-guides/SOGo/u_e-sogo/#deaktivieren-sie-die-passwortanderung","title":"Deaktivieren Sie die Passwort\u00e4nderung","text":"<p>Bearbeiten Sie <code>data/conf/sogo/sogo.conf</code> und \u00e4ndern Sie <code>SOGoPasswordChangeEnabled</code> auf <code>NO</code>. Bitte f\u00fcgen Sie keinen neuen Parameter hinzu.</p> <p>F\u00fchren Sie <code>docker compose restart memcached-mailcow sogo-mailcow</code> aus, um die \u00c4nderungen zu aktivieren.</p>"},{"location":"de/manual-guides/SOGo/u_e-sogo/#totp-zurucksetzen-totp-deaktivieren","title":"TOTP zur\u00fccksetzen / TOTP deaktivieren","text":"<p>F\u00fchren Sie <code>docker compose exec -u sogo sogo-mailcow sogo-tool user-preferences set defaults user@example.com SOGoTOTPEnabled '{\"SOGoTOTPEnabled\":0}'</code> aus dem mailcow Verzeichnis aus.</p>"},{"location":"de/manual-guides/Unbound/u_e-unbound-fwd/","title":"Verwendung eines externen DNS-Dienstes","text":"<p>Wenn Sie einen externen DNS-Dienst verwenden wollen oder m\u00fcssen, k\u00f6nnen Sie entweder einen Forwarder in Unbound einstellen oder eine Override-Datei kopieren, um externe DNS-Server zu definieren:</p> <p>Warnung</p> <p>Bitte verwenden Sie keinen \u00f6ffentlichen Resolver, wie wir es im obigen Beispiel getan haben. Viele - wenn nicht sogar alle - Blacklist-Lookups werden mit \u00f6ffentlichen Resolvern fehlschlagen, da der Blacklist-Server Grenzen hat, wie viele Anfragen von einer IP gestellt werden k\u00f6nnen und \u00f6ffentliche Resolver diese Grenzen normalerweise erreichen. Wichtig: Nur DNSSEC-validierende DNS-Dienste werden funktionieren.</p>"},{"location":"de/manual-guides/Unbound/u_e-unbound-fwd/#methode-a-unbound","title":"Methode A, Unbound","text":"<p>Bearbeiten Sie <code>data/conf/unbound/unbound.conf</code> und f\u00fcgen Sie die folgenden Parameter hinzu:</p> <pre><code>forward-zone:\n name: \".\"\n forward-addr: 8.8.8.8 # VERWENDEN SIE KEINE \u00d6FFENTLICHEN DNS-SERVER - NUR EIN BEISPIEL\n forward-addr: 8.8.4.4 # VERWENDET KEINE \u00d6FFENTLICHEN DNS-SERVER - NUR EIN BEISPIEL\n</code></pre> <p>Unbound neu starten:</p> <pre><code>docker compose restart unbound-mailcow\n</code></pre>"},{"location":"de/manual-guides/Unbound/u_e-unbound-fwd/#methode-b-uberschreiben-der-datei","title":"Methode B, \u00dcberschreiben der Datei","text":"<pre><code>cd /opt/mailcow-dockerized\ncp helper-scripts/docker-compose.override.yml.d/EXTERNAL_DNS/docker-compose.override.yml .\n</code></pre> <p>Bearbeiten Sie <code>docker-compose.override.yml</code> und passen Sie die IP an.</p> <p>F\u00fchren Sie <code>docker compose down ; docker compose up -d</code> aus.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/","title":"Thresholds","text":"<p>Watchdog verwendet Standardwerte f\u00fcr alle in <code>docker-compose.yml</code> definierten Thresholde.</p> <p>Die Standardwerte sind f\u00fcr die meisten Konfigurationen geeignet. Beispiel: <pre><code>- NGINX_THRESHOLD=${NGINX_THRESHOLD:-5}\n- UNBOUND_THRESHOLD=${UNBOUND_THRESHOLD:-5}\n- REDIS_THRESHOLD=${REDIS_THRESHOLD:-5}\n- MYSQL_THRESHOLD=${MYSQL_THRESHOLD:-5}\n- MYSQL_REPLICATION_THRESHOLD=${MYSQL_REPLICATION_THRESHOLD:-1}\n- SOGO_THRESHOLD=${SOGO_THRESHOLD:-3}\n- POSTFIX_THRESHOLD=${POSTFIX_THRESHOLD:-8}\n- CLAMD_THRESHOLD=${CLAMD_THRESHOLD:-15}\n- DOVECOT_THRESHOLD=${DOVECOT_THRESHOLD:-12}\n- DOVECOT_REPL_THRESHOLD=${DOVECOT_REPL_THRESHOLD:-20}\n- PHPFPM_THRESHOLD=${PHPFPM_THRESHOLD:-5}\n- RATELIMIT_THRESHOLD=${RATELIMIT_THRESHOLD:-1}\n- FAIL2BAN_THRESHOLD=${FAIL2BAN_THRESHOLD:-1}\n- ACME_THRESHOLD=${ACME_THRESHOLD:-1}\n- RSPAMD_THRESHOLD=${RSPAMD_THRESHOLD:-5}\n- OLEFY_THRESHOLD=${OLEFY_THRESHOLD:-5}\n- MAILQ_THRESHOLD=${MAILQ_THRESHOLD:-20}\n- MAILQ_CRIT=${MAILQ_CRIT:-30}\n</code></pre></p> <p>Um sie anzupassen, f\u00fcgen Sie einfach die notwendigen Threshold Variablen (z.B. <code>MAILQ_THRESHOLD=10</code>) zu <code>mailcow.conf</code> hinzu und f\u00fchren <code>docker compose up -d</code> aus.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#threshold-beschreibungen","title":"Threshold Beschreibungen","text":""},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#nginx_threshold","title":"NGINX_THRESHOLD","text":"<p>Benachrichtigt Administratoren, wenn Watchdog keine Verbindung zu Nginx auf Port 8081 herstellen kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht wurde.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#unbound_threshold","title":"UNBOUND_THRESHOLD","text":"<p>Benachrichtigt Administratoren, wenn Unbound externe Dom\u00e4nen/DNSSEC nicht aufl\u00f6sen/\u00fcberpr\u00fcfen kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht ist.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#redis_threshold","title":"REDIS_THRESHOLD","text":"<p>Benachrichtigt Administratoren, wenn der Watchdog keine Verbindung zu Redis auf Port 6379 herstellen kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht ist.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#mysql_threshold","title":"MYSQL_THRESHOLD","text":"<p>Benachrichtigt Administratoren, wenn watchdog keine Verbindung zu MySQL herstellen kann oder eine Tabelle nicht abfragen kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht wurde.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#mysql_replication_threshold","title":"MYSQL_REPLICATION_THRESHOLD","text":"<p>Benachrichtigt Administratoren, wenn die MySQL-Replikation fehlschl\u00e4gt.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#sogo_threshold","title":"SOGO_THRESHOLD","text":"<p>Benachrichtigt Administratoren, wenn der Watchdog keine Verbindung zu SOGo auf Port 20000 herstellen kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht ist.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#postfix_threshold","title":"POSTFIX_THRESHOLD","text":"<p>Benachrichtigt Administratoren, wenn watchdog keine Testmail \u00fcber Port 589 senden kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht ist.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#clamd_threshold","title":"CLAMD_THRESHOLD","text":"<p>Benachrichtigt Administratoren, wenn Watchdog keine Verbindung zu Clamd herstellen kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht wurde.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#dovecot_threshold","title":"DOVECOT_THRESHOLD","text":"<p>Benachrichtigt Administratoren, wenn watchdog bei verschiedenen Tests mit dem Dovecot-Container fehlschl\u00e4gt. Der Container wird automatisch neu gestartet, wenn Probleme gefunden wurden und der Threshold erreicht ist.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#dovecot_repl_threshold","title":"DOVECOT_REPL_THRESHOLD","text":"<p>Benachrichtigt Administratoren, wenn die Dovecot-Replikation fehlschl\u00e4gt.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#phpfpm_threshold","title":"PHPFPM_THRESHOLD","text":"<p>Benachrichtigt Administratoren, wenn Watchdog keine Verbindung zu PHP-FPM auf Port 9001/9002 herstellen kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht ist.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#ratelimit_threshold","title":"RATELIMIT_THRESHOLD","text":"<p>Benachrichtigt Administratoren, wenn ein Ratelimit erreicht wurde.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#fail2ban_threshold","title":"FAIL2BAN_THRESHOLD","text":"<p>Benachrichtigt Administratoren, wenn ein fail2ban eine IP gesperrt hat.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#acme_threshold","title":"ACME_THRESHOLD","text":"<p>Benachrichtigt Administratoren, wenn etwas mit dem acme-mailcow-Container nicht in Ordnung ist. Sie k\u00f6nnen dessen Logs \u00fcberpr\u00fcfen.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#rspamd_threshold","title":"RSPAMD_THRESHOLD","text":"<p>Benachrichtigt Administratoren, wenn Watchdog bei verschiedenen Tests mit dem Rspamd-Container fehlschl\u00e4gt und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht wurde.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#olefy_threshold","title":"OLEFY_THRESHOLD","text":"<p>Benachrichtigt Administratoren, wenn watchdog keine Verbindung zu olefy auf Port 10005 herstellen kann und startet den Container automatisch neu, wenn Probleme gefunden wurden und der Threshold erreicht ist.</p>"},{"location":"de/manual-guides/Watchdog/u_e-watchdog-thresholds/#mailq_crit-und-mailq_threshold","title":"MAILQ_CRIT und MAILQ_THRESHOLD","text":"<p>Benachrichtigt Administratoren, wenn die Anzahl der E-Mails in der Postfix-Warteschlange gr\u00f6\u00dfer ist als <code>MAILQ_CRIT</code> f\u00fcr einen Zeitraum von <code>MAILQ_THRESHOLD * (60\u00b130)</code> Sekunden.</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-bl_wl/","title":"Blacklist / Whitelist","text":"<p>Um einen Eintrag zu Ihrer domain\u00fcbergreifenden Filtertabelle hinzuzuf\u00fcgen oder zu bearbeiten, loggen Sie sich als (Domain-)Administrator in Ihre mailcow UI ein und wechseln Sie zu: <code>Konfiguration &gt; E-Mail-Setup &gt; Domains &gt; (Domain) Bearbeiten &gt; Spamfilter</code>.</p> <p>Info</p> <p>Seien Sie sich bewusst, dass ein Benutzer diese Einstellung \u00fcberschreiben kann, indem er seine eigene Black- und Whitelist setzt!</p> <p>Es ist auch eine globale Filtertabelle in <code>Konfiguration &gt; Server-Konfiguration &gt; Globale Filter-Maps</code> verf\u00fcgbar, um einen server\u00fcbergreifenden Filter f\u00fcr ein oder mehrere Regex-Maps zu konfigurieren (Todo: Screenshots).</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-config/","title":"Konfiguration","text":"<p>Mehrere Konfigurationsparameter der mailcow-Benutzeroberfl\u00e4che k\u00f6nnen ge\u00e4ndert werden, indem eine Datei <code>data/web/inc/vars.local.inc.php</code> erstellt wird, die die Standardeinstellungen in <code>data/web/inc/vars.inc.php</code> \u00fcberschreibt.</p> <p>Die lokale Konfigurationsdatei ist \u00fcber Updates von mailcow hinweg best\u00e4ndig. Versuchen Sie nicht, die Werte in <code>data/web/inc/vars.inc.php</code> zu \u00e4ndern, sondern verwenden Sie diese als Vorlage f\u00fcr die lokale \u00dcberschreibung.</p> <p>mailcow UI Konfigurationsparameter k\u00f6nnen verwendet werden, um...</p> <ul> <li>...die Standardsprache zu \u00e4ndern1</li> <li>...das Standard-Bootstrap-Theme zu \u00e4ndern</li> <li>...eine Passwort-Komplexit\u00e4ts-Regex zu setzen</li> <li>...die Sichtbarkeit des privaten DKIM-Schl\u00fcssels aktivieren</li> <li>...eine Gr\u00f6\u00dfe f\u00fcr den Paginierungsausl\u00f6ser festlegen</li> <li>...Standard-Postfach-Attribute festlegen</li> <li>...Sitzungs-Lebensdauern \u00e4ndern</li> <li>...feste App-Men\u00fcs erstellen (die nicht in der mailcow UI ge\u00e4ndert werden k\u00f6nnen)</li> <li>...ein Standard \"To\"-Feld f\u00fcr Relayhost-Tests einstellen</li> <li>...ein Timeout f\u00fcr Docker API Anfragen setzen</li> <li>...IP-Anonymisierung umschalten</li> </ul> <ol> <li> <p>Um SOGos Standardsprache zu \u00e4ndern, m\u00fcssen Sie <code>data/conf/sogo/sogo.conf</code> bearbeiten und \"English\" durch Ihre bevorzugte Sprache ersetzen.\u00a0\u21a9</p> </li> </ol>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-css/","title":"CSS-\u00dcberschreibungen","text":"<p>F\u00fcr benutzerdefinierte \u00dcberschreibungen bestimmter Elemente \u00fcber CSS, verwenden Sie die <code>data/web/css/build/0081-custom-mailcow.css</code> Datei.</p> <p>Die Datei wird von der Verfolgung (via Git) ausgeschlossen und bleibt bei Aktualisierungen erhalten.</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-fido/","title":"WebAuthn / FIDO2","text":""},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-fido/#wie-wird-uv-in-mailcow-gehandhabt","title":"Wie wird UV in mailcow gehandhabt?","text":"<p>Das UV-Flag (wie in \"user verification\") erzwingt, dass WebAuthn den Benutzer verifiziert, bevor es den Zugriff auf den Schl\u00fcssel erlaubt (denken Sie an eine PIN). Wir erzwingen keine UV, um Logins \u00fcber iOS und NFC (YubiKey) zu erm\u00f6glichen.</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-fido/#login-und-schlussel-verarbeitung","title":"Login und Schl\u00fcssel-Verarbeitung","text":"<p>mailcow verwendet Client-seitige Schl\u00fcsselverarbeitung. Wir bitten den Authentifikator (d.h. YubiKey), die Registrierung in seinem Speicher zu speichern.</p> <p>Ein Benutzer muss keinen Benutzernamen eingeben. Die verf\u00fcgbaren Anmeldedaten - falls vorhanden - werden dem Nutzer angezeigt, wenn er den \"Schl\u00fcssel-Login\" \u00fcber das Mailcow UI Login ausw\u00e4hlt.</p> <p>Beim Aufruf des Login-Prozesses werden dem Authentifikator keine Credential-IDs \u00fcbergeben. Dies wird ihn dazu zwingen, die Anmeldeinformationen in seinem eigenen Speicher zu suchen.</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-fido/#wer-kann-webauthn-benutzen-um-sich-bei-mailcow-anzumelden","title":"Wer kann WebAuthn benutzen, um sich bei mailcow anzumelden?","text":"<p>Ab heute sind nur Administratoren und Domain-Administratoren in der Lage, WebAuthn/FIDO2 einzurichten.</p> <p>Sie wollen WebAuthn/Fido als 2FA verwenden? Schauen Sie sich das hier an: Zwei-Faktoren-Authentifizierung</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-netfilter/","title":"Netfilter","text":""},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-netfilter/#netfilter-ban-einstellungen-andern","title":"Netfilter Ban-Einstellungen \u00e4ndern","text":"<p>Um die Netfilter Ban-Einstellungen zu \u00e4ndern navigieren Sie zu dem Men\u00fc Punkt: <code>Konfiguration -&gt; Server-Konfiguration -&gt; Konfiguration -&gt; Fail2ban-Parameter</code>.</p> <p>Sie sollten dann dieses Fenster sehen:</p> <p>Hier k\u00f6nnen Sie verschiedene Optionen f\u00fcr die Banns selbst festlegen. Zum Beispiel die max. Ban-Zeit oder die max. Versuche bevor ein Ban ausgef\u00fchrt wird.</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-netfilter/#netfilter-regex-andern","title":"Netfilter Regex \u00e4ndern","text":"<p>Achtung</p> <p>Folgender Bereich erfordert zumindest grundlegende Regex kenntnisse. Sollten Sie sich nicht sicher sein, was Sie dort tun, k\u00f6nnen wir Ihnen nur von der Umkonfiguration abraten.</p> <p>Sie k\u00f6nnen neben den Sperreinstellungen ebenfalls definieren, was genau aus den Logs der mailcow Container verwendet werden soll um einen m\u00f6glichen Angreifer zu sperren.</p> <p>Daf\u00fcr m\u00fcssen Sie das Regex Feld erst einmal aufklappen, was dann in etwa so aussieht:</p> <p>Dort k\u00f6nnen Sie nun verschiedenste neue Filter-Regeln anlegen.</p> <p>Hinweis</p> <p>Mit weiterschreitenden Updates ist es m\u00f6glich, dass neue Netfilter Regex Regeln dazu kommen oder entfernt werden. Sollte das der Fall sein empfiehlt es sich mit einem Klick auf <code>Zur\u00fccksetzen auf Standard</code> die Netfilter Regex Regeln neu laden zu lassen.</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-pushover/","title":"Pushover","text":"<p>Info</p> <p>Pushover macht es einfach, Echtzeit-Benachrichtigungen auf Ihrem Android, iPhone, iPad und Desktop zu erhalten</p> <p>Sie k\u00f6nnen Pushover verwenden, um eine Push-Benachrichtigung \u00fcber jede E-Mail zu erhalten, die Sie f\u00fcr jede Mailbox erhalten, in der Sie diese Funktion aktiviert haben.</p> <p>1. \u00d6ffnen Sie als Administrator die Einstellungen Ihres Postfachs und scrollen Sie nach unten zu den Pushover-Einstellungen</p> <p>2. Registrieren Sie sich bei Pushover</p> <p>3. Geben Sie Ihren \"Benutzerschl\u00fcssel\" in das Feld \"Benutzer-/Gruppenschl\u00fcssel\" in den Einstellungen Ihres Postfachs ein</p> <p>4. Erstellen Sie eine Anwendung, um das API-Token/den API-Schl\u00fcssel zu erhalten, das/den Sie ebenfalls in Ihre Postfacheinstellungen eintragen m\u00fcssen.</p> <p>5. Optional k\u00f6nnen Sie den Titel/Text der Benachrichtigung bearbeiten und bestimmte Absender-E-Mail-Adressen festlegen, bei denen eine Push-Benachrichtigung ausgel\u00f6st wird</p> <p>6. Speichern Sie alles und \u00fcberpr\u00fcfen Sie dann Ihre Anmeldedaten.</p> <p>Wenn alles erledigt ist, k\u00f6nnen Sie testen, ob Sie eine E-Mail senden k\u00f6nnen, und Sie erhalten eine Push-Nachricht auf Ihrem Telefon</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-spamalias/","title":"Tempor\u00e4re E-Mail-Aliase","text":"<p>Diese tempor\u00e4ren E-Mail-Aliasnamen werden meist dort verwendet, wo wir eine E-Mail-Adresse angeben m\u00fcssen, aber keine weitere E-Mails w\u00fcnschen. Sie werden auch Spam-Alias genannt.</p> <p>Um ein tempor\u00e4res E-Mail-Alias zu erstellen, zu l\u00f6schen oder zu erweitern, m\u00fcssen Sie sich in mailcow's UI als Mailbox-Nutzer anmelden und zum Reiter Tempor\u00e4re E-Mail-Aliase navigieren:</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-spamfilter/","title":"Spamfilter","text":"<p>Ein Mailbox-Nutzer kann den Spam-Filter und die Black-/Whitelist-Einstellungen f\u00fcr seine Mailbox individuell anpassen, indem er zum Reiter Spam-Filter in der Mailcow-Benutzeroberfl\u00e4che navigiert.</p> <p>Info</p> <p>F\u00fcr globale Einstellungen Ihres Spamfilters lesen Sie bitte unseren Abschnitt \u00fcber Rspamd. F\u00fcr eine domainweite Black- und Whitelist lesen Sie bitte unsere Anleitung zu Black / Whitelist</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-sub_addressing/","title":"Sub-Adressierung","text":"<p>Mailbox-Nutzer k\u00f6nnen ihre Mailadresse wie in \"me+facebook@example.org\" markieren. Sie k\u00f6nnen die Tag-Behandlung im mailcow UI Panel (f\u00fcr den Benutzer) unter <code>Mailbox &gt; Einstellungen</code> kontrollieren. </p> <p><code>Sub-Adressierung</code> (RFC 5233) oder <code>Plus-Adressierung</code> auch als Tagging bekannt (nicht zu verwechseln mit Tags)</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-sub_addressing/#verfugbare-aktionen","title":"Verf\u00fcgbare Aktionen","text":"<p>1. Diese Nachricht in einen Unterordner \"facebook\" verschieben (wird in Kleinbuchstaben erstellt, falls nicht vorhanden)</p> <p>2. Den Tag dem Betreff voranstellen: \"[facebook] Betreff\"</p> <p>Bitte beachten Sie: Gro\u00dfgeschriebene Tags werden in Kleinbuchstaben umgewandelt, mit Ausnahme des ersten Buchstabens. Wenn Sie den Tag so lassen wollen, wie er ist, wenden Sie bitte den folgenden Diff an und starten Sie mailcow neu: <pre><code>diff --git a/data/conf/dovecot/global_sieve_after b/data/conf/dovecot/global_sieve_after\nindex e047136e..933c4137 100644\n--- a/data/conf/dovecot/global_sieve_after\n+++ b/data/conf/dovecot/global_sieve_after\n@@ -15,7 +15,7 @@ if allof (\n envelope :detail :matches \"to\" \"*\",\n header :contains \"X-Moo-Tag\" \"YES\"\n ) {\n- set :lower :upperfirst \"tag\" \"${1}\";\n+ set \"tag\" \"${1}\";\n if mailboxexists \"INBOX/${1}\" {\n fileinto \"INBOX/${1}\";\n } else {\n</code></pre></p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-tags/","title":"Tags (f\u00fcr Domains und Mailboxen)","text":"<p>Hinweis</p> <p>Um diese Funktion nutzen zu k\u00f6nnen ist das Update 2022-05 (oder h\u00f6her) erforderlich! Sollten Sie das Update nicht installiert haben, denken Sie bitte \u00fcber ein Update nach. F\u00fcr weitere Informationen bez\u00fcglich dem Update Prozess schauen Sie hier.</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-tags/#wofur-wurden-die-tags-implementiert","title":"Wof\u00fcr wurden die Tags implementiert?","text":"<p>Mit den Tags ist es deutlich einfacher gezielt nach Domains bzw. Mailboxen zu suchen (wenn diese einen Tag haben).</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-tags/#wo-lassen-sich-die-tags-finden","title":"Wo lassen sich die Tags finden?","text":"<p>Die Tags befinden sich in der Domain/Mailbox Sektion der mailcow UI. Um sie zu sehen, klicken Sie einfach auf das kleine Plus-Symbol auf der linken Seite Ihrer Domain/Mailbox (das folgende Bild zeigt das Domain-Ribbon-Men\u00fc): </p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-tags/#wie-kann-ich-ein-tag-hinzufugenentfernen","title":"Wie kann ich ein Tag hinzuf\u00fcgen/entfernen?","text":"<p>Sie k\u00f6nnen bei der Erstellung einer neuen Domain/eines neuen Postfachs einfach ein Tag hinzuf\u00fcgen/entfernen. Sie k\u00f6nnen sie auch hinzuf\u00fcgen/entfernen, wenn Sie Ihre gew\u00fcnschte Domain/Mailbox bearbeiten.</p> <p>Es sieht \u00e4hnlich aus wie hier (das folgende Bild zeigt den Bereich zur Bearbeitung der Dom\u00e4ne):</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-tags/#wie-kann-ich-nach-einem-tag-suchen","title":"Wie kann ich nach einem Tag suchen?","text":"<p>Geben Sie einfach den Tag-Namen in die Suchleiste im Bereich Domain/Postfach ein und warten Sie, bis der Vorgang abgeschlossen ist.</p> <p>Sie k\u00f6nnen sogar angeben, ob Sie nur nach Tags suchen m\u00f6chten.</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/","title":"Zwei-Faktoren-Authentifizierung","text":"<p>Bislang sind drei Methoden f\u00fcr die Zwei-Faktor-Authentifizierung implementiert: WebAuthn (ersetzt seit Februar 2022 U2F), Yubi OTP und TOTP</p> <ul> <li>Damit WebAuthn funktioniert, ben\u00f6tigen Sie eine verschl\u00fcsselte Verbindung zum Server (HTTPS) sowie einen FIDO-Sicherheitsschl\u00fcssel.</li> <li>Sowohl WebAuthn als auch Yubi OTP funktionieren gut mit dem fantastischen Yubikey.</li> <li>W\u00e4hrend Yubi OTP eine aktive Internetverbindung und eine API ID + Schl\u00fcssel ben\u00f6tigt, funktioniert WebAuthn mit jedem Fido Security Key, kann aber nur verwendet werden, wenn der Zugriff auf mailcow \u00fcber HTTPS erfolgt.</li> <li>WebAuthn und Yubi OTP unterst\u00fctzen mehrere Schl\u00fcssel pro Nutzer.</li> <li>Als dritte TFA-Methode verwendet mailcow TOTP: zeitbasierte Einmal-Passw\u00f6rter. Diese Passw\u00f6rter k\u00f6nnen mit Apps wie \"Google Authenticator\" generiert werden, nachdem zun\u00e4chst ein QR-Code gescannt oder das gegebene Geheimnis manuell eingegeben wurde.</li> </ul> <p>Als Administrator k\u00f6nnen Sie den TFA-Login eines Domain-Administrators vor\u00fcbergehend deaktivieren, bis dieser sich erfolgreich eingeloggt hat.</p> <p>Der f\u00fcr die Anmeldung verwendete Schl\u00fcssel wird in gr\u00fcner Farbe angezeigt, w\u00e4hrend andere Schl\u00fcssel grau bleiben.</p> <p>Informationen zum Entfernen von 2FA finden Sie hier.</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#yubi-otp","title":"Yubi OTP","text":"<p>Die Yubi API ID und der Schl\u00fcssel werden mit der Yubico Cloud API abgeglichen. Bei der Einrichtung von TFA werden Sie nach Ihrem pers\u00f6nlichen API-Konto f\u00fcr diesen Schl\u00fcssel gefragt. Die API-ID, der API-Schl\u00fcssel und die ersten 12 Zeichen (Ihre YubiKeys ID in modhex) werden in der MySQL-Tabelle als Geheimnis gespeichert.</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#beispiel-einrichtung","title":"Beispiel-Einrichtung","text":"<p>Als erstes muss der YubiKey f\u00fcr die Verwendung als OTP-Generator konfiguriert werden. Laden Sie dazu den <code>YubiKey Manager</code> von der Yubico Website herunter: hier</p> <p>Im Folgenden konfigurieren Sie den YubiKey f\u00fcr OTP. \u00dcber den Men\u00fcpunkt <code>Anwendungen</code> -&gt; <code>OTP</code> und einem Klick auf den <code>Konfigurieren</code> Button. W\u00e4hlen Sie im folgenden Men\u00fc <code>Credential Type</code> -&gt; <code>Yubico OTP</code> und klicken Sie auf <code>Next</code>.</p> <p>Setzen Sie ein H\u00e4kchen in die Checkbox <code>Use serial</code>, generieren Sie eine <code>Private ID</code> und einen <code>Secret key</code> \u00fcber die Schaltfl\u00e4chen. Damit der YubiKey sp\u00e4ter validiert werden kann, muss auch das H\u00e4kchen in der <code>Upload</code> Checkbox gesetzt werden und klicken Sie dann auf <code>Finish</code>.</p> <p>Nun \u00f6ffnet sich ein neues Browserfenster, in dem Sie unten im Formular ein OTP Ihres YubiKey eingeben m\u00fcssen (auf das Feld klicken und dann auf Ihren YubiKey tippen). Best\u00e4tigen Sie das Captcha und laden Sie die Daten auf den Yubico-Server hoch, indem Sie auf 'Hochladen' klicken. Die Verarbeitung der Daten wird einen Moment dauern.</p> <p>Nachdem die Generierung erfolgreich war, werden Ihnen eine <code>Client ID</code> und ein <code>Secret key</code> angezeigt, notieren Sie sich diese Informationen an einem sicheren Ort.</p> <p>Nun k\u00f6nnen Sie <code>Yubico OTP-Authentifizierung</code> aus dem Dropdown-Men\u00fc in der mailcow UI auf der Startseite unter <code>Zugang</code> -&gt; <code>Zwei-Faktor-Authentifizierung</code> ausw\u00e4hlen. In dem sich nun \u00f6ffnenden Dialog k\u00f6nnen Sie einen Namen f\u00fcr diesen YubiKey eingeben und die zuvor notierte <code>Client ID</code> sowie den <code>Secret key</code> in die vorgesehenen Felder eintragen. Geben Sie schlie\u00dflich Ihr aktuelles Kontopasswort ein und ber\u00fchren Sie nach Auswahl des Feldes <code>Touch Yubikey</code> die Schaltfl\u00e4che Ihres YubiKey.</p> <p>Herzlichen Gl\u00fcckwunsch! Sie k\u00f6nnen sich nun mit Ihrem YubiKey in die mailcow UI einloggen!</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#webauthn-u2f-ersatz","title":"WebAuthn (U2F, Ersatz)","text":"<p>Warning</p> <p>Seit Februar 2022 hat Google Chrome die Unterst\u00fctzung f\u00fcr U2F aufgegeben und die Verwendung von WebAuthn standardisiert. Die WebAuthn API (der Ersatz f\u00fcr U2F) ist seit dem 21. Januar 2022 Teil von mailcow, wenn Sie also den Key \u00fcber Februar 2022 hinaus nutzen wollen, sollten Sie ein Update mit der <code>update.sh</code> in Betracht ziehen. </p> <p>Um WebAuthn zu nutzen, muss der Browser diesen Standard unterst\u00fctzen:</p> <ul> <li>Edge (&gt;=18)</li> <li>Firefox (&gt;=60)</li> <li>Chrome (&gt;=67)</li> <li>Safari (&gt;=13)</li> <li>Opera (&gt;=54)</li> </ul> <p>Die folgenden mobilen Browser unterst\u00fctzen diesen Authentifizierungstyp:</p> <ul> <li>Safari auf iOS (&gt;=14.5)</li> <li>Android-Browser (&gt;=97)</li> <li>Opera Mobil (&gt;=64)</li> <li>Chrome f\u00fcr Android (&gt;=97)</li> </ul> <p>Quellen: caniuse.com, blog.mozilla.org</p> <p>WebAuthn funktioniert auch ohne Internetverbindung.</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#was-passiert-mit-meinem-registrierten-fido-security-key-nach-dem-update-von-u2f-auf-webauthn","title":"Was passiert mit meinem registrierten Fido Security Key nach dem Update von U2F auf WebAuthn?","text":"<p>Warning</p> <p>Mit dem neuen U2F-Ersatz (WebAuthn) m\u00fcssen Sie Ihren Fido Security Key neu registrieren, zum Gl\u00fcck ist WebAuthn abw\u00e4rtskompatibel und unterst\u00fctzt das U2F-Protokoll.</p> <p>Im Idealfall sollten Sie beim n\u00e4chsten Einloggen (mit dem Schl\u00fcssel) ein Textfeld erhalten, das besagt, dass Ihr Fido Security Key aufgrund des Updates auf WebAuthn entfernt und als 2-Faktor-Authentifikator gel\u00f6scht wurde.</p> <p>Aber keine Sorge! Sie k\u00f6nnen Ihren bestehenden Schl\u00fcssel einfach neu registrieren und ihn wie gewohnt verwenden. Sie werden wahrscheinlich nicht einmal einen Unterschied bemerken, au\u00dfer dass Ihr Browser die U2F-Deaktivierungsmeldung nicht mehr anzeigt.</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#deaktivieren-inoffizieller-unterstutzter-fido-security-keys","title":"Deaktivieren inoffizieller unterst\u00fctzter Fido Security Keys","text":"<p>Mit WebAuthn gibt es die M\u00f6glichkeit, nur offizielle Fido Security Keys zu verwenden (von den gro\u00dfen Marken wie: Yubico, Apple, Nitro, Google, Huawei, Microsoft, usw.) zu verwenden.</p> <p>Dies dient in erster Linie der Sicherheit, da es Administratoren erm\u00f6glicht, sicherzustellen, dass nur offizielle Hardware in ihrer Umgebung verwendet werden kann.</p> <p>Um diese Funktion zu aktivieren, \u00e4ndern Sie den Wert <code>WEBAUTHN_ONLY_TRUSTED_VENDORS</code> in mailcow.conf von <code>n</code> auf <code>y</code> und starten Sie die betroffenen Container mit <code>docker compose up -d</code> neu.</p> <p>Die mailcow wird nun die Vendor-Zertifikate verwenden, die sich in Ihrem mailcow-Verzeichnis unter <code>data/web/inc/lib/WebAuthn/rootCertificates</code> befinden. </p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#beispiel","title":"Beispiel:","text":"<p>Wenn Sie die offiziellen Hersteller-Ger\u00e4te nur auf Apple beschr\u00e4nken wollen, brauchen Sie nur das Apple Hersteller-Zertifikat im <code>data/web/inc/lib/WebAuthn/rootCertificates</code>. Nachdem Sie alle anderen Zertifikate gel\u00f6scht haben, k\u00f6nnen Sie WebAuthn 2FA nur noch mit Apple-Ger\u00e4ten aktivieren.</p> <p>Das ist f\u00fcr jeden Hersteller gleich, also w\u00e4hlen Sie aus, was Ihnen gef\u00e4llt (wenn Sie es wollen).</p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#eigene-zertifikate-fur-webauthn-verwenden","title":"Eigene Zertifikate f\u00fcr WebAuthn verwenden","text":"<p>Wenn du ein g\u00fcltiges Zertifikat vom Hersteller deines Schl\u00fcssels hast, kannst du es auch zu deiner Mailcow hinzuf\u00fcgen!</p> <p>Kopieren Sie einfach das Zertifikat in den <code>data/web/inc/lib/WebAuthn/rootCertificates</code> Ordner und starten Sie Ihre Mailcow neu.</p> <p>Nun sollten Sie in der Lage sein, auch dieses Ger\u00e4t zu registrieren, obwohl die \u00dcberpr\u00fcfung f\u00fcr die Herstellerzertifikate aktiviert ist, da Sie das Zertifikat manuell hinzugef\u00fcgt haben. </p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#ist-es-gefahrlich-den-vendor-check-deaktiviert-zu-lassen","title":"Ist es gef\u00e4hrlich, den Vendor Check deaktiviert zu lassen?","text":"<p>Nein, das ist es nicht! Diese Herstellerzertifikate werden nur zur \u00dcberpr\u00fcfung der Originalhardware verwendet, nicht zur Absicherung des Registrierungsprozesses.</p> <p>Wie Sie in diesen Artikeln lesen k\u00f6nnen, hat die Deaktivierung nichts mit der Software-Sicherheit zu tun: - https://developers.yubico.com/U2F/Attestation_and_Metadata/ - https://medium.com/webauthnworks/webauthn-fido2-demystifying-attestation-and-mds-efc3b3cb3651 - https://medium.com/webauthnworks/sorting-fido-ctap-webauthn-terminology-7d32067c0b01</p> <p>Letztendlich ist es aber nat\u00fcrlich Ihre Entscheidung, ob Sie dieses H\u00e4kchen deaktiviert oder aktiviert lassen. </p>"},{"location":"de/manual-guides/mailcow-UI/u_e-mailcow_ui-tfa/#totp","title":"TOTP","text":"<p>Die bekannteste TFA-Methode, die meist mit einem Smartphone verwendet wird.</p> <p>Um die TOTP-Methode einzurichten, loggen Sie sich in die Admin UI ein und w\u00e4hlen Sie <code>Time-based OTP (TOTP)</code> aus der Liste.</p> <p>Nun \u00f6ffnet sich ein Modal, in dem Sie einen Namen f\u00fcr Ihr 2FA-\"Ger\u00e4t\" (Beispiel: John Deer's Smartphone) und das Passwort des betroffenen Admin-Kontos (mit dem Sie derzeit eingeloggt sind) eingeben m\u00fcssen.</p> <p>Sie haben zwei verschiedene Methoden, um TOTP f\u00fcr Ihr Konto zu registrieren: 1. Scannen Sie den QR-Code mit Ihrer Authenticator App auf einem Smartphone oder Tablet. 2. Verwenden Sie den TOTP-Code (unter dem QR-Code) in Ihrem TOTP-Programm oder Ihrer App (wenn Sie keinen QR-Code scannen k\u00f6nnen).</p> <p>Nachdem Sie den QR- oder TOTP-Code in der TOTP-App/dem TOTP-Programm Ihrer Wahl registriert haben, m\u00fcssen Sie nur noch den nun generierten TOTP-Token (in der App/dem Programm) als Best\u00e4tigung in der mailcow UI eingeben, um die TOTP 2FA endg\u00fcltig zu aktivieren, ansonsten wird sie nicht aktiviert, obwohl der TOTP-Token bereits in Ihrer App/ Ihrem Programm generiert wurde.</p>"},{"location":"de/models/model-acl/","title":"ACL","text":"<p>Die Bearbeitung eines Dom\u00e4nenadministrators oder eines Mailboxbenutzers erm\u00f6glicht es, Einschr\u00e4nkungen f\u00fcr dieses Konto festzulegen.</p> <p>Wichtig: Bei sich \u00fcberschneidenden Modulen wie Synchronisierungsauftr\u00e4gen, auf die sowohl Dom\u00e4nenadministratoren als auch Mailbox-Benutzer Zugriff erhalten k\u00f6nnen, werden die Rechte des Dom\u00e4nenadministrators geerbt, wenn man sich als Mailbox-Benutzer anmeldet.</p> <p>Einige Beispiele:</p> <p>1.</p> <ul> <li>Ein Dom\u00e4nenadministrator hat keinen Zugriff auf Synchronisierungsauftr\u00e4ge, kann sich aber als Mailbox-Benutzer anmelden</li> <li>Wenn er sich als Mailbox-Benutzer anmeldet, erh\u00e4lt er keinen Zugriff auf Synchronisierungsauftr\u00e4ge, auch wenn der betreffende Mailbox-Benutzer bei der direkten Anmeldung Zugriff hat.</li> </ul> <p>2.</p> <ul> <li>Ein Dom\u00e4nenadministrator hat Zugriff auf Synchronisierungsauftr\u00e4ge und kann sich als Postfachbenutzer anmelden</li> <li>Der Mailbox-Benutzer, als der er sich anzumelden versucht, hat keinen Zugang zu Synchronisierungsauftr\u00e4gen</li> <li>Der Dom\u00e4nenadministrator, der nun als Mailbox-Benutzer angemeldet ist, erbt die Berechtigung des Mailbox-Benutzers und kann auf Synchronisierungsauftr\u00e4ge zugreifen.</li> </ul> <p>3.</p> <ul> <li>Ein Dom\u00e4nenadministrator meldet sich als Mailbox-Benutzer an</li> <li>Jede Berechtigung, die nicht in der ACL eines Dom\u00e4nenadministrators vorhanden ist, wird automatisch gew\u00e4hrt (Beispiel: zeitlich begrenzter Alias, TLS-Richtlinie usw.)</li> </ul>"},{"location":"de/models/model-passwd/","title":"Passwort-Hashing","text":""},{"location":"de/models/model-passwd/#vollstandig-unterstutzte-hashing-methoden","title":"Vollst\u00e4ndig unterst\u00fctzte Hashing-Methoden","text":"<p>Die aktuellste Version von mailcow unterst\u00fctzt die folgenden Hashing-Methoden vollst\u00e4ndig. Die Standard-Hashing-Methode ist fett geschrieben:</p> <ul> <li>BLF-CRYPT</li> <li>SSHA</li> <li>SSHA256</li> <li>SSHA512</li> </ul> <p>Die obigen Methoden k\u00f6nnen in <code>mailcow.conf</code> als <code>MAILCOW_PASS_SCHEME</code> Wert verwendet werden.</p>"},{"location":"de/models/model-passwd/#nur-lese-hashing-methoden","title":"Nur-Lese-Hashing-Methoden","text":"<p>Die folgenden Methoden werden nur lesend unterst\u00fctzt. Wenn Sie planen, SOGo zu benutzen (wie standardm\u00e4\u00dfig), ben\u00f6tigen Sie eine SOGo-kompatible Hash-Methode. Bitte beachten Sie den Hinweis am Ende dieser Seite, wie Sie die Ansicht bei Bedarf aktualisieren k\u00f6nnen. Wenn SOGo deaktiviert ist, k\u00f6nnen alle unten aufgef\u00fchrten Hashing-Methoden von mailcow und Dovecot gelesen werden.</p> <ul> <li>ARGON2I (SOGo kompatibel)</li> <li>ARGON2ID (SOGo kompatibel)</li> <li>CLEAR</li> <li>CLEARTEXT</li> <li>CRYPT (SOGo-kompatibel)</li> <li>DES-CRYPT</li> <li>LDAP-MD5 (SOGo-kompatibel)</li> <li>MD5 (SOGo-kompatibel)</li> <li>MD5-CRYPT (SOGo-kompatibel)</li> <li>PBKDF2 (SOGo-kompatibel)</li> <li>PLAIN (SOGo-kompatibel)</li> <li>PLAIN-MD4</li> <li>PLAIN-MD5</li> <li>PLAIN-TRUNC</li> <li>SHA (SOGo-kompatibel)</li> <li>SHA1 (SOGo-kompatibel)</li> <li>SHA256 (SOGo-kompatibel)</li> <li>SHA256-CRYPT (SOGo-kompatibel)</li> <li>SHA512 (SOGo-kompatibel)</li> <li>SHA512-CRYPT (SOGo-kompatibel)</li> <li>SMD5 (SOGo kompatibel)</li> </ul> <p>Das bedeutet, mailcow ist in der Lage, Nutzer mit einem Hash wie <code>{MD5}1a1dc91c907325c69271ddf0c944bc72</code> aus der Datenbank zu verifizieren.</p> <p>Der Wert von <code>MAILCOW_PASS_SCHEME</code> wird immer verwendet, um neue Passw\u00f6rter zu verschl\u00fcsseln.</p> <p>Ich habe die Passwort-Hashes in der SQL-Tabelle \"Mailbox\" ge\u00e4ndert und kann mich nicht anmelden.</p> <p>Eine \"Ansicht\" muss aktualisiert werden. Sie k\u00f6nnen dies durch einen Neustart von sogo-mailcow ausl\u00f6sen: <code>docker compose restart sogo-mailcow</code></p>"},{"location":"de/models/model-sender_rcv/","title":"Sender- und Empf\u00e4ngermodell","text":"<p>Wenn eine Mailbox erstellt wird, kann ein Benutzer Mails von seiner eigenen Mailboxadresse senden und empfangen.</p> <pre><code>Die Mailbox me@example.org wird erstellt. example.org ist eine prim\u00e4re Dom\u00e4ne.\nHinweis: Eine Mailbox kann nicht in einer Alias-Dom\u00e4ne erstellt werden.\n\nme@example.org ist nur als me@example.org bekannt.\nme@example.org darf als me@example.org senden.\n</code></pre> <p>Wir k\u00f6nnen eine Alias-Dom\u00e4ne f\u00fcr example.org hinzuf\u00fcgen:</p> <pre><code>Die Alias-Dom\u00e4ne alias.com wird hinzugef\u00fcgt und der prim\u00e4ren Dom\u00e4ne example.org zugewiesen.\nme@example.org ist nun als me@example.org und me@alias.com bekannt.\nme@example.org darf nun als me@example.org und me@alias.com senden.\n</code></pre> <p>Wir k\u00f6nnen Aliase f\u00fcr eine Mailbox hinzuf\u00fcgen, um Mails von dieser neuen Adresse zu empfangen und zu senden.</p> <p>Es ist wichtig zu wissen, dass Sie nicht in der Lage sind, Mails f\u00fcr <code>my-alias@my-alias-domain.tld</code> zu empfangen. Sie m\u00fcssen diesen speziellen Alias erstellen.</p> <pre><code>me@example.org wird der Alias alias@example.org zugewiesen.\nme@example.org ist jetzt bekannt als me@example.org, me@alias.com, alias@example.org\n\nme@example.org ist NICHT als alias@alias.com bekannt.\n</code></pre> <p>Bitte beachten Sie, dass dies nicht f\u00fcr \"catch-all\"-Aliasnamen gilt:</p> <pre><code>Die Alias-Dom\u00e4ne alias.com wird hinzugef\u00fcgt und der prim\u00e4ren Dom\u00e4ne example.org zugewiesen\nme@example.org wird der Catch-all-Alias @example.org zugewiesen\nme@example.org ist weiterhin nur als me@example.org bekannt, was die einzige verf\u00fcgbare send-as Option ist.\n\nJede an alias.com gesendete E-Mail wird mit dem Catch-All-Alias f\u00fcr example.org \u00fcbereinstimmen.\n</code></pre> <p>Administratoren und Dom\u00e4nenadministratoren k\u00f6nnen Postf\u00e4cher bearbeiten, um bestimmten Benutzern zu erlauben, als andere Postfachbenutzer zu senden (sie zu \"delegieren\").</p> <p>Sie k\u00f6nnen zwischen Mailbox-Benutzern w\u00e4hlen oder die Absenderpr\u00fcfung f\u00fcr Dom\u00e4nen komplett deaktivieren.</p>"},{"location":"de/models/model-sender_rcv/#sogo-mail-von-adressen","title":"SOGo \"Mail von\"-Adressen","text":"<p>Mailbox-Benutzer k\u00f6nnen nat\u00fcrlich ihre eigene Mailbox-Adresse ausw\u00e4hlen, sowie alle Alias-Adressen und Aliase, die \u00fcber Alias-Dom\u00e4nen existieren.</p> <p>Wenn Sie einen anderen existierenden Mailbox-Benutzer als Ihre \"Mail von\"-Adresse ausw\u00e4hlen wollen, muss dieser Benutzer Ihnen den Zugriff \u00fcber SOGo delegieren (siehe SOGo-Dokumentation). Au\u00dferdem muss ein mailcow (Domain) Administrator Ihnen den Zugang wie oben beschrieben gew\u00e4hren.</p>"},{"location":"de/post_installation/firststeps-disable_ipv6/","title":"IPv6 deaktivieren","text":"<p>Dies wird NUR empfohlen, wenn Sie kein IPv6-f\u00e4higes Netzwerk auf Ihrem Host haben!</p> <p>Wenn Sie es wirklich brauchen, k\u00f6nnen Sie die Verwendung von IPv6 in der Compose-Datei deaktivieren. Zus\u00e4tzlich k\u00f6nnen Sie auch den Start des Containers \"ipv6nat-mailcow\" deaktivieren, da er nicht ben\u00f6tigt wird, wenn Sie IPv6 nicht verwenden.</p> <p>Anstatt die Datei docker-compose.yml direkt zu bearbeiten, ist es besser, eine Override-Datei zu erstellen zu erstellen und Ihre \u00c4nderungen am Dienst dort zu implementieren. Leider scheint dies im Moment nur f\u00fcr Dienste zu funktionieren, nicht f\u00fcr Netzwerkeinstellungen.</p> <p>Um IPv6 im mailcow-Netzwerk zu deaktivieren, \u00f6ffnen Sie docker-compose.yml mit Ihrem bevorzugten Texteditor und suchen Sie nach dem Netzwerk-Abschnitt (er befindet sich am Ende der Datei). </p> <p>1. \u00c4ndern Sie docker-compose.yml</p> <p>\u00c4ndern Sie <code>enable_ipv6: true</code> in <code>enable_ipv6: false</code>:</p> <pre><code>networks:\n mailcow-network:\n [...]\n enable_ipv6: true # &lt;&lt;&lt; auf false setzen\n [...]\n</code></pre> <p>2. ipv6nat-mailcow deaktivieren</p> <p>Um den ipv6nat-mailcow Container ebenfalls zu deaktivieren, gehen Sie in Ihr mailcow Verzeichnis und erstellen Sie eine neue Datei namens \"docker-compose.override.yml\": </p> <p>HINWEIS: Wenn Sie bereits eine Override-Datei haben, erstellen Sie diese nat\u00fcrlich nicht neu, sondern f\u00fcgen Sie die untenstehenden Zeilen entsprechend in Ihre bestehende Datei ein!</p> <pre><code># cd /opt/mailcow-dockerized\n# touch docker-compose.override.yml\n</code></pre> <p>\u00d6ffnen Sie die Datei in Ihrem bevorzugten Texteditor und tragen Sie folgendes ein:</p> <pre><code>version: '2.1'\nservices:\n\n ipv6nat-mailcow:\n image: bash:latest\n restart: \"no\"\n entrypoint: [\"echo\", \"ipv6nat disabled in compose.override.yml\"]\n</code></pre> <p>Damit diese \u00c4nderungen wirksam werden, m\u00fcssen Sie den Stack vollst\u00e4ndig stoppen und dann neu starten, damit Container und Netzwerke neu erstellt werden:</p> <pre><code>docker compose down\ndocker compose up -d\n</code></pre> <p>3. Deaktivieren Sie IPv6 in unbound-mailcow</p> <p>Bearbeiten Sie <code>data/conf/unbound/unbound.conf</code> und setzen Sie <code>do-ip6</code> auf \"no\":</p> <pre><code>Server:\n [...]\n do-ip6: no\n [...]\n</code></pre> <p>unbound neu starten:</p> <pre><code>docker compose restart unbound-mailcow\n</code></pre> <p>4. Deaktivieren Sie IPv6 in postfix-mailcow</p> <p>Erstellen Sie <code>data/conf/postfix/extra.cf</code> und setzen Sie <code>smtp_address_preference</code> auf <code>ipv4</code>:</p> <pre><code>smtp_address_preference = ipv4\ninet_protocols = ipv4\n</code></pre> <p>Starten Sie Postfix neu:</p> <pre><code>docker compose restart postfix-mailcow\n</code></pre> <p>5. Wenn im Docker Daemon IPv6 komplett deaktiviert ist:</p> <p>Folgende NGINX, Dovecot und Php-fpm Konfigurationsdateien anpassen</p> <pre><code>sed -i '/::/d' data/conf/nginx/listen_*\nsed -i '/::/d' data/conf/nginx/templates/listen*\nsed -i '/::/d' data/conf/nginx/dynmaps.conf\nsed -i 's/,\\[::\\]//g' data/conf/dovecot/dovecot.conf\nsed -i 's/\\[::\\]://g' data/conf/phpfpm/php-fpm.d/pools.conf\n</code></pre>"},{"location":"de/post_installation/firststeps-dmarc_reporting/","title":"DMARC Reporting","text":"<p>Die DMARC-Berichterstattung erfolgt \u00fcber das Rspamd DMARC-Modul.</p> <p>Die Rspamd-Dokumentation finden Sie hier: https://rspamd.com/doc/modules/dmarc.html</p> <p>Wichtig:</p> <ol> <li> <p>\u00c4ndern Sie <code>example.com</code>, <code>mail.example.com</code> und <code>Example</code> so, dass sie Ihrer Einrichtung entsprechen</p> </li> <li> <p>Die DMARC-Berichterstattung erfordert zus\u00e4tzliche Aufmerksamkeit, insbesondere in den ersten Tagen</p> </li> <li> <p>Alle empfangenden Domains, die auf mailcow gehostet werden, senden von einer Reporting-Domain. Es wird empfohlen, die \u00fcbergeordnete Domain Ihres <code>MAILCOW_HOSTNAME</code> zu verwenden:</p> <ul> <li>Wenn Ihr <code>MAILCOW_HOSTNAME</code> <code>mail.example.com</code> ist, \u00e4ndern Sie die folgende Konfiguration in <code>domain = \"example.com\";</code></li> <li>Setzen Sie <code>email</code> gleich, z.B. <code>email = \"noreply-dmarc@example.com\";</code></li> </ul> </li> <li> <p>Es ist optional, aber empfohlen, einen E-Mail-Benutzer <code>noreply-dmarc</code> in mailcow zu erstellen, um Bounces zu behandeln.</p> </li> </ol>"},{"location":"de/post_installation/firststeps-dmarc_reporting/#aktivieren-sie-dmarc-berichterstattung","title":"Aktivieren Sie DMARC-Berichterstattung","text":"<p>Erstellen Sie die Datei <code>data/conf/rspamd/local.d/dmarc.conf</code> und setzen Sie den folgenden Inhalt:</p> <pre><code>reporting {\n enabled = true;\n email = 'noreply-dmarc@example.com';\n domain = 'example.com';\n org_name = 'Example';\n helo = 'rspamd';\n smtp = 'postfix';\n smtp_port = 25;\n from_name = 'Example DMARC Report';\n msgid_from = 'rspamd.mail.example.com';\n max_entries = 2k;\n keys_expire = 2d;\n}\n</code></pre> <p>Erstellen oder \u00e4ndern Sie <code>docker-compose.override.yml</code> im mailcow-dockerized Basisverzeichnis:</p> <pre><code>version: '2.1'\n\nservices:\n rspamd-mailcow:\n environment:\n - MASTER=${MASTER:-y}\n labels:\n ofelia.enabled: \"true\"\n ofelia.job-exec.rspamd_dmarc_reporting_yesterday.schedule: \"@every 24h\"\n ofelia.job-exec.rspamd_dmarc_reporting_yesterday.command: \"/bin/bash -c \\\"[[ $${MASTER} == y ]] &amp;&amp; /usr/bin/rspamadm dmarc_report $(date --date yesterday '+%Y%m%d') &gt; /var/lib/rspamd/dmarc_reports_last_log 2&gt;&amp;1 || exit 0\\\"\"\n ofelia-mailcow:\n depends_on:\n - rspamd-mailcow\n</code></pre> <p>Starte <code>docker compose up -d</code></p>"},{"location":"de/post_installation/firststeps-dmarc_reporting/#senden-sie-eine-kopie-der-berichte-an-sich-selbst","title":"Senden Sie eine Kopie der Berichte an sich selbst","text":"<p>Um eine versteckte Kopie der von Rspamd erzeugten Berichte zu erhalten, k\u00f6nnen Sie eine <code>bcc_addrs</code> Liste im <code>reporting</code> Konfigurationsabschnitt von <code>data/conf/rspamd/local.d/dmarc.conf</code> setzen:</p> <pre><code>reporting {\n enabled = true;\n email = 'noreply-dmarc@example.com';\n bcc_addrs = [\"noreply-dmarc@example.com\", \"parsedmarc@example.com\"];\n[...]\n</code></pre> <p>Rspamd l\u00e4dt \u00c4nderungen in Echtzeit, so dass Sie den Container zu diesem Zeitpunkt nicht neu starten m\u00fcssen.</p> <p>Dies kann n\u00fctzlich sein, wenn Sie...</p> <ul> <li>...\u00fcberpr\u00fcfen wollen, ob Ihre DMARC-Berichte korrekt und authentifiziert gesendet werden.</li> <li>...Ihre eigenen Berichte analysieren wollen, um Statistiken zu erhalten, z.B. um sie mit ParseDMARC oder anderen Analysesystemen zu verwenden.</li> </ul>"},{"location":"de/post_installation/firststeps-dmarc_reporting/#fehlersuche","title":"Fehlersuche","text":"<p>Pr\u00fcfen Sie, wann der Berichtsplan zuletzt ausgef\u00fchrt wurde:</p> <pre><code>docker compose exec rspamd-mailcow date -r /var/lib/rspamd/dmarc_reports_last_log\n</code></pre> <p>Sehen Sie sich die letzte Berichtsausgabe an:</p> <pre><code>docker compose exec rspamd-mailcow cat /var/lib/rspamd/dmarc_reports_last_log\n</code></pre> <p>Manuelles Ausl\u00f6sen eines DMARC-Berichts:</p> <pre><code>docker compose exec rspamd-mailcow rspamadm dmarc_report\n</code></pre> <p>Best\u00e4tigen Sie, dass Rspamd Daten in Redis aufgezeichnet hat: \u00c4ndern Sie <code>20220428</code> in ein anderes interessantes Datum zum schauen.</p> <pre><code>docker compose exec redis-mailcow redis-cli SMEMBERS \"dmarc_idx;20220428\"\n</code></pre> <p>Nehmen Sie eine der Zeilen aus der Ausgabe, die Sie interessiert, und fordern Sie sie an, z. B.:</p> <pre><code>docker compose exec redis-mailcow redis-cli ZRANGE \"dmarc_rpt;microsoft.com;mailto:d@rua.agari.com;20220428\" 0 49\n</code></pre>"},{"location":"de/post_installation/firststeps-dmarc_reporting/#andern-sie-die-haufigkeit-der-dmarc-berichte","title":"\u00c4ndern Sie die H\u00e4ufigkeit der DMARC-Berichte","text":"<p>Im obigen Beispiel werden die Berichte einmal alle 24 Stunden sowie f\u00fcr den gestrigen Tag versendet. Dies ist f\u00fcr die meisten Konfigurationen ausreichend.</p> <p>Wenn Sie ein gro\u00dfes E-Mail-Aufkommen haben und die DMARC-Berichterstattung mehr als einmal am Tag durchf\u00fchren wollen, m\u00fcssen Sie einen zweiten Zeitplan erstellen und ihn mit <code>dmarc_report $(date '+%Y%m%d')</code> ausf\u00fchren, um den aktuellen Tag zu verarbeiten. Sie m\u00fcssen sicherstellen, dass der erste Lauf an jedem Tag auch den letzten Bericht vom Vortag verarbeitet, also muss er zweimal gestartet werden, einmal mit <code>$(date --date yesterday '+%Y%m%d')</code> um <code>0 5 0 * * *</code> (00:05 AM) und dann mit <code>$(date '+%Y%m%d')</code> mit dem gew\u00fcnschten Intervall.</p> <p>Der Ofelia-Zeitplan hat die gleiche Implementierung wie <code>cron</code> in Go, die unterst\u00fctzte Syntax ist beschrieben in cron Documentation</p> <p>Um den Zeitplan zu \u00e4ndern:</p> <ol> <li><code>docker-compose.override.yml</code> bearbeiten:</li> </ol> <pre><code>version: '2.1'\n\nservices:\n rspamd-mailcow:\n environment:\n - MASTER=${MASTER:-y}\n labels:\n ofelia.enabled: \"true\"\n ofelia.job-exec.rspamd_dmarc_reporting_yesterday.schedule: \"0 5 0 * * *\"\n ofelia.job-exec.rspamd_dmarc_reporting_yesterday.command: \"/bin/bash -c \\\"[[ $${MASTER} == y ]] &amp;&amp; /usr/bin/rspamadm dmarc_report $(date --date yesterday '+%Y%m%d') &gt; /var/lib/rspamd/dmarc_reports_last_log 2&gt;&amp;1 || exit 0\\\"\"\n ofelia.job-exec.rspamd_dmarc_reporting_today.schedule: \"@every 12h\"\n ofelia.job-exec.rspamd_dmarc_reporting_today.command: \"/bin/bash -c \\\"[[ $${MASTER} == y ]] &amp;&amp; /usr/bin/rspamadm dmarc_report $(date '+%Y%m%d') &gt; /var/lib/rspamd/dmarc_reports_last_log 2&gt;&amp;1 || exit 0\\\"\"\n ofelia-mailcow:\n depends_on:\n - rspamd-mailcow\n</code></pre> <ol> <li> <p>F\u00fchren Sie <code>docker compose up -d</code> aus.</p> </li> <li> <p>F\u00fchren Sie <code>docker compose restart ofelia-mailcow</code> aus</p> </li> </ol>"},{"location":"de/post_installation/firststeps-dmarc_reporting/#dmarc-berichterstattung-deaktivieren","title":"DMARC-Berichterstattung deaktivieren","text":"<p>Zum Deaktivieren der Berichterstattung:</p> <ol> <li> <p>Setzen Sie <code>enabled</code> auf <code>false</code> in <code>data/conf/rspamd/local.d/dmarc.conf</code>.</p> </li> <li> <p>Machen Sie \u00c4nderungen in <code>docker-compose.override.yml</code> an <code>rspamd-mailcow</code> und <code>ofelia-mailcow</code> r\u00fcckg\u00e4ngig</p> </li> <li> <p>F\u00fchren Sie <code>docker compose up -d</code> aus</p> </li> </ol>"},{"location":"de/post_installation/firststeps-ip_bindings/","title":"IP-Bindings","text":"<p>Warnung</p> <p>Das \u00c4ndern der Bindung hat keinen Einfluss auf Source-NAT. Siehe SNAT f\u00fcr die erforderlichen Schritte.</p>"},{"location":"de/post_installation/firststeps-ip_bindings/#ipv4-binding","title":"IPv4-Binding","text":"<p>Um eine oder mehrere IPv4-Bind(ings) anzupassen, \u00f6ffne <code>mailcow.conf</code> und editiere eine, mehrere oder alle Variablen nach deinen Bed\u00fcrfnissen:</p> <pre><code># Aus technischen Gr\u00fcnden unterscheiden sich die http-Bindungen ein wenig von anderen Service-Bindungen.\n# Sie werden die folgenden Variablen finden, getrennt durch eine Bindungsadresse und deren Port:\n# Beispiel: HTTP_BIND=1.2.3.4\n\nHTTP_PORT=80\nHTTP_BIND=\nHTTPS_PORT=443\nHTTPS_BIND=\n\n# Andere Dienste werden nach folgendem Format gebunden:\n# SMTP_PORT=1.2.3.4:25 bindet SMTP an die IP 1.2.3.4 auf Port 25\n# Wichtig! Durch die Angabe einer IPv4-Adresse werden alle IPv6-Bindungen seit Docker 20.x \u00fcbersprungen.\n# doveadm, SQL sowie Solr sind nur an lokale Ports gebunden, bitte \u00e4ndern Sie das nicht, es sei denn, Sie wissen, was Sie tun.\n\nSMTP_PORT=25\nSMTPS_PORT=465\nSUBMISSION_PORT=587\nIMAP_PORT=143\nIMAPS_PORT=993\nPOP_PORT=110\nPOPS_PORT=995\nSIEVE_PORT=4190\nDOVEADM_PORT=127.0.0.1:19991\nSQL_PORT=127.0.0.1:13306\nSOLR_PORT=127.0.0.1:18983\n</code></pre> <p>Um Ihre \u00c4nderungen zu \u00fcbernehmen, f\u00fchren Sie <code>docker compose down</code> gefolgt von <code>docker compose up -d</code> aus.</p>"},{"location":"de/post_installation/firststeps-ip_bindings/#ipv6-binding","title":"IPv6-Binding","text":"<p>Das \u00c4ndern von IPv6-Bindings ist anders als bei IPv4. Auch dies hat einen technischen Hintergrund.</p> <p>Eine <code>docker-compose.override.yml</code> Datei wird verwendet, anstatt die <code>docker-compose.yml</code> Datei direkt zu bearbeiten. Dies geschieht, um die Aktualisierbarkeit zu erhalten, da die Datei <code>docker-compose.yml</code> regelm\u00e4\u00dfig aktualisiert wird und Ihre \u00c4nderungen h\u00f6chstwahrscheinlich \u00fcberschrieben werden.</p> <p>Bearbeiten Sie die Datei \"docker-compose.override.yml\" und erstellen Sie sie mit dem folgenden Inhalt. Ihr Inhalt wird mit der produktiven Datei \"docker-compose.yml\" zusammengef\u00fchrt.</p> <p>Es wird eine beispielhafte IPv6 2001:db8:dead:beef::123 in [] angegeben. Das erste Suffix <code>:PORT1</code> definiert den externen Port, w\u00e4hrend das zweite Suffix <code>:PORT2</code> zu dem entsprechenden Port innerhalb des Containers f\u00fchrt und nicht ver\u00e4ndert werden darf.</p> <pre><code>version: '2.1'\nservices:\n\n dovecot-mailcow:\n ports:\n - '[2001:db8:dead:beef::123]:143:143'\n - '[2001:db8:dead:beef::123]:993:993'\n - '[2001:db8:dead:beef::123]:110:110'\n - '[2001:db8:dead:beef::123]:995:995'\n - '[2001:db8:dead:beef::123]:4190:4190'\n\n postfix-mailcow:\n ports:\n - '[2001:db8:dead:beef::123]:25:25'\n - '[2001:db8:dead:beef::123]:465:465'\n - '[2001:db8:dead:beef::123]:587:587'\n\n nginx-mailcow:\n ports:\n - '[2001:db8:dead:beef::123]:80:80'\n - '[2001:db8:dead:beef::123]:443:443'\n</code></pre> <p>Um Ihre \u00c4nderungen zu \u00fcbernehmen, f\u00fchren Sie <code>docker compose down</code> gefolgt von <code>docker compose up -d</code> aus.</p>"},{"location":"de/post_installation/firststeps-local_mta/","title":"Lokaler MTA auf Docker-Host","text":"<p>Die einfachste M\u00f6glichkeit w\u00e4re, den Listener an Port 25/tcp zu deaktivieren.</p> <p>Postfix-Benutzer deaktivieren den Listener, indem sie die folgende Zeile (beginnend mit <code>smtp</code> oder <code>25</code>) in <code>/etc/postfix/master.cf</code> auskommentieren: <pre><code>#smtp inet n - - - - smtpd\n</code></pre></p> <p>Au\u00dferdem, um \u00fcber eine Dockerized mailcow weiterzuleiten, sollten Sie <code>172.22.1.1</code> als Relayhost hinzuf\u00fcgen und das Docker-Interface aus \"inet_interfaces\" entfernen:</p> <pre><code>postconf -e 'relayhost = 172.22.1.1'\npostconf -e \"mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128\"\npostconf -e \"inet_interfaces = loopback-only\"\npostconf -e \"relay_transport = relay\"\npostconf -e \"default_transport = smtp\"\n</code></pre> <p>Jetzt ist es wichtig, dass Sie nicht denselben FQDN in <code>myhostname</code> haben, den Sie f\u00fcr Ihre mailcow verwenden. Pr\u00fcfen Sie Ihre lokale (nicht-Docker) Postfix' main.cf auf <code>myhostname</code> und setzen Sie ihn auf etwas anderes, zum Beispiel <code>local.my.fqdn.tld</code>.</p> <p>\"172.22.1.1\" ist das von mailcow erstellte Netzwerk-Gateway in Docker. Das Relaying \u00fcber diese Schnittstelle ist notwendig (anstatt - zum Beispiel - direkt \u00fcber ${MAILCOW_HOSTNAME}), um \u00fcber ein bekanntes internes Netzwerk weiterzuleiten.</p> <p>Starten Sie Postfix neu, nachdem Sie Ihre \u00c4nderungen vorgenommen haben.</p>"},{"location":"de/post_installation/firststeps-logging/","title":"Logging","text":"<p>Das Logging in mailcow: dockerized besteht aus mehreren Stufen, ist aber immerhin wesentlich flexibler und einfacher in einen Logging-Daemon zu integrieren als bisher.</p> <p>In Docker schreibt die containerisierte Anwendung (PID 1) ihre Ausgabe auf stdout. F\u00fcr echte Ein-Anwendungs-Container funktioniert das sehr gut. F\u00fchren Sie <code>docker compose logs --help</code> aus, um mehr zu erfahren. </p> <p>Einige Container protokollieren oder streamen an mehrere Ziele.</p> <p>Kein Container wird persistente Logs in sich behalten. Container sind fl\u00fcchtige Objekte!</p> <p>Am Ende wird jede Zeile der Logs den Docker-Daemon erreichen - ungefiltert.</p> <p>Der Standard-Logging-Treiber ist \"json \".</p>"},{"location":"de/post_installation/firststeps-logging/#gefilterte-logs","title":"Gefilterte Logs","text":"<p>Einige Logs werden gefiltert und in Redis-Schl\u00fcssel geschrieben, aber auch in einen Redis-Kanal gestreamt.</p> <p>Der Redis-Kanal wird verwendet, um Protokolle mit fehlgeschlagenen Authentifizierungsversuchen zu streamen, die von netfilter-mailcow gelesen werden.</p> <p>Die Redis-Schl\u00fcssel sind persistent und halten 10000 Zeilen von Logs f\u00fcr die Web-UI.</p> <p>Dieser Mechanismus macht es m\u00f6glich, jeden beliebigen Docker-Logging-Treiber zu verwenden, ohne die ohne die F\u00e4higkeit zu verlieren, Logs von der UI zu lesen oder verd\u00e4chtige Clients mit netfilter-mailcow zu sperren.</p> <p>Redis-Schl\u00fcssel enthalten nur Logs von Anwendungen und filtern Systemmeldungen heraus (man denke an Cron etc.).</p>"},{"location":"de/post_installation/firststeps-logging/#logging-treiber","title":"Logging-Treiber","text":""},{"location":"de/post_installation/firststeps-logging/#uber-docker-composeoverrideyml","title":"\u00dcber docker-compose.override.yml","text":"<p>Hier ist die gute Nachricht: Da Docker einige gro\u00dfartige Logging-Treiber hat, k\u00f6nnen Sie mailcow: dockerized mit Leichtigkeit in Ihre bestehende Logging-Umgebung integrieren.</p> <p>Erstellen Sie eine <code>docker-compose.override.yml</code> und f\u00fcgen Sie zum Beispiel diesen Block hinzu, um das \"gelf\" Logging-Plugin f\u00fcr <code>postfix-mailcow</code> zu verwenden:</p> <pre><code>version: '2.1'\nservices:\n postfix-mailcow: # oder ein anderer\n logging:\n driver: \"gelf\"\n options:\n gelf-address: \"udp://graylog:12201\"\n</code></pre> <p>Ein weiteres Beispiel f\u00fcr Syslog:</p> <pre><code>version: '2.1'\nservices:\n\n postfix-mailcow: # oder ein anderer\n logging:\n driver: \"syslog\"\n options:\n syslog-address: \"udp://127.0.0.1:514\"\n syslog-facility: \"local3\"\n\n dovecot-mailcow: # oder ein anderer\n logging:\n driver: \"syslog\"\n options:\n syslog-address: \"udp://127.0.0.1:514\"\n syslog-facility: \"local3\"\n\n rspamd-mailcow: # oder ein anderer\n logging:\n driver: \"syslog\"\n options:\n syslog-address: \"udp://127.0.0.1:514\"\n syslog-facility: \"local3\"\n</code></pre>"},{"location":"de/post_installation/firststeps-logging/#nur-fur-rsyslog","title":"Nur f\u00fcr rsyslog:","text":"<p>Stellen Sie sicher, dass folgende Zeilen in <code>/etc/rsyslog.conf</code> nicht auskommentiert sind:</p> <pre><code># provides UDP syslog reception\nmodule(load=\"imudp\")\ninput(type=\"imudp\" port=\"514\")\n</code></pre> <p>Um Eing\u00e4nge von <code>local3</code> in <code>/var/log/mailcow.log</code> zu leiten und danach die Verarbeitung zu stoppen, erstellen Sie die Datei <code>/etc/rsyslog.d/docker.conf</code>:</p> <pre><code>local3.* /var/log/mailcow.log\n&amp; stop\n</code></pre> <p>Starten Sie rsyslog danach neu.</p>"},{"location":"de/post_installation/firststeps-logging/#uber-daemonjson-global","title":"\u00dcber daemon.json (global)","text":"<p>Wenn Sie den Logging-Treiber global \u00e4ndern wollen, editieren Sie die Konfigurationsdatei des Docker-Daemons <code>/etc/docker/daemon.json</code> und starten Sie den Docker-Dienst neu:</p> <pre><code>{\n...\n \"log-driver\": \"gelf\",\n \"log-opts\": {\n \"gelf-address\": \"udp://graylog:12201\"\n }\n...\n}\n</code></pre> <p>F\u00fcr Syslog:</p> <pre><code>{\n...\n \"log-driver\": \"syslog\",\n \"log-opts\": {\n \"syslog-address\": \"udp://1.2.3.4:514\"\n }\n...\n}\n</code></pre> <p>Starten Sie den Docker-Daemon neu und f\u00fchren Sie <code>docker compose down &amp;&amp; docker compose up -d</code> aus, um die Container mit dem neuen Protokollierungstreiber neu zu erstellen.</p>"},{"location":"de/post_installation/firststeps-logging/#log-rotation","title":"Log rotation","text":"<p>Da diese Logs sehr gro\u00df werden k\u00f6nnen, ist es eine gute Idee logrotate zu nutzen, um Logs nach einer gewissen Zeit zu komprimieren und zu l\u00f6schen.</p> <p>Erstellen Sie die Datei <code>/etc/logrotate.d/mailcow</code> mit folgendem Inhalt:</p> <pre><code>/var/log/mailcow.log {\n rotate 7\n daily\n compress\n delaycompress\n missingok\n notifempty\n create 660 root root\n}\n</code></pre> <p>Mit dieser Konfiguration wird logrotate t\u00e4glich ausgef\u00fchrt und es werden maximal 7 Archive gespeichert.</p> <p>Um die Logdatei w\u00f6chentlich oder monatlich zu rotieren, muss <code>daily</code> durch <code>weekly</code> oder respektive <code>monthly</code> ersetzt werden.</p> <p>Um mehr Archive zu speichern, muss die Nummer hinter <code>rotate</code> angepasst werden.</p> <p>Danach kann logrotate neu gestartet werden.</p>"},{"location":"de/post_installation/firststeps-rp/","title":"Reverse Proxy","text":"<p>Sie m\u00fcssen die Nginx-Seite, die mit mailcow: dockerized geliefert wird, nicht \u00e4ndern. mailcow: dockerized vertraut auf das Standard-Gateway IP 172.22.1.1 als Proxy.</p> <p>1. Stellen Sie sicher, dass Sie HTTP_BIND und HTTPS_BIND in <code>mailcow.conf</code> auf eine lokale Adresse \u00e4ndern und die Ports entsprechend einstellen, zum Beispiel: <pre><code>HTTP_BIND=127.0.0.1\nHTTP_PORT=8080\nHTTPS_BIND=127.0.0.1\nHTTPS_PORT=8443\n</code></pre></p> <p>Dadurch werden auch die Bindungen innerhalb des Nginx-Containers ge\u00e4ndert! Dies ist wichtig, wenn Sie sich entscheiden, einen Proxy innerhalb von Docker zu verwenden.</p> <p>WICHTIG: Verwenden Sie nicht Port 8081, 9081 oder 65510!</p> <p>Erzeugen Sie die betroffenen Container neu, indem Sie <code>docker compose up -d</code> ausf\u00fchren.</p> <p>Wichtige Informationen, bitte lesen Sie diese sorgf\u00e4ltig durch!</p> <p>Info</p> <p>Wenn Sie planen, einen Reverse-Proxy zu verwenden und einen anderen Servernamen als MAILCOW_HOSTNAME verwenden wollen, m\u00fcssen Sie Zus\u00e4tzliche Servernamen f\u00fcr mailcow UI am Ende dieser Seite hinzuf\u00fcgen.</p> <p>Warning</p> <p>Stellen Sie sicher, dass Sie <code>generate_config.sh</code> ausf\u00fchren, bevor Sie die untenstehenden Konfigurationsbeispiele aktivieren. Das Skript <code>generate_config.sh</code> kopiert die Snake-oil Zertifikate an den richtigen Ort, so dass die Dienste nicht aufgrund fehlender Dateien nicht starten k\u00f6nnen.</p> <p>Warning</p> <p>Wenn Sie TLS SNI aktivieren (<code>ENABLE_TLS_SNI</code> in mailcow.conf), m\u00fcssen die Zertifikatspfade in Ihrem Reverse-Proxy mit den korrekten Pfaden in data/assets/ssl/{hostname} \u00fcbereinstimmen. Die Zertifikate werden in <code>data/assets/ssl/{hostname1,hostname2,etc}</code> aufgeteilt und werden daher nicht funktionieren, wenn Sie die Beispiele von unten kopieren, die auf <code>data/assets/ssl/cert.pem</code> etc. zeigen.</p> <p>Info</p> <p>Die Verwendung der untenstehenden Site-Konfigurationen wird acme-Anfragen an mailcow weiterleiten und es die Zertifikate selbst verwalten lassen. Der Nachteil der Verwendung von mailcow als ACME-Client hinter einem Reverse-Proxy ist, dass Sie Ihren Webserver neu laden m\u00fcssen, nachdem acme-mailcow das Zertifikat ge\u00e4ndert/erneuert/erstellt hat. Sie k\u00f6nnen entweder Ihren Webserver t\u00e4glich neu laden oder ein Skript schreiben, um die Datei auf \u00c4nderungen zu \u00fcberwachen. Auf vielen Servern wird logrotate den Webserver sowieso t\u00e4glich neu laden.</p> <p>Wenn Sie eine lokale Certbot-Installation verwenden m\u00f6chten, m\u00fcssen Sie die SSL-Zertifikatsparameter entsprechend \u00e4ndern. Stellen Sie sicher, dass Sie ein Post-Hook-Skript ausf\u00fchren, wenn Sie sich entscheiden, externe ACME-Clients zu verwenden. Ein Beispiel finden Sie am Ende dieser Seite.</p> <p>2. Konfigurieren Sie Ihren lokalen Webserver als Reverse Proxy:</p>"},{"location":"de/post_installation/firststeps-rp/#apache-24","title":"Apache 2.4","text":"<p>Erforderliche Module: <pre><code>a2enmod rewrite proxy proxy_http headers ssl\n</code></pre></p> <p>Let's Encrypt wird unserem Rewrite folgen, Zertifikatsanfragen in mailcow werden problemlos funktionieren.</p> <p>Die hervorgehobenen Zeilen m\u00fcssen beachtet werden.</p> <pre><code>&lt;VirtualHost *:80&gt;\n ServerName ZU MAILCOW HOSTNAMEN \u00c4NDERN\n ServerAlias autodiscover.*\n ServerAlias autoconfig.*\n RewriteEngine on\n\n RewriteCond %{HTTPS} off\n RewriteRule ^/?(.*) https://%{HTTP_HOST}/$1 [R=301,L]\n\n ProxyPass / http://127.0.0.1:8080/\n ProxyPassReverse / http://127.0.0.1:8080/\n ProxyPreserveHost On\n ProxyAddHeaders On\n RequestHeader set X-Forwarded-Proto \"http\"\n&lt;/VirtualHost&gt;\n&lt;VirtualHost *:443&gt;\n ServerName ZU MAILCOW HOSTNAMEN \u00c4NDERN\n ServerAlias autodiscover.*\n ServerAlias autoconfig.*\n\n # You should proxy to a plain HTTP session to offload SSL processing\n ProxyPass /Microsoft-Server-ActiveSync http://127.0.0.1:8080/Microsoft-Server-ActiveSync connectiontimeout=4000\n ProxyPassReverse /Microsoft-Server-ActiveSync http://127.0.0.1:8080/Microsoft-Server-ActiveSync\n ProxyPass / http://127.0.0.1:8080/\n ProxyPassReverse / http://127.0.0.1:8080/\n ProxyPreserveHost On\n ProxyAddHeaders On\n RequestHeader set X-Forwarded-Proto \"https\"\n\n SSLCertificateFile MAILCOW_ORDNER/data/assets/ssl/cert.pem\n SSLCertificateKeyFile MAILCOW_ORDNER/data/assets/ssl/key.pem\n\n # Wenn Sie einen HTTPS-Host als Proxy verwenden m\u00f6chten:\n #SSLProxyEngine On\n\n # Wenn Sie einen Proxy f\u00fcr einen nicht vertrauensw\u00fcrdigen HTTPS-Host einrichten wollen:\n #SSLProxyVerify none\n #SSLProxyCheckPeerCN off\n #SSLProxyCheckPeerName off\n #SSLProxyCheckPeerExpire off\n&lt;/VirtualHost&gt;\n</code></pre>"},{"location":"de/post_installation/firststeps-rp/#nginx","title":"Nginx","text":"<p>Let's Encrypt folgt unserem Rewrite, Zertifikatsanfragen funktionieren problemlos.</p> <p>Achten Sie auf die hervorgehobenen Zeilen.</p> <pre><code>server {\n listen 80 default_server;\n listen [::]:80 default_server;\n server_name ZU MAILCOW HOSTNAMEN \u00c4NDERN autodiscover.* autoconfig.*;\n return 301 https://$host$request_uri;\n}\nserver {\n listen 443 ssl http2;\n listen [::]:443 ssl http2;\n server_name ZU MAILCOW HOSTNAMEN \u00c4NDERN autodiscover.* autoconfig.*;\n\n ssl_certificate MAILCOW_PATH/data/assets/ssl/cert.pem;\n ssl_certificate_key MAILCOW_PATH/data/assets/ssl/key.pem;\n ssl_session_timeout 1d;\n ssl_session_cache shared:SSL:50m;\n ssl_session_tickets off;\n\n # Siehe https://ssl-config.mozilla.org/#server=nginx f\u00fcr die neuesten Empfehlungen zu ssl-Einstellungen\n # Ein Beispiel f\u00fcr eine Konfiguration ist unten angegeben\n ssl_protocols TLSv1.2;\n ssl_ciphers HIGH:!aNULL:!MD5:!SHA1:!kRSA;\n ssl_prefer_server_ciphers off;\n\n location /Microsoft-Server-ActiveSync {\n proxy_pass http://127.0.0.1:8080/Microsoft-Server-ActiveSync;\n proxy_set_header Host $http_host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n proxy_connect_timeout 75;\n proxy_send_timeout 3650;\n proxy_read_timeout 3650;\n proxy_buffers 64 512k; # Seit dem 2022-04 Update n\u00f6tig f\u00fcr SOGo\n client_body_buffer_size 512k;\n client_max_body_size 0;\n }\n\n location / {\n proxy_pass http://127.0.0.1:8080/;\n proxy_set_header Host $http_host;\n proxy_set_header X-Real-IP $remote_addr;\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n client_max_body_size 0;\n # Die folgenden Proxy-Buffer m\u00fcssen gesetzt werden, wenn Sie SOGo nach dem Update 2022-04 (April 2022) verwenden wollen\n # Andernfalls wird ein Login wie folgt fehlschlagen: https://github.com/mailcow/mailcow-dockerized/issues/4537\n proxy_buffer_size 128k;\n proxy_buffers 64 512k;\n proxy_busy_buffers_size 512k;\n }\n}\n</code></pre>"},{"location":"de/post_installation/firststeps-rp/#haproxy-von-der-community-unterstutzt","title":"HAProxy (von der Community unterst\u00fctzt)","text":"<p>Warnung</p> <p>Dies ist ein nicht unterst\u00fctzter Community Beitrag. Korrekturen sind immer erw\u00fcnscht!</p> <p>Wichtig/Fix erw\u00fcnscht: Dieses Beispiel leitet nur HTTPS-Verkehr weiter und benutzt nicht den in mailcow eingebauten ACME-Client.</p> <pre><code>frontend https-in\n bind :::443 v4v6 ssl crt mailcow.pem\n default_backend mailcow\n\nbackend mailcow\n option forwardfor\n http-request set-header X-Forwarded-Proto https if { ssl_fc }\n http-request set-header X-Forwarded-Proto http if !{ ssl_fc }\n server mailcow 127.0.0.1:8080 check\n</code></pre>"},{"location":"de/post_installation/firststeps-rp/#traefik-v2-von-der-community-unterstutzt","title":"Traefik v2 (von der Community unterst\u00fctzt)","text":"<p>Warnung</p> <p>Dies ist ein nicht unterst\u00fctzter Community Beitrag. Korrekturen sind immer erw\u00fcnscht!</p> <p>Wichtig: Diese Konfiguration deckt nur das \"Reverseproxing\" des Webpanels (nginx-mailcow) unter Verwendung von Traefik v2 ab. Wenn Sie auch die Mail-Dienste wie dovecot, postfix... reproxen wollen, m\u00fcssen Sie die folgende Konfiguration an jeden Container anpassen und einen EntryPoint in Ihrer <code>traefik.toml</code> oder <code>traefik.yml</code> (je nachdem, welche Konfiguration Sie verwenden) f\u00fcr jeden Port erstellen. </p> <p>In diesem Abschnitt gehen wir davon aus, dass Sie Ihren Traefik 2 <code>[certificatesresolvers]</code> in Ihrer Traefik-Konfigurationsdatei richtig konfiguriert haben und auch acme verwenden. Das folgende Beispiel verwendet Lets Encrypt, aber Sie k\u00f6nnen es gerne auf Ihren eigenen Zertifikatsresolver \u00e4ndern. Eine grundlegende Traefik 2 toml-Konfigurationsdatei mit allen oben genannten Elementen, die f\u00fcr dieses Beispiel verwendet werden kann, finden Sie hier traefik.toml, falls Sie eine solche Datei ben\u00f6tigen oder einen Hinweis, wie Sie Ihre Konfiguration anpassen k\u00f6nnen.</p> <p>Zuallererst werden wir den acme-mailcow-Container deaktivieren, da wir die von traefik bereitgestellten Zertifikate verwenden werden. Dazu m\u00fcssen wir <code>SKIP_LETS_ENCRYPT=y</code> in unserer <code>mailcow.conf</code> setzen und <code>docker compose up -d</code> ausf\u00fchren, um die \u00c4nderungen zu \u00fcbernehmen.</p> <p>Dann erstellen wir eine <code>docker-compose.override.yml</code> Datei, um die Hauptdatei <code>docker-compose.yml</code> zu \u00fcberschreiben, die sich im Mailcow-Stammverzeichnis befindet. </p> <pre><code>version: '2.1'\n\nservices:\n nginx-mailcow:\n networks:\n # Traefiks Netzwerk hinzuf\u00fcgen\n web:\n labels:\n - traefik.enable=true\n # Erstellt einen Router namens \"moo\" f\u00fcr den Container und richtet eine Regel ein, um den Container mit einer bestimmten Regel zu verkn\u00fcpfen,\n # in diesem Fall eine Host-Regel mit unserer MAILCOW_HOSTNAME-Variable.\n - traefik.http.routers.moo.rule=Host(`${MAILCOW_HOSTNAME}`)\n # Aktiviert tls \u00fcber den zuvor erstellten Router.\n - traefik.http.routers.moo.tls=true\n # Gibt an, welche Art von Cert-Resolver wir verwenden werden, in diesem Fall le (Lets Encrypt).\n - traefik.http.routers.moo.tls.certresolver=le\n # Erzeugt einen Dienst namens \"moo\" f\u00fcr den Container und gibt an, welchen internen Port des Containers\n # Traefik die eingehenden Daten weiterleiten soll.\n - traefik.http.services.moo.loadbalancer.server.port=${HTTP_PORT}\n # Gibt an, welchen Eingangspunkt (externer Port) traefik f\u00fcr diesen Container abh\u00f6ren soll.\n # Websecure ist Port 443, siehe die Datei traefik.toml wie oben.\n - traefik.http.routers.moo.entrypoints=websecure\n # Stellen Sie sicher, dass traefik das Web-Netzwerk verwendet, nicht das mailcowdockerized_mailcow-network\n - traefik.docker.network=web\n\n certdumper:\n image: humenius/traefik-certs-dumper\n command: --restart-containers ${COMPOSE_PROJECT_NAME}-postfix-mailcow-1,${COMPOSE_PROJECT_NAME}-nginx-mailcow-1,${COMPOSE_PROJECT_NAME}-dovecot-mailcow-1\n network_mode: none\n volumes:\n # Binden Sie das Volume, das Traefiks `acme.json' Datei enth\u00e4lt, ein\n - acme:/traefik:ro\n # SSL-Ordner von mailcow einh\u00e4ngen\n - ./data/assets/ssl/:/output:rw\n # Binden Sie den Docker Socket ein, damit traefik-certs-dumper die Container neu starten kann\n - /var/run/docker.sock:/var/run/docker.sock:ro\n restart: always\n environment:\n # \u00c4ndern Sie dies nur, wenn Sie eine andere Domain f\u00fcr Mailcows Web-Frontend verwenden als in der Standard-Konfiguration\n - DOMAIN=${MAILCOW_HOSTNAME}\n\nnetworks:\n web:\n external: true\n # Name des externen Netzwerks\n name: traefik_web\n\nvolumes:\n acme:\n external: true\n # Name des externen Docker Volumes, welches Traefiks `acme.json' Datei enth\u00e4lt\n name: traefik_acme\n</code></pre> <p>Starten Sie die neuen Container mit <code>docker compose up -d</code>.</p> <p>Da Traefik 2 ein acme v2 Format verwendet, um ALLE Zertifikaten von allen Domains zu speichern, m\u00fcssen wir einen Weg finden, die Zertifikate auszulagern. Zum Gl\u00fcck haben wir [diesen kleinen Container] (https://hub.docker.com/r/humenius/traefik-certs-dumper), der die Datei <code>acme.json</code> \u00fcber ein Volume und eine Variable <code>DOMAIN=example. org</code>, und damit wird der Container die <code>cert.pem</code> und <code>key.pem</code> Dateien ausgeben, daf\u00fcr lassen wir einfach den <code>traefik-certs-dumper</code> Container laufen, binden das <code>/traefik</code> Volume an den Ordner, in dem unsere <code>acme.json</code> gespeichert ist, binden das <code>/output</code> Volume an unseren mailcow <code>data/assets/ssl/</code> Ordner, und setzen die <code>DOMAIN=example.org</code> Variable auf die Domain, von der wir die Zertifikate ausgeben wollen. </p> <p>Dieser Container \u00fcberwacht die Datei <code>acme.json</code> auf \u00c4nderungen und generiert die Dateien <code>cert.pem</code> und <code>key.pem</code> direkt in <code>data/assets/ssl/</code>, wobei der Pfad mit dem <code>/output</code>-Pfad des Containers verbunden ist.</p> <p>Sie k\u00f6nnen es \u00fcber die Kommandozeile ausf\u00fchren oder das [hier] gezeigte docker compose verwenden (https://hub.docker.com/r/humenius/traefik-certs-dumper).</p> <p>Nachdem wir die Zertifikate \u00fcbertragen haben, m\u00fcssen wir die Konfigurationen aus unseren Postfix- und Dovecot-Containern neu laden und die Zertifikate \u00fcberpr\u00fcfen. Wie das geht, sehen Sie hier.</p> <p>Und das sollte es gewesen sein \ud83d\ude0a, Sie k\u00f6nnen \u00fcberpr\u00fcfen, ob der Traefik-Router einwandfrei funktioniert, indem Sie das Dashboard von Traefik / traefik logs / \u00fcber https auf die eingestellte Domain zugreifen, oder / und HTTPS, SMTP und IMAP mit den Befehlen auf der zuvor verlinkten Seite \u00fcberpr\u00fcfen.</p>"},{"location":"de/post_installation/firststeps-rp/#caddy-v2-von-der-community-unterstutzt","title":"Caddy v2 (von der Community unterst\u00fctzt)","text":"<p>Warnung</p> <p>Dies ist ein nicht unterst\u00fctzter Communitybeitrag. Korrekturen sind immer erw\u00fcnscht!</p> <p>Die Konfiguration von Caddy mit mailcow ist sehr simpel.</p> <p>In der Caddyfile muss einfach nur ein Bereich f\u00fcr den E-Mailserver angelegt werden.</p> <p>Bspw:</p> <pre><code>MAILCOW_HOSTNAME autodiscover.MAILCOW_HOSTNAME autoconfig.MAILCOW_HOSTNAME {\n log {\n output file /var/log/caddy/MAILCOW_HOSTNAME.log {\n roll_disabled\n roll_size 512M\n roll_uncompressed\n roll_local_time\n roll_keep 3\n roll_keep_for 48h\n }\n }\n\n reverse_proxy 127.0.0.1:HTTP_BIND\n}\n</code></pre> <p>Dies erlaubt es Caddy automatisch die Zertifikate zu erstellen und den Traffic f\u00fcr diese erw\u00e4hnten Domains anzunehmen und an mailcow weiterzuleiten.</p> <p>Wichtig: Der ACME Client der mailcow muss deaktiviert sein, da es sonst zu Fehlern seitens mailcow kommt.</p> <p>Da Caddy sich direkt selbst um die Zertifikate k\u00fcmmert, k\u00f6nnen wir mit dem folgenden Skript die Caddy generierten Zertifikate in die mailcow inkludieren:</p> <pre><code>#!/bin/bash\nMD5SUM_CURRENT_CERT=($(md5sum /opt/mailcow-dockerized/data/assets/ssl/cert.pem))\nMD5SUM_NEW_CERT=($(md5sum /var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/your.domain.tld/your.domain.tld.crt))\n\nif [ $MD5SUM_CURRENT_CERT != $MD5SUM_NEW_CERT ]; then\n cp /var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/your.domain.tld/your.domain.tld.crt /opt/mailcow-dockerized/data/assets/ssl/cert.pem\n cp /var/lib/caddy/.local/share/caddy/certificates/acme-v02.api.letsencrypt.org-directory/your.domain.tld/your.domain.tld.key /opt/mailcow-dockerized/data/assets/ssl/key.pem\n postfix_c=$(docker ps -qaf name=postfix-mailcow)\n dovecot_c=$(docker ps -qaf name=dovecot-mailcow)\n nginx_c=$(docker ps -qaf name=nginx-mailcow)\n docker restart ${postfix_c} ${dovecot_c} ${nginx_c}\n\nelse\n echo \"Certs not copied from Caddy (Not needed)\"\nfi\n</code></pre> <p>Achtung</p> <p>Der Zertifikatspfad von Caddy variiert je nach Installationsart. Bei diesem Installationsbeispiel wurde Caddy mithilfe des Caddy Repos (weitere Informationen hier) installiert. Um den Caddy Zertifikatspfad auf Ihrem System herauszufinden, gen\u00fcgt ein <code>find / -name \"certificates\"</code>.</p> <p>Dieses Skript k\u00f6nnte dann als Cronjob jede Stunde aufgerufen werden:</p> <pre><code>0 * * * * /bin/bash /path/to/script/deploy-certs.sh &gt;/dev/null 2&gt;&amp;1\n</code></pre>"},{"location":"de/post_installation/firststeps-rp/#optional-post-hook-skript-fur-nicht-mailcow-acme-clients","title":"Optional: Post-Hook-Skript f\u00fcr nicht-mailcow ACME-Clients","text":"<p>Die Verwendung eines lokalen Certbots (oder eines anderen ACME-Clients) erfordert den Neustart einiger Container, was Sie mit einem Post-Hook-Skript erledigen k\u00f6nnen. Stellen Sie sicher, dass Sie die Pfade entsprechend \u00e4ndern: <pre><code>#!/bin/bash\ncp /etc/letsencrypt/live/my.domain.tld/fullchain.pem /opt/mailcow-dockerized/data/assets/ssl/cert.pem\ncp /etc/letsencrypt/live/my.domain.tld/privkey.pem /opt/mailcow-dockerized/data/assets/ssl/key.pem\npostfix_c=$(docker ps -qaf name=postfix-mailcow)\ndovecot_c=$(docker ps -qaf name=dovecot-mailcow)\nnginx_c=$(docker ps -qaf name=nginx-mailcow)\ndocker restart ${postfix_c} ${dovecot_c} ${nginx_c}\n</code></pre></p>"},{"location":"de/post_installation/firststeps-rp/#hinzufugen-weiterer-servernamen-fur-mailcow-ui","title":"Hinzuf\u00fcgen weiterer Servernamen f\u00fcr mailcow UI","text":"<p>Wenn Sie vorhaben, einen Servernamen zu verwenden, der nicht <code>MAILCOW_HOSTNAME</code> in Ihrem Reverse-Proxy ist, stellen Sie sicher, dass Sie diesen Namen zuerst in mailcow.conf \u00fcber <code>ADDITIONAL_SERVER_NAMES</code> einpflegen. Die Namen m\u00fcssen durch Kommas getrennt werden und d\u00fcrfen keine Leerzeichen enthalten. Wenn Sie diesen Schritt \u00fcberspringen, kann es sein, dass mailcow auf Ihren Reverse-Proxy mit einer falschen Seite antwortet.</p> <pre><code>ADDITIONAL_SERVER_NAMES=webmail.domain.tld,other.example.tld\n</code></pre> <p>F\u00fchren Sie <code>docker compose up -d</code> zum Anwenden aus.</p>"},{"location":"de/post_installation/firststeps-rspamd_ui/","title":"Rspamd UI","text":"<p>Rspamd ist ein einfach zu benutzendes Spam-Filter-Tool, das derzeit mit mailcow installiert ist.</p> <ol> <li>Gehen Sie zum mailcow Web-Admin-Interface</li> <li>Navigieren Sie zur Registerkarte Zugang.(Zugang &gt; Rspamd UI)</li> <li>\u00c4ndern Sie das Rspamd UI Passwort</li> <li>Gehen Sie in einem Browser zu https://${MAILCOW_HOSTNAME}/rspamd und melden Sie sich an!</li> </ol> <p>Weitere Konfigurationsoptionen und Dokumentation finden Sie hier: https://rspamd.com/webui/</p>"},{"location":"de/post_installation/firststeps-snat/","title":"SNAT","text":"<p>SNAT wird verwendet, um die Quelladresse der von mailcow gesendeten Pakete zu \u00e4ndern. Es kann verwendet werden, um die ausgehende IP-Adresse auf Systemen mit mehreren IP-Adressen zu \u00e4ndern.</p> <p>\u00d6ffnen Sie <code>mailcow.conf</code>, setzen Sie einen oder beide der folgenden Parameter:</p> <pre><code># Benutze diese IPv4 f\u00fcr ausgehende Verbindungen (SNAT)\nSNAT_TO_SOURCE=1.2.3.4\n\n# Benutze dieses IPv6 f\u00fcr ausgehende Verbindungen (SNAT)\nSNAT6_TO_SOURCE=dead:beef\n</code></pre> <p>F\u00fchren Sie <code>docker compose up -d</code> aus.</p> <p>Die Werte werden von netfilter-mailcow gelesen. netfilter-mailcow stellt sicher, dass die Post-Routing-Regeln auf Position 1 in der Netfilter-Tabelle stehen. Es l\u00f6scht sie automatisch und legt sie neu an, wenn sie an einer anderen Position als 1 gefunden werden.</p> <p>\u00dcberpr\u00fcfen Sie die Ausgabe von <code>docker compose logs --tail=200 netfilter-mailcow</code>, um sicherzustellen, dass die SNAT-Einstellungen angewendet wurden.</p>"},{"location":"de/post_installation/firststeps-ssl/","title":"Erweitertes SSL","text":""},{"location":"de/post_installation/firststeps-ssl/#lets-encrypt-wird-mitgeliefert","title":"Let's Encrypt (wird mitgeliefert)","text":"<p>Der \"acme-mailcow\" Container wird versuchen, ein LE-Zertifikat f\u00fcr <code>${MAILCOW_HOSTNAME}</code>, <code>autodiscover.ADDED_MAIL_DOMAIN</code> und <code>autoconfig.ADDED_MAIL_DOMAIN</code> zu erhalten.</p> <p>Warning</p> <p>mailcow muss auf Port 80 verf\u00fcgbar sein, damit der acme-Client funktioniert. Unsere Reverse Proxy Beispielkonfigurationen decken das ab. Sie k\u00f6nnen auch jeden externen ACME-Client (z.B. certbot) verwenden, um Zertifikate zu erhalten, aber Sie m\u00fcssen sicherstellen, dass sie an den richtigen Ort kopiert werden und ein Post-Hook die betroffenen Container neu l\u00e4dt. Weitere Informationen finden Sie in der Reverse Proxy-Dokumentation.</p> <p>Standardm\u00e4\u00dfig, d.h. 0 Domains sind zu mailcow hinzugef\u00fcgt, wird es versuchen, ein Zertifikat f\u00fcr <code>${MAILCOW_HOSTNAME}</code> zu erhalten.</p> <p>F\u00fcr jede hinzugef\u00fcgte Domain wird versucht, <code>autodiscover.ADDED_MAIL_DOMAIN</code> und <code>autoconfig.ADDED_MAIL_DOMAIN</code> in die IPv6-Adresse oder - falls IPv6 in der Domain nicht konfiguriert ist - in die IPv4-Adresse aufzul\u00f6sen. Wenn dies gelingt, wird ein Name als SAN zur Zertifikatsanforderung hinzugef\u00fcgt.</p> <p>Nur Namen, die validiert werden k\u00f6nnen, werden als SAN hinzugef\u00fcgt.</p> <p>F\u00fcr jede Domain, die Sie entfernen, wird das Zertifikat verschoben und ein neues Zertifikat angefordert. Es ist nicht m\u00f6glich, Domains in einem Zertifikat zu behalten, wenn wir nicht in der Lage sind, die Challenge f\u00fcr diese zu validieren.</p> <p>Wenn Sie den ACME-Client neu starten wollen, verwenden Sie <code>docker compose restart acme-mailcow</code> und \u00fcberwachen Sie die Protokolle mit <code>docker compose logs --tail=200 -f acme-mailcow</code>.</p>"},{"location":"de/post_installation/firststeps-ssl/#zusatzliche-domain-namen","title":"Zus\u00e4tzliche Domain-Namen","text":"<p>Bearbeiten Sie \"mailcow.conf\" und f\u00fcgen Sie einen Parameter <code>ADDITIONAL_SAN</code> wie folgt hinzu:</p> <p>Verwenden Sie keine Anf\u00fchrungszeichen (<code>\"</code>) und keine Leerzeichen zwischen den Namen!</p> <pre><code>ADDITIONAL_SAN=smtp.*,cert1.example.com,cert2.example.org,whatever.*\n</code></pre> <p>Jeder Name wird anhand seiner IPv6-Adresse oder - wenn IPv6 in Ihrer Dom\u00e4ne nicht konfiguriert ist - anhand seiner IPv4-Adresse \u00fcberpr\u00fcft.</p> <p>Ein Wildcard-Name wie <code>smtp.*</code> wird versuchen, ein smtp.DOMAIN_NAME SAN f\u00fcr jede zu mailcow hinzugef\u00fcgte Domain zu erhalten.</p> <p>F\u00fchren Sie <code>docker compose up -d</code> aus, um betroffene Container automatisch neu zu erstellen.</p> <p>Info</p> <p>Die Verwendung anderer Namen als <code>MAILCOW_HOSTNAME</code> f\u00fcr den Zugriff auf das mailcow UI kann weitere Konfiguration erfordern.</p> <p>Wenn Sie planen, einen anderen Servernamen als <code>MAILCOW_HOSTNAME</code> f\u00fcr den Zugriff auf die mailcow UI zu verwenden (z.B. durch Hinzuf\u00fcgen von <code>mail.*</code> zu <code>ADDITIONAL_SAN</code>), stellen Sie sicher, dass Sie diesen Namen in mailcow.conf \u00fcber <code>ADDITIONAL_SERVER_NAMES</code> eintragen. Die Namen m\u00fcssen durch Kommas getrennt sein und d\u00fcrfen keine Leerzeichen enthalten. Wenn Sie diesen Schritt auslassen, kann mailcow mit einer falschen Seite antworten.</p> <pre><code>ADDITIONAL_SERVER_NAMES=webmail.domain.tld,other.example.tld\n</code></pre> <p>F\u00fchren Sie <code>docker compose up -d</code> aus, um es anzuwenden.</p>"},{"location":"de/post_installation/firststeps-ssl/#erneuerung-erzwingen","title":"Erneuerung erzwingen","text":"<p>Um eine Erneuerung zu erzwingen, m\u00fcssen Sie eine Datei namens <code>force_renew</code> erstellen und den <code>acme-mailcow</code> Container neu starten:</p> <pre><code>cd /opt/mailcow-dockerized\ntouch data/assets/ssl/force_renew\ndocker compose restart acme-mailcow\n# Pr\u00fcfen Sie nun die Logs auf eine Erneuerung\ndocker compose logs --tail=200 -f acme-mailcow\n</code></pre> <p>Die Datei wird automatisch gel\u00f6scht.</p>"},{"location":"de/post_installation/firststeps-ssl/#validierungsfehler-und-wie-man-die-validierung-uberspringt","title":"Validierungsfehler und wie man die Validierung \u00fcberspringt","text":"<p>Sie k\u00f6nnen die IP-\u00dcberpr\u00fcfung \u00fcberspringen, indem Sie <code>SKIP_IP_CHECK=y</code> in mailcow.conf setzen (keine Anf\u00fchrungszeichen). Seien Sie gewarnt, dass eine Fehlkonfiguration dazu f\u00fchrt, dass Sie von Let's Encrypt eingeschr\u00e4nkt werden! Dies ist vor allem f\u00fcr Multi-IP-Setups n\u00fctzlich, bei denen der IP-Check die falsche Quell-IP-Adresse zur\u00fcckgeben w\u00fcrde. Aufgrund der Verwendung von dynamischen IPs f\u00fcr acme-mailcow ist Source-NAT bei Neustarts nicht konsistent.</p> <p>Wenn Sie Probleme mit der \"HTTP-Validierung\" haben, aber Ihre IP-Adressbest\u00e4tigung erfolgreich ist, verwenden Sie h\u00f6chstwahrscheinlich firewalld, ufw oder eine andere Firewall, die Verbindungen von <code>br-mailcow</code> zu Ihrem externen Interface verbietet. Sowohl firewalld als auch ufw lassen dies standardm\u00e4\u00dfig nicht zu. Es reicht oft nicht aus, diese Firewall-Dienste einfach zu stoppen. Sie m\u00fcssen mailcow stoppen (<code>docker compose down</code>), den Firewall-Dienst stoppen, die Ketten flushen und Docker neu starten.</p> <p>Sie k\u00f6nnen diese Validierungsmethode auch \u00fcberspringen, indem Sie <code>SKIP_HTTP_VERIFICATION=y</code> in \"mailcow.conf\" setzen. Seien Sie gewarnt, dass dies nicht zu empfehlen ist. In den meisten F\u00e4llen wird die HTTP-\u00dcberpr\u00fcfung \u00fcbersprungen, um unbekannte NAT-Reflection-Probleme zu umgehen, die durch das Ignorieren dieser spezifischen Netzwerk-Fehlkonfiguration nicht gel\u00f6st werden. Wenn Sie Probleme haben, TLSA-Eintr\u00e4ge in der DNS-\u00dcbersicht innerhalb von mailcow zu generieren, haben Sie h\u00f6chstwahrscheinlich Probleme mit NAT-Reflexion, die Sie beheben sollten.</p> <p>Wenn du einen SKIP_* Parameter ge\u00e4ndert hast, f\u00fchre <code>docker compose up -d</code> aus, um deine \u00c4nderungen zu \u00fcbernehmen.</p>"},{"location":"de/post_installation/firststeps-ssl/#deaktivieren-sie-lets-encrypt","title":"Deaktivieren Sie Let's Encrypt","text":""},{"location":"de/post_installation/firststeps-ssl/#deaktivieren-sie-lets-encrypt-vollstandig","title":"Deaktivieren Sie Let's Encrypt vollst\u00e4ndig","text":"<p>Setzen Sie <code>SKIP_LETS_ENCRYPT=y</code> in \"mailcow.conf\" und erstellen Sie \"acme-mailcow\" neu, indem Sie <code>docker compose up -d</code> ausf\u00fchren.</p>"},{"location":"de/post_installation/firststeps-ssl/#alle-namen-auer-mailcow_hostname-uberspringen","title":"Alle Namen au\u00dfer ${MAILCOW_HOSTNAME} \u00fcberspringen","text":"<p>F\u00fcgen Sie <code>ONLY_MAILCOW_HOSTNAME=y</code> zu \"mailcow.conf\" hinzu und erstellen Sie \"acme-mailcow\" neu, indem Sie <code>docker compose up -d</code> ausf\u00fchren.</p>"},{"location":"de/post_installation/firststeps-ssl/#das-lets-encrypt-subjectaltname-limit-von-100-domains","title":"Das Let's Encrypt subjectAltName-Limit von 100 Domains","text":"<p>Let's Encrypt hat derzeit ein Limit von 100 Domainnamen pro Zertifikat.</p> <p>Standardm\u00e4\u00dfig erstellt \"acme-mailcow\" ein einzelnes SAN-Zertifikat f\u00fcr alle validierten Domains (siehe den ersten Abschnitt und Zus\u00e4tzliche Domainnamen). Dies bietet beste Kompatibilit\u00e4t, bedeutet aber, dass das Let's Encrypt-Limit \u00fcberschritten wird, wenn Sie zu viele Domains zu einer einzelnen Mailcow-Installation hinzuf\u00fcgen.</p> <p>Um dies zu l\u00f6sen, k\u00f6nnen Sie <code>ENABLE_SSL_SNI</code> so konfigurieren, dass es generiert wird:</p> <ul> <li>Ein Hauptserver-Zertifikat mit <code>MAILCOW_HOSTNAME</code> und allen voll qualifizierten Domainnamen in der <code>ADDITIONAL_SAN</code> Konfiguration</li> <li>Ein zus\u00e4tzliches Zertifikat f\u00fcr jede in der Datenbank gefundene Domain mit autodiscover., autoconfig. und jeder anderen in diesem Format konfigurierten <code>ADDITIONAL_SAN</code> (subdomain.*).</li> <li>Begrenzungen: Ein Zertifikatsname <code>ADDITIONAL_SAN=test.example.com</code> wird als SAN zum Hauptzertifikat hinzugef\u00fcgt. Ein separates Zertifikat/Schl\u00fcsselpaar wird f\u00fcr dieses Format nicht erzeugt.</li> </ul> <p>Postfix, Dovecot und Nginx werden dann diese Zertifikate mit SNI bedienen.</p> <p>Setzen Sie <code>ENABLE_SSL_SNI=y</code> in \"mailcow.conf\" und erstellen Sie \"acme-mailcow\" durch Ausf\u00fchren von <code>docker compose up -d</code>.</p> <p>Warning</p> <p>Nicht alle Clients unterst\u00fctzen SNI, siehe Dovecot Dokumentation oder Wikipedia. Sie sollten sicherstellen, dass diese Clients den <code>MAILCOW_HOSTNAME</code> f\u00fcr sichere Verbindungen verwenden, wenn Sie diese Funktion aktivieren.</p> <p>Hier ist ein Beispiel:</p> <ul> <li><code>MAILCOW_HOSTNAME=server.email.tld</code></li> <li><code>ADDITIONAL_SAN=webmail.email.tld,mail.*</code></li> <li>Mailcow E-Mail-Dom\u00e4nen: \"domain1.tld\" und \"domain2.tld\"</li> </ul> <p>Die folgenden Zertifikate werden generiert:</p> <ul> <li><code>server.email.tld, webmail.email.tld</code> -&gt; dies ist das Standard-Zertifikat, alle Clients k\u00f6nnen sich mit diesen Domains verbinden</li> <li><code>mail.domain1.tld, autoconfig.domain1.tld, autodiscover.domain1.tld</code> -&gt; individuelles Zertifikat f\u00fcr domain1.tld, kann von Clients ohne SNI-Unterst\u00fctzung nicht verwendet werden</li> <li><code>mail.domain2.tld, autoconfig.domain2.tld, autodiscover.domain2.tld</code> -&gt; individuelles Zertifikat f\u00fcr domain2.tld, kann von Clients ohne SNI-Unterst\u00fctzung nicht verwendet werden</li> </ul>"},{"location":"de/post_installation/firststeps-ssl/#ein-eigenes-zertifikat-verwenden","title":"Ein eigenes Zertifikat verwenden","text":"<p>Stellen Sie sicher, dass Sie mailcows internen LE-Client deaktivieren (siehe oben).</p> <p>Um Ihre eigenen Zertifikate zu verwenden, speichern Sie einfach das kombinierte Zertifikat (mit dem Zertifikat und der zwischengeschalteten CA/CA, falls vorhanden) unter <code>data/assets/ssl/cert.pem</code> und den entsprechenden Schl\u00fcssel unter <code>data/assets/ssl/key.pem</code>.</p> <p>WICHTIG: Verwenden Sie keine symbolischen Links! Stellen Sie sicher, dass Sie die Zertifikate kopieren und sie nicht mit <code>data/assets/ssl</code> verkn\u00fcpfen.</p> <p>Starten Sie die betroffenen Dienste anschlie\u00dfend neu:</p> <pre><code>docker restart $(docker ps -qaf name=postfix-mailcow)\ndocker restart $(docker ps -qaf name=nginx-mailcow)\ndocker restart $(docker ps -qaf name=dovecot-mailcow)\n</code></pre> <p>Siehe Post-Hook-Skript f\u00fcr Nicht-Mailcow-ACME-Clients f\u00fcr ein vollst\u00e4ndiges Beispielskript.</p>"},{"location":"de/post_installation/firststeps-ssl/#test-gegen-das-acme-verzeichnis","title":"Test gegen das ACME-Verzeichnis","text":"<p>Bearbeiten Sie <code>mailcow.conf</code> und f\u00fcgen Sie <code>LE_STAGING=y</code> hinzu.</p> <p>F\u00fchren Sie <code>docker compose up -d</code> aus, um Ihre \u00c4nderungen zu aktivieren.</p>"},{"location":"de/post_installation/firststeps-ssl/#benutzerdefinierte-verzeichnis-url","title":"Benutzerdefinierte Verzeichnis-URL","text":"<p>Editieren Sie <code>mailcow.conf</code> und f\u00fcgen Sie die entsprechende Verzeichnis-URL in die neue Variable <code>DIRECTORY_URL</code> ein:</p> <pre><code>DIRECTORY_URL=https://acme-custom-v9000.api.letsencrypt.org/directory\n</code></pre> <p>Sie k\u00f6nnen <code>LE_STAGING</code> nicht mit <code>DIRECTORY_URL</code> verwenden. Wenn beide gesetzt sind, wird nur <code>LE_STAGING</code> verwendet.</p> <p>F\u00fchren Sie <code>docker compose up -d</code> aus, um Ihre \u00c4nderungen zu aktivieren.</p>"},{"location":"de/post_installation/firststeps-ssl/#uberprufen-sie-ihre-konfiguration","title":"\u00dcberpr\u00fcfen Sie Ihre Konfiguration","text":"<p>F\u00fchren Sie <code>docker compose logs acme-mailcow</code> aus, um herauszufinden, warum eine Validierung fehlschl\u00e4gt.</p> <p>Um zu \u00fcberpr\u00fcfen, ob nginx das richtige Zertifikat verwendet, benutzen Sie einfach einen Browser Ihrer Wahl und \u00fcberpr\u00fcfen Sie das angezeigte Zertifikat.</p> <p>Um das von Postfix, Dovecot und Nginx verwendete Zertifikat zu \u00fcberpr\u00fcfen, verwenden wir <code>openssl</code>:</p> <pre><code># Verbindung \u00fcber SMTP (587)\necho \"Q\" | openssl s_client -starttls smtp -crlf -connect mx.mailcow.email:587\n# Verbindung \u00fcber IMAP (143)\necho \"Q\" | openssl s_client -starttls imap -showcerts -connect mx.mailcow.email:143\n# Verbindung \u00fcber HTTPS (443)\necho \"Q\" | openssl s_client -connect mx.mailcow.email:443\n</code></pre> <p>Um die von openssl zur\u00fcckgegebenen Verfallsdaten gegen MAILCOW_HOSTNAME zu validieren, k\u00f6nnen Sie unser Hilfsskript verwenden:</p> <pre><code>cd /opt/mailcow-dockerized\nbash helper-scripts/expiry-dates.sh\n</code></pre>"},{"location":"de/post_installation/firststeps-sync_jobs_migration/","title":"Migration von Sync-Jobs","text":"<p>Sync-Auftr\u00e4ge werden verwendet, um bestehende E-Mails von einem externen IMAP-Server oder innerhalb von mailcow's bestehenden Mailboxen zu kopieren oder zu verschieben.</p> <p>Info</p> <p>Abh\u00e4ngig von der ACL Ihrer Mailbox haben Sie m\u00f6glicherweise nicht die M\u00f6glichkeit, einen Sync-Job hinzuzuf\u00fcgen. Bitte kontaktieren Sie in diesem Fall Ihren Domain-Administrator.</p>"},{"location":"de/post_installation/firststeps-sync_jobs_migration/#einrichten-eines-sync-jobs","title":"Einrichten eines Sync-Jobs","text":"<ol> <li> <p>Erstellen Sie unter dem Punkt \"Konfiguration &gt; E-Mail-Setup\" oder \"Benutzereinstellungen\" einen neuen Synchronisierungsauftrag.</p> </li> <li> <p>Wenn Sie ein Administrator sind, w\u00e4hlen Sie den Benutzernamen der nachgelagerten mailcow-Mailbox im Dropdown-Men\u00fc \"Benutzername\".</p> </li> <li> <p>F\u00fcllen Sie die Felder \"Host\" und \"Port\" mit den entsprechenden korrekten Werten des vorgelagerten IMAP-Servers aus.</p> </li> <li> <p>Geben Sie in den Feldern \"Benutzername\" und \"Passwort\" die korrekten Zugangsdaten des vorgelagerten IMAP-Servers ein.</p> </li> <li> <p>W\u00e4hlen Sie die \"Verschl\u00fcsselungsmethode\". Wenn der vorgelagerte IMAP-Server Port 143 verwendet, ist es wahrscheinlich, dass die Verschl\u00fcsselungsmethode TLS und SSL f\u00fcr Port 993 ist. Sie k\u00f6nnen auch PLAIN-Authentifizierung verwenden, aber davon wird dringend abgeraten.</p> </li> <li> <p>Alle anderen Felder k\u00f6nnen Sie so lassen, wie sie sind, oder sie nach Belieben \u00e4ndern.</p> </li> <li> <p>Vergewissern Sie sich, dass Sie \"Aktiv\" ankreuzen und klicken Sie auf \"Hinzuf\u00fcgen\".</p> </li> </ol> <p>Info</p> <p>Sobald Sie fertig sind, melden Sie sich in der Mailbox an und \u00fcberpr\u00fcfen Sie, ob alle E-Mails korrekt importiert wurden. Wenn alles gut geht, werden alle Ihre E-Mails in Ihrem neuen Postfach landen. Vergessen Sie nicht, den Synchronisierungsauftrag zu l\u00f6schen oder zu deaktivieren, nachdem er verwendet wurde.</p>"},{"location":"de/prerequisite/prerequisite-dns/","title":"DNS Einstellungen","text":"<p>Nachstehend finden Sie eine Liste von empfohlenen DNS-Eintr\u00e4gen. Einige sind f\u00fcr einen Mailserver obligatorisch (A, MX), andere werden empfohlen, um eine gute Reputation aufzubauen (TXT/SPF) oder f\u00fcr die automatische Konfiguration von Mailclients verwendet (SRV).</p>"},{"location":"de/prerequisite/prerequisite-dns/#referenzen","title":"Referenzen","text":"<ul> <li>Ein guter Artikel, der alle relevanten Themen abdeckt: \"3 DNS Records Every Email Marketer Must Know\"</li> <li>Ein weiterer guter Artikel, aber mit Zimbra als Beispielplattform: \"Best Practices on Email Protection: SPF, DKIM and DMARC\"</li> <li>Eine ausf\u00fchrliche Diskussion \u00fcber SPF, DKIM und DMARC: \"Wie Sie Spam beseitigen und Ihren Namen mit DMARC sch\u00fctzen\"</li> <li>Ein ausf\u00fchrlicher Leitfaden zum Verst\u00e4ndnis von DMARC: \"Entmystifizierung von DMARC: Ein Leitfaden zur Verhinderung von E-Mail-Spoofing\"</li> </ul>"},{"location":"de/prerequisite/prerequisite-dns/#reverse-dns-ihrer-ip-adresse","title":"Reverse DNS Ihrer IP-Adresse","text":"<p>Stellen Sie sicher, dass der PTR-Eintrag Ihrer IP-Adresse mit dem FQDN Ihres mailcow-Hosts \u00fcbereinstimmt: <code>${MAILCOW_HOSTNAME}</code> 1. Dieser Eintrag wird normalerweise bei dem Provider gesetzt, von dem Sie die IP-Adresse (Server) gemietet haben.</p>"},{"location":"de/prerequisite/prerequisite-dns/#die-minimale-dns-konfiguration","title":"Die minimale DNS-Konfiguration","text":"<p>Dieses Beispiel zeigt Ihnen eine Reihe von Eintr\u00e4gen f\u00fcr eine von mailcow verwaltete Domain. Jede Domain, die zu mailcow hinzugef\u00fcgt wird, ben\u00f6tigt mindestens diesen Satz an Eintr\u00e4gen, um korrekt zu funktionieren.</p> <pre><code># Name Typ Wert\nmail IN A 1.2.3.4\nautodiscover IN CNAME mail.example.org. (Ihr ${MAILCOW_HOSTNAME})\nautoconfig IN CNAME mail.example.org. (Ihr ${MAILCOW_HOSTNAME})\n@ IN MX 10 mail.example.org. (Ihr ${MAILCOW_HOSTNAME})\n</code></pre> <p>Hinweis: Der <code>mail</code> DNS-Eintrag, der die Subdomain an die angegebene IP-Adresse bindet, muss nur f\u00fcr die Domain gesetzt werden, auf der mailcow l\u00e4uft und die f\u00fcr den Zugriff auf das Webinterface verwendet wird. F\u00fcr jede andere von mailcow verwaltete Domain leitet der <code>MX</code>-Eintrag den Datenverkehr entsprechend weiter.</p>"},{"location":"de/prerequisite/prerequisite-dns/#dkim-spf-und-dmarc","title":"DKIM, SPF und DMARC","text":"<p>Im folgenden Beispiel f\u00fcr eine DNS-Zonendatei wird ein einfacher SPF TXT-Eintrag verwendet, um nur DIESEM Server (dem MX) zu erlauben, E-Mails f\u00fcr Ihre Dom\u00e4ne zu senden. Jeder andere Server ist nicht zugelassen, kann es aber tun (\"<code>~all</code>\"). Weitere Informationen finden Sie im SPF-Projekt.</p> <pre><code># Name Typ Wert\n@ IN TXT \"v=spf1 mx a -all\"\n</code></pre> <p>Es wird dringend empfohlen, einen DKIM TXT-Eintrag in Ihrer mailcow UI zu erstellen und den entsprechenden TXT-Eintrag in Ihren DNS-Eintr\u00e4gen zu setzen. Bitte lesen Sie OpenDKIM f\u00fcr weitere Informationen.</p> <pre><code># Name Typ Wert\ndkim._domainkey IN TXT \"v=DKIM1; k=rsa; t=s; s=email; p=...\"\n</code></pre> <p>Der letzte Schritt, um sich selbst und andere zu sch\u00fctzen, ist die Implementierung eines DMARC TXT-Datensatzes, zum Beispiel mit Hilfe des DMARC-Assistenten (check).</p> <pre><code># Name Typ Wert\n_dmarc IN TXT \"v=DMARC1; p=reject; rua=mailto:mailauth-reports@example.org\"\n</code></pre>"},{"location":"de/prerequisite/prerequisite-dns/#die-erweiterte-dns-konfiguration","title":"Die erweiterte DNS-Konfiguration","text":"<p>SRV-Eintr\u00e4ge geben den/die Server f\u00fcr ein bestimmtes Protokoll in Ihrer Dom\u00e4ne an. Wenn Sie einen Dienst explizit als nicht bereitgestellt ank\u00fcndigen wollen, geben Sie \".\" als Zieladresse an (statt \"mail.example.org.\"). Bitte beachten Sie RFC 2782.</p> <pre><code># Name Typ Priorit\u00e4t Gewicht Port Wert\n_autodiscover._tcp IN SRV 0 1 443 mail.example.org. (Ihr ${MAILCOW_HOSTNAME})\n_caldavs._tcp IN SRV 0 1 443 mail.example.org. (Ihr ${MAILCOW_HOSTNAME})\n_caldavs._tcp IN TXT \"path=/SOGo/dav/\"\n_carddavs._tcp IN SRV 0 1 443 mail.example.org. (Ihr ${MAILCOW_HOSTNAME})\n_carddavs._tcp IN TXT \"path=/SOGo/dav/\"\n_imap._tcp IN SRV 0 1 143 mail.example.org. (Ihr ${MAILCOW_HOSTNAME})\n_imaps._tcp IN SRV 0 1 993 mail.example.org. (Ihr ${MAILCOW_HOSTNAME})\n_pop3._tcp IN SRV 0 1 110 mail.example.org. (Ihr ${MAILCOW_HOSTNAME})\n_pop3s._tcp IN SRV 0 1 995 mail.example.org. (Ihr ${MAILCOW_HOSTNAME})\n_sieve._tcp IN SRV 0 1 4190 mail.example.org. (Ihr ${MAILCOW_HOSTNAME})\n_smtps._tcp IN SRV 0 1 465 mail.example.org. (Ihr ${MAILCOW_HOSTNAME})\n_submission._tcp IN SRV 0 1 587 mail.example.org. (Ihr ${MAILCOW_HOSTNAME})\n</code></pre>"},{"location":"de/prerequisite/prerequisite-dns/#testen","title":"Testen","text":"<p>Hier finden Sie einige Tools, mit denen Sie Ihre DNS-Konfiguration \u00fcberpr\u00fcfen k\u00f6nnen:</p> <ul> <li>MX Toolbox (DNS, SMTP, RBL)</li> <li>port25.com (DKIM, SPF)</li> <li>Mail-Tester (DKIM, DMARC, SPF)</li> <li>DMARC-Analysator (DMARC, SPF)</li> <li>MultiRBL.valli.org (DNSBL, RBL, FCrDNS)</li> </ul>"},{"location":"de/prerequisite/prerequisite-dns/#verschiedenes","title":"Verschiedenes","text":""},{"location":"de/prerequisite/prerequisite-dns/#optionale-dmarc-statistiken","title":"Optionale DMARC-Statistiken","text":"<p>Wenn Sie an Statistiken interessiert sind, k\u00f6nnen Sie sich zus\u00e4tzlich bei einem der vielen unten aufgef\u00fchrten DMARC-Statistikdienste anmelden - oder Ihre eigene Statistik selbst hosten.</p> <p>Tipp</p> <p>Es ist zu bedenken, dass wenn Sie DMARC-Statistik-Berichte an Ihren mailcow-Server anfordern und Ihr mailcow-Server nicht korrekt f\u00fcr den Empfang dieser Berichte konfiguriert ist, Sie m\u00f6glicherweise keine genauen und vollst\u00e4ndigen Ergebnisse erhalten. Bitte erw\u00e4gen Sie die Verwendung einer alternativen E-Mail-Domain f\u00fcr den Empfang von DMARC-Berichten.</p> <p>Es ist erw\u00e4hnenswert, dass die folgenden Vorschl\u00e4ge keine umfassende Liste aller verf\u00fcgbaren Dienste und Tools sind, sondern nur eine kleine Auswahl der vielen M\u00f6glichkeiten.</p> <ul> <li>Postmaster Tool</li> <li>parsedmarc (selbst gehostet)</li> <li>Fraudmarc</li> <li>Postmark</li> <li>Dmarcian</li> </ul> <p>Tipp</p> <p>Diese Dienste stellen Ihnen m\u00f6glicherweise einen TXT-Eintrag zur Verf\u00fcgung, den Sie in Ihre DNS-Eintr\u00e4ge einf\u00fcgen m\u00fcssen, so wie es der Anbieter vorschreibt. Bitte stellen Sie sicher, dass Sie die Dokumentation des Anbieters des von Ihnen gew\u00e4hlten Dienstes lesen, da dieser Prozess variieren kann.</p>"},{"location":"de/prerequisite/prerequisite-dns/#e-mail-test-fur-spf-dkim-und-dmarc","title":"E-Mail-Test f\u00fcr SPF, DKIM und DMARC:","text":"<p>Um eine rudiment\u00e4re E-Mail-Authentifizierungspr\u00fcfung durchzuf\u00fchren, senden Sie eine E-Mail an <code>check-auth at verifier.port25.com</code> und warten Sie auf eine Antwort. Sie werden einen Bericht \u00e4hnlich dem folgenden finden:</p> <pre><code>==========================================================\nZusammenfassung der Ergebnisse\n==========================================================\nSPF-Pr\u00fcfung: bestanden\n\"iprev\"-Pr\u00fcfung: bestanden\nDKIM-Pr\u00fcfung: bestanden\nDKIM-Pr\u00fcfung: bestanden\nSpamAssassin-Pr\u00fcfung: ham\n\n==========================================================\nEinzelheiten:\n==========================================================\n....\n</code></pre> <p>Der vollst\u00e4ndige Bericht enth\u00e4lt weitere technische Details.</p>"},{"location":"de/prerequisite/prerequisite-dns/#fully-qualified-domain-name-fqdn","title":"Fully Qualified Domain Name (FQDN)","text":"<ol> <li> <p>Ein Fully Qualified Domain Name (FQDN) ist der vollst\u00e4ndige (absolute) Dom\u00e4nenname f\u00fcr einen bestimmten Computer oder Host im Internet. Der FQDN besteht aus mindestens drei Teilen, die durch einen Punkt getrennt sind: dem Hostnamen, dem Dom\u00e4nennamen und der Top Level Domain (kurz TLD). Im Beispiel <code>mx.mailcow.email</code> w\u00e4re der Hostname <code>mx</code>, der Domainname <code>mailcow</code> und die TLD <code>email</code>.\u00a0\u21a9</p> </li> </ol>"},{"location":"de/prerequisite/prerequisite-system/","title":"Systemvoraussetzungen","text":"<p>Bevor Sie mailcow: dockerized ausf\u00fchren, sollten Sie einige Voraussetzungen \u00fcberpr\u00fcfen:</p> <p>Achtung</p> <p>Versuchen Sie nicht, mailcow auf einem Synology/QNAP-Ger\u00e4t (jedes NAS), OpenVZ, LXC oder anderen Container-Plattformen zu installieren. KVM, ESX, Hyper-V und andere vollst\u00e4ndige Virtualisierungsplattformen werden unterst\u00fctzt.</p> <p>Info</p> <ul> <li>mailcow: dockerized erfordert, dass einige Ports f\u00fcr eingehende Verbindungen offen sind, also stellen Sie sicher, dass Ihre Firewall diese nicht blockiert.</li> <li>Stellen Sie sicher, dass keine andere Anwendung die Konfiguration von mailcow st\u00f6rt, wie z.B. ein anderer Maildienst</li> <li>Ein korrektes DNS-Setup ist entscheidend f\u00fcr jedes gute Mailserver-Setup, also stellen Sie bitte sicher, dass Sie zumindest die basics abgedeckt haben, bevor Sie beginnen!</li> <li>Stellen Sie sicher, dass Ihr System ein korrektes Datum und eine korrekte Zeiteinstellung hat. Dies ist entscheidend f\u00fcr verschiedene Komponenten wie die Zwei-Faktor-TOTP-Authentifizierung.</li> </ul>"},{"location":"de/prerequisite/prerequisite-system/#minimale-systemressourcen","title":"Minimale Systemressourcen","text":"<p>Nicht unterst\u00fctzt</p> <p>OpenVZ, Virtuozzo und LXC</p> <p>Bitte stellen Sie sicher, dass Ihr System mindestens \u00fcber die folgenden Ressourcen verf\u00fcgt:</p> Ressource mailcow: dockerized CPU 1 GHz RAM Minimum 6 GiB + 1 GiB Swap (Standardkonfiguration) Festplatte 20 GiB (ohne Emails) Systemtyp x86_64 <p>ClamAV und Solr k\u00f6nnen sehr viel Arbeitspeicher verbrauchen. Sie k\u00f6nnen diese in der <code>mailcow.conf</code> durch die Einstellungen <code>SKIP_CLAMD=y</code> und <code>SKIP_SOLR=y</code> jedoch auch deaktivieren.</p> <p>Info</p> <p>Wir sind uns bewusst, dass ein reiner MTA auf 128 MiB RAM laufen kann. mailcow ist eine ausgewachsene und gebrauchsfertige Groupware mit vielen Extras, die das Leben einfacher machen. Diese kommt mit einem Webserver, Webmailer, ActiveSync (MS), Antivirus, Antispam, Indexierung (Solr), Dokumentenscanner (Oletools), SQL (MariaDB), Cache (Redis), MDA, MTA, verschiedenen Webdiensten etc.</p> <p>Ein einzelner SOGo-Worker kann ~350 MiB RAM belegen, bevor er geleert wird. Je mehr ActiveSync-Verbindungen Sie verwenden m\u00f6chten, desto mehr RAM wird ben\u00f6tigt. In der Standardkonfiguration werden 20 Arbeiter erzeugt.</p>"},{"location":"de/prerequisite/prerequisite-system/#beispiele-fur-die-ram-planung","title":"Beispiele f\u00fcr die RAM Planung","text":"<p>Ein Unternehmen mit 15 Smartphones (EAS aktiviert) und etwa 50 gleichzeitigen IMAP-Verbindungen sollte 16 GiB RAM einplanen.</p> <p>6 GiB RAM + 1 GiB Swap sind f\u00fcr die meisten privaten Installationen ausreichend, w\u00e4hrend 8 GiB RAM f\u00fcr ~5 bis 10 Benutzer empfohlen werden.</p> <p>Im Rahmen unseres Supports k\u00f6nnen wir Ihnen bei der korrekten Planung Ihres Setups helfen.</p>"},{"location":"de/prerequisite/prerequisite-system/#unterstutzte-betriebssysteme","title":"Unterst\u00fctzte Betriebssysteme","text":"<p>Grunds\u00e4tzlich kann mailcow auf jeder Distribution verwendet werden, die von Docker CE unterst\u00fctzt wird (siehe https://docs.docker.com/install/). Es kann jedoch in vereinzelten F\u00e4llen zu einer Inkompatibilit\u00e4t der Betriebssysteme und den mailcow Komponenten kommen.</p> <p>Die folgende Tabelle enth\u00e4lt alle von uns offiziell unterst\u00fctzten und getesteten Betriebssysteme (Stand November 2022):</p> Betriebssystem Kompatibilit\u00e4t Alpine 3.16 und \u00e4lter \u26a0\ufe0f Centos 7 \u2705 Debian 10, 11 \u2705 Ubuntu 18.04, 20.04, 22.04 \u2705 Rocky Linux 9 \u2754 <p>Legende<p>\u2705 = Funktioniert out of the box anhand der Anleitung. \u26a0\ufe0f = Erfordert einige manuelle Anpassungen, sonst aber nutzbar. \u274c = Generell NICHT Kompatibel. \u2754 = Ausstehend.</p> </p> <p>Hinweis: Andere (nicht genannte Betriebssysteme) k\u00f6nnen auch funktionieren, sind jedoch nicht offiziell getestet worden.</p>"},{"location":"de/prerequisite/prerequisite-system/#firewall-ports","title":"Firewall &amp; Ports","text":"<p>Bitte \u00fcberpr\u00fcfen Sie, ob alle Standard-Ports von mailcow offen sind und nicht von anderen Anwendungen genutzt werden:</p> <pre><code>ss -tlpn | grep -E -w '25|80|110|143|443|465|587|993|995|4190'\n# oder:\nnetstat -tulpn | grep -E -w '25|80|110|143|443|465|587|993|995|4190'\n</code></pre> <p>Vorsicht</p> <p>Es gibt einige Probleme mit dem Betrieb von mailcow auf einem Firewalld/ufw aktivierten System. Sie sollten es deaktivieren (wenn m\u00f6glich) und stattdessen Ihren Regelsatz in die DOCKER-USER-Kette verschieben, die nicht durch einen Neustart des Docker-Dienstes gel\u00f6scht wird. Siehe diese (blog.donnex.net) oder diese (unrouted.io) Anleitung f\u00fcr Informationen dar\u00fcber, wie man iptables-persistent mit der DOCKER-USER Kette benutzt. Da mailcow im Docker-Modus l\u00e4uft, haben INPUT-Regeln keinen Effekt auf die Beschr\u00e4nkung des Zugriffs auf mailcow. Verwenden Sie stattdessen die FORWARD-Kette.</p> <p>Wenn dieser Befehl irgendwelche Ergebnisse liefert, entfernen oder stoppen Sie bitte die Anwendung, die auf diesem Port l\u00e4uft. Sie k\u00f6nnen mailcows Ports auch \u00fcber die Konfigurationsdatei <code>mailcow.conf</code> anpassen.</p>"},{"location":"de/prerequisite/prerequisite-system/#standard-ports","title":"Standard Ports","text":"<p>Wenn Sie eine Firewall vor mailcow haben, stellen Sie bitte sicher, dass diese Ports f\u00fcr eingehende Verbindungen offen sind:</p> Dienst Protokoll Port Container Variable Postfix SMTP TCP 25 postfix-mailcow <code>${SMTP_PORT}</code> Postfix SMTPS TCP 465 postfix-mailcow <code>${SMTPS_PORT}</code> Postfix Submission TCP 587 postfix-mailcow <code>${SUBMISSION_PORT}</code> Dovecot IMAP TCP 143 dovecot-mailcow <code>${IMAP_PORT}</code> Dovecot IMAPS TCP 993 dovecot-mailcow <code>${IMAPS_PORT}</code> Dovecot POP3 TCP 110 dovecot-mailcow <code>${POP_PORT}</code> Dovecot POP3S TCP 995 dovecot-mailcow <code>${POPS_PORT}</code> Dovecot ManageSieve TCP 4190 dovecot-mailcow <code>${SIEVE_PORT}</code> HTTP(S) TCP 80/443 nginx-mailcow <code>${HTTP_PORT}</code> / <code>${HTTPS_PORT}</code> <p>Um einen Dienst an eine IP-Adresse zu binden, k\u00f6nnen Sie die IP-Adresse wie folgt voranstellen: <code>SMTP_PORT=1.2.3.4:25</code></p> <p>Wichtig: Sie k\u00f6nnen keine IP:PORT-Bindungen in HTTP_PORT und HTTPS_PORT verwenden. Bitte verwenden Sie stattdessen <code>HTTP_PORT=1234</code> und <code>HTTP_BIND=1.2.3.4</code>.</p>"},{"location":"de/prerequisite/prerequisite-system/#wichtig-fur-hetzner-firewalls","title":"Wichtig f\u00fcr Hetzner Firewalls","text":"<p>Ich zitiere https://github.com/chermsen \u00fcber https://github.com/mailcow/mailcow-dockerized/issues/497#issuecomment-469847380 (DANKE!):</p> <p>F\u00fcr alle, die mit der Hetzner-Firewall zu k\u00e4mpfen haben:</p> <p>Port 53 ist in diesem Fall f\u00fcr die Firewall-Konfiguration unwichtig. Laut Dokumentation verwendet unbound den Portbereich 1024-65535 f\u00fcr ausgehende Anfragen. Da es sich bei der Hetzner Robot Firewall um eine statische Firewall handelt (jedes eingehende Paket wird isoliert gepr\u00fcft) - m\u00fcssen die folgenden Regeln angewendet werden:</p> <p>F\u00fcr TCP <pre><code>SRC-IP: ---\nDST-IP: ---\nSRC-Port: ---\nDST-Port: 1024-65535\nProtokoll: tcp\nTCP-Flags: ack\nAktion: Akzeptieren\n</code></pre></p> <p>F\u00fcr UDP <pre><code>SRC-IP: ---\nDST-IP: ---\nSRC-Port: ---\nDST-Port: 1024-65535\nProtokoll: udp\nAktion: Akzeptieren\n</code></pre></p> <p>Wenn man einen restriktiveren Portbereich anwenden will, muss man zuerst die Konfiguration von unbound \u00e4ndern (nach der Installation):</p> <p>{mailcow-dockerized}/data/conf/unbound/unbound.conf: <pre><code>ausgehender-Port-vermeiden: 0-32767\n</code></pre></p> <p>Nun k\u00f6nnen die Firewall-Regeln wie folgt angepasst werden:</p> <pre><code>[...]\nDST Port: 32768-65535\n[...]\n</code></pre>"},{"location":"de/prerequisite/prerequisite-system/#datum-und-uhrzeit","title":"Datum und Uhrzeit","text":"<p>Um sicherzustellen, dass Sie das richtige Datum und die richtige Zeit auf Ihrem System eingestellt haben, \u00fcberpr\u00fcfen Sie bitte die Ausgabe von <code>timedatectl status</code>:</p> <pre><code>$ timedatectl status\n Lokale Zeit: Sat 2017-05-06 02:12:33 CEST\n Weltzeit: Sa 2017-05-06 00:12:33 UTC\n RTC-Zeit: Sa 2017-05-06 00:12:32\n Zeitzone: Europa/Berlin (MESZ, +0200)\n NTP aktiviert: ja\nNTP synchronisiert: ja\n RTC in lokaler TZ: nein\n Sommerzeit aktiv: ja\n Letzte DST-\u00c4nderung: Sommerzeit begann am\n Sonne 2017-03-26 01:59:59 MEZ\n So 2017-03-26 03:00:00 MESZ\n N\u00e4chste Sommerzeit\u00e4nderung: Die Sommerzeit endet (die Uhr springt eine Stunde r\u00fcckw\u00e4rts) am\n Sun 2017-10-29 02:59:59 MESZ\n Sun 2017-10-29 02:00:00 MEZ\n</code></pre> <p>Die Zeilen <code>NTP aktiviert: ja</code> und <code>NTP synchronisiert: ja</code> zeigen an, ob Sie NTP aktiviert haben und ob es synchronisiert ist.</p> <p>Um NTP zu aktivieren, m\u00fcssen Sie den Befehl <code>timedatectl set-ntp true</code> ausf\u00fchren. Sie m\u00fcssen auch Ihre <code>/etc/systemd/timesyncd.conf</code> bearbeiten:</p> <pre><code># vim /etc/systemd/timesyncd.conf\n[Zeit]\nNTP=0.pool.ntp.org 1.pool.ntp.org 2.pool.ntp.org 3.pool.ntp.org\n</code></pre>"},{"location":"de/prerequisite/prerequisite-system/#hetzner-cloud-und-wahrscheinlich-andere","title":"Hetzner Cloud (und wahrscheinlich andere)","text":"<p>Pr\u00fcfen Sie <code>/etc/network/interfaces.d/50-cloud-init.cfg</code> und \u00e4ndern Sie die IPv6-Schnittstelle von eth0:0 auf eth0:</p> <pre><code># Falsch:\nauto eth0:0\niface eth0:0 inet6 static\n# Richtig:\nauto eth0\niface eth0 inet6 static\n</code></pre> <p>Starten Sie die Schnittstelle neu, um die Einstellungen zu \u00fcbernehmen. Sie k\u00f6nnen au\u00dferdem die cloud-init Netzwerk\u00e4nderungen deaktivieren.</p>"},{"location":"de/prerequisite/prerequisite-system/#mtu","title":"MTU","text":"<p>Besonders relevant f\u00fcr OpenStack-Benutzer: \u00dcberpr\u00fcfen Sie Ihre MTU und setzen Sie sie entsprechend in docker-compose.yml. Siehe Problebehandlungen in unseren Installationsanleitungen.</p>"},{"location":"de/third_party/borgmatic/third_party-borgmatic/","title":"Borgmatic Backup","text":""},{"location":"de/third_party/borgmatic/third_party-borgmatic/#einfuhrung","title":"Einf\u00fchrung","text":"<p>Borgmatic ist ein gro\u00dfartiger Weg, um Backups auf Ihrem Mailcow-Setup durchzuf\u00fchren, da es Ihre Daten sicher verschl\u00fcsselt und extrem einfach zu einzurichten.</p> <p>Aufgrund seiner Deduplizierungsf\u00e4higkeiten k\u00f6nnen Sie eine gro\u00dfe Anzahl von Backups speichern, ohne gro\u00dfe Mengen an Speicherplatz zu verschwenden. So k\u00f6nnen Sie Backups in sehr kurzen Abst\u00e4nden durchf\u00fchren, um einen minimalen Datenverlust zu gew\u00e4hrleisten, wenn die Notwendigkeit besteht Daten aus einer Sicherung wiederherzustellen.</p> <p>Dieses Dokument f\u00fchrt Sie durch den Prozess zur Aktivierung kontinuierlicher Backups f\u00fcr mailcow mit borgmatic. Die borgmatic Funktionalit\u00e4t wird durch das borgmatic Docker Image bereitgestellt. Schauen Sie sich die <code>README</code> in diesem Repository, um mehr \u00fcber die anderen Optionen (wie z.B. Push-Benachrichtigungen) zu erfahren, die verf\u00fcgbar sind. Diese Anleitung behandelt nur die Grundlagen.</p>"},{"location":"de/third_party/borgmatic/third_party-borgmatic/#einrichten-von-borgmatic","title":"Einrichten von borgmatic","text":""},{"location":"de/third_party/borgmatic/third_party-borgmatic/#erstellen-oder-andern-sie-docker-composeoverrideyml","title":"Erstellen oder \u00e4ndern Sie <code>docker-compose.override.yml</code>","text":"<p>Im mailcow-dockerized Stammverzeichnis erstellen oder bearbeiten Sie <code>docker-compose.override.yml</code> und f\u00fcgen Sie die folgende Konfiguration ein: <pre><code>version: '2.1'\n\nservices:\n borgmatic-mailcow:\n image: ghcr.io/borgmatic-collective/borgmatic\n hostname: mailcow\n restart: always\n dns: ${IPV4_NETWORK:-172.22.1}.254\n volumes:\n - vmail-vol-1:/mnt/source/vmail:ro\n - crypt-vol-1:/mnt/source/crypt:ro\n - redis-vol-1:/mnt/source/redis:ro,z\n - rspamd-vol-1:/mnt/source/rspamd:ro,z\n - postfix-vol-1:/mnt/source/postfix:ro,z\n - mysql-socket-vol-1:/var/run/mysqld/:z\n - borg-config-vol-1:/root/.config/borg:Z\n - borg-cache-vol-1:/root/.cache/borg:Z\n - ./data/conf/borgmatic/etc:/etc/borgmatic.d:Z\n - ./data/conf/borgmatic/ssh:/root/.ssh:Z\n environment:\n - TZ=${TZ}\n - BORG_PASSPHRASE=YouBetterPutSomethingRealGoodHere\n networks:\n mailcow-network:\n aliases:\n - borgmatic\n\nvolumes:\n borg-cache-vol-1:\n borg-config-vol-1:\n</code></pre></p> <p>Stellen Sie sicher, dass Sie die <code>BORG_PASSPHRASE</code> in eine sichere Passphrase Ihrer Wahl \u00e4ndern.</p> <p>Aus Sicherheitsgr\u00fcnden mounten wir das maildir als schreibgesch\u00fctzt. Wenn Sie sp\u00e4ter Daten wiederherstellen wollen, m\u00fcssen Sie das <code>ro</code>-Flag entfernen, bevor Sie die Daten wiederherstellen. Dies wird im Abschnitt \u00fcber die Wiederherstellung von Backups beschrieben.</p>"},{"location":"de/third_party/borgmatic/third_party-borgmatic/#erstellen-sie-dataconfborgmaticetcconfigyaml","title":"Erstellen Sie <code>data/conf/borgmatic/etc/config.yaml</code>","text":"<p>Als n\u00e4chstes m\u00fcssen wir die borgmatic-Konfiguration erstellen.</p> <pre><code>source mailcow.conf\ncat &lt;&lt;EOF &gt; data/conf/borgmatic/etc/config.yaml\nlocation:\n source_directories:\n - /mnt/source\n repositories:\n - ssh://user@rsync.net:22/./mailcow\n exclude_patterns:\n - '/mnt/source/postfix/public/'\n - '/mnt/source/postfix/private/'\n - '/mnt/source/rspamd/rspamd.sock'\n\nretention:\n keep_hourly: 24\n keep_daily: 7\n keep_weekly: 4\n keep_monthly: 6\n prefix: \"\"\n\nhooks:\n mysql_databases:\n - name: ${DBNAME}\n username: ${DBUSER}\n password: ${DBPASS}\n options: --default-character-set=utf8mb4\nEOF\n</code></pre> <p>Das Erstellen der Datei auf diese Weise stellt sicher, dass die korrekten MySQL-Zugangsdaten aus <code>mailcow.conf</code> \u00fcbernommen werden.</p> <p>Diese Datei ist ein minimales Beispiel f\u00fcr die Verwendung von borgmatic mit einem Konto <code>user</code> beim Cloud-Speicheranbieter <code>rsync.net</code> f\u00fcr ein Repository namens <code>mailcow</code> (siehe <code>repositories</code> Einstellung). Es wird sowohl das maildir als auch die MySQL-Datenbank sichern, was alles ist was alles ist, was Sie brauchen, um Ihr mailcow Setup nach einem Vorfall wiederherzustellen. Die Aufbewahrungseinstellungen werden ein Archiv f\u00fcr jede Stunde der letzten 24 Stunden, eines pro Tag der Woche, eines pro Woche des Monats und eines pro Monat des letzten halben Jahr.</p> <p>Schauen Sie in der borgmatic Dokumentation nach, wie Sie andere Arten von Repositories oder Konfigurationsoptionen. Wenn Sie ein lokales Dateisystem als Backup-Ziel verwenden, stellen Sie sicher, dass Sie es in den Container einbinden. Der Container definiert zu diesem Zweck ein Volume namens <code>/mnt/borg-repository</code>.</p> <p>Note</p> <p>Wenn Sie rsync.net nicht verwenden, k\u00f6nnen Sie wahrscheinlich das Element <code>remote_path</code> aus Ihrer Konfiguration streichen.</p>"},{"location":"de/third_party/borgmatic/third_party-borgmatic/#erstellen-sie-einen-crontab","title":"Erstellen Sie einen crontab","text":"<p>Erstellen Sie eine neue Textdatei in <code>data/conf/borgmatic/etc/crontab.txt</code> mit folgendem Inhalt:</p> <pre><code>14 * * * * PATH=$PATH:/usr/local/bin /usr/local/bin/borgmatic --stats -v 0 2&gt;&amp;1\n</code></pre> <p>Diese Datei erwartet eine crontab-Syntax. Das hier gezeigte Beispiel veranlasst das Backup, jede Stunde um 14 Minuten nach nach der vollen Stunde auszuf\u00fchren und am Ende einige nette Statistiken zu protokollieren.</p>"},{"location":"de/third_party/borgmatic/third_party-borgmatic/#ssh-schlussel-in-ordner-ablegen","title":"SSH-Schl\u00fcssel in Ordner ablegen","text":"<p>Legen Sie die SSH-Schl\u00fcssel, die Sie f\u00fcr entfernte Repository-Verbindungen verwenden wollen, in <code>data/conf/borgmatic/ssh</code> ab. OpenSSH erwartet die \u00fcbliche <code>id_rsa</code>, <code>id_ed25519</code> oder \u00e4hnliches in diesem Verzeichnis zu finden. Stellen Sie sicher, dass die Datei <code>chmod 600</code> ist und nicht von der Welt gelesen werden kann oder OpenSSH wird sich weigern, den SSH-Schl\u00fcssel zu benutzen.</p>"},{"location":"de/third_party/borgmatic/third_party-borgmatic/#den-container-hochfahren","title":"Den Container hochfahren","text":"<p>F\u00fcr den n\u00e4chsten Schritt m\u00fcssen wir den Container in einem konfigurierten Zustand hochfahren und laufen lassen. Um das zu tun, f\u00fchren Sie aus:</p> <pre><code>docker compose up -d\n</code></pre>"},{"location":"de/third_party/borgmatic/third_party-borgmatic/#wiederherstellung-von-einem-backup","title":"Wiederherstellung von einem Backup","text":"<p>Das Wiederherstellen eines Backups setzt voraus, dass Sie mit einer neuen Installation von mailcow beginnen, und dass Sie derzeit keine keine benutzerdefinierten Daten in ihrem maildir oder ihrer mailcow Datenbank.</p>"},{"location":"de/third_party/borgmatic/third_party-borgmatic/#wiederherstellen-von-maildir","title":"Wiederherstellen von maildir","text":"<p>Warning</p> <p>Dies wird Dateien in Ihrem maildir \u00fcberschreiben! F\u00fchren Sie dies nicht aus, es sei denn, Sie beabsichtigen tats\u00e4chlich, Mail Dateien von einem Backup wiederherzustellen.</p> <p>Wenn Sie SELinux im Erzwingungsmodus verwenden</p> <p>Wenn Sie mailcow auf einem Host mit SELinux im Enforcing-Modus verwenden, m\u00fcssen Sie es vor\u00fcbergehend deaktivieren w\u00e4hrend w\u00e4hrend der Extraktion des Archivs vor\u00fcbergehend deaktivieren, da das Mailcow-Setup das vmail-Volumen als privat kennzeichnet, das ausschlie\u00dflich dem Dovecot-Container ausschlie\u00dflich. SELinux wird (berechtigterweise) jeden anderen Container, wie z.B. den borgmatic Container, daran hindern, auf dieses Volume zu schreiben.</p> <p>Bevor Sie eine Wiederherstellung durchf\u00fchren, m\u00fcssen Sie das vmail-Volume in <code>docker-compose.override.yml</code> beschreibbar machen, indem Sie das das <code>ro</code>-Flag aus dem Volume entfernen. Dann k\u00f6nnen Sie den folgenden Befehl verwenden, um das Maildir aus einem Backup wiederherzustellen:</p> <pre><code>docker compose exec borgmatic-mailcow borgmatic extract --path mnt/source --archive latest\n</code></pre> <p>Alternativ k\u00f6nnen Sie auch einen beliebigen Archivnamen aus der Liste der Archive angeben (siehe Auflistung aller verf\u00fcgbaren Archive)</p>"},{"location":"de/third_party/borgmatic/third_party-borgmatic/#mysql-wiederherstellen","title":"MySQL wiederherstellen","text":"<p>Warning</p> <p>Die Ausf\u00fchrung dieses Befehls l\u00f6scht und erstellt die mailcow-Datenbank neu! F\u00fchren sie diesen Befehl nicht aus, es sei denn sie beabsichtigen, die mailcow-Datenbank von einem Backup wiederherzustellen.</p> <p>Um die MySQL-Datenbank aus dem letzten Archiv wiederherzustellen, verwenden Sie diesen Befehl:</p> <pre><code>docker compose exec borgmatic-mailcow borgmatic restore --archive latest\n</code></pre> <p>Alternativ k\u00f6nnen Sie auch einen beliebigen Archivnamen aus der Liste der Archive angeben (siehe Auflistung aller verf\u00fcgbaren Archive)</p>"},{"location":"de/third_party/borgmatic/third_party-borgmatic/#nach-der-wiederherstellung","title":"Nach der Wiederherstellung","text":"<p>Nach der Wiederherstellung m\u00fcssen Sie mailcow neu starten. Wenn Sie den SELinux-Erzwingungsmodus deaktiviert haben, w\u00e4re jetzt ein guter Zeitpunkt, um ihn wieder zu aktivieren.</p> <p>Um mailcow neu zu starten, verwenden Sie den folgenden Befehl:</p> <pre><code>docker compose down &amp;&amp; docker compose up -d\n</code></pre> <p>Wenn Sie SELinux verwenden, werden dadurch auch alle Dateien in Ihrem vmail-Volume neu benannt. Seien Sie geduldig, denn dies kann eine Weile dauern kann, wenn Sie viele Dateien haben.</p>"},{"location":"de/third_party/borgmatic/third_party-borgmatic/#nutzliche-befehle","title":"N\u00fctzliche Befehle","text":""},{"location":"de/third_party/borgmatic/third_party-borgmatic/#manueller-archivierungslauf-mit-debugging-ausgabe","title":"Manueller Archivierungslauf (mit Debugging-Ausgabe)","text":"<pre><code>docker compose exec borgmatic-mailcow borgmatic -v 2\n</code></pre>"},{"location":"de/third_party/borgmatic/third_party-borgmatic/#auflistung-aller-verfugbaren-archive","title":"Auflistung aller verf\u00fcgbaren Archive","text":"<pre><code>docker compose exec borgmatic-mailcow borgmatic list\n</code></pre>"},{"location":"de/third_party/borgmatic/third_party-borgmatic/#sperre-aufheben","title":"Sperre aufheben","text":"<p>Wenn borg w\u00e4hrend eines Archivierungslaufs unterbrochen wird, hinterl\u00e4sst es eine veraltete Sperre, die gel\u00f6scht werden muss, bevor neue Operationen durchgef\u00fchrt werden k\u00f6nnen:</p> <pre><code>docker compose exec borgmatic-mailcow borg break-lock user@rsync.net:mailcow\n</code></pre> <p>Wobei <code>user@rsync.net:mailcow</code> die URI zu Ihrem Repository ist.</p> <p>Jetzt w\u00e4re ein guter Zeitpunkt, einen manuellen Archivierungslauf durchzuf\u00fchren, um sicherzustellen, dass er erfolgreich durchgef\u00fchrt werden kann.</p>"},{"location":"de/third_party/borgmatic/third_party-borgmatic/#exportieren-von-schlusseln","title":"Exportieren von Schl\u00fcsseln","text":"<p>Wenn Sie eine der <code>keyfile</code>-Methoden zur Verschl\u00fcsselung verwenden, M\u00dcSSEN Sie sich selbst um die Sicherung der Schl\u00fcsseldateien k\u00fcmmern. Die Schl\u00fcsseldateien werden erzeugt, wenn Sie das Repository initialisieren. Die <code>repokey</code>-Methoden speichern die Schl\u00fcsseldatei innerhalb des Repository, so dass eine manuelle Sicherung nicht so wichtig ist.</p> <p>Beachten Sie, dass Sie in beiden F\u00e4llen auch die Passphrase haben m\u00fcssen, um die Archive zu entschl\u00fcsseln.</p> <p>Um die <code>keyfile</code> zu holen, f\u00fchren Sie aus:</p> <pre><code>docker compose exec borgmatic-mailcow borg key export --paper user@rsync.net:mailcow\n</code></pre> <p>Wobei <code>user@rsync.net:mailcow</code> die URI zu Ihrem Repository ist.</p>"},{"location":"de/third_party/checkmk/u_e-checkmk/","title":"CheckMK","text":"<p>Mailcow bietet mittels dem eigenen Update-Script die M\u00f6glichkeit zu pr\u00fcfen ob Updates vorhanden sind.</p> <p>Sofern mailcow-Updates mittels checkmk abgefragt werden soll, kann man im <code>local</code>-Verzeichnis des checkmk-Agents (normalerweise <code>/usr/lib/check_mk_agent/local/</code>) eine ausf\u00fchrbare Datei mit dem Namen <code>mailcow_update</code> und nachfolgendem Inhalt erstellen:</p> <pre><code>#!/bin/bash\ncd /opt/mailcow-dockerized/ &amp;&amp; ./update.sh -c &gt;/dev/null\nstatus=$?\nif [ $status -eq 3 ]; then\n echo \"0 \\\"mailcow_update\\\" mailcow_update=0;1;;0;1 No updates available.\"\nelif [ $status -eq 0 ]; then\n echo \"1 \\\"mailcow_update\\\" mailcow_update=1;1;;0;1 Updated code is available.\\nThe changes can be found here: https://github.com/mailcow/mailcow-dockerized/commits/master\"\nelse\n echo \"3 \\\"mailcow_update\\\" - Unknown output from update script ...\"\nfi\nexit\n</code></pre> <p>Sofern das mailcow-Installationsverzeichnis nicht <code>/opt/</code> ist, ist das in der 2. Zeile anzupassen.</p> <p>Danach f\u00fcr den mailcow-Host in checkmk die Services neu inventarisieren und es sollte ein neuer Check mit Namen <code>mailcow_update</code> ausw\u00e4hlbar sein.</p> <p>Der Check <code>mailcow_update</code> wird jedes Mal ausgef\u00fchrt, wenn der checkmk Agent den mailcow Server \u00fcberpr\u00fcft. Sie k\u00f6nnen das Ergebnis zwischenspeichern, indem Sie das Skript in einem Unterordner mit dem Namen der Anzahl von Sekunden ablegen, f\u00fcr die Sie es zwischenspeichern m\u00f6chten. \\ <code>/usr/lib/check_mk_agent/local/3600/</code> speichert die Antwort f\u00fcr 3600 Sekunden (1 Stunde).</p>"},{"location":"de/third_party/checkmk/u_e-checkmk/#screenshots","title":"Screenshots","text":""},{"location":"de/third_party/checkmk/u_e-checkmk/#keine-updates-verfugbar","title":"Keine Updates verf\u00fcgbar","text":"<p>Sofern keine Updates vorhanden sind, wird <code>OK</code> ausgegeben.</p>"},{"location":"de/third_party/checkmk/u_e-checkmk/#neue-updates-verfugbar","title":"Neue Updates verf\u00fcgbar","text":"<p>Sofern Updates vorhanden sind, wird <code>WARN</code> ausgegeben.</p> <p>Sollte stattdessen <code>CRIT</code> gew\u00fcnscht sein, ist die 7. Zeile durch folgendes zu ersetzen:</p> <pre><code> echo \"2 \\\"mailcow_update\\\" mailcow_update=1;1;;0;1 Updated code is available.\\nThe changes can be found here: https://github.com/mailcow/mailcow-dockerized/commits/master\"\n</code></pre>"},{"location":"de/third_party/checkmk/u_e-checkmk/#detailierter-check-output","title":"Detailierter Check-Output","text":"<ul> <li>Hier wird ein Link zu den GitHub Commits von mailcow ausgegeben, sofern Updates verf\u00fcgbar sind.</li> <li>Metriken werden ebenfalls ausgegeben (nicht nur bei vorhandenen Updates):</li> <li>0 = Keine Updates verf\u00fcgbar</li> <li>1 = Neue Updates verf\u00fcgbar</li> </ul>"},{"location":"de/third_party/exchange_onprem/third_party-exchange_onprem/","title":"Exchange Hybrid Setup","text":"<p>Die Verwendung von Microsoft Exchange in einem hybriden Setup ist mit mailcow m\u00f6glich. Mit diesem Setup k\u00f6nnen Sie Postf\u00e4cher auf Ihrer mailcow hinzuf\u00fcgen und trotzdem Exchange Online Protection nutzen. Alle Postf\u00e4cher, die in Exchange eingerichtet sind, erhalten ihre Mails wie gewohnt, w\u00e4hrend mit dem hybriden Ansatz zus\u00e4tzliche Postf\u00e4cher in mailcow ohne weitere Konfiguration eingerichtet werden k\u00f6nnen.</p> <p>Dieses Setup ist sehr praktisch, wenn Sie die Office 365 Sicherheitsvorgaben aktiviert haben und Anwendungen von Drittanbietern sich nicht mehr in Ihre Postf\u00e4cher mit einer der unterst\u00fctzten Methoden einloggen k\u00f6nnen.</p>"},{"location":"de/third_party/exchange_onprem/third_party-exchange_onprem/#voraussetzungen","title":"Voraussetzungen","text":"<ul> <li>Der mx Record Ihrer Domain muss auf den Exchange Mail Service zeigen. Melden Sie sich in Ihrem Admin-Center an und suchen Sie in den DNS-Einstellungen Ihrer Dom\u00e4ne nach Ihrer personalisierten Gateway-Dom\u00e4ne. Sie sollte wie folgt aussehen: <code>contoso-com.mail.protection.outlook.com</code>. Wenden Sie sich an Ihren Domainregistrator, um weitere Informationen zur \u00c4nderung des mx-Eintrags zu erhalten.</li> <li>Die Dom\u00e4ne, f\u00fcr die Sie zus\u00e4tzliche Postf\u00e4cher haben m\u00f6chten, muss in Exchange als \"Interne Relay-Dom\u00e4ne\" eingerichtet werden.<ol> <li>Melden Sie sich bei Ihrem Exchange Admin Center an.</li> <li>W\u00e4hlen Sie den Bereich \"Mailflow\" und klicken Sie auf \"Akzeptierte Dom\u00e4nen\".</li> <li>W\u00e4hlen Sie die Dom\u00e4ne aus und schalten Sie sie von \"autorisiert\" auf \"internes Relais\" um.</li> </ol> </li> </ul>"},{"location":"de/third_party/exchange_onprem/third_party-exchange_onprem/#einrichten-der-mailcow","title":"Einrichten der Mailcow","text":"<p>Ihre Mailcow muss alle Mails an Ihren personalisierten Exchange Host weiterleiten. Es ist die gleiche Host-Adresse, die wir bereits f\u00fcr den mx Record gesucht haben.</p> <ol> <li>F\u00fcgen Sie die Domain zu Ihrer Mailcow hinzu</li> <li>F\u00fcgen Sie Ihre personalisierte Exchange Host Adresse als relayhost hinzu</li> <li>F\u00fcgen Sie Ihre personalisierte Exchange Host Adresse als Weiterleitungshost hinzu, um alle weitergeleiteten Mails von Exchange bedingungslos zu akzeptieren. (Admin &gt; Konfiguration &amp; Details &gt; Konfigurations-Dropdown &gt; Weiterleitungshosts)</li> <li>Gehen Sie zu den Dom\u00e4neneinstellungen und w\u00e4hlen Sie den neu hinzugef\u00fcgten Host in der Dropdown-Liste \"Absenderabh\u00e4ngige Transporte\" aus. Aktivieren Sie die Weiterleitung, indem Sie die Kontrollk\u00e4stchen \"Diese Dom\u00e4ne weiterleiten\", \"Alle Empf\u00e4nger weiterleiten\" und \"Nur nicht vorhandene Postf\u00e4cher weiterleiten\" aktivieren.</li> </ol> <p>Info</p> <p>Von nun an wird Ihre Mailcow alle Mails akzeptieren, die von Exchange weitergeleitet werden. Die Eingangsfilterung und damit das neuronale Lernen Ihrer Kuh wird nicht mehr funktionieren. Da alle Mails \u00fcber Exchange geroutet werden, wird der Filterungsprozess dort abgewickelt.</p>"},{"location":"de/third_party/exchange_onprem/third_party-exchange_onprem/#connectors-in-exchange-einrichten","title":"Connectors in Exchange einrichten","text":"<p>Der gesamte Mailverkehr l\u00e4uft nun \u00fcber Exchange. Zu diesem Zeitpunkt filtert der Exchange Online-Schutz bereits alle ein- und ausgehenden Mails. Jetzt m\u00fcssen wir zwei Konnektoren einrichten, um eingehende Mails von unserem Exchange Service an die Mailcow weiterzuleiten und einen weiteren, um Mails zuzulassen, die von der Mailcow an unseren Exchange Service weitergeleitet werden. Sie k\u00f6nnen der [offiziellen Anleitung von Microsoft] folgen (https://docs.microsoft.com/exchange/mail-flow-best-practices/use-connectors-to-configure-mail-flow/set-up-connectors-to-route-mail#2-set-up-a-connector-from-microsoft-365-or-office-365-to-your-email-server).</p> <p>Warning</p> <p>F\u00fcr den Connector, der die Mails von Ihrer Mailcow zu Exchange weiterleitet, bietet Microsoft zwei M\u00f6glichkeiten der Authentifizierung an. Der empfohlene Weg ist die Verwendung eines tls-Zertifikats, das mit einem Subject-Namen konfiguriert ist, der mit einer akzeptierten Dom\u00e4ne in Exchange \u00fcbereinstimmt. Andernfalls m\u00fcssen Sie die Authentifizierung mit der statischen IP-Adresse Ihrer Mailcow w\u00e4hlen.</p>"},{"location":"de/third_party/exchange_onprem/third_party-exchange_onprem/#validierung","title":"Validierung","text":"<p>Der einfachste Weg, die hybride Einrichtung zu \u00fcberpr\u00fcfen, ist das Senden einer Mail aus dem Internet an eine Mailbox, die nur auf der Mailcow existiert und andersherum.</p>"},{"location":"de/third_party/exchange_onprem/third_party-exchange_onprem/#allgemeine-probleme","title":"Allgemeine Probleme","text":"<ul> <li>Die Validierung des Connectors von Exchange zu Ihrer Mailcow schlug fehl mit <code>550 5.1.10 RESOLVER.ADR.RecipientNotFound; Recipient test@contoso.com not found by SMTP address lookup</code> M\u00f6gliche L\u00f6sung: Ihre Dom\u00e4ne ist nicht als \"internes Relay\" eingerichtet. Exchange kann daher den Empf\u00e4nger nicht finden.</li> <li>Mails, die von der Mailcow an eine Mailbox im Internet gesendet werden, k\u00f6nnen nicht zugestellt werden. Non Delivery Report mit Fehler <code>550 5.7.64 TenantAttribution; Relay Access Denied</code> M\u00f6gliche L\u00f6sung: Die Authentifizierungsmethode ist fehlgeschlagen. Stellen Sie sicher, dass der Betreff des Zertifikats mit einer akzeptierten Dom\u00e4ne in Exchange \u00fcbereinstimmt. Versuchen Sie stattdessen die Authentifizierung \u00fcber eine statische IP.</li> </ul> <p>Microsoft-Anleitung f\u00fcr die Einrichtung des Connectors und zus\u00e4tzliche Anforderungen: https://docs.microsoft.com/exchange/mail-flow-best-practices/use-connectors-to-configure-mail-flow/set-up-connectors-to-route-mail#prerequisites-for-your-on-premises-email-environment</p>"},{"location":"de/third_party/gitea/third_party-gitea/","title":"Gitea","text":"<p>Mit der F\u00e4higkeit von Gitea, sich \u00fcber SMTP zu authentifizieren, ist es trivial, es mit mailcow zu integrieren. Es sind nur wenige \u00c4nderungen erforderlich:</p> <p>1. \u00d6ffnen Sie <code>docker-compose.override.yml</code> und f\u00fcgen Sie Gitea hinzu:</p> <pre><code>version: '2.1'\nservices:\n\n gitea-mailcow:\n image: gitea/gitea:1\n volumes:\n - ./data/gitea:/data\n networks:\n mailcow-network:\n aliases:\n - gitea\n ports:\n - \"${GITEA_SSH_PORT:-127.0.0.1:4000}:22\"\n</code></pre> <p>2. Erstellen Sie <code>data/conf/nginx/site.gitea.custom</code>, f\u00fcgen Sie folgendes hinzu: <pre><code>location /gitea/ {\n proxy_pass http://gitea:3000/;\n}\n</code></pre></p> <p>3. \u00d6ffne <code>mailcow.conf</code> und definiere den Port Bind, den Gitea f\u00fcr SSH verwenden soll. Beispiel:</p> <pre><code>GITEA_SSH_PORT=127.0.0.1:4000\n</code></pre> <p>5. F\u00fchren Sie <code>docker compose up -d</code> aus, um den Gitea-Container hochzufahren und f\u00fchren Sie anschlie\u00dfend <code>docker compose restart nginx-mailcow</code> aus.</p> <p>6. Wenn Sie mailcow zu https gezwungen haben, f\u00fchren Sie Schritt 9 aus und starten Sie gitea mit <code>docker compose restart gitea-mailcow</code> neu. Fahren Sie mit Schritt 7 fort (Denken Sie daran, https anstelle von http zu verwenden, <code>https://mx.example.org/gitea/</code> </p> <p>7. \u00d6ffnen Sie <code>http://${MAILCOW_HOSTNAME}/gitea/</code>, zum Beispiel <code>http://mx.example.org/gitea/</code>. F\u00fcr die Datenbankdetails stellen Sie <code>mysql</code> als Datenbankhost ein. Verwenden Sie den in mailcow.conf gefundenen Wert von DBNAME als Datenbankname, DBUSER als Datenbankbenutzer und DBPASS als Datenbankpasswort.</p> <p>8. Sobald die Installation abgeschlossen ist, loggen Sie sich als Administrator ein und setzen Sie \"Einstellungen\" -&gt; \"Autorisierung\" -&gt; \"SMTP aktivieren\". SMTP-Host sollte <code>postfix</code> mit Port <code>587</code> sein, setzen Sie <code>Skip TLS Verify</code>, da wir ein nicht gelistetes SAN verwenden (\"postfix\" ist h\u00f6chstwahrscheinlich nicht Teil Ihres Zertifikats).</p> <p>9. Erstellen Sie <code>data/gitea/gitea/conf/app.ini</code> und setzen Sie die folgenden Werte. Sie k\u00f6nnen gitea cheat sheet, leider bisher nur in Englisch verf\u00fcgbar f\u00fcr deren Bedeutung und andere m\u00f6gliche Werte konsultieren.</p> <pre><code>[server]\nSSH_LISTEN_PORT = 22\n# F\u00fcr GITEA_SSH_PORT=127.0.0.1:4000 in mailcow.conf, setzen:\nSSH_DOMAIN = 127.0.0.1\nSSH_PORT = 4000\n# F\u00fcr MAILCOW_HOSTNAME=mx.example.org in mailcow.conf (und Standard-Ports f\u00fcr HTTPS), setzen:\nROOT_URL = https://mx.example.org/gitea/\n</code></pre> <p>10. Starten Sie gitea neu mit <code>docker compose restart gitea-mailcow</code>. Ihre Nutzer sollten in der Lage sein, sich mit von mailcow verwalteten Konten anzumelden.</p>"},{"location":"de/third_party/gogs/third_party-gogs/","title":"Gogs","text":"<p>Mit Gogs' F\u00e4higkeit, sich \u00fcber SMTP zu authentifizieren, ist es einfach, es mit mailcow zu verbinden. Es sind nur wenige \u00c4nderungen erforderlich:</p> <p>1. \u00d6ffne <code>docker-compose.override.yml</code> und f\u00fcge Gogs hinzu:</p> <pre><code>version: '2.1'\nservices:\n\n gogs-mailcow:\n image: gogs/gogs\n volumes:\n - ./data/gogs:/data\n networks:\n mailcow-network:\n aliases:\n - gogs\n ports:\n - \"${GOGS_SSH_PORT:-127.0.0.1:4000}:22\"\n</code></pre> <p>2. Erstelle <code>data/conf/nginx/site.gogs.custom</code>, f\u00fcge hinzu: <pre><code>location /gogs/ {\n proxy_pass http://gogs:3000/;\n}\n</code></pre></p> <p>3. \u00d6ffne <code>mailcow.conf</code> und definiere die Bindung, die Gogs f\u00fcr SSH verwenden soll. Beispiel:</p> <pre><code>GOGS_SSH_PORT=127.0.0.1:4000\n</code></pre> <p>5. F\u00fchren Sie <code>docker compose up -d</code> aus, um den Gogs-Container hochzufahren und f\u00fchren Sie anschlie\u00dfend <code>docker compose restart nginx-mailcow</code> aus.</p> <p>6. \u00d6ffnen Sie <code>http://${MAILCOW_HOSTNAME}/gogs/</code>, zum Beispiel <code>http://mx.example.org/gogs/</code>. F\u00fcr Datenbank-Details setzen Sie <code>mysql</code> als Datenbank-Host. Verwenden Sie den in mailcow.conf gefundenen Wert von DBNAME als Datenbankname, DBUSER als Datenbankbenutzer und DBPASS als Datenbankpasswort.</p> <p>7. Sobald die Installation abgeschlossen ist, loggen Sie sich als Administrator ein und setzen Sie \"Einstellungen\" -&gt; \"Autorisierung\" -&gt; \"SMTP aktivieren\". SMTP-Host sollte <code>postfix</code> mit Port <code>587</code> sein, setzen Sie <code>Skip TLS Verify</code>, da wir ein nicht gelistetes SAN verwenden (\"postfix\" ist h\u00f6chstwahrscheinlich nicht Teil Ihres Zertifikats).</p> <p>8. Erstellen Sie <code>data/gogs/gogs/conf/app.ini</code> und setzen Sie die folgenden Werte. Sie k\u00f6nnen Gogs cheat sheet f\u00fcr ihre Bedeutung und andere m\u00f6gliche Werte konsultieren.</p> <pre><code>[server]\nSSH_LISTEN_PORT = 22\n# F\u00fcr GOGS_SSH_PORT=127.0.0.1:4000 in mailcow.conf, setzen:\nSSH_DOMAIN = 127.0.0.1\nSSH_PORT = 4000\n# F\u00fcr MAILCOW_HOSTNAME=mx.example.org in mailcow.conf (und Standard-Ports f\u00fcr HTTPS), setzen:\nROOT_URL = https://mx.example.org/gogs/\n</code></pre> <p>9. Starten Sie Gogs neu mit <code>docker compose restart gogs-mailcow</code>. Ihre Benutzer sollten in der Lage sein, sich mit von mailcow verwalteten Konten einzuloggen.</p>"},{"location":"de/third_party/mailman3/third_party-mailman3/","title":"Installation von mailcow und Mailman 3 auf der Basis von dockerisierten Versionen","text":"<p>Info</p> <p>Diese Anleitung ist eine Kopie von dockerized-mailcow-mailman. Bitte posten Sie Probleme, Fragen und Verbesserungen in den issue tracker dort.</p> <p>Warning</p> <p>mailcow ist nicht verantwortlich f\u00fcr Datenverlust, Hardwaresch\u00e4den oder kaputte Tastaturen. Diese Anleitung kommt ohne jegliche Garantie. Macht Backups bevor ihr anfangt, Kein Backup kein Mitleid!</p>"},{"location":"de/third_party/mailman3/third_party-mailman3/#einleitung","title":"Einleitung","text":"<p>Diese Anleitung zielt darauf ab, mailcow-dockerized mit [docker-mailman] (https://github.com/maxking/docker-mailman) zu installieren und zu konfigurieren und einige n\u00fctzliche Skripte bereitzustellen. Eine wesentliche Bedingung ist, dass mailcow und Mailman in ihren eigenen Installationen f\u00fcr unabh\u00e4ngige Updates erhalten bleiben.</p> <p>Es gibt einige Anleitungen und Projekte im Internet, aber sie sind nicht auf dem neuesten Stand und/oder unvollst\u00e4ndig in der Dokumentation oder Konfiguration. Diese Anleitung basiert auf der Arbeit von:</p> <ul> <li>mailcow-mailman3-dockerized von Shadowghost</li> <li>mailman-mailcow-integration</li> </ul> <p>Nach Beendigung dieser Anleitung werden mailcow-dockerized und docker-mailman laufen und Apache als Reverse-Proxy wird die Web-Frontends bedienen.</p> <p>Das verwendete Betriebssystem ist ein Ubuntu 20.04 LTS.</p>"},{"location":"de/third_party/mailman3/third_party-mailman3/#installation","title":"Installation","text":"<p>Diese Anleitung basiert auf verschiedenen Schritten:</p> <ol> <li>DNS-Einrichtung</li> <li>Installieren Sie Apache als Reverse Proxy</li> <li>Beziehen Sie SSL-Zertifikate mit Let's Encrypt.</li> <li>Installieren Sie mailcow mit Mailman Integration</li> <li>Installieren Sie Mailman.</li> <li>\ud83c\udfc3 Ausf\u00fchren</li> </ol>"},{"location":"de/third_party/mailman3/third_party-mailman3/#dns-einrichtung","title":"DNS-Einrichtung","text":"<p>Der gr\u00f6\u00dfte Teil der Konfiguration ist in mailcows DNS Konfiguration enthalten. Nachdem diese Einrichtung abgeschlossen ist, f\u00fcgen Sie eine weitere Subdomain f\u00fcr Mailman hinzu, z.B. <code>lists.example.org</code>, die auf denselben Server zeigt:</p> <pre><code># Name Typ Wert\nlists IN A 1.2.3.4\nlists IN AAAA dead:beef\n</code></pre>"},{"location":"de/third_party/mailman3/third_party-mailman3/#installieren-sie-apache-als-reverse-proxy","title":"Installieren Sie Apache als Reverse Proxy","text":"<p>Installieren Sie Apache, z.B. mit dieser Anleitung von Digital Ocean: How To Install the Apache Web Server on Ubuntu 20.04 (Englisch).</p> <p>Aktivieren Sie bestimmte Apache Module (als root oder sudo):</p> <pre><code>a2enmod rewrite proxy proxy_http headers ssl wsgi proxy_uwsgi http2\n</code></pre> <p>M\u00f6glicherweise m\u00fcssen Sie weitere Pakete installieren, um diese Module zu erhalten. Dieses PPA von Ond\u0159ej Sur\u00fd k\u00f6nnte Ihnen helfen.</p>"},{"location":"de/third_party/mailman3/third_party-mailman3/#vhost-konfiguration","title":"vHost-Konfiguration","text":"<p>Kopieren Sie die mailcow.conf und die mailman.conf in den Apache conf Ordner <code>sites-available</code> (z.B. unter <code>/etc/apache2/sites-available</code>).</p> <p>\u00c4nderung in <code>mailcow.conf</code>: - <code>MAILCOW_HOSTNAME</code> zu Ihrem MAILCOW_HOSTNAME</p> <p>\u00c4nderung in <code>mailman.conf</code>: - <code>MAILMAN_DOMAIN</code> in Ihre Mailman-Domain (z.B. <code>Lists.example.org</code>)</p> <p>**Aktivieren Sie die Konfiguration noch nicht, da die ssl-Zertifikate und Verzeichnisse noch fehlen.</p>"},{"location":"de/third_party/mailman3/third_party-mailman3/#beziehen-sie-ssl-zertifikate-mit-lets-encrypt","title":"Beziehen Sie SSL-Zertifikate mit Let's Encrypt.","text":"<p>Pr\u00fcfen Sie, ob Ihre DNS-Konfiguration \u00fcber das Internet verf\u00fcgbar ist und auf die richtigen IP-Adressen zeigt, z.B. mit MXToolBox:</p> <ul> <li>https://mxtoolbox.com/SuperTool.aspx?action=a%3aMAILCOW_HOSTNAME</li> <li>https://mxtoolbox.com/SuperTool.aspx?action=aaaa%3aMAILCOW_HOSTNAME</li> <li>https://mxtoolbox.com/SuperTool.aspx?action=a%3aMAILMAN_DOMAIN</li> <li>https://mxtoolbox.com/SuperTool.aspx?action=aaaa%3aMAILMAN_DOMAIN</li> </ul> <p>Installieren Sie certbot (als root oder sudo):</p> <pre><code>apt install certbot\n</code></pre> <p>Holen Sie sich die gew\u00fcnschten Zertifikate (als root oder sudo):</p> <pre><code>certbot certonly -d mailcow_HOSTNAME\ncertbot certonly -d MAILMAN_DOMAIN\n</code></pre>"},{"location":"de/third_party/mailman3/third_party-mailman3/#installieren-sie-mailcow-mit-mailman-integration","title":"Installieren Sie mailcow mit Mailman Integration","text":""},{"location":"de/third_party/mailman3/third_party-mailman3/#installieren-sie-mailcow","title":"Installieren Sie mailcow","text":"<p>Folgen Sie der mailcow installation. Schritt 5 auslassen und nicht mit <code>docker compose</code> starten!</p>"},{"location":"de/third_party/mailman3/third_party-mailman3/#mailcow-konfigurieren","title":"Mailcow konfigurieren","text":"<p>Dies ist auch Schritt 4 in der offiziellen mailcow-Installation (<code>nano mailcow.conf</code>). Passen Sie also Ihre Bed\u00fcrfnisse an und \u00e4ndern Sie die folgenden Variablen:</p> <pre><code>HTTP_PORT=18080 # verwenden Sie nicht 8080, da mailman es braucht\nHTTP_BIND=127.0.0.1 #\nHTTPS_PORT=18443 # Sie k\u00f6nnen 8443 verwenden\nHTTPS_BIND=127.0.0.1 # # HTTPS_BIND=127.0.0.1\n\nSKIP_LETS_ENCRYPT=y # Der Reverse Proxy wird die SSL-Verifizierung durchf\u00fchren\n\nSNAT_TO_SOURCE=1.2.3.4 # \u00e4ndern Sie dies in Ihre IPv4\nSNAT6_TO_SOURCE=dead:beef # \u00c4ndern Sie dies in Ihre globale IPv6\n</code></pre>"},{"location":"de/third_party/mailman3/third_party-mailman3/#mailman-integration-hinzufugen","title":"Mailman-Integration hinzuf\u00fcgen","text":"<p>Erstelle die Datei <code>/opt/mailcow-dockerized/docker-compose.override.yml</code> (z.B. mit <code>nano</code>) und f\u00fcge die folgenden Zeilen hinzu:</p> <pre><code>version: '2.1'\n\nservices:\n postfix-mailcow:\n volumes:\n - /opt/mailman:/opt/mailman\n networks:\n - docker-mailman_mailman\n\nnetworks:\n docker-mailman_mailman:\n external: true\n</code></pre> <p>Das zus\u00e4tzliche Volume wird von Mailman verwendet, um zus\u00e4tzliche Konfigurationsdateien f\u00fcr mailcow postfix zu generieren. Das externe Netzwerk wird von Mailman erstellt und verwendet. mailcow ben\u00f6tigt es, um eingehende Listenmails an Mailman zu liefern.</p> <p>Erstellen Sie die Datei <code>/opt/mailcow-dockerized/data/conf/postfix/extra.cf</code> (z.B. mit <code>nano</code>) und f\u00fcgen Sie die folgenden Zeilen hinzu:</p> <pre><code># mailman\n\nrecipient_delimiter = +\nunknown_local_recipient_reject_code = 550\nowner_request_special = no\n\nlocal_recipient_maps =\n regexp:/opt/mailman/core/var/data/postfix_lmtp,\n proxy:unix:passwd.byname,\n $alias_maps\nvirtual_mailbox_maps =\n proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_mailbox_maps.cf,\n regexp:/opt/mailman/core/var/data/postfix_lmtp\ntransport_maps =\n pcre:/opt/postfix/conf/custom_transport.pcre,\n pcre:/opt/postfix/conf/local_transport,\n proxy:mysql:/opt/postfix/conf/sql/mysql_relay_ne.cf,\n proxy:mysql:/opt/postfix/conf/sql/mysql_transport_maps.cf,\n regexp:/opt/mailman/core/var/data/postfix_lmtp\nrelay_domains =\n proxy:mysql:/opt/postfix/conf/sql/mysql_virtual_relay_domain_maps.cf,\n regexp:/opt/mailman/core/var/data/postfix_domains\nrelay_recipient_maps =\n proxy:mysql:/opt/postfix/conf/sql/mysql_relay_recipient_maps.cf,\n regexp:/opt/mailman/core/var/data/postfix_lmtp\n</code></pre> <p>Da wir hier die mailcow postfix Konfiguration \u00fcberschreiben, kann dieser Schritt Ihre normalen Mailtransporte unterbrechen. \u00dcberpr\u00fcfen Sie die originalen Konfigurationsdateien, wenn sich etwas ge\u00e4ndert hat.</p>"},{"location":"de/third_party/mailman3/third_party-mailman3/#ssl-zertifikate","title":"SSL-Zertifikate","text":"<p>Da wir mailcow als Proxy verwenden, m\u00fcssen wir die SSL-Zertifikate in die mailcow-Dateistruktur kopieren. Diese Aufgabe wird das Skript renew-ssl.sh f\u00fcr uns erledigen:</p> <ul> <li>Kopieren Sie die Datei nach <code>/opt/mailcow-dockerized</code></li> <li>\u00c4ndere mailcow_HOSTNAME in deinen mailcow Hostnamen</li> <li>Machen Sie es ausf\u00fchrbar (<code>chmod a+x renew-ssl.sh</code>)</li> <li>Noch nicht ausf\u00fchren, da wir zuerst Mailman ben\u00f6tigen</li> </ul> <p>Sie m\u00fcssen einen cronjob erstellen, so dass neue Zertifikate kopiert werden. F\u00fchren Sie ihn als root oder sudo aus:</p> <pre><code>crontab -e\n</code></pre> <p>Um das Skript jeden Tag um 5 Uhr morgens laufen zu lassen, f\u00fcgen Sie hinzu:</p> <pre><code>0 5 * * * /opt/mailcow-dockerized/renew-ssl.sh\n</code></pre>"},{"location":"de/third_party/mailman3/third_party-mailman3/#installieren-sie-mailman","title":"Installieren Sie Mailman.","text":"<p>Befolgen Sie im Wesentlichen die Anweisungen unter docker-mailman. Da sie sehr umfangreich sind, ist hier in aller K\u00fcrze beschrieben, was zu tun ist:</p> <p>Als root oder sudo:</p> <pre><code>cd /opt\nmkdir -p mailman/core\nmkdir -p mailman/web\ngit clone https://github.com/maxking/docker-mailman\ncd docker-mailman\n</code></pre>"},{"location":"de/third_party/mailman3/third_party-mailman3/#mailman-konfigurieren","title":"Mailman konfigurieren","text":"<p>Erstellen Sie einen langen Schl\u00fcssel f\u00fcr Hyperkitty, z.B. mit dem Linux-Befehl <code>cat /dev/urandom | tr -dc a-zA-Z0-9 | head -c30; echo</code>. Speichern Sie diesen Schl\u00fcssel vorerst als HYPERKITTY_KEY.</p> <p>Erstellen Sie ein langes Passwort f\u00fcr die Datenbank, z. B. mit dem Linux-Befehl <code>cat /dev/urandom | tr -dc a-zA-Z0-9 | head -c30; echo</code>. Speichern Sie dieses Passwort zun\u00e4chst als DBPASS.</p> <p>Erstellen Sie einen langen Schl\u00fcssel f\u00fcr Django, z. B. mit dem Linux-Befehl <code>cat /dev/urandom | tr -dc a-zA-Z0-9 | head -c30; echo</code>. Speichern Sie diesen Schl\u00fcssel f\u00fcr einen Moment als DJANGO_KEY.</p> <p>Erstellen Sie die Datei <code>/opt/docker-mailman/docker compose.override.yaml</code> und ersetzen Sie <code>HYPERKITTY_KEY</code>, <code>DBPASS</code> und <code>DJANGO_KEY</code> durch die generierten Werte:</p> <pre><code>version: '2'\n\nservices:\n mailman-core:\n environment:\n - DATABASE_URL=postgres://mailman:DBPASS@database/mailmandb\n - HYPERKITTY_API_KEY=HYPERKITTY_KEY\n - TZ=Europe/Berlin\n - MTA=postfix\n restart: always\n networks:\n - mailman\n\n mailman-web:\n environment:\n - DATABASE_URL=postgres://mailman:DBPASS@database/mailmandb\n - HYPERKITTY_API_KEY=HYPERKITTY_KEY\n - TZ=Europe/Berlin\n - SECRET_KEY=DJANGO_KEY\n - SERVE_FROM_DOMAIN=MAILMAN_DOMAIN # e.g. lists.example.org\n - MAILMAN_ADMIN_USER=admin # the admin user\n - MAILMAN_ADMIN_EMAIL=admin@example.org # the admin mail address\n - UWSGI_STATIC_MAP=/static=/opt/mailman-web-data/static\n restart: always\n\n database:\n environment:\n - POSTGRES_PASSWORD=DBPASS\n restart: always\n</code></pre> <p>Bei <code>mailman-web</code> geben Sie die korrekten Werte f\u00fcr <code>SERVE_FROM_DOMAIN</code> (z.B. <code>lists.example.org</code>), <code>MAILMAN_ADMIN_USER</code> und <code>MAILMAN_ADMIN_EMAIL</code> ein. Sie ben\u00f6tigen die Admin-Zugangsdaten, um sich in der Web-Oberfl\u00e4che (Pistorius) anzumelden. Um das Passwort zum ersten Mal zu setzen, verwenden Sie die Funktion Passwort vergessen im Webinterface.</p> <p>\u00dcber andere Konfigurationsoptionen lesen Sie die Dokumentationen Mailman-web und Mailman-core.</p>"},{"location":"de/third_party/mailman3/third_party-mailman3/#konfigurieren-sie-mailman-core-und-mailman-web","title":"Konfigurieren Sie Mailman core und Mailman web","text":"<p>Erstellen Sie die Datei <code>/opt/mailman/core/mailman-extra.cfg</code> mit dem folgenden Inhalt. <code>mailman@example.org</code> sollte auf ein g\u00fcltiges Postfach oder eine Umleitung verweisen.</p> <pre><code>[mailman]\ndefault_language: de\nsite_owner: mailman@example.org\n</code></pre> <p>Erstellen Sie die Datei <code>/opt/mailman/web/settings_local.py</code> mit dem folgenden Inhalt. <code>mailman@example.org</code> sollte auf ein g\u00fcltiges Postfach oder eine Umleitung verweisen.</p> <p><pre><code># Gebietsschema\nLANGUAGE_CODE = 'de-de'\n\n# soziale Authentifizierung deaktivieren\nMAILMAN_WEB_SOCIAL_AUTH = []\n\n# \u00e4ndern\nDEFAULT_FROM_EMAIL = 'mailman@example.org'\n\nDEBUG = False\n</code></pre> Sie k\u00f6nnen <code>LANGUAGE_CODE</code> und <code>SOCIALACCOUNT_PROVIDERS</code> an Ihre Bed\u00fcrfnisse anpassen.</p>"},{"location":"de/third_party/mailman3/third_party-mailman3/#ausfuhren","title":"\ud83c\udfc3 Ausf\u00fchren","text":"<p>Ausf\u00fchren (als root oder sudo)</p> <pre><code>a2ensite mailcow.conf\na2ensite mailman.conf\nsystemctl restart apache2\n\ncd /opt/docker-mailman\ndocker compose pull\ndocker compose up -d\n\ncd /opt/mailcow-dockerized/\ndocker compose pull\n./renew-ssl.sh\n</code></pre> <p>Warten Sie ein paar Minuten! Die Container m\u00fcssen ihre Datenbanken und Konfigurationsdateien erstellen. Dies kann bis zu 1 Minute und mehr dauern.</p>"},{"location":"de/third_party/mailman3/third_party-mailman3/#bemerkungen","title":"Bemerkungen","text":""},{"location":"de/third_party/mailman3/third_party-mailman3/#neue-listen-werden-von-postfix-nicht-sofort-erkannt","title":"Neue Listen werden von Postfix nicht sofort erkannt","text":"<p>Wenn man eine neue Liste anlegt und versucht, sofort eine E-Mail zu versenden, antwortet postfix mit <code>Benutzer existiert nicht</code>, weil postfix die Liste noch nicht an Mailman \u00fcbergeben hat. Die Konfiguration unter <code>/opt/mailman/core/var/data/postfix_lmtp</code> wird nicht sofort aktualisiert. Wenn Sie die Liste sofort ben\u00f6tigen, starten Sie postifx manuell neu:</p> <pre><code>cd /opt/mailcow-dockerized\ndocker compose restart postfix-mailcow\n</code></pre>"},{"location":"de/third_party/mailman3/third_party-mailman3/#update","title":"Update","text":"<p>mailcow hat sein eigenes Update-Skript in <code>/opt/mailcow-dockerized/update.sh</code>, siehe die Dokumentation.</p> <p>F\u00fcr Mailman holen Sie sich einfach die neueste Version aus dem github repository.</p>"},{"location":"de/third_party/mailman3/third_party-mailman3/#sicherung","title":"Sicherung","text":"<p>mailcow hat ein eigenes Backup-Skript. Lies die Docs f\u00fcr weitere Informationen.</p> <p>Mailman gibt keine Backup-Anweisungen in der README.md an. Im gitbucket von pgollor befindet sich ein Skript, das hilfreich sein k\u00f6nnte.</p>"},{"location":"de/third_party/mailman3/third_party-mailman3/#todo","title":"ToDo","text":""},{"location":"de/third_party/mailman3/third_party-mailman3/#skript-installieren","title":"Skript installieren","text":"<p>Schreiben Sie ein Skript wie in mailman-mailcow-integration/mailman-install.sh, da viele der Schritte automatisierbar sind.</p> <ol> <li>Fragen Sie alle Konfigurationsvariablen ab und erstellen Sie Passw\u00f6rter und Schl\u00fcssel.</li> <li>F\u00fchren Sie eine (halb)automatische Installation durch.</li> <li>Viel Spa\u00df!</li> </ol>"},{"location":"de/third_party/mailpiler/third_party-mailpiler_integration/","title":"Mailpiler Integration","text":"<p>Dies ist eine einfache Integration von mailcow-Aliasen und dem Mailbox-Namen in mailpiler bei Verwendung von IMAP-Authentifizierung.</p> <p>Disclaimer: Dies wird weder offiziell vom mailcow-Projekt noch von seinen Mitwirkenden gepflegt oder unterst\u00fctzt. Es wird keine Garantie oder Unterst\u00fctzung angeboten, jedoch steht es Ihnen frei, Themen auf GitHub zu \u00f6ffnen, um einen Fehler zu melden oder weitere Ideen zu liefern. GitHub Repo kann hier gefunden werden.</p> <p>Info</p> <p>Die Unterst\u00fctzung f\u00fcr Domain Wildcards wurde in Piler 1.3.10 implementiert, das am 03.01.2021 ver\u00f6ffentlicht wurde. Fr\u00fchere Versionen funktionieren grunds\u00e4tzlich, aber nach dem Einloggen sehen Sie keine E-Mails, die von oder an den Domain-Alias gesendet werden. (z.B. wenn @example.com ein Alias f\u00fcr admin@example.com ist)</p>"},{"location":"de/third_party/mailpiler/third_party-mailpiler_integration/#das-zu-losende-problem","title":"Das zu l\u00f6sende Problem","text":"<p>mailpiler bietet die Authentifizierung auf Basis von IMAP an, zum Beispiel:</p> <pre><code>$config['ENABLE_IMAP_AUTH'] = 1;\n$config['IMAP_HOST'] = 'mail.example.com';\n$config['IMAP_PORT'] = 993;\n$config['IMAP_SSL'] = true;\n</code></pre> <ul> <li>Wenn Sie sich also mit <code>patrik@example.com</code> anmelden, sehen Sie nur zugestellte E-Mails, die von oder an diese spezielle E-Mail-Adresse gesendet wurden.</li> <li>Wenn zus\u00e4tzliche Aliase in mailcow definiert werden, wie z.B. <code>team@example.com</code>, werden Sie keine Emails sehen, die an oder von dieser Email-Adresse gesendet wurden, auch wenn Sie ein Empf\u00e4nger von Emails sind, die an diese Alias-Adresse gesendet wurden.</li> </ul> <p>Indem wir uns in den Authentifizierungsprozess von mailpiler einklinken, sind wir in der Lage, die erforderlichen Daten \u00fcber die mailcow API w\u00e4hrend des Logins zu erhalten. Dies l\u00f6st API-Anfragen an die mailcow-API aus (die einen Nur-Lese-API-Zugang erfordern), um die Aliase auszulesen, an denen Ihre E-Mail-Adresse teilnimmt, und auch den \"Namen\" des Postfachs, der angegeben wurde, um ihn nach dem Login oben rechts in mailpiler anzuzeigen.</p> <p>Zugelassene E-Mail-Adressen k\u00f6nnen in den Mailpiler-Einstellungen oben rechts nach dem Einloggen eingesehen werden.</p> <p>Info</p> <p>Dies wird nur einmal w\u00e4hrend des Authentifizierungsprozesses abgefragt. Die autorisierten Aliase und der Realname sind f\u00fcr die gesamte Dauer der Benutzersitzung g\u00fcltig, da mailpiler sie in den Sitzungsdaten setzt. Wird ein Benutzer aus einem bestimmten Alias entfernt, so wird dies erst nach dem n\u00e4chsten Login wirksam.</p>"},{"location":"de/third_party/mailpiler/third_party-mailpiler_integration/#die-losung","title":"Die L\u00f6sung","text":"<p>Hinweis: Die Dateipfade k\u00f6nnen je nach Einrichtung variieren.</p>"},{"location":"de/third_party/mailpiler/third_party-mailpiler_integration/#voraussetzungen","title":"Voraussetzungen","text":"<ul> <li>Eine funktionierende mailcow-Instanz</li> <li>Eine funktionierende mailpiler Instanz (Sie finden eine Installationsanleitung hier, \u00fcberpr\u00fcfen Sie unterst\u00fctzte Versionen hier)</li> <li>Ein mailcow API-Schl\u00fcssel (Nur-Lesen funktioniert): <code>Konfiguration &amp; Details - Zugang - Nur-Lesen-Zugang</code>. Vergessen Sie nicht, den API-Zugang von Ihrer mailpiler IP zu erlauben.</li> </ul> <p>Warning</p> <p>Da mailpiler sich gegen\u00fcber mailcow, unserem IMAP-Server, authentifiziert, k\u00f6nnen fehlgeschlagene Logins von Nutzern oder Bots eine Sperre f\u00fcr Ihre mailpiler-Instanz ausl\u00f6sen. Daher sollten Sie in Erw\u00e4gung ziehen, die IP-Adresse der mailpiler-Instanz innerhalb von mailcow auf eine Whitelist zu setzen: <code>Konfiguration &amp; Details - Konfiguration - Fail2ban-Parameter - Whitelisted networks/hosts</code>.</p>"},{"location":"de/third_party/mailpiler/third_party-mailpiler_integration/#einrichtung","title":"Einrichtung","text":"<ol> <li> <p>Setzen Sie die benutzerdefinierte Abfragefunktion von mailpiler und f\u00fcgen Sie diese an <code>/usr/local/etc/piler/config-site.php</code> an:</p> <pre><code>$config['MAILCOW_API_KEY'] = 'YOUR_READONLY_API_KEY';\n$config['MAILCOW_SET_REALNAME'] = true; // wenn nicht angegeben, dann ist der Standardwert false\n$config['CUSTOM_EMAIL_QUERY_FUNCTION'] = 'query_mailcow_for_email_access';\ninclude('auth-mailcow.php');\n</code></pre> <p>Sie k\u00f6nnen auch den mailcow-Hostnamen \u00e4ndern, falls erforderlich: <pre><code>$config['MAILCOW_HOST'] = 'mail.domain.tld'; // standardm\u00e4\u00dfig $config['IMAP_HOST']\n</code></pre></p> </li> <li> <p>Laden Sie die PHP-Datei mit den Funktionen aus dem GitHub Repo herunter:</p> <pre><code>curl -o /usr/local/etc/piler/auth-mailcow.php https://raw.githubusercontent.com/patschi/mailpiler-mailcow-integration/master/auth-mailcow.php\n</code></pre> </li> <li> <p>Erledigt!</p> </li> </ol> <p>Stellen Sie sicher, dass Sie sich erneut mit Ihren IMAP-Zugangsdaten anmelden, damit die \u00c4nderungen wirksam werden.</p> <p>Wenn es nicht funktioniert, ist h\u00f6chstwahrscheinlich etwas mit der API-Abfrage selbst nicht in Ordnung. Versuchen Sie eine Fehlersuche, indem Sie manuelle API-Anfragen an die API senden. (Tipp: \u00d6ffnen Sie <code>https://mail.domain.tld/api</code> auf Ihrer Instanz)</p>"},{"location":"de/third_party/nextcloud/third_party-nextcloud/","title":"Nextcloud","text":""},{"location":"de/third_party/nextcloud/third_party-nextcloud/#nextcloud-mit-dem-helper-skript-verwalten","title":"Nextcloud mit dem Helper-Skript verwalten","text":"<p>Nextcloud kann mit dem helper script, das in mailcow enthalten ist, eingerichtet (Parameter <code>-i</code>) und entfernt (Parameter <code>-p</code>) werden. Um Nextcloud zu installieren, navigieren Sie einfach zu Ihrem mailcow-dockerized Root-Ordner und f\u00fchren Sie das Helper-Skript wie folgt aus:</p> <p><code>./helper-scripts/nextcloud.sh -i</code></p> <p>F\u00fcr den Fall, dass Sie das Passwort (z.B. f\u00fcr admin) vergessen haben und kein neues anfordern k\u00f6nnen [\u00fcber den Passwort-Reset-Link auf dem Login-Bildschirm] (https://docs.nextcloud.com/server/20/admin_manual/configuration_user/reset_admin_password.html?highlight=reset), k\u00f6nnen Sie durch den Aufruf des Helper-Skripts mit <code>-r</code> als Parameter ein neues Passwort setzen. Verwenden Sie diese Option nur, wenn Ihre Nextcloud nicht so konfiguriert ist, dass Sie mailcow zur Authentifizierung verwendet, wie im n\u00e4chsten Abschnitt beschrieben.</p> <p>Damit mailcow ein Zertifikat f\u00fcr die Nextcloud Domain generieren kann, muss die Domain unter welcher die Nextcloud sp\u00e4ter erreichbar sein soll als ADDITIONAL_SAN in die mailcow.conf hinzuf\u00fcgt werden und <code>docker compose up -d</code> zur \u00dcbernahme ausgef\u00fchrt werden. F\u00fcr weitere Informationen siehe: Erweitertes SSL.</p>"},{"location":"de/third_party/nextcloud/third_party-nextcloud/#hintergrund-aufgaben","title":"Hintergrund-Aufgaben","text":"<p>Zur Verwendung der empfohlenen Einstellung (Cron) zur Verarbeitung der Hintergrund-Aufgaben m\u00fcssen in der <code>docker-compose.override.yml</code> folgende Zeilen hinzugef\u00fcgt werden:</p> <pre><code>version: '2.1'\nservices:\n php-fpm-mailcow:\n labels:\n ofelia.enabled: \"true\"\n ofelia.job-exec.nextcloud-cron.schedule: \"@every 5m\"\n ofelia.job-exec.nextcloud-cron.command: \"su www-data -s /bin/bash -c \\\"/usr/local/bin/php -f /web/nextcloud/cron.php\\\"\"\n</code></pre> <p>Nachdem diese Zeilen hinzugef\u00fcgt wurden muss <code>docker compose up -d</code> ausgef\u00fchrt werden, um das Docker Image mit den entsprechenden Labels zu versehen. Danach muss zudem der docker scheduler neu gestartet werden, um den neuen Job zu registrieren. Dazu wird <code>docker compose restart ofelia-mailcow</code> ausgef\u00fchrt. Zur \u00dcberpr\u00fcfung, ob die <code>ofelia</code> Konfiguration korrekt ist geladen wurde, kann mittels <code>docker compose logs ofelia-mailcow</code> nach einer Zeile mit dem Inhalt <code>New job registered \"nextcloud-cron\" - ...</code> gesucht werden.</p> <p>Hierdurch wird alle 5 Minuten die Hintergrundverarbeitung gestartet. Da die Ausf\u00fchrung selbst keine Ausgabe liefert, kann die korrekte Funktionsweise in den Grundeinstellungen von Nextcloud \u00fcberpr\u00fcft werden. Hier wird automatisch mit der ersten Ausf\u00fchrung die Hintergrund-Aufgaben Verarbeitung auf <code>(X) Cron</code> gesetzt und der Zeitstempel <code>Letzte Aufgabe ausgef\u00fchrt</code> aktualisiert.</p>"},{"location":"de/third_party/nextcloud/third_party-nextcloud/#konfigurieren-sie-nextcloud-um-mailcow-fur-die-authentifizierung-zu-verwenden","title":"Konfigurieren Sie Nextcloud, um mailcow f\u00fcr die Authentifizierung zu verwenden","text":"<p>Im Folgenden wird beschrieben, wie die Authentifizierung \u00fcber mailcow unter Verwendung des OAuth2-Protokolls eingerichtet wird. Wir nehmen nur an, dass Sie Nextcloud bereits unter cloud.example.com eingerichtet haben und dass Ihre mailcow unter mail.example.com l\u00e4uft. Es spielt keine Rolle, wenn Ihre Nextcloud auf einem anderen Server l\u00e4uft, Sie k\u00f6nnen immer noch mailcow f\u00fcr die Authentifizierung verwenden.</p> <p>1. Melden Sie sich bei mailcow als Administrator an.</p> <p>2. Scrollen Sie nach unten zu OAuth2 Apps und klicken Sie auf die Schaltfl\u00e4che Hinzuf\u00fcgen. Geben Sie die Redirect URI als <code>https://cloud.example.com/index.php/apps/sociallogin/custom_oauth2/Mailcow</code> an und klicken Sie auf Hinzuf\u00fcgen. Speichern Sie die Client-ID und das Geheimnis f\u00fcr sp\u00e4ter.</p> <p>Info</p> <p>Einige Installationen, einschlie\u00dflich derer, die mit dem Helper-Skript von mailcow eingerichtet wurden, m\u00fcssen index.php/ aus der URL entfernen, um einen erfolgreichen Redirect zu erhalten: <code>https://cloud.example.com/apps/sociallogin/custom_oauth2/Mailcow</code></p> <p>3. Melden Sie sich bei Nextcloud als Administrator an.</p> <p>4. Klicken Sie auf die Schaltfl\u00e4che in der oberen rechten Ecke und w\u00e4hlen Sie Apps. Klicken Sie auf die Schaltfl\u00e4che \"Suchen\" in der Symbolleiste, suchen Sie nach dem Plugin Social Login und klicken Sie daneben auf Herunterladen und aktivieren.</p> <p>5. Klicken Sie auf die Schaltfl\u00e4che in der oberen rechten Ecke und w\u00e4hlen Sie Einstellungen. Scrollen Sie zum Abschnitt Administration auf der linken Seite und klicken Sie auf Social Login.</p> <p>6. Entfernen Sie das H\u00e4kchen bei den folgenden Punkten:</p> <ul> <li>\"Automatische Erstellung neuer Benutzer deaktivieren\"</li> <li>\"Benutzern erlauben, soziale Logins mit ihren Konten zu verbinden\".</li> <li>\"Nicht verf\u00fcgbare Benutzergruppen bei der Anmeldung nicht entfernen\"</li> <li>\"Gruppen automatisch erstellen, wenn sie nicht vorhanden sind\"</li> <li>\"Anmeldung f\u00fcr Benutzer ohne zugeordnete Gruppen einschr\u00e4nken\".</li> </ul> <p>7. \u00dcberpr\u00fcfen Sie die folgenden Punkte:</p> <ul> <li>\"Die Erstellung eines Kontos verhindern, wenn die E-Mail-Adresse in einem anderen Konto existiert\"</li> <li>\"Benutzerprofil bei jeder Anmeldung aktualisieren\"</li> <li>\"Benachrichtigung der Administratoren \u00fcber neue Benutzer deaktivieren\".</li> </ul> <p>Klicken Sie auf die Schaltfl\u00e4che Speichern.</p> <p>8. Scrollen Sie nach unten zu Custom OAuth2 und klicken Sie auf die Schaltfl\u00e4che +. 9. Konfigurieren Sie die Parameter wie folgt:</p> <ul> <li>Interner Name: <code>Mailcow</code></li> <li>Titel: <code>Mailcow</code></li> <li>API Basis-URL: <code>https://mail.example.com</code></li> <li>Autorisierungs-URL: <code>https://mail.example.com/oauth/authorize</code></li> <li>Token-URL: <code>https://mail.example.com/oauth/token</code></li> <li>Profil-URL: <code>https://mail.example.com/oauth/profile</code></li> <li>Abmelde-URL: (leer lassen)</li> <li>Kunden-ID: (die Sie in Schritt 1 erhalten haben)</li> <li>Client Secret: (was Sie in Schritt 1 erhalten haben)</li> <li>Bereich: <code>Profil</code></li> </ul> <p>Klicken Sie auf die Schaltfl\u00e4che Speichern ganz unten auf der Seite.</p> <p>Wenn Sie bisher Nextcloud mit mailcow-Authentifizierung \u00fcber user_external/IMAP verwendet haben, m\u00fcssen Sie einige zus\u00e4tzliche Schritte durchf\u00fchren, um Ihre bestehenden Benutzerkonten mit OAuth2 zu verkn\u00fcpfen.</p> <p>1. Klicken Sie auf die Schaltfl\u00e4che in der oberen rechten Ecke und w\u00e4hlen Sie Apps. Scrollen Sie nach unten zur App Externe Benutzerauthentifizierung und klicken Sie daneben auf Entfernen. 2. F\u00fchren Sie die folgenden Abfragen in Ihrer Nextcloud-Datenbank aus (wenn Sie Nextcloud mit dem Skript von mailcow einrichten, k\u00f6nnen Sie <code>source mailcow.conf &amp;&amp; docker compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME</code> ausf\u00fchren): <pre><code>INSERT INTO nc_users (uid, uid_lower) SELECT DISTINCT uid, LOWER(uid) FROM nc_users_external;\nINSERT INTO nc_sociallogin_connect (uid, identifier) SELECT DISTINCT uid, CONCAT(\"Mailcow-\", uid) FROM nc_users_external;\n</code></pre></p> <p>Wenn Sie Nextcloud bisher ohne mailcow-Authentifizierung, aber mit den gleichen Benutzernamen wie mailcow genutzt haben, k\u00f6nnen Sie Ihre bestehenden Benutzerkonten auch mit OAuth2 verkn\u00fcpfen.</p> <p>1. F\u00fchren Sie die folgenden Abfragen in Ihrer Nextcloud-Datenbank aus (wenn Sie Nextcloud mit dem Skript von mailcow einrichten, k\u00f6nnen Sie <code>source mailcow.conf &amp;&amp; docker compose exec mysql-mailcow mysql -u$DBUSER -p$DBPASS $DBNAME</code> ausf\u00fchren): <pre><code>INSERT INTO nc_sociallogin_connect (uid, identifier) SELECT DISTINCT uid, CONCAT(\"Mailcow-\", uid) FROM nc_users;\n</code></pre></p>"},{"location":"de/third_party/nextcloud/third_party-nextcloud/#aktualisieren","title":"Aktualisieren","text":"<p>Die Nextcloud-Instanz kann einfach mit dem Web-Update-Mechanismus aktualisiert werden. Bei gr\u00f6\u00dferen Updates k\u00f6nnen nach dem Update weitere \u00c4nderungen vorgenommen werden. Nachdem die Nextcloud-Instanz gepr\u00fcft wurde, werden Probleme angezeigt. Dies k\u00f6nnen z.B. fehlende Indizes in der DB oder \u00e4hnliches sein. Es wird angezeigt, welche Befehle ausgef\u00fchrt werden m\u00fcssen, diese m\u00fcssen im php-fpm-mailcow Container platziert werden.</p> <p>F\u00fchren Sie z.B. folgenden Befehl aus, um die fehlenden Indizes hinzuzuf\u00fcgen <code>docker exec -it -u www-data $(docker ps -f name=php-fpm-mailcow -q) bash -c \"php /web/nextcloud/occ db:add-missing-indices\"</code></p>"},{"location":"de/third_party/nextcloud/third_party-nextcloud/#fehlersuche-und-fehlerbehebung","title":"Fehlersuche und Fehlerbehebung","text":"<p>Es kann vorkommen, dass Sie die Nextcloud-Instanz von Ihrem Netzwerk aus nicht erreichen k\u00f6nnen. Dies kann daran liegen, dass der Eintrag Ihres Subnetzes im Array 'trusted_proxies' fehlt. Sie k\u00f6nnen \u00c4nderungen in der Nextcloud config.php in <code>data/web/nextcloud/config/*</code> vornehmen.</p> <pre><code>'trusted_proxies' =&gt;\n array (\n 0 =&gt; 'fd4d:6169:6c63:6f77::/64',\n 1 =&gt; '172.22.1.0/24',\n 2 =&gt; 'NewSubnet/24',\n ),\n</code></pre> <p>Nachdem die \u00c4nderungen vorgenommen wurden, muss der nginx-Container neu gestartet werden. <code>docker compose restart nginx-mailcow</code></p>"},{"location":"de/third_party/portainer/third_party-portainer/","title":"Portainer","text":"<p>Um Portainer zu aktivieren, m\u00fcssen die docker-compose.yml und site.conf f\u00fcr Nginx ge\u00e4ndert werden.</p> <p>1. Erstellen Sie eine neue Datei <code>docker-compose.override.yml</code> im mailcow-dockerized Stammverzeichnis und f\u00fcgen Sie die folgende Konfiguration ein <pre><code>version: '2.1'\nservices:\n portainer-mailcow:\n image: portainer/portainer-ce\n volumes:\n - /var/run/docker.sock:/var/run/docker.sock\n - ./data/conf/portainer:/data\n restart: always\n dns:\n - 172.22.1.254\n dns_search: mailcow-network\n networks:\n mailcow-network:\n aliases:\n - portainer\n</code></pre> 2a. Erstelle <code>data/conf/nginx/portainer.conf</code>: <pre><code>upstream portainer {\n server portainer-mailcow:9000;\n}\n\nmap $http_upgrade $connection_upgrade {\n default upgrade;\n '' close;\n}\n</code></pre></p> <p>2b. F\u00fcgen Sie einen neuen Standort f\u00fcr die Standard-Mailcow-Site ein, indem Sie die Datei <code>data/conf/nginx/site.portainer.custom</code> erstellen: <pre><code> location /portainer/ {\n proxy_http_version 1.1;\n proxy_set_header Host $http_host; # required for docker client's sake\n proxy_set_header X-Real-IP $remote_addr; # pass on real client's IP\n proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;\n proxy_set_header X-Forwarded-Proto $scheme;\n proxy_read_timeout 900;\n\n proxy_set_header Connection \"\";\n proxy_buffers 32 4k;\n proxy_pass http://portainer/;\n }\n\n location /portainer/api/websocket/ {\n proxy_http_version 1.1;\n proxy_set_header Upgrade $http_upgrade;\n proxy_set_header Connection $connection_upgrade;\n proxy_pass http://portainer/api/websocket/;\n }\n</code></pre></p> <p>3. \u00dcbernehmen Sie Ihre \u00c4nderungen: <pre><code>docker compose up -d &amp;&amp; docker compose restart nginx-mailcow\n</code></pre></p> <p>Nun k\u00f6nnen Sie einfach zu https://${MAILCOW_HOSTNAME}/portainer/ navigieren, um Ihre Portainer-Container-\u00dcberwachungsseite anzuzeigen. Sie werden dann aufgefordert, ein neues Passwort f\u00fcr den admin Account anzugeben. Nachdem Sie Ihr Passwort eingegeben haben, k\u00f6nnen Sie sich mit der Portainer UI verbinden.</p>"},{"location":"de/third_party/portainer/third_party-portainer/#reverse-proxy","title":"Reverse Proxy","text":"<p>Wenn Sie einen Reverse-Proxy verwenden, muss dieser noch konfiguriert werden die Websocket Requests richtig weiterzuleiten.</p> <p>Dies wird f\u00fcr die Docker Konsole und andere Komponenten ben\u00f6tigt.</p> <p>Hier ist ein Bespiel f\u00fcr Apache:</p> <pre><code>&lt;Location /portainer/api/websocket/&gt;\n RewriteEngine on\n RewriteCond %{HTTP:UPGRADE} ^WebSocket$ [NC]\n RewriteCond %{HTTP:CONNECTION} Upgrade$ [NC]\n RewriteRule /portainer/api/websocket/(.*) ws://127.0.0.1:8080/portainer/api/websocket/$1 [P]\n&lt;/Location&gt;\n</code></pre>"},{"location":"de/third_party/roundcube/third_party-roundcube/","title":"Roundcube","text":""},{"location":"de/third_party/roundcube/third_party-roundcube/#installation-von-roundcube","title":"Installation von Roundcube","text":"<p>Laden Sie Roundcube 1.6.x in das Web htdocs Verzeichnis herunter und entpacken Sie es (hier <code>rc/</code>): <pre><code># Pr\u00fcfen Sie, ob eine neuere Version vorliegt!\ncd daten/web\nwget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz | tar xfvz -\n\n# \u00c4ndern Sie den Ordnernamen\nmv roundcubemail-1.6.0 rc\n\n# Berechtigungen \u00e4ndern\nchown -R root: rc/\n</code></pre></p> <p>Wenn Sie eine Rechtschreibpr\u00fcfung ben\u00f6tigen, erstellen Sie eine Datei <code>data/hooks/phpfpm/aspell.sh</code> mit folgendem Inhalt und geben Sie dann <code>chmod +x data/hooks/phpfpm/aspell.sh</code> ein. Dadurch wird eine lokale Rechtschreibpr\u00fcfung installiert. Beachten Sie, dass die meisten modernen Webbrowser eine eingebaute Rechtschreibpr\u00fcfung haben, so dass Sie diese vielleicht nicht ben\u00f6tigen. <pre><code>#!/bin/bash\napk update\napk add aspell-de # oder jede andere Sprache\n</code></pre></p> <p>Erstellen Sie eine Datei <code>data/web/rc/config/config.inc.php</code> mit dem folgenden Inhalt. - \u00c4ndern Sie den Parameter <code>des_key</code> auf einen Zufallswert. Er wird verwendet, um Ihr IMAP-Passwort vor\u00fcbergehend zu speichern. - Der <code>db_prefix</code> ist optional, wird aber empfohlen. - Wenn Sie die Rechtschreibpr\u00fcfung im obigen Schritt nicht installiert haben, entfernen Sie den Parameter <code>spellcheck_engine</code> und ersetzen ihn durch <code>$config['enable_spellcheck'] = false;</code>. <pre><code>&lt;?php\nerror_reporting(0);\nif (!file_exists('/tmp/mime.types')) {\nfile_put_contents(\"/tmp/mime.types\", fopen(\"http://svn.apache.org/repos/asf/httpd/httpd/trunk/docs/conf/mime.types\", 'r'));\n}\n$config = array();\n$config['db_dsnw'] = 'mysql://' . getenv('DBUSER') . ':' . getenv('DBPASS') . '@mysql/' . getenv('DBNAME');\n$config['imap_host'] = 'tls://dovecot:143';\n$config['smtp_host'] = 'tls://postfix:587';\n$config['smtp_user'] = '%u';\n$config['smtp_pass'] = '%p';\n$config['support_url'] = '';\n$config['product_name'] = 'Roundcube Webmail';\n$config['des_key'] = 'yourrandomstring_changeme';\n$config['log_dir'] = '/dev/null';\n$config['temp_dir'] = '/tmp';\n$config['plugins'] = array(\n 'archive',\n 'managesieve'\n);\n$config['spellcheck_engine'] = 'aspell';\n$config['mime_types'] = '/tmp/mime.types';\n$config['imap_conn_options'] = array(\n 'ssl' =&gt; array('verify_peer' =&gt; false, 'verify_peer_name' =&gt; false, 'allow_self_signed' =&gt; true)\n);\n$config['enable_installer'] = true;\n$config['smtp_conn_options'] = array(\n 'ssl' =&gt; array('verify_peer' =&gt; false, 'verify_peer_name' =&gt; false, 'allow_self_signed' =&gt; true)\n);\n$config['db_prefix'] = 'mailcow_rc1';\n</code></pre></p> <p>Richten Sie Ihren Browser auf <code>https://myserver/rc/installer</code> und folgen Sie den Anweisungen. Initialisiere die Datenbank und verlasse das Installationsprogramm.</p> <p>L\u00f6schen Sie das Verzeichnis <code>data/web/rc/installer</code> nach einer erfolgreichen Installation!</p>"},{"location":"de/third_party/roundcube/third_party-roundcube/#konfigurieren-sie-die-managesieve-filterung","title":"Konfigurieren Sie die ManageSieve-Filterung","text":"<p>\u00d6ffnen Sie <code>data/web/rc/config/config.inc.php</code> und \u00e4ndern Sie die folgenden Parameter (oder f\u00fcgen Sie sie am Ende der Datei hinzu): <pre><code>$config['managesieve_host'] = 'tls://dovecot:4190';\n$config['managesieve_conn_options'] = array(\n 'ssl' =&gt; array('verify_peer' =&gt; false, 'verify_peer_name' =&gt; false, 'allow_self_signed' =&gt; true)\n);\n// Aktiviert separate Verwaltungsschnittstelle f\u00fcr Urlaubsantworten (au\u00dfer Haus)\n// 0 - kein separater Abschnitt (Standard),\n// 1 - Abschnitt \"Urlaub\" hinzuf\u00fcgen,\n// 2 - Abschnitt \"Urlaub\" hinzuf\u00fcgen, aber Abschnitt \"Filter\" ausblenden\n$config['managesieve_vacation'] = 1;\n</code></pre></p>"},{"location":"de/third_party/roundcube/third_party-roundcube/#aktivieren-sie-die-funktion-passwort-andern-in-roundcube","title":"Aktivieren Sie die Funktion \"Passwort \u00e4ndern\" in Roundcube","text":"<p>\u00d6ffnen Sie <code>data/web/rc/config/config.inc.php</code> und aktivieren Sie das Passwort-Plugin:</p> <pre><code>[...]\n$config['plugins'] = array(\n 'archive',\n 'password',\n);\n[...]\n</code></pre> <p>\u00d6ffnen Sie <code>data/web/rc/plugins/password/password.php</code>, suchen Sie nach <code>case 'ssha':</code> und f\u00fcgen Sie oben hinzu:</p> <pre><code> case 'ssha256':\n $salt = rcube_utils::random_bytes(8);\n $crypted = base64_encode( hash('sha256', $password . $salt, TRUE ) . $salt );\n $prefix = '{SSHA256}';\n break;\n</code></pre> <p>\u00d6ffnen Sie <code>data/web/rc/plugins/password/config.inc.php</code> und \u00e4ndern Sie die folgenden Parameter (oder f\u00fcgen Sie sie am Ende der Datei hinzu):</p> <pre><code>$config['password_driver'] = 'sql';\n$config['password_algorithm'] = 'ssha256';\n$config['password_algorithm_prefix'] = '{SSHA256}';\n$config['password_query'] = \"UPDATE mailbox SET password = %P WHERE username = %u\";\n</code></pre>"},{"location":"de/third_party/roundcube/third_party-roundcube/#carddav-adressbucher-in-roundcube-einbinden","title":"CardDAV Adressb\u00fccher in Roundcube einbinden","text":"<p>Laden Sie die neueste Version von RCMCardDAV in das Roundcube Plugin Verzeichnis und entpacken Sie es (hier <code>rc/plugins</code>): <pre><code>cd data/web/rc/plugins\nwget -O - https://github.com/mstilkerich/rcmcarddav/releases/download/v4.4.1/carddav-v4.4.1-roundcube16.tar.gz | tar xfvz -\nchown -R root: carddav/\n</code></pre></p> <p>Kopieren Sie die Datei <code>config.inc.php.dist</code> nach <code>config.inc.php</code> (hier in <code>rc/plugins/carddav</code>) und f\u00fcgen Sie die folgende Voreinstellung an das Ende der Datei an - vergessen Sie nicht, <code>mx.example.org</code> durch Ihren eigenen Hostnamen zu ersetzen: <pre><code>$prefs['SOGo'] = array(\n 'name' =&gt; 'SOGo',\n 'username' =&gt; '%u',\n 'password' =&gt; '%p',\n 'url' =&gt; 'https://mx.example.org/SOGo/dav/%u/',\n 'carddav_name_only' =&gt; true,\n 'use_categories' =&gt; true,\n 'active' =&gt; true,\n 'readonly' =&gt; false,\n 'refresh_time' =&gt; '02:00:00',\n 'fixed' =&gt; array( 'active', 'name', 'username', 'password', 'refresh_time' ),\n 'hide' =&gt; false,\n);\n</code></pre> Bitte beachten Sie, dass dieses Preset nur das Standard-Adressbuch integriert (dasjenige, das den Namen \"Pers\u00f6nliches Adressbuch\" tr\u00e4gt und nicht gel\u00f6scht werden kann). Weitere Adressb\u00fccher werden derzeit nicht automatisch erkannt, k\u00f6nnen aber manuell in den Roundcube-Einstellungen hinzugef\u00fcgt werden.</p> <p>Aktivieren Sie das Plugin, indem Sie <code>carddav</code> zu <code>$config['plugins']</code> in <code>rc/config/config.inc.php</code> hinzuf\u00fcgen.</p> <p>Wenn Sie die Standard-Adressb\u00fccher (die in der Roundcube-Datenbank gespeichert sind) entfernen m\u00f6chten, so dass nur die CardDAV-Adressb\u00fccher zug\u00e4nglich sind, f\u00fcgen Sie <code>$config['address_book_type'] = '';</code> in die Konfigurationsdatei <code>data/web/rc/config/config.inc.php</code> ein.</p> <p>Optional k\u00f6nnen Sie Roundcube's Link zu der mailcow Apps Liste hinzuf\u00fcgen. Um dies zu tun, \u00f6ffnen oder erstellen Sie <code>data/web/inc/vars.local.inc.php</code> und f\u00fcgen Sie den folgenden Code-Block hinzu:</p> <p>HINWEIS: Vergessen Sie nicht, das <code>&lt;?php</code> Trennzeichen in der ersten Zeile einzuf\u00fcgen</p> <pre><code>...\n$MAILCOW_APPS = array(\n array(\n 'name' =&gt; 'SOGo',\n 'link' =&gt; '/SOGo/'\n ),\n array(\n 'name' =&gt; 'Roundcube',\n 'link' =&gt; '/rc/'\n )\n);\n...\n</code></pre>"},{"location":"de/third_party/roundcube/third_party-roundcube/#aktualisierung-von-roundcube","title":"Aktualisierung von Roundcube","text":"<p>Ein Upgrade von Roundcube ist recht einfach: Gehen Sie auf die Github releases Seite f\u00fcr Roundcube und holen Sie sich den Link f\u00fcr die \"complete.tar.gz\" Datei f\u00fcr die gew\u00fcnschte Version. Dann folgen Sie den untenstehenden Befehlen und \u00e4ndern Sie die URL und den Namen des Roundcube-Ordners, falls n\u00f6tig. </p> <pre><code># Starten Sie eine Bash-Sitzung des mailcow PHP-Containers\ndocker exec -it mailcowdockerized-php-fpm-mailcow-1 bash\n\n# Installieren Sie die erforderliche Upgrade-Abh\u00e4ngigkeit, dann aktualisieren Sie Roundcube auf die gew\u00fcnschte Version\napk add rsync\ncd /tmp\nwget -O - https://github.com/roundcube/roundcubemail/releases/download/1.6.0/roundcubemail-1.6.0-complete.tar.gz | tar xfvz -\ncd roundcubemail-1.6.0\nbin/installto.sh /web/rc\n\n# Geben Sie 'Y' ein und dr\u00fccken Sie die Eingabetaste, um Ihre Installation von Roundcube zu aktualisieren.\n# Geben Sie 'N' ein, wenn folgender Dialog erscheint: \"Do you want me to fix your local configuration\".\n\n# Sollte im Output eine Notice kommen \"NOTICE: Update dependencies by running php composer.phar update --no-dev\" sollte an kurzerhand composer.phar downloaden und die updates durchf\u00fchren:\ncd /web/rc\nwget https://getcomposer.org/download/2.4.2/composer.phar\nphp composer.phar update --no-dev\n# Auf die Frage \"Do you trust \"roundcube/plugin-installer\" to execute code and wish to enable it now? (writes \"allow-plugins\" to composer.json) [y,n,d,?] \" bitte mit y antworten.\n\n# Entfernen Sie \u00fcbrig gebliebene Dateien\ncd /tmp\nrm -rf roundcube*\n\n# Falls Sie von Version 1.5 auf 1.6 updaten, dann f\u00fchren Sie folgende Befehle aus, um die Konfigurationsdatei anzupassen:`\nsed -i \"s/\\$config\\['default_host'\\].*$/\\$config\\['imap_host'\\]\\ =\\ 'tls:\\/\\/dovecot:143'\\;/\" /web/rc/config/config.inc.php\nsed -i \"/\\$config\\['default_port'\\].*$/d\" /web/rc/config/config.inc.php\nsed -i \"s/\\$config\\['smtp_server'\\].*$/\\$config\\['smtp_host'\\]\\ =\\ 'tls:\\/\\/postfix:587'\\;/\" /web/rc/config/config.inc.php\nsed -i \"/\\$config\\['smtp_port'\\].*$/d\" /web/rc/config/config.inc.php\nsed -i \"s/\\$config\\['managesieve_host'\\].*$/\\$config\\['managesieve_host'\\]\\ =\\ 'tls:\\/\\/dovecot:4190'\\;/\" /web/rc/config/config.inc.php\nsed -i \"/\\$config\\['managesieve_port'\\].*$/d\" /web/rc/config/config.inc.php\n</code></pre>"},{"location":"de/third_party/roundcube/third_party-roundcube/#administratoren-ohne-passwort-in-roundcube-einloggen-lassen","title":"Administratoren ohne Passwort in Roundcube einloggen lassen","text":"<p>Installieren Sie zun\u00e4chst das Plugin [dovecot_impersonate] (https://github.com/corbosman/dovecot_impersonate/) und f\u00fcgen Sie Roundcube als App hinzu (siehe oben).</p> <p>Editieren Sie <code>mailcow.conf</code> und f\u00fcgen Sie folgendes hinzu:</p> <pre><code># Erlaube Admins, sich in Roundcube als Email-Benutzer einzuloggen (ohne Passwort)\n# Roundcube mit Plugin dovecot_impersonate muss zuerst installiert werden\n\nALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE=y\n</code></pre> <p>Editieren Sie <code>docker-compose.override.yml</code> und verfassen/erweitern Sie den Abschnitt f\u00fcr <code>php-fpm-mailcow</code>:</p> <pre><code>version: '2.1'\nservices:\n php-fpm-mailcow:\n environment:\n - ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE=${ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE:-n}\n</code></pre> <p>Bearbeiten Sie <code>data/web/js/site/mailbox.js</code> und den folgenden Code nach <code>if (ALLOW_ADMIN_EMAIL_LOGIN) { ... }</code></p> <pre><code>if (ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE) {\n item.action += '&lt;a href=\"/rc-auth.php?login=' + encodeURIComponent(item.username) + '\" class=\"login_as btn btn-xs ' + btnSize + ' btn-primary\" target=\"_blank\"&gt;&lt;i class=\"bi bi-envelope-fill\"&gt;&lt;/i&gt; Roundcube&lt;/a&gt;';\n}\n</code></pre> <p>Bearbeiten Sie <code>data/web/mailbox.php</code> und f\u00fcgen Sie diese Zeile zum Array <code>$template_data</code> hinzu:</p> <pre><code> 'allow_admin_email_login_roundcube' =&gt; (preg_match(\"/^(yes|y)+$/i\", $_ENV[\"ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE\"])) ? 'true' : 'false',\n</code></pre> <p>Bearbeiten Sie <code>data/web/templates/mailbox.twig</code> und f\u00fcgen Sie diesen Code am Ende des [javascript-Abschnitts] ein (https://github.com/mailcow/mailcow-dockerized/blob/2f9da5ae93d93bf62a8c2b7a5a6ae50a41170c48/data/web/templates/mailbox.twig#L49-L57):</p> <pre><code> var ALLOW_ADMIN_EMAIL_LOGIN_ROUNDCUBE = {{ allow_admin_email_login_roundcube }};\n</code></pre> <p>Kopieren Sie den Inhalt der folgenden Dateien aus diesem Snippet:</p> <ul> <li><code>data/web/inc/lib/RoundcubeAutoLogin.php</code></li> <li><code>data/web/rc-auth.php</code></li> </ul> <p>Starten Sie schlie\u00dflich mailcow neu</p> <pre><code>docker compose down\ndocker compose up -d\n</code></pre>"},{"location":"de/troubleshooting/debug-admin_login_sogo/","title":"Admin-Anmeldung bei SOGo","text":"<p>Dies ist eine experimentelle Funktion, die es Admins und Dom\u00e4nenadmins erlaubt, sich direkt als Mailbox-Benutzer bei SOGo anzumelden, ohne das Passwort des Benutzers zu kennen. Dazu wird ein zus\u00e4tzlicher Link zu SOGo in der Mailbox-Liste (mailcow UI) angezeigt.</p> <p>Auch mehrere gleichzeitige Admin-Logins auf verschiedene Postf\u00e4cher sind mit dieser Funktion m\u00f6glich.</p>"},{"location":"de/troubleshooting/debug-admin_login_sogo/#aktivieren-der-funktion","title":"Aktivieren der Funktion","text":"<p>Die Funktion ist standardm\u00e4\u00dfig deaktiviert. Es kann in der <code>mailcow.conf</code> durch Setzen aktiviert werden: <pre><code>ALLOW_ADMIN_EMAIL_LOGIN=y\n</code></pre> und die betroffenen Container neu erstellen mit <pre><code>docker compose up -d\n</code></pre></p>"},{"location":"de/troubleshooting/debug-admin_login_sogo/#nachteile-bei-aktivierung","title":"Nachteile bei Aktivierung","text":"<ul> <li>Jeder SOGo-Seiten-Load und jede Active-Sync-Anfrage verursacht eine zus\u00e4tzliche Ausf\u00fchrung eines internen PHP-Skripts. Dies kann die Ladezeiten von SOGo / EAS beeintr\u00e4chtigen. In den meisten F\u00e4llen sollte dies nicht sp\u00fcrbar sein, aber Sie sollten es im Hinterkopf behalten, wenn Sie Performance-Probleme haben.</li> <li>SOGo zeigt keinen Logout-Link f\u00fcr Admin-Logins an, um sich normal anzumelden, muss man sich von der mailcow UI abmelden, so dass die PHP-Sitzung zerst\u00f6rt wird.</li> <li>Das Abonnieren des Kalenders oder Adressbuchs eines anderen Nutzers, w\u00e4hrend man als Admin eingeloggt ist, funktioniert nicht. Ebenso wenig funktioniert das Einladen anderer Nutzer zu Kalender-Events. Die Seite wird neu geladen, wenn diese Dinge versucht werden.</li> </ul>"},{"location":"de/troubleshooting/debug-admin_login_sogo/#technische-details","title":"Technische Details","text":"<p>Die Option SOGoTrustProxyAuthentication ist auf YES gesetzt, so dass SOGo dem x-webobjects-remote-user-Header vertraut.</p> <p>Dovecot erh\u00e4lt ein zuf\u00e4lliges Master-Passwort, das f\u00fcr alle Mailboxen g\u00fcltig ist, wenn es vom SOGo-Container verwendet wird.</p> <p>Ein Klick auf den SOGo-Button in der Mailbox-Liste \u00f6ffnet die Datei sogo-auth.php, die Berechtigungen pr\u00fcft, Session-Variablen setzt und auf die SOGo-Mailbox umleitet.</p> <p>Jede SOGo, CardDAV, CalDAV und EAS http-Anfrage verursacht einen zus\u00e4tzlichen, nginx-internen auth_request-Aufruf an sogo-auth.php mit folgendem Verhalten:</p> <ul> <li> <p>Wenn ein basic_auth-Header vorhanden ist, wird das Skript die Anmeldedaten anstelle von SOGo validieren und die folgenden Header bereitstellen: <code>x-webobjects-remote-user</code>, <code>Authorization</code> und <code>x-webobjects-auth-type</code>.</p> </li> <li> <p>Wenn kein basic_auth-Header vorhanden ist, wird das Skript nach einer aktiven Mailcow-Admin-Sitzung f\u00fcr den angeforderten E-Mail-Benutzer suchen und die gleichen Header bereitstellen, aber mit dem Dovecot-Master-Passwort, das im <code>Authorization</code>-Header verwendet wird.</p> </li> <li> <p>Wenn beides fehlschl\u00e4gt, werden die Header leer gesetzt, was SOGo dazu bringt, seine Standard-Authentifizierungsmethoden zu verwenden.</p> </li> </ul> <p>Alle diese Optionen/Verhaltensweisen sind deaktiviert, wenn die Option <code>ALLOW_ADMIN_EMAIL_LOGIN</code> in der Konfiguration nicht aktiviert ist.</p>"},{"location":"de/troubleshooting/debug-attach_service/","title":"In einen Container wechseln (CLI)","text":""},{"location":"de/troubleshooting/debug-attach_service/#anhangen-eines-containers-an-ihre-shell","title":"Anh\u00e4ngen eines Containers an Ihre Shell","text":"<p>Um einen Container an Ihre Shell anzuh\u00e4ngen, k\u00f6nnen Sie einfach folgendes ausf\u00fchren</p> <pre><code>docker compose exec $Dienst_Name /bin/bash\n</code></pre>"},{"location":"de/troubleshooting/debug-attach_service/#verbindung-zu-diensten-herstellen","title":"Verbindung zu Diensten herstellen","text":"<p>Wenn Sie sich direkt mit einem Dienst / einer Anwendung verbinden wollen, ist es immer eine gute Idee, <code>source mailcow.conf</code> zu benutzen, um alle relevanten Variablen in Ihre Umgebung zu bekommen.</p>"},{"location":"de/troubleshooting/debug-attach_service/#mysql","title":"MySQL","text":"<pre><code>Quelle mailcow.conf\ndocker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}\n</code></pre>"},{"location":"de/troubleshooting/debug-attach_service/#redis","title":"Redis","text":"<pre><code>docker compose exec redis-mailcow redis-cli\n</code></pre>"},{"location":"de/troubleshooting/debug-attach_service/#dienstbeschreibungen","title":"Dienstbeschreibungen","text":"<p>Hier ist eine kurze \u00dcbersicht, welcher Container / Dienst was macht:</p> Dienstname Dienstbeschreibungen unbound-mailcow Lokaler (DNSSEC) DNS-Aufl\u00f6ser mysql-mailcow Speichert die SOGo's und die meisten Einstellungen von mailcow postfix-mailcow Empf\u00e4ngt und sendet Mails dovecot-mailcow Benutzer-Logins und Siebfilter redis-mailcow Speicher-Backend f\u00fcr DKIM-Schl\u00fcssel und Rspamd rspamd-mailcow Mail-Filter-System. Verwendet f\u00fcr Av-Behandlung, DKIM-Signierung, Spam-Behandlung clamd-mailcow Scannt Anh\u00e4nge auf Viren olefy-mailcow Scannt angeh\u00e4ngte Office-Dokumente auf Makro-Viren solr-mailcow Bietet Volltextsuche in Dovecot sogo-mailcow Webmail-Client, der Microsoft ActiveSync und Cal- / CardDav verarbeitet nginx-mailcow Nginx Remote-Proxy, der alle mailcow-bezogenen HTTP / HTTPS-Anfragen bearbeitet acme-mailcow Automatisiert den Einsatz von HTTPS (SSL/TLS) Zertifikaten memcached-mailcow Internes Caching-System f\u00fcr mailcow-Dienste watchdog-mailcow Erm\u00f6glicht die \u00dcberwachung von Docker-Containern / Diensten php-fpm-mailcow Betreibt die mailcow Web UI netfilter-mailcow Fail2Ban \u00e4hnliche Integration"},{"location":"de/troubleshooting/debug-common_problems/","title":"H\u00e4ufig auftretende Probleme","text":"<p>Hier sind h\u00e4ufige Probleme und m\u00f6gliche L\u00f6sungen:</p>"},{"location":"de/troubleshooting/debug-common_problems/#mail-kommt-in-einer-schleife-zu-sich-selbst-zuruck","title":"Mail kommt in einer Schleife zu sich selbst zur\u00fcck.","text":"<p>Bitte \u00fcberpr\u00fcfen Sie in Ihrer mailcow UI, ob Sie die Domain als Backup MX eingestellt haben: </p>"},{"location":"de/troubleshooting/debug-common_problems/#ich-kann-mails-empfangen-aber-nicht-senden","title":"Ich kann Mails empfangen, aber nicht senden","text":"<p>Es gibt viele Gr\u00fcnde, die Sie daran hindern k\u00f6nnen, Mails zu versenden:</p> <ul> <li>Pr\u00fcfen Sie, ob Ihre IP-Adresse auf einer schwarzen Liste steht. Sie k\u00f6nnen dnsbl.info oder einen \u00e4hnlichen Dienst verwenden, um Ihre IP-Adresse zu \u00fcberpr\u00fcfen.</li> <li>Es gibt einige ISP-Router, die Mail-Ports f\u00fcr nicht auf der Blacklist stehende Domains blockieren. Bitte \u00fcberpr\u00fcfen Sie, ob Sie Ihren Server \u00fcber die Ports <code>465</code> oder <code>587</code> erreichen k\u00f6nnen:</li> </ul> <pre><code># telnet 74.125.133.27 465\nVersucht 74.125.133.27...\nVerbunden mit 74.125.133.27.\nEscape-Zeichen ist '^]'.\n</code></pre>"},{"location":"de/troubleshooting/debug-common_problems/#meine-mails-werden-als-spam-identifiziert","title":"Meine Mails werden als Spam identifiziert","text":"<p>Bitte lesen Sie unsere DNS-Konfiguration Anleitung.</p>"},{"location":"de/troubleshooting/debug-common_problems/#docker-compose-wirft-seltsame-fehler-aus","title":"docker compose wirft seltsame Fehler aus.","text":"<p>... wie:</p> <ul> <li><code>ERROR: Ung\u00fcltiges Interpolationsformat ...</code></li> <li><code>AttributeError: 'NoneType' Objekt hat kein Attribut 'keys'</code>.</li> <li>ERROR: In der Datei './docker-compose.yml' hat der Dienst 'version' keine Konfigurationsoptionen.</li> </ul> <p>Wenn Sie eine oder \u00e4hnliche Meldungen erhalten, w\u00e4hrend Sie versuchen, mailcow: dockerized auszuf\u00fchren, \u00fcberpr\u00fcfen Sie bitte, ob Sie die aktuellste Version von Docker und docker compose haben.</p>"},{"location":"de/troubleshooting/debug-common_problems/#container-xy-ist-ungesund","title":"Container XY ist ungesund","text":"<p>Dieser Fehler versucht Ihnen mitzuteilen, dass eine der (Gesundheits-)Bedingungen f\u00fcr einen bestimmten Container nicht erf\u00fcllt ist. Daher kann er nicht gestartet werden. Dies kann verschiedene Gr\u00fcnde haben, der h\u00e4ufigste ist ein aktualisierter Git-Klon, aber ein altes Docker-Image oder umgekehrt.</p> <p>Auch eine falsch konfigurierte Firewall kann einen solchen Fehler verursachen. Die Container m\u00fcssen in der Lage sein, \u00fcber das Netzwerk 172.22.1.1/24 miteinander zu kommunizieren.</p> <p>Es k\u00f6nnte auch eine falsch verkn\u00fcpfte Datei sein (z. B. ein SSL-Zertifikat), die den Start eines wichtigen Containers (nginx) verhindert. Pr\u00fcfen Sie daher immer Ihre Protokolle, um herauszufinden, woher das Problem kommt.</p>"},{"location":"de/troubleshooting/debug-common_problems/#adresse-bereits-in-gebrauch","title":"Adresse bereits in Gebrauch","text":"<p>Wenn Sie eine Fehlermeldung erhalten wie:</p> <pre><code>ERROR: for postfix-mailcow Cannot start service postfix-mailcow: driver failed programming external connectivity on endpoint mailcowdockerized_postfix-mailcow_1: Error starting userland proxy: listen tcp 0.0.0:25: bind: address already in use\n</code></pre> <p>w\u00e4hrend Sie versuchen, mailcow: dockerized zu starten / zu installieren, stellen Sie sicher, dass Sie unseren Abschnitt \u00fcber prerequisites befolgt haben.</p>"},{"location":"de/troubleshooting/debug-common_problems/#xyz-kann-keine-verbindung-zu","title":"XYZ kann keine Verbindung zu ...","text":"<p>Bitte \u00fcberpr\u00fcfen Sie Ihre lokale Firewall! Docker und iptables-basierte Firewalls erstellen manchmal widerspr\u00fcchliche Regeln. Deaktivieren Sie daher die Firewall auf Ihrem Host, um festzustellen, ob Ihre Verbindungsprobleme durch solche Konflikte verursacht werden. Wenn dies der Fall ist, m\u00fcssen Sie manuell entsprechende Regeln in Ihrer Host-Firewall erstellen, um die erforderlichen Verbindungen zuzulassen.</p> <p>Wenn Sie Verbindungsprobleme von zu Hause aus haben, \u00fcberpr\u00fcfen Sie bitte auch die Firewall Ihres ISP-Routers, da einige von ihnen den E-Mail-Verkehr \u00fcber die Ports SMTP (587) oder SMTPS (465) blockieren. Es k\u00f6nnte auch sein, dass Ihr ISP die Ports f\u00fcr SUBMISSION (25) blockiert.</p> <p>W\u00e4hrend Linux-Benutzer aus einer Vielzahl von Tools1 w\u00e4hlen k\u00f6nnen, um zu \u00fcberpr\u00fcfen, ob ein Port offen ist, steht Windows-Benutzern standardm\u00e4\u00dfig nur der PowerShell-Befehl <code>Test-NetConnection -ComputerName host -Port port</code> zur Verf\u00fcgung.</p> <p>Um Telnet auf einem Windows nach Vista zu aktivieren, lesen Sie bitte diese Anleitung oder geben Sie den folgenden Befehl in einem Terminal mit Administratorrechten ein:</p> <pre><code>dism /online /Enable-Feature /FeatureName:TelnetClient\n</code></pre>"},{"location":"de/troubleshooting/debug-common_problems/#inotify-instanz-limit-uberschritten-fur-benutzer-5000-uid-vmail-siehe-453","title":"Inotify-Instanz-Limit \u00fcberschritten f\u00fcr Benutzer 5000 (UID vmail) (siehe #453).","text":"<p>Docker-Container verwenden die inotify-Limits von Docker-Hosts. Wenn Sie sie auf Ihrem Docker-Host setzen, werden sie an den Container weitergegeben.</p>"},{"location":"de/troubleshooting/debug-common_problems/#dovecot-startet-standig-neu-siehe-2672","title":"Dovecot startet st\u00e4ndig neu (siehe #2672).","text":"<p>Stellen Sie sicher, dass Sie mindestens die folgenden Dateien in <code>data/assets/ssl</code> haben:</p> <pre><code>cert.pem\ndhparams.pem\nkey.pem\n</code></pre> <p>Wenn <code>dhparams.pem</code> fehlt, k\u00f6nnen Sie es mit Bash</p> <pre><code>openssl dhparam -out data/assets/ssl/dhparams.pem 4096\n</code></pre> <ol> <li> <p>netcat, nmap, openssl, [telnet](https://linux \u21a9</p> </li> </ol>"},{"location":"de/troubleshooting/debug-logs/","title":"Logs","text":"<p>Warning</p> <p>Dieser Abschnitt gilt nur f\u00fcr Docker's Standard-Logging-Treiber (JSON).</p> <p>Um die Logs aller mailcow: dockerized bezogenen Container zu sehen, k\u00f6nnen Sie <code>docker compose logs</code> innerhalb Ihres mailcow-dockerized Ordners verwenden, der Ihre <code>mailcow.conf</code> enth\u00e4lt. Dies ist normalerweise ein bisschen viel, aber Sie k\u00f6nnen die Ausgabe mit <code>--tail=100</code> auf die letzten 100 Zeilen pro Container k\u00fcrzen, oder ein <code>-f</code> hinzuf\u00fcgen, um die Live-Ausgabe aller Ihrer Dienste zu verfolgen.</p> <p>Um die Logs eines bestimmten Dienstes zu sehen, kann man <code>docker compose logs [options] $service_name</code> verwenden</p> <p>Info</p> <p>Die verf\u00fcgbaren Optionen f\u00fcr den Befehl docker compose logs sind:</p> <ul> <li>-no-color: Erzeugt eine einfarbige Ausgabe.</li> <li>-f: Der Log-Ausgabe folgen.</li> <li>-t: Zeitstempel anzeigen.</li> <li>--tail=\"all \": Anzahl der Zeilen, die ab dem Ende der Protokolle f\u00fcr jeden Container angezeigt werden sollen.</li> </ul>"},{"location":"de/troubleshooting/debug-mysql_aria/","title":"Abgest\u00fcrzte Aria-Speicher-Engine wiederherstellen","text":""},{"location":"de/troubleshooting/debug-mysql_aria/#mariadb-aria-wiederherstellung-nach-absturz","title":"MariaDB: Aria-Wiederherstellung nach Absturz","text":"<p>Wenn Ihr Server abgest\u00fcrzt ist und MariaDB eine Fehlermeldung \u00e4hnlich <code>[ERROR] mysqld: Aria recovery failed. Please run aria_chk -r on all Aria tables (*.MAI) and delete all aria_log.######## files</code>, k\u00f6nnen Sie Folgendes versuchen, um die Datenbank in einen gesunden Zustand zu bringen:</p> <p>Starten Sie den Stack und warten Sie, bis mysql-mailcow beginnt, einen Neustart zu melden. \u00dcberpr\u00fcfen Sie dies, indem Sie <code>docker compose ps</code> ausf\u00fchren.</p> <p>F\u00fchren Sie nun die folgenden Befehle aus:</p> <pre><code># Stoppe den Stack, f\u00fchre nicht \"down\" aus\ndocker compose stop\n# F\u00fchren Sie eine Bash in dem gestoppten Container als Benutzer mysql aus\ndocker compose run --rm --entrypoint '/bin/sh -c \"gosu mysql bash\"' mysql-mailcow\n# cd in das SQL-Datenverzeichnis\ncd /var/lib/mysql\n# aria_chk ausf\u00fchren\naria_chk --check --force */*.MAI\n# L\u00f6schen der aria-Logdateien\nrm aria_log.*\n</code></pre> <p>F\u00fchren Sie nun <code>docker compose down</code> gefolgt von <code>docker compose up -d</code> aus.</p>"},{"location":"de/troubleshooting/debug-mysql_upgrade/","title":"Manuelles MySQL-Upgrade","text":""},{"location":"de/troubleshooting/debug-mysql_upgrade/#fuhren-sie-ein-manuelles-mysql_upgrade-durch","title":"F\u00fchren Sie ein manuelles mysql_upgrade durch.","text":"<p>Dieser Schritt ist normalerweise nicht notwendig. </p> <pre><code>docker compose stop mysql-mailcow watchdog-mailcow\ndocker compose run --rm --entrypoint '/bin/sh -c \"gosu mysql mysqld --skip-grant-tables &amp; sleep 10 &amp;&amp; bash &amp;&amp; exit 0\"' mysql-mailcow\n</code></pre> <p>Sobald die SQL-Shell gestartet wurde, f\u00fchren Sie <code>mysql_upgrade</code> aus und verlassen den Container:</p> <pre><code>mysql_upgrade\nexit\n</code></pre>"},{"location":"de/troubleshooting/debug-reset_pw/","title":"Passw\u00f6rter zur\u00fccksetzen (inkl. SQL)","text":""},{"location":"de/troubleshooting/debug-reset_pw/#mailcow-admin-konto","title":"mailcow Admin-Konto","text":"<p>Setzt den mailcow Admin Account auf ein zuf\u00e4lliges Passwort zur\u00fcck. \u00c4ltere mailcow: dockerisierte Installationen k\u00f6nnen das <code>mailcow-reset-admin.sh</code> Skript in ihrem mailcow Stammverzeichnis (mailcow_path) finden.</p> <pre><code>cd mailcow_pfad\n./helper-scripts/mailcow-reset-admin.sh\n</code></pre>"},{"location":"de/troubleshooting/debug-reset_pw/#mysql-passworter-zurucksetzen","title":"MySQL-Passw\u00f6rter zur\u00fccksetzen","text":"<p>Stoppen Sie den Stack, indem Sie <code>docker compose stop</code> ausf\u00fchren.</p> <p>Wenn die Container heruntergefahren sind, f\u00fchren Sie diesen Befehl aus:</p> <pre><code>docker compose run --rm --entrypoint '/bin/sh -c \"gosu mysql mysqld --skip-grant-tables &amp; sleep 10 &amp;&amp; mysql -hlocalhost -uroot &amp;&amp; exit 0\"' mysql-mailcow\n</code></pre>"},{"location":"de/troubleshooting/debug-reset_pw/#1-datenbank-name-finden","title":"1. Datenbank-Name finden","text":"<pre><code># source mailcow.conf\n# docker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}\nMariaDB [(none)]&gt; show databases;\n+--------------------+\n| Database |\n+--------------------+\n| information_schema |\n| mailcow_database | &lt;=====\n| mysql |\n| performance_schema |\n+--------------------+\n4 rows in set (0.00 sec)\n</code></pre>"},{"location":"de/troubleshooting/debug-reset_pw/#2-einen-oder-mehrere-benutzer-zurucksetzen","title":"2. Einen oder mehrere Benutzer zur\u00fccksetzen","text":""},{"location":"de/troubleshooting/debug-reset_pw/#21-maria-db-104-altere-mailcow-installationen","title":"2.1 Maria DB &lt; 10.4 (\u00e4ltere mailcow-Installationen)","text":"<p>Sowohl \"password\" als auch \"authentication_string\" existieren. Derzeit wird \"password\" verwendet, aber besser ist es, beide zu setzen.</p> <pre><code>MariaDB [(none)]&gt; SELECT user FROM mysql.user;\n+--------------+\n| user |\n+--------------+\n| mailcow | &lt;=====\n| root |\n+--------------+\n2 rows in set (0.00 sec)\n\nMariaDB [(none)]&gt; FLUSH PRIVILEGES;\nMariaDB [(none)]&gt; UPDATE mysql.user SET authentication_string = PASSWORD('gotr00t'), password = PASSWORD('gotr00t') WHERE User = 'root';\nMariaDB [(none)]&gt; UPDATE mysql.user SET authentication_string = PASSWORD('mookuh'), password = PASSWORD('mookuh') WHERE User = 'mailcow' AND Host = '%';\nMariaDB [(none)]&gt; FLUSH PRIVILEGES;\n</code></pre>"},{"location":"de/troubleshooting/debug-reset_pw/#22-maria-db-104-aktuelle-mailcows","title":"2.2 Maria DB &gt;= 10.4 (aktuelle mailcows)","text":"<pre><code>MariaDB [(none)]&gt; SELECT user FROM mysql.user;\n+--------------+\n| user |\n+--------------+\n| mailcow | &lt;=====\n| root |\n+--------------+\n2 rows in set (0.00 sec)\n\nMariaDB [(none)]&gt; FLUSH PRIVILEGES;\nMariaDB [(none)]&gt; ALTER USER 'mailcow'@'%' IDENTIFIED BY 'mookuh';\nMariaDB [(none)]&gt; ALTER USER 'root'@'%' IDENTIFIED BY 'gotr00t'; MariaDB [(none)]&gt; ALTER USER 'root'@'%' IDENTIFIED BY 'gotr00t';\nMariaDB [(none)]&gt; ALTER USER 'root'@'localhost' IDENTIFIED BY 'gotr00t'; MariaDB [(none)]&gt; ALTER USER 'root'@'localhost' IDENTIFIED BY 'gotr00t';\nMariaDB [(none)]&gt; FLUSH PRIVILEGES;\n</code></pre>"},{"location":"de/troubleshooting/debug-reset_pw/#zwei-faktor-authentifizierung-entfernen","title":"Zwei-Faktor-Authentifizierung entfernen","text":""},{"location":"de/troubleshooting/debug-reset_pw/#fur-mailcow-webui","title":"F\u00fcr mailcow WebUI:","text":"<p>Dies funktioniert \u00e4hnlich wie das Zur\u00fccksetzen eines MySQL-Passworts, jetzt machen wir es vom Host aus, ohne uns mit dem MySQL CLI zu verbinden:</p> <pre><code>Quelle mailcow.conf\ndocker compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e \"DELETE FROM tfa WHERE username='YOUR_USERNAME';\"\n</code></pre>"},{"location":"de/troubleshooting/debug-reset_pw/#fur-sogo","title":"F\u00fcr SOGo:","text":"<pre><code>docker compose exec -u sogo sogo-mailcow sogo-tool user-preferences set defaults user@example.com SOGoGoogleAuthenticatorEnabled '{\"SOGoGoogleAuthenticatorEnabled\":0}'\n</code></pre>"},{"location":"de/troubleshooting/debug-reset_tls/","title":"TLS-Zertifikate zur\u00fccksetzen","text":"<p>Sollten Sie Probleme mit Ihrem Zertifikat, Schl\u00fcssel oder Let's Encrypt-Konto haben, versuchen Sie bitte, die TLS-Assets zur\u00fcckzusetzen:</p> <pre><code>source mailcow.conf\ndocker compose down\nrm -rf data/assets/ssl\nmkdir data/assets/ssl\nopenssl req -x509 -newkey rsa:4096 -keyout data/assets/ssl-example/key.pem -out data/assets/ssl-example/cert.pem -days 365 -subj \"/C=DE/ST=NRW/L=Willich/O=mailcow/OU=mailcow/CN=${MAILCOW_HOSTNAME}\" -sha256 -nodes\ncp -n -d data/assets/ssl-example/*.pem data/assets/ssl/\ndocker compose up -d\n</code></pre> <p>Dies wird mailcow stoppen, die ben\u00f6tigten Variablen beschaffen, ein selbstsigniertes Zertifikat erstellen und mailcow starten.</p> <p>Wenn Sie Let's Encrypt verwenden, sollten Sie vorsichtig sein, da Sie ein neues Konto und einen neuen Satz von Zertifikaten erstellen werden. Sie werden fr\u00fcher oder sp\u00e4ter auf ein Ratelimit sto\u00dfen.</p> <p>Bitte beachten Sie auch, dass fr\u00fchere TLSA-Datens\u00e4tze ung\u00fcltig werden.</p>"},{"location":"de/troubleshooting/debug-rm_volumes/","title":"Persistente Daten l\u00f6schen","text":"<p>Es kann sein, dass Sie einen Satz persistenter Daten entfernen wollen, um einen Konflikt zu l\u00f6sen oder um neu zu beginnen.</p> <p><code>mailcowdockerized</code> kann variieren und h\u00e4ngt von Ihrem Compose-Projektnamen ab (wenn er unver\u00e4ndert ist, ist <code>mailcowdockerized</code> der richtige Wert). Wenn Sie sich unsicher sind, f\u00fchren Sie <code>docker volume ls</code> aus, um eine vollst\u00e4ndige Liste zu erhalten.</p> <p>L\u00f6schen Sie ein einzelnes Volume:</p> <pre><code>docker volume rm mailcowdockerized_${VOLUME_NAME}\n</code></pre> <ul> <li>Entfernen Sie Volume <code>mysql-vol-1</code>, um alle MySQL-Daten zu entfernen.</li> <li>Entfernen Sie Volume <code>redis-vol-1</code> um alle Redis Daten zu entfernen.</li> <li>Volume <code>vmail-vol-1</code> entfernen, um alle Inhalte von <code>/var/vmail</code> zu entfernen, die in <code>dovecot-mailcow</code> eingebunden sind.</li> <li>Entfernen Sie das Volume <code>rspamd-vol-1</code>, um alle Rspamd-Daten zu entfernen.</li> <li>Entfernen Sie Volume <code>crypt-vol-1</code>, um alle Crypto-Daten zu entfernen. Dies wird alle Mails unlesbar machen.</li> </ul> <p>Alternativ dazu wird die Ausf\u00fchrung von <code>docker compose down -v</code> alle mailcow: dockerized volumes zerst\u00f6ren und alle zugeh\u00f6rigen Container und Netzwerke l\u00f6schen.</p>"},{"location":"de/troubleshooting/debug-rspamd_memory_leaks/","title":"Fortgeschritten: Memory-Leaks in Rspamd finden","text":"<p>Eine kurze Anleitung, um einen schlecht funktionierenden Rspamd tiefgehend zu analysieren.</p> <pre><code>docker compose exec rspamd-mailcow bash\n\nif ! grep -qi 'apt-stable-asan' /etc/apt/sources.list.d/rspamd.list; then\n sed -i 's/apt-stabil/apt-stabil-asan/i' /etc/apt/sources.list.d/rspamd.list\nfi\n\napt-get update ; apt-get upgrade rspamd\n\nnano /docker-entrypoint.sh\n\n# F\u00fcgen Sie vor \"exec \"$@\"\" die folgenden Zeilen ein:\n\nexport G_SLICE=always-malloc\nexport ASAN_OPTIONS=new_delete_type_mismatch=0:detect_leaks=1:detect_odr_violation=0:log_path=/tmp/rspamd-asan:quarantine_size_mb=2048:malloc_context_size=8:fast_unwind_on_malloc=0\n</code></pre> <p>Starten Sie Rspamd neu: <code>docker compose restart rspamd-mailcow</code></p> <p>Ihr Speicherverbrauch wird stark ansteigen, er wird auch stetig wachsen, was nicht mit einem m\u00f6glichen Memory Leak zusammenh\u00e4ngt, nach dem Sie suchen.</p> <p>Lassen Sie den Container f\u00fcr ein paar Minuten, Stunden oder Tage laufen (es sollte die Zeit sein, die Sie normalerweise warten, bis der Memory Leak \"passiert\") und starten Sie ihn neu: <code>docker compose restart rspamd-mailcow</code>.</p> <p>Betreten Sie nun den Container, indem Sie <code>docker compose exec rspamd-mailcow bash</code> ausf\u00fchren, wechseln Sie das Verzeichnis zu /tmp und kopieren Sie die asan-Dateien an den gew\u00fcnschten Ort oder laden Sie sie \u00fcber termbin.com hoch (<code>cat /tmp/rspamd-asan.* | nc termbin.com 9999</code>).</p>"},{"location":"de/troubleshooting/debug/","title":"Einf\u00fchrung","text":"<p>Wenn ein Problem auftritt, dann immer aus einem bestimmten Grund! Was Sie in einem solchen Fall tun sollten, ist:</p> <ol> <li>Lesen Sie Ihre Logs; verfolgen Sie sie, um herauszufinden, was der Grund f\u00fcr Ihr Problem ist.</li> <li>Folgen Sie den Hinweisen in Ihren Logdateien und beginnen Sie mit der Untersuchung.</li> <li>Starten Sie den gest\u00f6rten Dienst oder den gesamten Stack neu, um zu sehen, ob das Problem weiterhin besteht.</li> <li>Lesen Sie die Dokumentation des gest\u00f6rten Dienstes und suchen Sie in dessen Bugtracker nach Ihrem Problem.</li> <li>Durchsuchen Sie unsere Github Issues nach Ihrem Problem.</li> <li>Erstelle einen Github Issue in unserem GitHub Repository, wenn Sie glauben, dass Ihr Problem ein Fehler oder eine fehlende Funktion ist, die Sie dringend ben\u00f6tigen. Bitte stellen Sie aber sicher, dass Sie alle Logs und eine vollst\u00e4ndige Beschreibung Ihres Problems mitschicken. Bitte fragen Sie nicht nach Support auf Github.</li> <li>Treten Sie unserer Telegram-Community bei oder finden Sie die offiziellen Support-Pakete bei Servercow. Alternativ fragen Sie Twitter um Rat und taggen uns mit @mailcow_email.</li> </ol>"}]}