diff --git a/config.toml b/config.toml index 7183fb4..8e67721 100755 --- a/config.toml +++ b/config.toml @@ -591,7 +591,7 @@ key = ["rcpt-domain"] concurrency = 5 [resolver] -type = "system" +type = "custom" #preserve-intermediates = true concurrency = 2 timeout = "5s" @@ -609,6 +609,11 @@ ptr = 1024 tlsa = 1024 mta-sts = 1024 +[[resolver.nameservers]] +ip = "10.222.222.1" +port = 53 +protocol = "udp" + [report] path = "/opt/stalwart-mail/reports" hash = 64 diff --git a/docker/Dockerfile b/docker/Dockerfile index b14b035..22c1c9e 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -7,6 +7,16 @@ ARG VERSION="0.4.2" ADD https://github.com/stalwartlabs/mail-server/archive/refs/tags/v$VERSION.tar.gz /tmp/v$VERSION.tar.gz RUN tar --strip-components=1 -C /source -xzf /tmp/v$VERSION.tar.gz +RUN apt update && apt install -y patch + +# Enhancement: Custom resolver nameservers +ADD https://patch-diff.githubusercontent.com/raw/stalwartlabs/mail-server/pull/141.patch /tmp/141.patch +RUN patch -p1 < /tmp/141.patch + +# Fix: Return an error to client if STARTTLS is not available +ADD https://patch-diff.githubusercontent.com/raw/stalwartlabs/mail-server/pull/135.patch /tmp/135.patch +RUN patch -p1 < /tmp/135.patch + FROM --platform=$BUILDPLATFORM docker.io/lukemathwalker/cargo-chef:latest-rust-slim-bookworm AS chef WORKDIR /build