Skip to content

Commit 9ce8055

Browse files
committed
feat(web): update to mailserver-admin 5.14.1 and add observability configuration
1 parent 855fd1c commit 9ce8055

6 files changed

Lines changed: 26 additions & 12 deletions

File tree

.env.dist

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ MAILNAME=mail.example.com
1717
1818

1919
# Relay mails to another SMTP server
20-
# @see docs/RELAYHOST.md
20+
# @see docs/configuration/relayhost.md
2121
RELAYHOST=false
2222
RELAY_PASSWD_FILE=false
2323

@@ -27,11 +27,14 @@ FILTER_MIME=false
2727
# Password to access the rspamd web-interface
2828
CONTROLLER_PASSWORD=changeme2
2929

30+
# Password to access the dovecot doveadm api
31+
DOVEADM_API_KEY=changeme2
32+
3033
# How long to wait for services to start
3134
WAITSTART_TIMEOUT=2m
3235

3336
# Configure local address extension
34-
# @see docs/LOCAL_ADDRESS_EXTENSION.md
37+
# @see docs/configuration/local-address-extension.md
3538
RECIPIENT_DELIMITER=-
3639

3740
# Interval in seconds for fetchmail to check for new mails

deploy/kustomize/common/configmap.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ data:
66
FILTER_MILTER_ADDRESS: filter:11332
77
FILTER_WEB_ADDRESS: filter:11334
88
MDA_AUTH_ADDRESS: mda:2004
9+
MDA_DOVEADM_ADDRESS: mda:8080
910
MDA_IMAP_ADDRESS: mda:143
1011
MDA_IMAPS_ADDRESS: mda:993
1112
MDA_LMTP_ADDRESS: mda:2003

deploy/kustomize/mda/network-policy.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,8 @@ spec:
3333
port: 2004 # Auth
3434
- protocol: TCP
3535
port: 4190 # ManageSieve
36+
- protocol: TCP
37+
port: 8080 # Doveadm
3638
# Allow external access (from internet)
3739
- from:
3840
- ipBlock:

docs/configuration/environment-variables.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,10 @@ It is required to **always set** `REDIS_PASSWORD`.
4040

4141
### Authentication
4242

43-
This is the password for the RSpamd controller access. It is required to **always set** `CONTROLLER_PASSWORD`.
44-
4543
| Variable | Default | Description |
4644
| --------------------- | ------------ | ------------------------------------- |
4745
| `CONTROLLER_PASSWORD` | _(required)_ | Password for RSpamd controller access |
46+
| `DOVEADM_API_KEY` | _(required)_ | Password for Dovecot API access |
4847

4948
### Relay Configuration
5049

target/web/Dockerfile

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,20 @@ ENV MYSQL_HOST=db \
1010
MYSQL_USER=mailserver \
1111
REDIS_HOST=redis \
1212
REDIS_PORT=6379 \
13+
APP_SHARE_DIR="var/cache" \
14+
DATABASE_URL="mysql://%env(MYSQL_USER)%:%env(MYSQL_PASSWORD)%@%env(MYSQL_HOST)%:%env(MYSQL_PORT)%/%env(MYSQL_DATABASE)%?serverVersion=8.4" \
15+
DOVEADM_HTTP_URL="https://%env(MDA_DOVEADM_ADDRESS)%" \
1316
FILTER_WEB_ADDRESS=filter:11334 \
17+
MAILNAME=mail.example.com \
18+
MDA_DOVEADM_ADDRESS=mda:8080 \
1419
MDA_IMAP_ADDRESS=mda:31143 \
1520
MDA_MANAGESIEVE_ADDRESS=mda:4190 \
1621
MTA_SMTP_SUBMISSION_ADDRESS=mta:587 \
22+
RSPAMD_CONTROLLER_URL="http://%env(FILTER_WEB_ADDRESS)%" \
23+
RSPAMD_PASSWORD="%env(CONTROLLER_PASSWORD)%" \
24+
SERVER_ROOT=/var/www/html \
1725
SUPPORT_URL=https://github.com/jeboehm/docker-mailserver \
18-
MAILNAME=mail.example.com \
19-
WAITSTART_TIMEOUT=1m \
20-
DATABASE_URL="mysql://%env(MYSQL_USER)%:%env(MYSQL_PASSWORD)%@%env(MYSQL_HOST)%:%env(MYSQL_PORT)%/%env(MYSQL_DATABASE)%?serverVersion=8.4" \
21-
SERVER_ROOT=/var/www/html
26+
WAITSTART_TIMEOUT=1m
2227

2328
ARG FRANKENPHP_VER=v1.11.1 # renovate: depName=php/frankenphp
2429
RUN apk add --no-cache \
@@ -74,17 +79,15 @@ RUN --mount=type=cache,target=/root/.composer \
7479

7580
FROM composer AS admin-builder
7681

77-
ARG ADMIN_VER=5.13.4 # renovate: depName=jeboehm/mailserver-admin
82+
ARG ADMIN_VER=5.14.1 # renovate: depName=jeboehm/mailserver-admin
7883
WORKDIR /opt/admin
7984
RUN curl -sSLf \
8085
-o /tmp/admin.tar.gz \
8186
https://github.com/jeboehm/mailserver-admin/releases/download/${ADMIN_VER}/release-${ADMIN_VER}.tar.gz && \
82-
tar -oxf /tmp/admin.tar.gz --strip=1 && \
87+
tar -oxf /tmp/admin.tar.gz && \
8388
rm /tmp/admin.tar.gz && \
84-
composer symfony:dump-env prod && \
8589
chmod 777 \
8690
/opt/admin/var/cache \
87-
/opt/admin/var/cache/prod \
8891
/opt/admin/var/log
8992

9093
FROM base AS prod

test/bats/integration/070_docker.bats

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,9 @@ setup() {
1616

1717
[ "$status" -eq 0 ]
1818
}
19+
20+
@test "system:check command succeeds" {
21+
run docker exec docker-mailserver-web-1 /opt/admin/bin/console system:check --all
22+
23+
[ "$status" -eq 0 ]
24+
}

0 commit comments

Comments
 (0)