Email configuration #9
|
@ -2,18 +2,20 @@
|
||||||
`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" ''
|
# brauchen wir das überhaupt?
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
server_host = ldaps://auth.${config.fsr.domain}
|
#ldap-aliases = pkgs.writeText "ldap-aliases.cf" ''
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
search_base = dc=ifsr, dc=de
|
#server_host = ldap://localhost
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
'';
|
#search_base = ou=mail, 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`
|
|||||||
|
#'';
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
dovecot-ldap-args = pkgs.writeText "ldap-args" ''
|
dovecot-ldap-args = pkgs.writeText "ldap-args" ''
|
||||||
uris = auth.${config.fsr.domain}
|
uris = ldap://localhost
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
dn = uid=search, ou=admins, dc=ifsr, dc=de
|
dn = uid=search, ou=users, 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`
|
|||||||
|
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
auth_bind = yes
|
auth_bind = yes
|
||||||
|
dnpass = $(${pkgs.coreutils}/bin/cat /run/secrets/portunus_search)
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
|
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
ldap_version = 3
|
ldap_version = 3
|
||||||
scope = subtree
|
scope = subtree
|
||||||
base = ou=ifsr, dc=ifsr, dc=de
|
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`
|
|||||||
user_filter = (&(ou=mail)(uid=%n))
|
user_filter = (&(ou=mail)(uid=%n))
|
||||||
pass_filter = (&(ou=mail)(uid=%n))
|
pass_filter = (&(ou=mail)(uid=%n))
|
||||||
'';
|
'';
|
||||||
|
@ -39,7 +41,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}" ];
|
#alias_maps = [ "ldap:${ldap-aliases}" ];
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
`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";
|
||||||
|
@ -71,8 +73,6 @@ 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`
|
|||||||
};
|
};
|
||||||
extraConfig = ''
|
extraConfig = ''
|
||||||
mail_location = maildir:/var/mail/%u
|
mail_location = maildir:/var/mail/%u
|
||||||
auth_mechanisms = plain login
|
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
disable_plaintext_auth = no
|
|
||||||
`sops.config.secrets.portunus_search.path`
`/var/lib/mail`
`rspamd.ifsr.de`
|
|||||||
passdb {
|
passdb {
|
||||||
driver = ldap
|
driver = ldap
|
||||||
args = ${dovecot-ldap-args}
|
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`
|
sops.config.secrets.portunus_search.path
/var/lib/mail
rspamd.ifsr.de