From 78e588264d776dfb071e86ef8d8f929443fa704a Mon Sep 17 00:00:00 2001 From: LanQin Date: Tue, 16 Jun 2026 22:10:29 +0800 Subject: [PATCH] =?UTF-8?q?chore(postfix):=20=E9=85=8D=E7=BD=AE=20Postfix?= =?UTF-8?q?=20=E7=9A=84=E9=BB=98=E8=AE=A4=20TLS=20=E8=AF=81=E4=B9=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - 在 `postfix` 容器镜像中安装 `ssl-cert`。 - 为 `smtpd` 指定 snakeoil 证书和私钥路径,启用默认 TLS 配置。 --- deploy/postfix/Dockerfile | 2 +- deploy/postfix/main.cf | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/deploy/postfix/Dockerfile b/deploy/postfix/Dockerfile index 65ac390..b8ef3ed 100644 --- a/deploy/postfix/Dockerfile +++ b/deploy/postfix/Dockerfile @@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND=noninteractive RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \ --mount=type=cache,target=/var/lib/apt/lists,sharing=locked \ rm -f /etc/apt/apt.conf.d/docker-clean && \ - apt-get update && apt-get install -y --no-install-recommends postfix postfix-sqlite ca-certificates rsyslog + apt-get update && apt-get install -y --no-install-recommends postfix postfix-sqlite ca-certificates rsyslog ssl-cert COPY main.cf /etc/postfix/main.cf COPY master.cf /etc/postfix/master.cf COPY sqlite-*.cf /etc/postfix/ diff --git a/deploy/postfix/main.cf b/deploy/postfix/main.cf index 6c075cd..22c8374 100644 --- a/deploy/postfix/main.cf +++ b/deploy/postfix/main.cf @@ -20,6 +20,8 @@ smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, rej smtpd_sasl_type = dovecot smtpd_sasl_path = inet:dovecot:12345 smtpd_sasl_auth_enable = yes +smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem +smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key smtpd_tls_security_level = may smtp_tls_security_level = may