added option to use non-default network-interface, resolves #1227 (#1621)

* added option to use non-default network-interface (#1227)
* minor (stylistic) changes
* properly working with Bash arrays for CONTAINER_NETWORKS
* cleanup to trigger rebuild
* added CODE_OF_CONDUCT to trigger rebuild
This commit is contained in:
Georg Lauterbach 2020-09-26 15:11:52 +02:00 committed by GitHub
parent a0791ef457
commit 8e8671bb42
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 138 additions and 42 deletions

View file

@ -36,6 +36,7 @@ Why I created this image: [Simple Mail Server with Docker](http://tvi.al/simple-
- Dovecot was downgraded
2. ELK was removed
3. New contributing guidelines were added
4. Added option to use non-default network interface
## Includes
@ -68,13 +69,13 @@ Before you open an issue, please have a look this `README`, the [Wiki](https://g
Recommended:
- 1 CPU
- 1 Core
- 1-2GB RAM
- Swap enabled for the container
Minimum:
- 1 CPU
- 1 vCore
- 512MB RAM
**Note:** You'll need to deactivate some services like ClamAV to be able to run on a host with 512MB of RAM. Even with 1G RAM you may run into problems without swap, see [FAQ](https://github.com/tomav/docker-mailserver/wiki/FAQ-and-Tips).
@ -103,7 +104,10 @@ curl -o env-mailserver https://raw.githubusercontent.com/tomav/docker-mailserver
- These files supports only simple `VAR=VAL` lines (see [Documentation](https://docs.docker.com/compose/env-file/)).
- Don't quote your values.
- Variable substitution is *not* supported (e.g. `OVERRIDE_HOSTNAME=$HOSTNAME.$DOMAINNAME`).
- Install [docker-compose](https://docs.docker.com/compose/) in the version `1.7` or higher.
- [Install the latest docker-compose](https://docs.docker.com/compose/install/)
**Note:**: Variables in `.env` are expanded in the `docker-compose.yml` file **only** and **not** in the container. The file `env-mailserver` serves this case where environment variables are used in the container.
**Note:** If you want to use a bare domain (host name equals domain name) see [FAQ](https://github.com/tomav/docker-mailserver/wiki/FAQ-and-Tips#can-i-use-nakedbare-domains-no-host-name).
@ -160,9 +164,9 @@ version: '3.8'
services:
mail:
image: tvial/docker-mailserver:latest
hostname: mail # ${HOSTNAME}
domainname: domain.com # ${DOMAINNAME}
container_name: mail # ${CONTAINER_NAME}
hostname: mail # ${HOSTNAME}
domainname: domain.com # ${DOMAINNAME}
container_name: mail # ${CONTAINER_NAME}
ports:
- "25:25"
- "143:143"
@ -200,9 +204,9 @@ version: '3.8'
services:
mail:
image: tvial/docker-mailserver:latest
hostname: mail # ${HOSTNAME}
domainname: domain.com # ${DOMAINNAME}
container_name: mail # ${CONTAINER_NAME}
hostname: mail # ${HOSTNAME}
domainname: domain.com # ${DOMAINNAME}
container_name: mail # ${CONTAINER_NAME}
ports:
- "25:25"
- "143:143"
@ -256,10 +260,6 @@ volumes:
If an option doesn't work as documented here, check if you are running the latest image! Values in **bold** are the default values.
### Reminder
Please note: Variables in `.env` are expanded in the `docker-compose.yml` file **only** and **not** in the container. The file `env-mailserver` serves this case where environment variables are used in the container.
### Assignments
#### General
@ -346,6 +346,12 @@ Set different options for mynetworks option (can be overwrite in postfix-main.cf
Note: you probably want to [set `POSTFIX_INET_PROTOCOLS=ipv4`](#postfix_inet_protocols) to make it work fine with Docker.
##### NETWORK_INTERFACE
In case your network interface differs from `eth0`, e.g. when you are using HostNetworking in Kubernetes, you can set this to whatever interface you want. This interface will then be used.
- **empty** => `eth0`
##### VIRUSMAILS_DELETE_DELAY
Set how many days a virusmail will stay on the server before being deleted