Change in docs

master
andryyy 2017-03-07 09:19:07 +01:00
parent 71886834ab
commit 3eae8345c4
6 changed files with 266 additions and 45 deletions

View File

@ -1,4 +1,4 @@
# SSL (and: How to use Let's Encrypt) ## SSL (and: How to use Let's Encrypt)
mailcow dockerized comes with a snakeoil CA "mailcow" and a server certificate in `data/assets/ssl`. Please use your own trusted certificates. mailcow dockerized comes with a snakeoil CA "mailcow" and a server certificate in `data/assets/ssl`. Please use your own trusted certificates.
@ -8,7 +8,7 @@ mailcow uses 3 domain names that should be covered by your new certificate:
- autodiscover.**example.org** - autodiscover.**example.org**
- autoconfig.**example.org** - autoconfig.**example.org**
**Obtain multi-SAN certificate by Let's Encrypt** ### Obtain multi-SAN certificate by Let's Encrypt
This is just an example of how to obtain certificates with certbot. There are several methods! This is just an example of how to obtain certificates with certbot. There are several methods!
@ -51,7 +51,7 @@ docker-compose restart postfix-mailcow dovecot-mailcow nginx-mailcow
When renewing certificates, run the last two steps (link + restart) as post-hook in a script. When renewing certificates, run the last two steps (link + restart) as post-hook in a script.
# Rspamd Web UI ## Rspamd Web UI
At first you may want to setup Rspamds web interface which provides some useful features and information. At first you may want to setup Rspamds web interface which provides some useful features and information.
1\. Generate a Rspamd controller password hash: 1\. Generate a Rspamd controller password hash:
@ -71,7 +71,7 @@ docker-compose restart rspamd-mailcow
Open https://${MAILCOW_HOSTNAME}/rspamd in a browser and login! Open https://${MAILCOW_HOSTNAME}/rspamd in a browser and login!
# Optional: Reverse proxy ## Optional: Reverse proxy
You don't need to change the Nginx site that comes with mailcow: dockerized. 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. This is very important to control access to Rspamd's web UI. mailcow: dockerized trusts the default gateway IP 172.22.1.1 as proxy. This is very important to control access to Rspamd's web UI.
@ -88,7 +88,7 @@ Recreate affected containers by running `docker-compose up -d`.
2\. Configure your local webserver as reverse proxy: 2\. Configure your local webserver as reverse proxy:
**Apache 2.4** ### Apache 2.4
``` ```
<VirtualHost *:443> <VirtualHost *:443>
ServerName mail.example.org ServerName mail.example.org
@ -114,7 +114,7 @@ Recreate affected containers by running `docker-compose up -d`.
</VirtualHost> </VirtualHost>
``` ```
**Nginx** ### Nginx
``` ```
server { server {
listen 443; listen 443;
@ -133,7 +133,7 @@ server {
} }
``` ```
# Sender and receiver model ## Sender and receiver model
When a mailbox is created, a user is allowed to send mail from and receive mail for his own mailbox address. When a mailbox is created, a user is allowed to send mail from and receive mail for his own mailbox address.
@ -162,7 +162,7 @@ Administrators and domain administrators can edit mailboxes to allow specific us
You can choose between mailbox users or completely disable the sender check for domains. You can choose between mailbox users or completely disable the sender check for domains.
**SOGo "mail from" addresses** ### SOGo "mail from" addresses
Mailbox users can, obviously, select their own mailbox address, as well as all alias addresses and aliases that exist through alias domains. Mailbox users can, obviously, select their own mailbox address, as well as all alias addresses and aliases that exist through alias domains.

View File

@ -0,0 +1,197 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Generator: Adobe Illustrator 17.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<svg
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:cc="http://creativecommons.org/ns#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:svg="http://www.w3.org/2000/svg"
xmlns="http://www.w3.org/2000/svg"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
version="1.1"
id="Layer_1"
x="0px"
y="0px"
width="446.22601"
height="396.02499"
viewBox="0 0 446.226 396.02499"
enable-background="new 0 0 1600 1200"
xml:space="preserve"
inkscape:version="0.91 r13725"
sodipodi:docname="cow_mailcow.svg"><metadata
id="metadata144"><rdf:RDF><cc:Work
rdf:about=""><dc:format>image/svg+xml</dc:format><dc:type
rdf:resource="http://purl.org/dc/dcmitype/StillImage" /><dc:title /></cc:Work></rdf:RDF></metadata><defs
id="defs142" /><sodipodi:namedview
pagecolor="#ffffff"
bordercolor="#666666"
borderopacity="1"
objecttolerance="10"
gridtolerance="10"
guidetolerance="10"
inkscape:pageopacity="0"
inkscape:pageshadow="2"
inkscape:window-width="1097"
inkscape:window-height="1138"
id="namedview140"
showgrid="false"
inkscape:zoom="1.1125147"
inkscape:cx="261.00704"
inkscape:cy="233.97883"
inkscape:window-x="814"
inkscape:window-y="0"
inkscape:window-maximized="0"
inkscape:current-layer="Layer_1"
fit-margin-top="0"
fit-margin-left="0"
fit-margin-right="0"
fit-margin-bottom="0" /><g
id="g3"
transform="translate(-576.88698,-401.988)"><g
id="g5"><g
id="g7"><g
id="email"><path
d="m 890.306,557.81 29.26,11.373 0,172.027 c 0,9.753 -7.895,17.649 -17.638,17.649 l -235.998,0 c -9.743,0 -17.638,-7.896 -17.638,-17.649 l 0,-172.026 29.259,-8.937"
id="path10"
inkscape:connector-curvature="0"
style="fill:#5a3620" /><path
d="M 758.871,656.221 649.49,747.45 c 2.507,6.648 8.901,11.409 16.44,11.409 l 235.998,0 c 7.536,0 13.933,-4.761 16.444,-11.409 l -107.402,-91.229 -52.099,0 z"
id="path12"
inkscape:connector-curvature="0"
style="fill:#fee70f;fill-opacity:0.89499998" /><g
id="g14"><path
d="m 810.391,656.686 107.981,90.764 c -0.331,0.881 -0.744,1.726 -1.205,2.536 l 0.028,0.035 c 1.501,-2.596 2.371,-5.594 2.371,-8.81 l 0,-172.004 -109.175,87.479 z"
id="path16"
inkscape:connector-curvature="0"
style="fill:#f9e82d;fill-opacity:1" /><path
d="m 649.49,747.45 108.864,-90.764 -110.061,-87.479 0,172.003 c 0,3.216 0.876,6.214 2.367,8.81 l 0.039,-0.035 c -0.466,-0.809 -0.877,-1.654 -1.209,-2.535 z"
id="path18"
inkscape:connector-curvature="0"
style="fill:#f9e82d;fill-opacity:1" /></g></g><path
d="m 961.81,681.214 c 0,0 -15.232,16.783 -42.244,14.73 l 0,28.14 c 13.328,-5.185 47.061,-20.036 56.854,-40.809 l -14.61,-2.061 z"
id="path20"
inkscape:connector-curvature="0"
style="fill:#b58765" /><path
d="m 984.594,658.413 c 3.59,-9.156 7.701,-11 9.346,-11.346 -49.276,4.542 -32.99,38.693 -32.99,38.693 0,0 6.229,14.728 26.532,13.892 27.063,0.461 35.631,-50.166 35.631,-50.166 -6.654,11.655 -26.404,9.876 -38.519,8.927 z"
id="path22"
inkscape:connector-curvature="0"
style="fill:#fef3df" /><ellipse
cx="787.75098"
cy="788.54498"
rx="210.864"
ry="9.4680004"
id="ellipse24"
style="fill:#f1f2f2" /><path
d="m 783.931,446.247 c -66.396,0 -120.223,53.827 -120.223,120.223 0,66.396 53.827,120.221 120.223,120.221 66.397,0 120.222,-53.825 120.222,-120.221 0,-66.395 -53.825,-120.223 -120.222,-120.223 z m -11.96,215.702 c -53.009,0 -95.982,-43.855 -95.982,-97.953 0,-54.098 42.973,-97.952 95.982,-97.952 53.007,0 95.98,43.855 95.98,97.952 -10e-4,54.098 -42.973,97.953 -95.98,97.953 z"
id="path26"
inkscape:connector-curvature="0"
style="opacity:0.1;fill:#3d5263" /><g
id="g28"><g
id="g30"><polyline
points="691.144,492.5 673.257,540.276 686.55,605.582 712.496,631.852 "
id="polyline32"
style="fill:#3d5263" /><g
id="g34"><g
id="g36"><polyline
points="658.248,450.81 673.501,487.076 693.836,496.903 724.04,458.731 "
id="polyline38"
style="fill:#fef3df" /><g
id="g40"><path
d="m 710.634,473.205 c 0,0 -22.482,-25.556 -49.793,-18.975 0,0 4.667,34.118 46.349,44.019 l 2.61,8.533 c 0,0 -65.612,-9.689 -59.339,-67.593 0,0 49.008,-19.884 72.598,15.106"
id="path42"
inkscape:connector-curvature="0"
style="fill:#b58765" /><polyline
points="909.697,450.81 894.447,487.076 874.114,496.903 843.907,458.731 "
id="polyline44"
style="fill:#fef3df" /><path
d="m 857.314,473.205 c 0,0 22.48,-25.556 49.79,-18.975 0,0 -4.664,34.118 -46.347,44.019 l -2.613,8.533 c 0,0 65.611,-9.689 59.339,-67.593 0,0 -49.006,-19.884 -72.6,15.106"
id="path46"
inkscape:connector-curvature="0"
style="fill:#b58765" /></g></g><path
d="m 726.619,647.067 55.945,0 16.40428,-204.81407 c -55.814,0 -112.41728,30.01707 -112.41728,77.85207 0,1.454 0.085,2.787 0.121,4.175 0.127,3.934 0.448,7.585 0.856,11.135 1.689,14.816 5.451,27.177 8.461,43.383 1.452,7.831 5.002,23.374 5.002,23.374 0.056,0.408 0.165,0.804 0.224,1.211 2.535,16.546 11.832,32.027 25.404,43.684 z"
id="path48"
inkscape:connector-curvature="0"
style="fill:#b58765"
sodipodi:nodetypes="cccscccccc" /><path
d="m 781.992,433.489 0,213.577 55.944,0 c 13.572,-11.657 22.867,-27.138 25.406,-43.684 0.058,-0.407 0.163,-0.803 0.221,-1.211 0,0 3.549,-15.543 5.002,-23.374 3.011,-16.206 6.774,-28.567 8.464,-43.381 0.405,-3.552 0.724,-7.203 0.846,-11.137 0.042,-1.388 0.126,-2.721 0.126,-4.175 0,-47.834 -40.191,-86.615 -96.009,-86.615 z"
id="path50"
inkscape:connector-curvature="0"
style="fill:#b58765" /><g
id="g52"><g
id="g54"><path
d="m 860.944,613.502 c 0,28.321 -35.091,51.289 -78.383,51.289 -43.299,0 -78.388,-22.968 -78.388,-51.289 0,-28.325 35.089,-51.289 78.388,-51.289 43.292,0 78.383,22.964 78.383,51.289 z"
id="path56"
inkscape:connector-curvature="0"
style="fill:#fef3df" /></g></g><g
id="g58"><g
id="g60"><g
id="g62"><path
d="m 747.044,605.582 c 0,6.215 -5.04,11.256 -11.261,11.256 -6.21,0 -11.253,-5.041 -11.253,-11.256 0,-6.223 5.043,-11.257 11.253,-11.257 6.22,0 11.261,5.034 11.261,11.257 z"
id="path64"
inkscape:connector-curvature="0"
style="fill:#5a3620" /></g></g><g
id="g66"><g
id="g68"><path
d="m 840.856,605.582 c 0,6.215 -5.037,11.256 -11.257,11.256 -6.218,0 -11.259,-5.041 -11.259,-11.256 0,-6.223 5.041,-11.257 11.259,-11.257 6.22,0 11.257,5.034 11.257,11.257 z"
id="path70"
inkscape:connector-curvature="0"
style="fill:#5a3620" /></g></g></g><g
id="g72"><path
d="m 875.228,525.835 c 0.354,-3.113 0.634,-6.311 0.743,-9.754 0.035,-1.218 0.109,-2.384 0.109,-3.661 0,-40.785 -33.369,-74.043 -80.237,-75.775 l -7.335,0.005 c -0.003,0 -0.003,0 -0.006,0 -0.007,0.018 -28.632,88.422 76.583,140.268 0.946,-4.317 2.078,-9.585 2.73,-13.088 2.64,-14.196 5.934,-25.021 7.413,-37.995 z"
id="path74"
inkscape:connector-curvature="0"
style="fill:#87654a" /></g><g
id="g76"><g
id="g78"><g
id="g80"><g
id="g82"><path
d="m 843.907,519.681 c 0,6.964 -5.65,12.611 -12.618,12.611 -6.963,0 -12.614,-5.646 -12.614,-12.611 0,-6.97 5.651,-12.614 12.614,-12.614 6.968,0 12.618,5.644 12.618,12.614 z"
id="path84"
inkscape:connector-curvature="0"
style="fill:#5a3620" /></g></g></g><g
id="g86"><g
id="g88"><g
id="g90"><path
d="m 752.028,519.681 c 0,6.964 -5.649,12.611 -12.612,12.611 -6.969,0 -12.612,-5.646 -12.612,-12.611 0,-6.97 5.642,-12.614 12.612,-12.614 6.964,0 12.612,5.644 12.612,12.614 z"
id="path92"
inkscape:connector-curvature="0"
style="fill:#5a3620" /></g></g></g><g
id="g94"><g
id="g96"><path
d="m 748.75,515.894 c 0,2.558 -2.071,4.629 -4.63,4.629 -2.558,0 -4.633,-2.072 -4.633,-4.629 0,-2.552 2.076,-4.626 4.633,-4.626 2.559,0 4.63,2.073 4.63,4.626 z"
id="path98"
inkscape:connector-curvature="0"
style="fill:#ffffff" /></g></g><g
id="g100"><g
id="g102"><path
d="m 839.771,515.894 c 0,2.558 -2.073,4.629 -4.629,4.629 -2.558,0 -4.631,-2.072 -4.631,-4.629 0,-2.552 2.072,-4.626 4.631,-4.626 2.555,0 4.629,2.073 4.629,4.626 z"
id="path104"
inkscape:connector-curvature="0"
style="fill:#ffffff" /></g></g></g></g><path
d="m 734.557,443.625 c 0,0 -18.236,-25.199 0,-41.637 0,0 13.125,32.012 40.242,31.502"
id="path106"
inkscape:connector-curvature="0"
style="fill:#fef3df" /><path
d="m 834.496,443.625 c 0,0 18.236,-25.199 0,-41.637 0,0 -13.126,32.012 -40.242,31.502"
id="path108"
inkscape:connector-curvature="0"
style="fill:#fef3df" /><path
d="m 786.264,431.965 c -66.396,0 -120.223,53.827 -120.223,120.223 0,66.396 53.827,120.221 120.223,120.221 66.397,0 120.222,-53.825 120.222,-120.221 10e-4,-66.395 -53.825,-120.223 -120.222,-120.223 z m -11.96,215.702 c -53.009,0 -95.982,-43.855 -95.982,-97.953 0,-54.098 42.973,-97.952 95.982,-97.952 53.007,0 95.979,43.855 95.979,97.952 0,54.098 -42.972,97.953 -95.979,97.953 z"
id="path110"
inkscape:connector-curvature="0"
style="fill:#f1f2f2" /></g><g
id="g112"><path
d="m 781.737,436.751 c 66.396,0 120.221,53.827 120.221,120.223 0,30.718 -11.526,58.74 -30.482,79.991 21.636,-21.74 35.01,-51.708 35.01,-84.803 0,-66.395 -53.825,-120.222 -120.222,-120.222 -35.678,0 -67.721,15.549 -89.739,40.233 21.772,-21.879 51.91,-35.422 85.212,-35.422 z"
id="path114"
inkscape:connector-curvature="0"
style="fill:#ffffff" /></g></g><path
d="m 919.566,695.944 c 0,0 7.562,0.712 13.317,-0.502 l 13.013,16.12 c 0,0 -17.639,9.525 -26.33,12.523 l 0,-28.141 z"
id="path116"
inkscape:connector-curvature="0"
style="opacity:0.1;fill:#3d5263" /></g><path
d="m 648.292,659.614 0,81.645 c 0,9.72 7.88,17.6 17.6,17.6 l 236.073,0 c 9.72,0 17.6,-7.88 17.6,-17.6 l 0,-24.902 c 10e-4,0 -175.814,35.524 -271.273,-56.743 z"
id="path124"
inkscape:connector-curvature="0"
style="opacity:0.1;fill:#3d5263" /></g><g
id="g126" /></g></svg>

After

Width:  |  Height:  |  Size: 12 KiB

View File

@ -2,6 +2,12 @@
[![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JWBSYHF4SMC68) [![Donate](https://img.shields.io/badge/Donate-PayPal-green.svg)](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=JWBSYHF4SMC68)
## Screenshots
You can find screenshots [on Imgur](http://imgur.com/a/oewYt).
## Overview
mailcow dockerized comes with **11 containers** linked in **one bridged network**. mailcow dockerized comes with **11 containers** linked in **one bridged network**.
- Dovecot - Dovecot

View File

@ -1,4 +1,4 @@
# Install mailcow ## Install mailcow
You need Docker and Docker Compose. You need Docker and Docker Compose.
@ -46,7 +46,7 @@ You can now access **https://${MAILCOW_HOSTNAME}** with the default credentials
The database will be initialized right after a connection to MySQL can be established. The database will be initialized right after a connection to MySQL can be established.
# Update mailcow ## Update mailcow
There is no update routine. You need to refresh your pulled repository clone and apply your local changes (if any). Actually there are many ways to merge local changes. Here is one to There is no update routine. You need to refresh your pulled repository clone and apply your local changes (if any). Actually there are many ways to merge local changes. Here is one to
stash all local changes, pull changes from the remote master branch and apply your stash on top of it. You will most likely see warnings about non-commited changes; you can ignore them: stash all local changes, pull changes from the remote master branch and apply your stash on top of it. You will most likely see warnings about non-commited changes; you can ignore them:

View File

@ -1,4 +1,4 @@
# Anonymize headers ## Anonymize headers
Save as `data/conf/postfix/mailcow_anonymize_headers.pcre`: Save as `data/conf/postfix/mailcow_anonymize_headers.pcre`:
@ -17,9 +17,9 @@ Add this to `data/conf/postfix/main.cf`:
smtp_header_checks = pcre:/opt/postfix/conf/mailcow_anonymize_headers.pcre smtp_header_checks = pcre:/opt/postfix/conf/mailcow_anonymize_headers.pcre
``` ```
# Backup and restore maildir (simple tar file) ## Backup and restore maildir (simple tar file)
**Backup** ### Backup
This line backups the vmail directory to a file backup_vmail.tar.gz in the mailcow root directory: This line backups the vmail directory to a file backup_vmail.tar.gz in the mailcow root directory:
``` ```
@ -32,7 +32,7 @@ docker run --rm -it -v $(docker inspect --format '{{ range .Mounts }}{{ if eq .D
You can change the path by adjusting ${PWD} (which equals to the current directory) to any path you have write-access to. 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 `backup_vmail.tar.gz` to any custom name, but leave the path as it is. Example: `[...] tar cvfz /backup/my_own_filename_.tar.gz` Set the filename `backup_vmail.tar.gz` to any custom name, but leave the path as it is. Example: `[...] tar cvfz /backup/my_own_filename_.tar.gz`
**Restore** ### Restore
``` ```
cd /path/to/mailcow-dockerized cd /path/to/mailcow-dockerized
source mailcow.conf source mailcow.conf
@ -40,19 +40,19 @@ DATE=$(date +"%Y%m%d_%H%M%S")
docker 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:jessie tar xvfz /backup/backup_vmail.tar.gz docker 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:jessie tar xvfz /backup/backup_vmail.tar.gz
``` ```
# Docker Compose Bash completion ## Docker Compose Bash completion
For the tab-tab... :-) For the tab-tab... :-)
``` ```
curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose curl -L https://raw.githubusercontent.com/docker/compose/$(docker-compose version --short)/contrib/completion/bash/docker-compose -o /etc/bash_completion.d/docker-compose
``` ```
# Black and Whitelist ## Black and Whitelist
Edit a domain as (domain) administrator to add an item to the filter table. Edit a domain as (domain) administrator to add an item to the filter table.
Beware that a mailbox user can login to mailcow and override a domain policy filter item. Beware that a mailbox user can login to mailcow and override a domain policy filter item.
# Change default language ## Change default language
Change `data/conf/sogo/sogo.conf` and replace "English" by your prefered language. Change `data/conf/sogo/sogo.conf` and replace "English" by your prefered language.
@ -62,7 +62,7 @@ Create a file `data/web/inc/vars.local.inc.php` and add "DEFAULT_LANG" with eith
$DEFAULT_LANG = "de"; $DEFAULT_LANG = "de";
``` ```
# Change UI theme ## Change UI theme
mailcow uses [Bootstrap](http://getbootstrap.com/), a HTML, CSS, and JS framework. mailcow uses [Bootstrap](http://getbootstrap.com/), a HTML, CSS, and JS framework.
@ -71,7 +71,7 @@ Open or create the file `data/web/inc/vars.local.inc.php` and change `DEFAULT_TH
<?php <?php
$DEFAULT_THEME = "paper"; $DEFAULT_THEME = "paper";
``` ```
# Customize Dockerfiles ## Customize Dockerfiles
Make your changes in `data/Dockerfiles/$service` and build the image locally: Make your changes in `data/Dockerfiles/$service` and build the image locally:
@ -85,7 +85,7 @@ Now auto-recreate modified containers:
docker-compose up -d docker-compose up -d
``` ```
# Disable sender addresses verification ## Disable sender addresses verification
This option is not best-practice and should only be implemented when there is no other option available to archive whatever you are trying to do. This option is not best-practice and should only be implemented when there is no other option available to archive whatever you are trying to do.
@ -107,7 +107,7 @@ docker-compose exec postfix-mailcow postmap /opt/postfix/conf/check_sasl_access
Restart the Postfix container. Restart the Postfix container.
# Install Roundcube ## Install Roundcube
Download Roundcube 1.3.x (beta at the time of Feb 2017) to the web htdocs directory and extract it (here `rc/`): Download Roundcube 1.3.x (beta at the time of Feb 2017) to the web htdocs directory and extract it (here `rc/`):
``` ```
@ -157,10 +157,11 @@ $config['smtp_conn_options'] = array(
``` ```
Point your browser to `https://myserver/rc/installer` and follow the instructions. Point your browser to `https://myserver/rc/installer` and follow the instructions.
Initialize the database and leave the installer. Initialize the database and leave the installer.
**Delete the directory `data/web/rc/installer` after a successful installation!** **Delete the directory `data/web/rc/installer` after a successful installation!**
**Enable change password function in Roundcube** ### Enable change password function in Roundcube
Open `data/web/rc/config.inc.php` and enable the password plugin: Open `data/web/rc/config.inc.php` and enable the password plugin:
@ -192,15 +193,15 @@ $config['password_algorithm_prefix'] = '{SSHA256}';
$config['password_query'] = "UPDATE mailbox SET password = %P WHERE username = %u"; $config['password_query'] = "UPDATE mailbox SET password = %P WHERE username = %u";
``` ```
# MySQL ## MySQL
**Connect to the MySQL database** ### Connect
``` ```
source mailcow.conf source mailcow.conf
docker-compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} docker-compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME}
``` ```
**Backup the database** ### Backup
``` ```
cd /path/to/mailcow-dockerized cd /path/to/mailcow-dockerized
source mailcow.conf source mailcow.conf
@ -208,21 +209,22 @@ DATE=$(date +"%Y%m%d_%H%M%S")
docker-compose exec mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} > backup_${DBNAME}_${DATE}.sql docker-compose exec mysql-mailcow mysqldump --default-character-set=utf8mb4 -u${DBUSER} -p${DBPASS} ${DBNAME} > backup_${DBNAME}_${DATE}.sql
``` ```
**Restore the database** ### Restore
``` ```
cd /path/to/mailcow-dockerized cd /path/to/mailcow-dockerized
source mailcow.conf source mailcow.conf
docker-compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} < backup_file.sql docker-compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} < backup_file.sql
``` ```
# Read logs ## Debugging
You can use `docker-compose logs $service-name` for all containers. You can use `docker-compose logs $service-name` for all containers.
Run `docker-compose logs` for all logs at once. Run `docker-compose logs` for all logs at once.
Follow the log output by running docker-compose with `logs -f`. Follow the log output by running docker-compose with `logs -f`.
# Redirect port 80 to 443 ## Redirect port 80 to 443
Since February the 28th 2017 mailcow does come with port 80 and 443 enabled. Since February the 28th 2017 mailcow does come with port 80 and 443 enabled.
@ -242,15 +244,15 @@ Restart the stack, changed containers will be updated:
`docker-compose up -d` `docker-compose up -d`
# Redis ## Redis
**Connect to redis key store** ### Client
``` ```
docker-compose exec redis-mailcow redis-cli docker-compose exec redis-mailcow redis-cli
``` ```
# Remove persistent data ## Remove persistent data
- Remove volume `mysql-vol-1` to remove all MySQL data. - Remove volume `mysql-vol-1` to remove all MySQL data.
- Remove volume `redis-vol-1` to remove all Redis data. - Remove volume `redis-vol-1` to remove all Redis data.
@ -260,7 +262,7 @@ docker-compose exec redis-mailcow redis-cli
Running `docker-compose down -v` will **destroy all mailcow: dockerized volumes** and delete any related containers. Running `docker-compose down -v` will **destroy all mailcow: dockerized volumes** and delete any related containers.
# Reset admin password ## Reset admin password
Reset mailcow admin to `admin:moohoo`: Reset mailcow admin to `admin:moohoo`:
1\. Drop admin table 1\. Drop admin table
@ -271,9 +273,9 @@ docker-compose exec mysql-mailcow mysql -u${DBUSER} -p${DBPASS} ${DBNAME} -e "DR
2\. Open mailcow UI to auto-init the db 2\. Open mailcow UI to auto-init the db
# Rspamd ## Rspamd
**Learn spam and ham** ### Learn spam and ham
Rspamd learns mail as spam or ham when you move a message in or out of the junk folder to any mailbox besides trash. 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 archived by using the Dovecot plugin "antispam" and a simple parser script. This is archived by using the Dovecot plugin "antispam" and a simple parser script.
@ -284,7 +286,7 @@ The bayes statistics are written to Redis as keys `BAYES_HAM` and `BAYES_SPAM`.
You can also use Rspamd's web ui to learn ham and/or spam. You can also use Rspamd's web ui to learn ham and/or spam.
**CLI tools** ### CLI tools
``` ```
docker-compose exec rspamd-mailcow rspamc --help docker-compose exec rspamd-mailcow rspamc --help
@ -293,7 +295,7 @@ docker-compose exec rspamd-mailcow rspamadm --help
See [Rspamd documentation](https://rspamd.com/doc/index.html) See [Rspamd documentation](https://rspamd.com/doc/index.html)
# Adjust service configurations ## Adjust service configurations
The most important configuration files are mounted from the host into the related containers: The most important configuration files are mounted from the host into the related containers:
``` ```
data/conf data/conf
@ -367,7 +369,7 @@ Just change the according configuration file on the host and restart the related
docker-compose restart service-mailcow docker-compose restart service-mailcow
``` ```
# Tagging ## Tagging
Mailbox users can tag their mail address like in `me+facebook@example.org` and choose between to setups to handle this tag: Mailbox users can tag their mail address like in `me+facebook@example.org` and choose between to setups to handle this tag:
@ -375,7 +377,7 @@ Mailbox users can tag their mail address like in `me+facebook@example.org` and c
2\. Prepend the tag to the subject: "[facebook] Subject" 2\. Prepend the tag to the subject: "[facebook] Subject"
# Two-factor authentication ## Two-factor authentication
So far two methods for TFA are impelemented. Both work with the fantastic [Yubikey](https://www.yubico.com). So far two methods for TFA are impelemented. Both work with the fantastic [Yubikey](https://www.yubico.com).
@ -387,18 +389,18 @@ As administrator you are able to temporary disable a domain adminsitrators TFA l
The key used to login will be displayed in green, while other keys remain grey. The key used to login will be displayed in green, while other keys remain grey.
**Yubi OTP** ### Yubi OTP
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 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. The API ID, API key and the first 12 characters (your YubiKeys ID in modhex) are stored in the MySQL table as secret.
**U2F** ### U2F
Only Google Chrome (+derivates) and Opera support U2F authentication to this day natively. Only Google Chrome (+derivates) and Opera support U2F authentication to this day natively.
For Firefox you will need to install the "U2F Support Add-on" as provided on [mozilla.org](https://addons.mozilla.org/en-US/firefox/addon/u2f-support-add-on/). For Firefox you will need to install the "U2F Support Add-on" as provided on [mozilla.org](https://addons.mozilla.org/en-US/firefox/addon/u2f-support-add-on/).
U2F works without an internet connection. U2F works without an internet connection.
# Why Bind? ## Why Bind?
For DNS blacklist lookups and DNSSEC. For DNS blacklist lookups and DNSSEC.

View File

@ -1,9 +1,25 @@
site_name: "mailcow: dockerized" site_name: "mailcow: dockerized"
repo_url: https://github.com/andryyy/mailcow-dockerized/ repo_url: https://github.com/andryyy/mailcow-dockerized
remote_branch: gh-pages remote_branch: gh-pages
theme: readthedocs theme: material
extra:
social:
- type: 'github'
link: 'https://github.com/andryyy/mailcow-dockerized'
palette:
primary: 'indigo'
accent: 'yellow'
logo: 'images/logo.svg'
markdown_extensions:
- admonition
- codehilite(guess_lang=true)
- footnotes
- meta
- toc(permalink=true)
pages: pages:
- 'Overview': 'index.md' - 'This is mailcow': 'index.md'
- 'Installation': 'install.md' - 'Installation': 'install.md'
- 'First Steps': 'first_steps.md' - 'First Steps': 'first_steps.md'
- 'Usage & Examples': 'u_and_e.md' - 'Usage & Examples': 'u_and_e.md'