From 6eceb56606eff364069a1f9646fabd7af03dffd4 Mon Sep 17 00:00:00 2001 From: Sebastian Hugentobler Date: Wed, 22 Dec 2021 11:34:40 +0100 Subject: [PATCH] add milter configuration --- README.md | 12 +++--------- rootfs/etc/confd/templates/main.cf.tmpl | 3 +++ 2 files changed, 6 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 0965d99..a9dc1ab 100644 --- a/README.md +++ b/README.md @@ -13,21 +13,12 @@ The internet domain name of the mail system. ## SMTP_BANNER Text prepended to `$myhostname ESMTP $mail_name` for the smtp banner. -## SPAMASSASSIN_HOST -Hostname for the spamassassin host. - ## DOVECOT_HOST Hostname for the dovecot host. ## DOVECOT_AUTH_PORT Port for the dovecot host. -## DKIM_HOST -Hostname for the OpenDkim host. - -## DKIM_PORT -Port for the OpenDkim host. - ## LMTP_HOST Hostname for the lmtp host (probably dovecot). @@ -94,6 +85,9 @@ Comma seperated list of ciphers or cipher types to exclude from the SMTP server ## RSPAMD_ADDRESS - default: inet:127.0.0.1:11332 +## EXTERNAL_IP +The network interface addresses that this mail system receives mail on by way of a proxy or network address translation unit. + Where to connect to rspamd. # Ports diff --git a/rootfs/etc/confd/templates/main.cf.tmpl b/rootfs/etc/confd/templates/main.cf.tmpl index 336d1e8..ef6f8a3 100644 --- a/rootfs/etc/confd/templates/main.cf.tmpl +++ b/rootfs/etc/confd/templates/main.cf.tmpl @@ -62,6 +62,9 @@ smtpd_sasl_tls_security_options = noanonymous smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination, reject_unverified_recipient +smtpd_milters={{getenv "RSPAMD_ADDRESS" "inet:127.0.0.1:11332"}} +non_smtpd_milters=$smtpd_milters +milter_mail_macros="i {mail_addr} {client_addr} {client_name} {auth_authen}" milter_default_action = accept milter_macro_daemon_name = ORIGINATING milter_connect_macros = "i j {daemon_name} v {if_name} _"