Merge pull request #204 from 707Alex707/master

Added instructions for binding to multiple addresses
Dieser Commit ist enthalten in:
André Peters 2020-03-17 11:37:20 +01:00 committet von GitHub
Commit 5a07eee671
Es konnte kein GPG-SchlĂĽssel zu dieser Signatur gefunden werden
GPG-SchlĂĽssel-ID: 4AEE18F83AFDEB23
2 geänderte Dateien mit 78 neuen und 6 gelöschten Zeilen

Datei anzeigen

@ -0,0 +1,71 @@
!!! warning
Changing the binding does not affect source NAT. See [SNAT](https://mailcow.github.io/mailcow-dockerized-docs/firststeps-snat/) for required steps.
## IPv4 binding
To adjust one or multiple IPv4 bindings, open `mailcow.conf` and edit one, mulitple or all variables as per your needs:
```
# For technical reasons, http bindings are a bit different from other service bindings.
# You will find the following variables, separated by a bind address and its port:
HTTP_PORT=80
HTTP_BIND=0.0.0.0
HTTPS_PORT=443
HTTPS_BIND=0.0.0.0
# Other services are bound by using the following format:
# SMTP_PORT=25 equals to SMTP_PORT=0.0.0.0:25
# SMTP_PORT=1.2.3.4:25 will bind SMTP to the IP 1.2.3.4 on port 25
# doveadm, SQL as well as Solr are bound to local ports only, please do not change that, unless you know what you are doing.
SMTP_PORT=25
SMTPS_PORT=465
SUBMISSION_PORT=587
IMAP_PORT=143
IMAPS_PORT=993
POP_PORT=110
POPS_PORT=995
SIEVE_PORT=4190
DOVEADM_PORT=127.0.0.1:19991
SQL_PORT=127.0.0.1:13306
SOLR_PORT=127.0.0.1:18983
```
To apply your changes, run `docker-compose down` followed by `docker-compose up -d`.
## IPv6 binding
Changing IPv6 bindings is different from IPv4. Again, this has a technical background.
A `docker-compose.override.yml` file will be used instead of editing the `docker-compose.yml` file directly. This is to maintain updatability, as the `docker-compose.yml` file gets updated regularly and your changes will most likely be overwritten.
Edit to create a file `docker-compose.override.yml` with the following content. Its content will be merged with the productive `docker-compose.yml` file.
An imaginary IPv6 **2a00:dead:beef::abc** is given. The first suffix `:PORT1` defines the external port, while the second suffix `:PORT2` routes to the corresponding port inside the container and must not be changed.
```
version: '2.1'
services:
dovecot-mailcow:
ports:
- '2a00:dead:beef::abc:143:143'
- '2a00:dead:beef::abc:993:993'
- '2a00:dead:beef::abc:110:110'
- '2a00:dead:beef::abc:995:995'
- '2a00:dead:beef::abc:4190:4190'
postfix-mailcow:
ports:
- '2a00:dead:beef::abc:25:25'
- '2a00:dead:beef::abc:465:465'
- '2a00:dead:beef::abc:587:587'
nginx-mailcow:
ports:
- '2a00:dead:beef::abc:80:80'
- '2a00:dead:beef::abc:443:443'
```
To apply your changes, run `docker-compose down` followed by `docker-compose up -d`.

Datei anzeigen

@ -22,22 +22,23 @@ markdown_extensions:
nav: nav:
- 'Information & Support': 'index.md' - 'Information & Support': 'index.md'
- 'Prerequisites': - 'Prerequisites':
- 'Prepare Your System': 'prerequisite-system.md' - 'Prepare your system': 'prerequisite-system.md'
- 'DNS Setup': 'prerequisite-dns.md' - 'DNS setup': 'prerequisite-dns.md'
- 'Installation, Update & Migration': - 'Installation, Update & Migration':
- 'Installation': 'i_u_m_install.md' - 'Installation': 'i_u_m_install.md'
- 'Update': 'i_u_m_update.md' - 'Update': 'i_u_m_update.md'
- 'Migration': 'i_u_m_migration.md' - 'Migration': 'i_u_m_migration.md'
- 'First Steps (optional)': - 'First Steps (optional)':
- 'SSL': 'firststeps-ssl.md' - 'Advanced SSL': 'firststeps-ssl.md'
- 'Rspamd Web UI': 'firststeps-rspamd_ui.md' - 'Rspamd UI': 'firststeps-rspamd_ui.md'
- 'Reverse Proxy': 'firststeps-rp.md' - 'Reverse Proxy': 'firststeps-rp.md'
- 'SNAT': 'firststeps-snat.md' - 'SNAT': 'firststeps-snat.md'
- 'Disable IPv6': 'firststeps-disable_ipv6.md' - 'Disable IPv6': 'firststeps-disable_ipv6.md'
- 'Setup a relayhost': 'firststeps-relayhost.md' - 'Relayhosts': 'firststeps-relayhost.md'
- 'Logging': 'firststeps-logging.md' - 'Logging': 'firststeps-logging.md'
- 'Local MTA on Docker host': 'firststeps-local_mta.md' - 'Local MTA on Docker host': 'firststeps-local_mta.md'
- 'Sync Jobs Migration': 'firststeps-sync_jobs_migration.md' - 'Sync job migration': 'firststeps-sync_jobs_migration.md'
- 'IP bindings': 'firststeps-ip_bindings.md'
- 'Models': - 'Models':
- 'Sender and receiver model': 'model-sender_rcv.md' - 'Sender and receiver model': 'model-sender_rcv.md'
- 'ACL': 'model-acl.md' - 'ACL': 'model-acl.md'