Email configuration #9
|
@ -2,6 +2,21 @@
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
let
|
let
|
||||||
hostname = "mail.${config.fsr.domain}";
|
hostname = "mail.${config.fsr.domain}";
|
||||||
domain = config.fsr.domain;
|
domain = config.fsr.domain;
|
||||||
|
ldap-aliases = pkgs.writeText "ldap-aliases.cf" ''
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
server_host = ldaps://auth.${config.fsr.domain}
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
search_base = dc=ifsr, dc=de
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
'';
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
dovecot-ldap-args = pkgs.writeText "ldap-args" ''
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
uris = auth.${config.fsr.domain}
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
dn = uid=search, ou=admins, dc=ifsr, dc=de
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
auth_bind = yes
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
ldap_version = 3
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
scope = subtree
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
base = ou=ifsr, dc=ifsr, dc=de
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
user_filter = (&(ou=mail)(uid=%n))
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
pass_filter = (&(ou=mail)(uid=%n))
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
'';
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
in
|
in
|
||||||
{
|
{
|
||||||
sops.secrets."rspamd-password".owner = config.users.users.rspamd.name;
|
sops.secrets."rspamd-password".owner = config.users.users.rspamd.name;
|
||||||
|
@ -24,6 +39,7 @@ in
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
"permit_sasl_authenticated"
|
"permit_sasl_authenticated"
|
||||||
"permit_mynetworks"
|
"permit_mynetworks"
|
||||||
];
|
];
|
||||||
|
alias_maps = [ "ldap:${ldap-aliases}" ];
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
smtpd_sasl_auth_enable = true;
|
smtpd_sasl_auth_enable = true;
|
||||||
smtpd_sasl_path = "/var/lib/postfix/auth";
|
smtpd_sasl_path = "/var/lib/postfix/auth";
|
||||||
virtual_mailbox_base = "/var/spool/mail";
|
virtual_mailbox_base = "/var/spool/mail";
|
||||||
|
@ -57,9 +73,13 @@ in
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
mail_location = maildir:/var/mail/%u
|
mail_location = maildir:/var/mail/%u
|
||||||
auth_mechanisms = plain login
|
auth_mechanisms = plain login
|
||||||
disable_plaintext_auth = no
|
disable_plaintext_auth = no
|
||||||
|
passdb {
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
driver = ldap
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
args = ${dovecot-ldap-args}
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
}
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
userdb {
|
userdb {
|
||||||
driver = passwd
|
driver = ldap
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
args = blocking=no
|
args = ${dovecot-ldap-args}
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
}
|
}
|
||||||
service auth {
|
service auth {
|
||||||
unix_listener /var/lib/postfix/auth {
|
unix_listener /var/lib/postfix/auth {
|
||||||
|
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
sops.config.secrets.portunus_search.path
/var/lib/mail
rspamd.ifsr.de