mailsystem: Configure rspamd as spam filter
This commit is contained in:
parent
b805502099
commit
9149f03384
6 changed files with 143 additions and 2 deletions
|
|
@ -154,6 +154,16 @@ in {
|
|||
# Configure a non-blocking source of randomness
|
||||
tls_random_source = "dev:/dev/urandom";
|
||||
|
||||
smtpd_milters = [
|
||||
"unix:${rspamdProxySocket}"
|
||||
];
|
||||
# Also use milter for outgoing mails (for e.g., dkim)
|
||||
non_smtpd_milters = [
|
||||
"unix:${rspamdProxySocket}"
|
||||
];
|
||||
milter_protocol = "6";
|
||||
milter_mail_macros = "i {mail_addr} {client_addr} {client_name} {auth_type} {auth_authen} {auth_author} {mail_addr} {mail_host} {mail_mailer}";
|
||||
|
||||
# Fix for https://www.postfix.org/smtp-smuggling.html
|
||||
smtpd_forbid_bare_newline = "yes";
|
||||
smtpd_forbid_bare_newline_exclusions = "$mynetworks";
|
||||
|
|
@ -179,9 +189,9 @@ in {
|
|||
systemd.services.postfix = {
|
||||
wants = sslCertService;
|
||||
after =
|
||||
["dovecot2.service"]
|
||||
["dovecot2.service" "rspamd.service"]
|
||||
++ sslCertService;
|
||||
requires = ["dovecot2.service"];
|
||||
requires = ["dovecot2.service" "rspamd.service"];
|
||||
};
|
||||
|
||||
networking.firewall = lib.mkIf cfg.openFirewall {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue