chore(postfix): 配置 Postfix 的默认 TLS 证书
- 在 `postfix` 容器镜像中安装 `ssl-cert`。 - 为 `smtpd` 指定 snakeoil 证书和私钥路径,启用默认 TLS 配置。
This commit is contained in:
@@ -5,7 +5,7 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|||||||
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
RUN --mount=type=cache,target=/var/cache/apt,sharing=locked \
|
||||||
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
|
--mount=type=cache,target=/var/lib/apt/lists,sharing=locked \
|
||||||
rm -f /etc/apt/apt.conf.d/docker-clean && \
|
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 main.cf /etc/postfix/main.cf
|
||||||
COPY master.cf /etc/postfix/master.cf
|
COPY master.cf /etc/postfix/master.cf
|
||||||
COPY sqlite-*.cf /etc/postfix/
|
COPY sqlite-*.cf /etc/postfix/
|
||||||
|
|||||||
@@ -20,6 +20,8 @@ smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, rej
|
|||||||
smtpd_sasl_type = dovecot
|
smtpd_sasl_type = dovecot
|
||||||
smtpd_sasl_path = inet:dovecot:12345
|
smtpd_sasl_path = inet:dovecot:12345
|
||||||
smtpd_sasl_auth_enable = yes
|
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
|
smtpd_tls_security_level = may
|
||||||
smtp_tls_security_level = may
|
smtp_tls_security_level = may
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user