Job offer: Upgrade DMS from v6.2.0 and configuration check need *CHANGED #4279
Replies: 3 comments 10 replies
-
|
Are you really on v1.3? I only joined the project late 2020 when migration from the original project author to an organization occurred (releases v8 and above since Jan 2021), while the original image It would seem the version you have does not actually exist officially? How old is your deployment? From v8 we have a CHANGELOG to track breaking changes which should help from then onwards. However if you really have a version of DMS before Jan 2021 it's going to be important for you to establish your actual customizations from non-defaults.
How many user accounts / mailboxes do you have? Aliases? If these are not much you should be able to re-create them manually, otherwise writing a script to adapt to any format changes should be viable. Your deployment presumably has the Are you using volume bind mounts, or named data volumes? Assuming your deployment has the same locations we use for persisting data via volumes:
If you use a If the server you are running DMS on has not been kept updated, you'll want to address that. Our debugging / troubleshooting docs page details compatibility expectations. If you're really still running on a docker host from about 8 years ago that's absolutely something that should be updated, along with kernel and cgroups to v2. TLS cipher suite compatibility has changed, if you have any old client device/software that is likewise not received updates/upgrades, it may have compatibility issues if it cannot use expected TLS 1.2 or TLS 1.3 cipher suites. I can advise here in public as time permits, but I'm presently quite busy elsewhere. While I can take on paid work, it's not what I would consider affordable as I charge considerably more to deviate to and prioritize new work. |
Beta Was this translation helpful? Give feedback.
-
|
I am looking for someone experienced to support that migration. |
Beta Was this translation helpful? Give feedback.
-
|
Before and after migration attempt Docker Compose (old configuration)services:
mail:
image: localhost/docker-mailserver:1.3
build:
context: .
hostname: mail.example.com
domainname: example.com
container_name: mail-container
restart: always
dns: 192.168.1.2
networks:
openldap_internal:
dns_internal:
monitoring_internal:
ipv4_address: 192.168.2.1
internal:
ipv4_address: 192.168.3.1
aliases:
- mail
- smtp
- third.example.com
ports:
- "25:25"
- "110:110"
- "143:143"
- "465:465"
- "587:587"
- "993:993"
- "995:995"
volumes:
- maildata:/var/mail
- maillogs:/var/log/mail
- ./config/:/tmp/docker-mailserver/
- ./cron/sa-learn:/etc/cron.d/sa-learn
- mailcert:/etc/letsencrypt
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
env_file:
- .env
- env-mailserver
cap_add:
- NET_ADMIN
- SYS_PTRACE
letsencrypt:
build:
context: ./certbot
image: localhost/letsencrypt:latest
container_name: certbot
restart: always
volumes:
- type: bind
source: /c/srv/docker/volumes/mail/cert/
target: /etc/letsencrypt
networks:
internal:
ipv4_address: 192.168.3.2
roundcube:
image: localhost/roundcubemail:latest-apache
container_name: roundcube
restart: always
volumes:
- roundcube:/var/www/html
- roundcube_db:/var/roundcube/db
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
- ./config_roundcube/:/var/roundcube/config/
environment:
- ROUNDCUBEMAIL_DB_TYPE=sqlite
- ROUNDCUBEMAIL_DEFAULT_HOST=ssl://third.example.com
- ROUNDCUBEMAIL_DEFAULT_PORT=993
- ROUNDCUBEMAIL_SMTP_SERVER=tls://third.example.com
- ROUNDCUBEMAIL_SMTP_PORT=587
- ROUNDCUBEMAIL_PLUGINS=archive,zipdownload,managesieve,markasjunk,password
networks:
internal:
ipv4_address: 192.168.3.3
openldap_internal:
wireguard_internal:
ipv4_address: 192.168.4.1
traefik_internal:
ipv4_address: 192.168.5.1
volumes:
maildata:
driver: local-persist
driver_opts:
mountpoint: /c/srv/docker/volumes/mail/data
maillogs:
driver: local-persist
driver_opts:
mountpoint: /c/srv/docker/volumes/mail/logs
mailcert:
driver: local-persist
driver_opts:
mountpoint: /c/srv/docker/volumes/mail/cert
roundcube:
driver: local-persist
driver_opts:
mountpoint: /c/srv/docker/volumes/mail/roundcube/www
roundcube_db:
driver: local-persist
driver_opts:
mountpoint: /c/srv/docker/volumes/mail/roundcube/db
networks:
internal:
ipam:
config:
- subnet: 192.168.3.0/24
openldap_internal:
external: true
dns_internal:
external: true
traefik_internal:
external: true
wireguard_internal:
external: true
monitoring_internal:
external: trueenv file (old configuration)# -----------------------------------------------------------------------------------------------------------------------------
# --------------------- General Settings --------------------------------------------------------------------------------------
# -----------------------------------------------------------------------------------------------------------------------------
# empty => uses the `hostname` command to get the mail server's canonical hostname
# => Specify a fully-qualified domainname to serve mail for. This is used for many of the config features so if you can't set your hostname (e.g. you're in a container platform that doesn't let you) specify it in this environment variable.
OVERRIDE_HOSTNAME=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# 0 => Debug disabled
# 1 => Enables debug on startup
DMS_DEBUG=0
# 0 => mail state in default directories
# 1 => consolidate all states into a single directory (`/var/mail-state`) to allow persistence using docker volumes
ONE_DIR=1
# empty => postmaster@domain.com
# => Specify the postmaster address
POSTMASTER_ADDRESS=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# Set different options for mynetworks option (can be overwrite in postfix-main.cf)
# **WARNING**: Adding the docker network's gateway to the list of trusted hosts, e.g. using the `network` or
# `connected-networks` option, can create an open relay
# https://github.com/tomav/docker-mailserver/issues/1405#issuecomment-590106498
# empty => localhost only
# host => Add docker host (ipv4 only)
# network => Add all docker containers (ipv4 only)
# connected-networks => Add all connected docker networks (ipv4 only)
PERMIT_DOCKER=host
# empty => modern
# modern => Enables TLSv1.2 and modern ciphers only. (default)
# intermediate => Enables TLSv1, TLSv1.1 and TLSv1.2 and broad compatibility ciphers.
# old => NOT implemented. If you really need it, then customize the TLS ciphers overriding postfix and dovecot settings
# (https://github.com/tomav/docker-mailserver/wiki/)
TLS_LEVEL=
#TLS_LEVEL=intermediate
# Configures the handling of creating mails with forged sender addresses.
#
# empty => (not recommended, but default for backwards compatibility reasons)
# Mail address spoofing allowed. Any logged in user may create email messages with a forged sender address.
# See also https://en.wikipedia.org/wiki/Email_spoofing
# 1 => (recommended) Mail spoofing denied. Each user may only send with his own or his alias addresses.
# Addresses with extension delimiters(http://www.postfix.org/postconf.5.html#recipient_delimiter) are not able to send messages.
SPOOF_PROTECTION=1
# Enables the Sender Rewriting Scheme. SRS is needed if your mail server acts as forwarder. See [postsrsd](https://github.com/roehling/postsrsd/blob/master/README.md#sender-rewriting-scheme-crash-course) for further explanation.
# - **0** => Disabled
# - 1 => Enabled
ENABLE_SRS=0
# 1 => Enables POP3 service
# empty => disables POP3
#ENABLE_POP3=
ENABLE_POP3=1
#ENABLE_CLAMAV=0
ENABLE_CLAMAV=1
# If you enable Fail2Ban, don't forget to add the following lines to your `docker-compose.yml`:
# cap_add:
# - NET_ADMIN
# Otherwise, `iptables` won't be able to ban IPs.
ENABLE_FAIL2BAN=1
# 1 => Enables Managesieve on port 4190
# empty => disables Managesieve
ENABLE_MANAGESIEVE=1
# **enforce** => Allow other tests to complete. Reject attempts to deliver mail with a 550 SMTP reply, and log the helo/sender/recipient information. Repeat this test the next time the client connects.
# drop => Drop the connection immediately with a 521 SMTP reply. Repeat this test the next time the client connects.
# ignore => Ignore the failure of this test. Allow other tests to complete. Repeat this test the next time the client connects. This option is useful for testing and collecting statistics without blocking mail.
POSTSCREEN_ACTION=enforce
# empty => all daemons start
# 1 => only launch postfix smtp
SMTP_ONLY=
# Please read [the SSL page in the wiki](https://github.com/tomav/docker-mailserver/wiki/Configure-SSL) for more information.
#
# empty => SSL disabled
# letsencrypt => Enables Let's Encrypt certificates
# custom => Enables custom certificates
# manual => Let's you manually specify locations of your SSL certificates for non-standard cases
# self-signed => Enables self-signed certificates
SSL_TYPE=letsencrypt
# Set how many days a virusmail will stay on the server before being deleted
# empty => 7 days
VIRUSMAILS_DELETE_DELAY=
# This Option is activating the Usage of POSTFIX_DAGENT to specify a lmtp client different from default dovecot socket.
# empty => disabled
# 1 => enabled
ENABLE_POSTFIX_VIRTUAL_TRANSPORT=
# Enabled by ENABLE_POSTFIX_VIRTUAL_TRANSPORT. Specify the final delivery of postfix
#
# empty => fail
# `lmtp:unix:private/dovecot-lmtp` (use socket)
# `lmtps:inet:<host>:<port>` (secure lmtp with starttls, take a look at https://sys4.de/en/blog/2014/11/17/sicheres-lmtp-mit-starttls-in-dovecot/)
# `lmtp:<kopano-host>:2003` (use kopano as mailstore)
# etc.
POSTFIX_DAGENT=
# Set the mailbox size limit for all users. If set to zero, the size will be unlimited (default).
#
# empty => 0
POSTFIX_MAILBOX_SIZE_LIMIT=
# Set the message size limit for all users. If set to zero, the size will be unlimited (not recommended!)
#
# empty => 10240000 (~10 MB)
POSTFIX_MESSAGE_SIZE_LIMIT=30720000
# Enables regular pflogsumm mail reports.
# This is a new option. The old REPORT options are still supported for backwards compatibility. If this is not set and reports are enabled with the old options, logrotate will be used.
#
# not set => No report
# daily_cron => Daily report for the previous day
# logrotate => Full report based on the mail log when it is rotated
PFLOGSUMM_TRIGGER=daily_cron
# Recipient address for pflogsumm reports.
#
# not set => Use REPORT_RECIPIENT or POSTMASTER_ADDRESS
# => Specify the recipient address(es)
PFLOGSUMM_RECIPIENT=
# From address for pflogsumm reports.
#
# not set => Use REPORT_SENDER or POSTMASTER_ADDRESS
# => Specify the sender address
PFLOGSUMM_SENDER=
# Interval for logwatch report.
#
# none => No report is generated
# daily => Send a daily report
# weekly => Send a report every week
LOGWATCH_INTERVAL=daily
# Recipient address for logwatch reports if they are enabled.
#
# not set => Use REPORT_RECIPIENT or POSTMASTER_ADDRESS
# => Specify the recipient address(es)
LOGWATCH_RECIPIENT=
# Enables a report being sent (created by pflogsumm) on a regular basis. (deprecated)
# **0** => Report emails are disabled
# 1 => Using POSTMASTER_ADDRESS as the recipient
# => Specify the recipient address
REPORT_RECIPIENT=0
# Change the sending address for mail report (deprecated)
# **empty** => mailserver-report@hostname
# => Specify the report sender (From) address
REPORT_SENDER=
# Changes the interval in which a report is being sent. (deprecated)
# **daily** => Send a daily report
# weekly => Send a report every week
# monthly => Send a report every month
#
# Note: This Variable actually controls logrotate inside the container and rotates the log depending on this setting. The main log output is still available in its entirety via `docker logs mail` (Or your respective container name). If you want to control logrotation for the docker generated logfile see: [Docker Logging Drivers](https://docs.docker.com/config/containers/logging/configure/)
REPORT_INTERVAL=daily
# Choose TCP/IP protocols to use
# **all** => All possible protocols.
# ipv4 => Use only IPv4 traffic. Most likely you want this behind Docker.
# ipv6 => Use only IPv6 traffic.
#
# Note: More details in http://www.postfix.org/postconf.5.html#inet_protocols
POSTFIX_INET_PROTOCOLS=ipv4
# -----------------------------------------------------------------------------------------------------------------------------
# --------------------- Spamassassin section ----------------------------------------------------------------------------------
# -----------------------------------------------------------------------------------------------------------------------------
#ENABLE_SPAMASSASSIN=0
ENABLE_SPAMASSASSIN=1
#If Enabled, SPAM goes to your inbox with added SPAM header, you can then move it to a specific SPAM folder with SIEVE rules
#SPAMASSASSIN_SPAM_TO_INBOX=0
SPAMASSASSIN_SPAM_TO_INBOX=1
# add spam info headers if at, or above that level:
SA_TAG=2.0
# add 'spam detected' headers at that level
SA_TAG2=6.31
# triggers spam evasive actions
SA_KILL=6.31
# add tag to subject if spam detected
SA_SPAM_SUBJECT=***SPAM*****
# -----------------------------------------------------------------------------------------------------------------------------
# --------------------- Fetchmail section -------------------------------------------------------------------------------------
# -----------------------------------------------------------------------------------------------------------------------------
ENABLE_FETCHMAIL=0
# The interval to fetch mail in seconds
FETCHMAIL_POLL=300
# -----------------------------------------------------------------------------------------------------------------------------
# --------------------- LDAP section ------------------------------------------------------------------------------------------
# -----------------------------------------------------------------------------------------------------------------------------
# A second container for the ldap service is necessary (i.e. https://github.com/osixia/docker-openldap)
# For preparing the ldap server to use in combination with this container this article may be helpful: http://acidx.net/wordpress/2014/06/installing-a-mailserver-with-postfix-dovecot-sasl-ldap-roundcube/
# empty => LDAP authentification is disabled
# 1 => LDAP authentification is enabled
ENABLE_LDAP=1
# empty => no
# yes => LDAP over TLS enabled for Postfix
LDAP_START_TLS=
# If you going to use the mailserver in combination with docker-compose you can set the service name here
# empty => mail.domain.com
# Specify the dns-name/ip-address where the ldap-server
LDAP_SERVER_HOST=openldap
# empty => ou=people,dc=domain,dc=com
# => e.g. LDAP_SEARCH_BASE=dc=mydomain,dc=local
LDAP_SEARCH_BASE=ou=people,dc=third,dc=hostarm,dc=com
# empty => cn=admin,dc=domain,dc=com
# => take a look at examples of SASL_LDAP_BIND_DN
LDAP_BIND_DN=cn=admin,dc=third,dc=hostarm,dc=com
# empty** => admin
# => Specify the password to bind against ldap
LDAP_BIND_PW=xxxxxxxxxxxxxxxxxxxx
# e.g. `"(&(mail=%s)(mailEnabled=TRUE))"`
# => Specify how ldap should be asked for users
LDAP_QUERY_FILTER_USER=(&(mail=%s)(mailEnabled=TRUE))
# e.g. `"(&(mailGroupMember=%s)(mailEnabled=TRUE))"`
# => Specify how ldap should be asked for groups
LDAP_QUERY_FILTER_GROUP=(&(mailGroupMember=%s)(mailEnabled=TRUE))
# e.g. `"(&(mailAlias=%s)(mailEnabled=TRUE))"`
# => Specify how ldap should be asked for aliases
#LDAP_QUERY_FILTER_ALIAS=(|(&(mailAlias=%s)(objectClass=PostfixBookMailForward))(&(mailAlias=%s)(objectClass=PostfixBookMailAccount)(mailEnabled=TRUE)))
LDAP_QUERY_FILTER_ALIAS=(&(mailAlias=%s)(mailEnabled=TRUE))
# e.g. `"(&(|(mail=*@%s)(mailalias=*@%s)(mailGroupMember=*@%s))(mailEnabled=TRUE))"`
# => Specify how ldap should be asked for domains
#LDAP_QUERY_FILTER_DOMAIN=(|(&(mail=*@%s)(objectClass=PostfixBookMailAccount)(mailEnabled=TRUE))(&(mailGroupMember=*@%s)(objectClass=PostfixBookMailAccount)(mailEnabled=TRUE))(&(mailalias=*@%s)(objectClass=PostfixBookMailForward)))
LDAP_QUERY_FILTER_DOMAIN=(&(|(mail=*@%s)(mailalias=*@%s)(mailGroupMember=*@%s))(mailEnabled=TRUE))
# -----------------------------------------------------------------------------------------------------------------------------
# ---------------- Dovecot section --------------------------------------------------------------------------------------------
# -----------------------------------------------------------------------------------------------------------------------------
# empty => no
# yes => LDAP over TLS enabled for Dovecot
#DOVECOT_TLS=
DOVECOT_TLS=
# e.g. `"(&(objectClass=PostfixBookMailAccount)(uniqueIdentifier=%n))"`
#DOVECOT_USER_FILTER=(&(objectClass=PostfixBookMailAccount)(uniqueIdentifier=%n))
DOVECOT_USER_FILTER=(&(objectClass=PostfixBookMailAccount)(mail=%u))
# e.g. `"(&(objectClass=PostfixBookMailAccount)(uniqueIdentifier=%n))"`
#DOVECOT_PASS_FILTER=(&(objectClass=PostfixBookMailAccount)(uniqueIdentifier=%n))
DOVECOT_PASS_FILTER=(&(objectClass=PostfixBookMailAccount)(mail=%u))
# Define the mailbox format to be used
# default is maildir, supported values are: sdbox, mdbox, maildir
DOVECOT_MAILBOX_FORMAT=maildir
# -----------------------------------------------------------------------------------------------------------------------------
# ---------------- Postgrey section -------------------------------------------------------------------------------------------
# -----------------------------------------------------------------------------------------------------------------------------
#ENABLE_POSTGREY=0
ENABLE_POSTGREY=1
# greylist for N seconds
POSTGREY_DELAY=300
# delete entries older than N days since the last time that they have been seen
POSTGREY_MAX_AGE=35
# response when a mail is greylisted
POSTGREY_TEXT=Delayed by postgrey
# whitelist host after N successful deliveries (N=0 to disable whitelisting)
POSTGREY_AUTO_WHITELIST_CLIENTS=5
# -----------------------------------------------------------------------------------------------------------------------------
# ---------------- SASL section -----------------------------------------------------------------------------------------------
# -----------------------------------------------------------------------------------------------------------------------------
ENABLE_SASLAUTHD=1
# empty => pam
# `ldap` => authenticate against ldap server
# `shadow` => authenticate against local user db
# `mysql` => authenticate against mysql db
# `rimap` => authenticate against imap server
# NOTE: can be a list of mechanisms like pam ldap shadow
SASLAUTHD_MECHANISMS=ldap
# empty => None
# e.g. with SASLAUTHD_MECHANISMS rimap you need to specify the ip-address/servername of the imap server ==> xxx.xxx.xxx.xxx
SASLAUTHD_MECH_OPTIONS=
# empty => localhost
SASLAUTHD_LDAP_SERVER=openldap
# empty or 0 => `ldap://` will be used
# 1 => `ldaps://` will be used
SASLAUTHD_LDAP_SSL=
# empty => anonymous bind
# specify an object with priviliges to search the directory tree
# e.g. active directory: SASLAUTHD_LDAP_BIND_DN=cn=Administrator,cn=Users,dc=mydomain,dc=net
# e.g. openldap: SASLAUTHD_LDAP_BIND_DN=cn=admin,dc=mydomain,dc=net
SASLAUTHD_LDAP_BIND_DN=cn=admin,dc=third,dc=hostarm,dc=com
# empty => anonymous bind
SASLAUTHD_LDAP_PASSWORD=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
# empty => Reverting to SASLAUTHD_MECHANISMS pam
# specify the search base
SASLAUTHD_LDAP_SEARCH_BASE=ou=people,dc=third,dc=hostarm,dc=com
# empty => default filter `(&(uniqueIdentifier=%u)(mailEnabled=TRUE))`
# e.g. for active directory: `(&(sAMAccountName=%U)(objectClass=person))`
# e.g. for openldap: `(&(uid=%U)(objectClass=person))`
SASLAUTHD_LDAP_FILTER=(&(mail=%U@%r)(mailEnabled=TRUE))
# empty => no
# yes => LDAP over TLS enabled for SASL
# Must not be used together with SASLAUTHD_LDAP_SSL=1_
SASLAUTHD_LDAP_START_TLS=
# empty => no
# yes => Require and verify server certificate
SASLAUTHD_LDAP_TLS_CHECK_PEER=
# empty => No sasl_passwd will be created
# string => `/etc/postfix/sasl_passwd` will be created with the string as password
SASL_PASSWD=
# -----------------------------------------------------------------------------------------------------------------------------
# ---------------- SRS section --------------------------------------------------------------------------------------------
# -----------------------------------------------------------------------------------------------------------------------------
# envelope_sender => Rewrite only envelope sender address (default)
# header_sender => Rewrite only header sender (not recommended)
# envelope_sender,header_sender => Rewrite both senders
# An email has an "envelope" sender (indicating the sending server) and a
# "header" sender (indicating who sent it). More strict SPF policies may require
# you to replace both instead of just the envelope sender.
SRS_SENDER_CLASSES=envelope_sender
# empty => Envelope sender will be rewritten for all domains
# provide comma separated list of domains to exclude from rewriting
SRS_EXCLUDE_DOMAINS=
# empty => generated when the image is built
# provide a secret to use in base64
# you may specify multiple keys, comma separated. the first one is used for
# signing and the remaining will be used for verification. this is how you
# rotate and expire keys
SRS_SECRET=
# -----------------------------------------------------------------------------------------------------------------------------
# ---------------- Default relay host section ---------------------------------------------------------------------------------
# -----------------------------------------------------------------------------------------------------------------------------
# Setup relaying all mail through a default relay host
#
# empty => don't configure default relay host
# default host and optional port to relay all mail through
DEFAULT_RELAY_HOST=
# -----------------------------------------------------------------------------------------------------------------------------
# ---------------- Multi-domain relay section ---------------------------------------------------------------------------------
# -----------------------------------------------------------------------------------------------------------------------------
# Setup relaying for multiple domains based on the domain name of the sender
# optionally uses usernames and passwords in postfix-sasl-password.cf and relay host mappings in postfix-relaymap.cf
#
# empty => don't configure relay host
# default host to relay mail through
RELAY_HOST=
# empty => 25
# default port to relay mail
RELAY_PORT=25
# empty => no default
# default relay username (if no specific entry exists in postfix-sasl-password.cf)
RELAY_USER=
# empty => no default
# password for default relay user
RELAY_PASSWORD=Docker Compose (new, seems to work well)services:
mailserver:
image: ghcr.io/docker-mailserver/docker-mailserver:latest
hostname: ${MAIL_HOSTNAME}
domainname: ${MAIL_DOMAINNAME}
container_name: mailserver
env_file:
- mailserver.env
- .env
dns: 192.168.1.2
networks:
openldap_internal:
dns_internal:
monitoring_internal:
ipv4_address: 192.168.10.8
internal:
ipv4_address: 192.168.20.2
aliases:
- mail
- smtp
- example.mailserver.com
ports:
- "25:25"
- "143:143"
- "465:465"
- "587:587"
- "993:993"
volumes:
- /c/srv/docker/volumes/mail/data:/var/mail
- /c/srv/docker/volumes/mail/logs:/var/log/mail
- ./config/:/tmp/docker-mailserver/
- ./cron/sa-learn:/etc/cron.d/sa-learn
- /c/srv/docker/volumes/mail/cert:/etc/letsencrypt
- "/etc/localtime:/etc/localtime:ro"
restart: always
stop_grace_period: 1m
cap_add:
- NET_ADMIN
healthcheck:
test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
timeout: 3s
retries: 0
letsencrypt:
build:
context: ./certbot
image: custom/letsencrypt:latest
container_name: certbot
restart: always
volumes:
- type: bind
source: /c/srv/docker/volumes/mail/cert/
target: /etc/letsencrypt
networks:
internal:
ipv4_address: 192.168.20.3
roundcube:
image: roundcube/roundcubemail:latest-apache
container_name: roundcube
restart: always
volumes:
- /c/srv/docker/volumes/mail/roundcube/www:/var/www/html
- /c/srv/docker/volumes/mail/roundcube/db:/var/roundcube/db
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
- ./config_roundcube/:/var/roundcube/config/
environment:
- ROUNDCUBEMAIL_DB_TYPE=sqlite
- ROUNDCUBEMAIL_DEFAULT_HOST=ssl://mail.example.com
- ROUNDCUBEMAIL_DEFAULT_PORT=993
- ROUNDCUBEMAIL_SMTP_SERVER=tls://mail.example.com
- ROUNDCUBEMAIL_SMTP_PORT=587
- ROUNDCUBEMAIL_PLUGINS=archive,zipdownload,managesieve,markasjunk,password
networks:
internal:
ipv4_address: 192.168.20.4
openldap_internal:
wireguard_internal:
ipv4_address: 192.168.30.14
traefik_internal:
ipv4_address: 192.168.40.6
networks:
internal:
ipam:
config:
- subnet: 192.168.20.0/24
openldap_internal:
external: true
dns_internal:
external: true
traefik_internal:
external: true
wireguard_internal:
external: true
monitoring_internal:
external: true
```services:
mailserver:
image: ghcr.io/docker-mailserver/docker-mailserver:latest
hostname: ${MAIL_HOSTNAME}
domainname: ${MAIL_DOMAINNAME}
container_name: mailserver
env_file:
- mailserver.env
- .env
dns: 192.168.1.2
networks:
openldap_internal:
dns_internal:
monitoring_internal:
ipv4_address: 192.168.10.8
internal:
ipv4_address: 192.168.20.2
aliases:
- mail
- smtp
- example.mailserver.com
ports:
- "25:25"
- "143:143"
- "465:465"
- "587:587"
- "993:993"
volumes:
- /c/srv/docker/volumes/mail/data:/var/mail
- /c/srv/docker/volumes/mail/logs:/var/log/mail
- ./config/:/tmp/docker-mailserver/
- ./cron/sa-learn:/etc/cron.d/sa-learn
- /c/srv/docker/volumes/mail/cert:/etc/letsencrypt
- "/etc/localtime:/etc/localtime:ro"
restart: always
stop_grace_period: 1m
cap_add:
- NET_ADMIN
healthcheck:
test: "ss --listening --tcp | grep -P 'LISTEN.+:smtp' || exit 1"
timeout: 3s
retries: 0
letsencrypt:
build:
context: ./certbot
image: custom/letsencrypt:latest
container_name: certbot
restart: always
volumes:
- type: bind
source: /c/srv/docker/volumes/mail/cert/
target: /etc/letsencrypt
networks:
internal:
ipv4_address: 192.168.20.3
roundcube:
image: roundcube/roundcubemail:latest-apache
container_name: roundcube
restart: always
volumes:
- /c/srv/docker/volumes/mail/roundcube/www:/var/www/html
- /c/srv/docker/volumes/mail/roundcube/db:/var/roundcube/db
- "/etc/timezone:/etc/timezone:ro"
- "/etc/localtime:/etc/localtime:ro"
- ./config_roundcube/:/var/roundcube/config/
environment:
- ROUNDCUBEMAIL_DB_TYPE=sqlite
- ROUNDCUBEMAIL_DEFAULT_HOST=ssl://mail.example.com
- ROUNDCUBEMAIL_DEFAULT_PORT=993
- ROUNDCUBEMAIL_SMTP_SERVER=tls://mail.example.com
- ROUNDCUBEMAIL_SMTP_PORT=587
- ROUNDCUBEMAIL_PLUGINS=archive,zipdownload,managesieve,markasjunk,password
networks:
internal:
ipv4_address: 192.168.20.4
openldap_internal:
wireguard_internal:
ipv4_address: 192.168.30.14
traefik_internal:
ipv4_address: 192.168.40.6
networks:
internal:
ipam:
config:
- subnet: 192.168.20.0/24
openldap_internal:
external: true
dns_internal:
external: true
traefik_internal:
external: true
wireguard_internal:
external: true
monitoring_internal:
external: trueenv file (new, seems to have problem with old data)# -----------------------------------------------
# --- Mailserver Environment Variables ----------
# -----------------------------------------------
# DOCUMENTATION FOR THESE VARIABLES IS FOUND UNDER
# https://docker-mailserver.github.io/docker-mailserver/latest/config/environment/
# -----------------------------------------------
# --- General Section ---------------------------
# -----------------------------------------------
OVERRIDE_HOSTNAME=example.com
DMS_DEBUG=0
LOG_LEVEL=debug
SUPERVISOR_LOGLEVEL=
DMS_VMAIL_UID=
DMS_VMAIL_GID=
ACCOUNT_PROVISIONER=LDAP
POSTMASTER_ADDRESS=postmaster@example.com
ENABLE_UPDATE_CHECK=1
UPDATE_CHECK_INTERVAL=1d
PERMIT_DOCKER=host
TZ=Europe/Warsaw
NETWORK_INTERFACE=
TLS_LEVEL=
SPOOF_PROTECTION=1
ENABLE_SRS=0
ENABLE_OPENDKIM=1
ENABLE_OPENDMARC=1
ENABLE_POLICYD_SPF=1
ENABLE_POP3=1
ENABLE_IMAP=1
ENABLE_CLAMAV=1
SPAM_SUBJECT=SPAM
ENABLE_RSPAMD=0
ENABLE_RSPAMD_REDIS=
RSPAMD_LEARN=1
RSPAMD_CHECK_AUTHENTICATED=0
RSPAMD_GREYLISTING=0
RSPAMD_HFILTER=1
RSPAMD_HFILTER_HOSTNAME_UNKNOWN_SCORE=6
RSPAMD_NEURAL=0
ENABLE_AMAVIS=1
AMAVIS_LOGLEVEL=0
ENABLE_DNSBL=0
ENABLE_FAIL2BAN=1
FAIL2BAN_BLOCKTYPE=drop
ENABLE_MANAGESIEVE=1
POSTSCREEN_ACTION=enforce
SMTP_ONLY=
SSL_TYPE=letsencrypt
SSL_CERT_PATH=
SSL_KEY_PATH=
SSL_ALT_CERT_PATH=
SSL_ALT_KEY_PATH=
VIRUSMAILS_DELETE_DELAY=
POSTFIX_DAGENT=
POSTFIX_MAILBOX_SIZE_LIMIT=
ENABLE_QUOTAS=1
POSTFIX_MESSAGE_SIZE_LIMIT=30720000
CLAMAV_MESSAGE_SIZE_LIMIT=
PFLOGSUMM_TRIGGER=daily_cron
PFLOGSUMM_RECIPIENT=
PFLOGSUMM_SENDER=
LOGWATCH_INTERVAL=daily
LOGWATCH_RECIPIENT=
LOGWATCH_SENDER=
REPORT_RECIPIENT=
REPORT_SENDER=
LOGROTATE_INTERVAL=weekly
LOGROTATE_COUNT=4
POSTFIX_REJECT_UNKNOWN_CLIENT_HOSTNAME=0
POSTFIX_INET_PROTOCOLS=all
ENABLE_MTA_STS=0
DOVECOT_INET_PROTOCOLS=all
# -----------------------------------------------
# --- SpamAssassin Section ----------------------
# -----------------------------------------------
ENABLE_SPAMASSASSIN=1
ENABLE_SPAMASSASSIN_KAM=1
SPAMASSASSIN_SPAM_TO_INBOX=1
MOVE_SPAM_TO_JUNK=1
MARK_SPAM_AS_READ=0
SA_TAG=2.0
SA_TAG2=6.31
SA_KILL=10.0
# -----------------------------------------------
# --- Fetchmail Section -------------------------
# -----------------------------------------------
ENABLE_FETCHMAIL=0
FETCHMAIL_POLL=300
FETCHMAIL_PARALLEL=0
ENABLE_GETMAIL=0
GETMAIL_POLL=5
# -----------------------------------------------
# --- OAUTH2 Section ----------------------------
# -----------------------------------------------
ENABLE_OAUTH2=0
OAUTH2_INTROSPECTION_URL=
# -----------------------------------------------
# --- LDAP Section ------------------------------
# -----------------------------------------------
LDAP_START_TLS=
LDAP_SERVER_HOST=ldap://ldap.example.com
LDAP_SEARCH_BASE=ou=users,dc=example,dc=com
LDAP_BIND_DN=cn=admin,dc=example,dc=com
LDAP_BIND_PW=REDACTED
LDAP_QUERY_FILTER_USER=(&(mail=%s)(mailEnabled=TRUE))
LDAP_QUERY_FILTER_GROUP=(&(mailGroupMember=%s)(mailEnabled=TRUE))
LDAP_QUERY_FILTER_ALIAS=(&(mailAlias=%s)(mailEnabled=TRUE))
LDAP_QUERY_FILTER_DOMAIN=(&(|(mail=*@%s)(mailalias=*@%s)(mailGroupMember=*@%s))(mailEnabled=TRUE))
# -----------------------------------------------
# --- Dovecot Section ---------------------------
# -----------------------------------------------
DOVECOT_TLS=no
DOVECOT_USER_FILTER=(&(objectClass=PostfixBookMailAccount)(mail=%u))
DOVECOT_PASS_FILTER=(&(objectClass=PostfixBookMailAccount)(mail=%u))
DOVECOT_MAILBOX_FORMAT=maildir
DOVECOT_AUTH_BIND=yes
# -----------------------------------------------
# --- Postgrey Section --------------------------
# -----------------------------------------------
ENABLE_POSTGREY=0
POSTGREY_DELAY=300
POSTGREY_MAX_AGE=35
POSTGREY_TEXT="Delayed by Postgrey"
POSTGREY_AUTO_WHITELIST_CLIENTS=5
# -----------------------------------------------
# --- SASL Section ------------------------------
# -----------------------------------------------
ENABLE_SASLAUTHD=1
SASLAUTHD_MECHANISMS=ldap
SASLAUTHD_MECH_OPTIONS=
SASLAUTHD_LDAP_SERVER=ldap://ldap.example.com
SASLAUTHD_LDAP_BIND_DN=cn=admin,dc=example,dc=com
SASLAUTHD_LDAP_PASSWORD=REDACTED
SASLAUTHD_LDAP_SEARCH_BASE=ou=users,dc=example,dc=com
SASLAUTHD_LDAP_FILTER=(&(mail=%U@%r)(mailEnabled=TRUE))
SASLAUTHD_LDAP_START_TLS=
SASLAUTHD_LDAP_TLS_CHECK_PEER=
SASLAUTHD_LDAP_TLS_CACERT_FILE=
SASLAUTHD_LDAP_TLS_CACERT_DIR=
SASLAUTHD_LDAP_PASSWORD_ATTR=
SASLAUTHD_LDAP_AUTH_METHOD=
SASLAUTHD_LDAP_MECH=
# -----------------------------------------------
# --- SRS Section -------------------------------
# -----------------------------------------------
SRS_SENDER_CLASSES=envelope_sender
SRS_EXCLUDE_DOMAINS=
SRS_SECRET=
# -----------------------------------------------
# --- Default Relay Host Section ----------------
# -----------------------------------------------
DEFAULT_RELAY_HOST=
# -----------------------------------------------
# --- Multi-Domain Relay Section ----------------
# -----------------------------------------------
RELAY_HOST=
RELAY_PORT=25
# -----------------------------------------------
# --- Relay Host Credentials Section ------------
# -----------------------------------------------
RELAY_USER=
RELAY_PASSWORD= |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Hi,
I am looking for someone experienced with Docker Mailserver configuration. I need help upgrading a working server from version v6.2.0 The server is not very large, but maintaining data continuity is essential.
This would be a paid job. Is anyone here available to assist? I would be happy to discuss the details.
Beta Was this translation helpful? Give feedback.
All reactions