use rspamd as milter

This commit is contained in:
Sebastian Hugentobler 2021-11-18 14:44:30 +01:00
parent 04dce50646
commit e2d10a72b5
Signed by: shu
GPG Key ID: BB32CF3CA052C2F0
4 changed files with 10 additions and 12 deletions

View File

@ -20,16 +20,12 @@ RUN apk add --no-cache \
postfix \ postfix \
postfix-pgsql \ postfix-pgsql \
openssl \ openssl \
spamassassin-client \
libstdc++ \ libstdc++ \
libmilter libmilter
RUN addgroup -g 2222 access RUN addgroup -g 2222 access
RUN addgroup postfix access RUN addgroup postfix access
RUN mkdir /var/run/spamass-milter
RUN chown postfix:postfix /var/run/spamass-milter
RUN chown root /var/spool/postfix/ RUN chown root /var/spool/postfix/
RUN chown root /var/spool/postfix/pid RUN chown root /var/spool/postfix/pid

View File

@ -1,4 +1,4 @@
[Postfix](http://www.postfix.org/) with dovecot authentication and [spamassassin](http://spamassassin.apache.org/) + [OpenDKIM](http://www.opendkim.org/) in postgres. [Postfix](http://www.postfix.org/) with dovecot authentication and [rspamd](https://rspamd.com/) using postgres.
# Volumes # Volumes
- `/etc/ssl/mail:ro`: certificates have to be here. - `/etc/ssl/mail:ro`: certificates have to be here.
@ -91,6 +91,11 @@ The minimum TLS cipher grade that the Postfix SMTP server will use with opportun
Comma seperated list of ciphers or cipher types to exclude from the SMTP server cipher list at all TLS security levels. Comma seperated list of ciphers or cipher types to exclude from the SMTP server cipher list at all TLS security levels.
## RSPAMD_ADDRESS
- default: inet:127.0.0.1:11332
Where to connect to rspamd.
# Ports # Ports
- 25 - 25
- 587 - 587

View File

@ -59,10 +59,10 @@ smtpd_sasl_tls_security_options = noanonymous
smtpd_relay_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination 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_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, defer_unauth_destination, reject_unverified_recipient
#smtpd_milters = smtpd_milters={{ getenv "RSPAMD_ADDRESS" "inet:127.0.0.1:11332" }}
# unix:/var/run/spamass-milter/spamass.sock non_smtpd_milters=$smtpd_milters
# inet:{{getenv "DKIM_HOST"}}:{{getenv "DKIM_PORT"}} milter_mail_macros="i {mail_addr} {client_addr} {client_name} {auth_authen}"
#non_smtpd_milters = $smtpd_milters
milter_default_action = accept milter_default_action = accept
milter_macro_daemon_name = ORIGINATING milter_macro_daemon_name = ORIGINATING
milter_connect_macros = "i j {daemon_name} v {if_name} _" milter_connect_macros = "i j {daemon_name} v {if_name} _"

View File

@ -1,3 +0,0 @@
#!/usr/bin/with-contenv sh
#exec s6-setuidgid postfix spamass-milter -u postmaster -p /var/run/spamass-milter/spamass.sock -- -d $SPAMASSASSIN_HOST