chore dovecot&postfix: rename nix files, disable debug
This commit is contained in:
@@ -21,8 +21,8 @@ let
|
|||||||
${lib.optionalString config.mailserver.ldap.startTls ''
|
${lib.optionalString config.mailserver.ldap.startTls ''
|
||||||
tls = yes
|
tls = yes
|
||||||
''}
|
''}
|
||||||
# tls_require_cert = hard
|
tls_require_cert = hard
|
||||||
# tls_ca_cert_file = ${config.mailserver.ldap.tlsCAFile}
|
tls_ca_cert_file = ${config.mailserver.ldap.tlsCAFile}
|
||||||
dn = ${config.mailserver.ldap.bind.dn}
|
dn = ${config.mailserver.ldap.bind.dn}
|
||||||
sasl_bind = no
|
sasl_bind = no
|
||||||
auth_bind = no
|
auth_bind = no
|
||||||
@@ -108,24 +108,21 @@ lib.mkIf config.selfprivacy.modules.auth.enable {
|
|||||||
default_fields = home=/var/vmail/${domain}/%u uid=${toString config.mailserver.vmailUID} gid=${toString config.mailserver.vmailUID}
|
default_fields = home=/var/vmail/${domain}/%u uid=${toString config.mailserver.vmailUID} gid=${toString config.mailserver.vmailUID}
|
||||||
}
|
}
|
||||||
|
|
||||||
#auth_username_format = %Ln
|
# with debugging OAuth2 token gets printed in logs
|
||||||
|
# auth_debug = yes
|
||||||
# FIXME
|
# auth_debug_passwords = yes
|
||||||
auth_debug = yes
|
# auth_verbose = yes
|
||||||
auth_debug_passwords = yes # Be cautious with this in production as it logs passwords
|
# mail_debug = yes
|
||||||
auth_verbose = yes
|
|
||||||
mail_debug = yes
|
|
||||||
'';
|
'';
|
||||||
services.dovecot2.enablePAM = false;
|
services.dovecot2.enablePAM = false;
|
||||||
systemd.services.dovecot2 = {
|
systemd.services.dovecot2 = {
|
||||||
# TODO does it merge with existing preStart?
|
# TODO does it merge with existing preStart?
|
||||||
preStart = setPwdInLdapConfFile + "\n";
|
preStart = setPwdInLdapConfFile + "\n";
|
||||||
# FIXME pass dependant services to auth module option instead
|
# FIXME pass dependant services to auth module option instead?
|
||||||
wants = [ "kanidm.service" ];
|
wants = [ auth-passthru.oauth2-systemd-service ];
|
||||||
after = [ "kanidm.service" ];
|
after = [ auth-passthru.oauth2-systemd-service ];
|
||||||
};
|
};
|
||||||
|
|
||||||
# does it merge with existing restartTriggers?
|
# does it merge with existing restartTriggers?
|
||||||
systemd.services.postfix.restartTriggers = [ setPwdInLdapConfFile ];
|
systemd.services.postfix.restartTriggers = [ setPwdInLdapConfFile ];
|
||||||
|
|
||||||
}
|
}
|
@@ -14,8 +14,8 @@ let
|
|||||||
server_host = ${lib.concatStringsSep " " cfg.ldap.uris}
|
server_host = ${lib.concatStringsSep " " cfg.ldap.uris}
|
||||||
start_tls = ${if cfg.ldap.startTls then "yes" else "no"}
|
start_tls = ${if cfg.ldap.startTls then "yes" else "no"}
|
||||||
version = 3
|
version = 3
|
||||||
# tls_ca_cert_file = ${cfg.ldap.tlsCAFile}
|
tls_ca_cert_file = ${cfg.ldap.tlsCAFile}
|
||||||
# tls_require_cert = yes
|
tls_require_cert = yes
|
||||||
|
|
||||||
search_base = ${cfg.ldap.searchBase}
|
search_base = ${cfg.ldap.searchBase}
|
||||||
scope = ${cfg.ldap.searchScope}
|
scope = ${cfg.ldap.searchScope}
|
||||||
@@ -63,17 +63,12 @@ lib.mkIf config.selfprivacy.modules.auth.enable {
|
|||||||
restartTriggers =
|
restartTriggers =
|
||||||
[ appendPwdInVirtualMailboxMap appendPwdInSenderLoginMap ];
|
[ appendPwdInVirtualMailboxMap appendPwdInSenderLoginMap ];
|
||||||
wants = [ auth-passthru.oauth2-systemd-service ];
|
wants = [ auth-passthru.oauth2-systemd-service ];
|
||||||
after = [ "kanidm.service" ];
|
after = [ auth-passthru.oauth2-systemd-service ];
|
||||||
};
|
};
|
||||||
services.postfix = {
|
services.postfix = {
|
||||||
# the list should be merged with other options from nixos-mailserver
|
# the list should be merged with other options from nixos-mailserver
|
||||||
config.virtual_mailbox_maps = [ "ldap:${ldapVirtualMailboxMapFile}" ];
|
config.virtual_mailbox_maps = [ "ldap:${ldapVirtualMailboxMapFile}" ];
|
||||||
inherit submissionOptions;
|
inherit submissionOptions;
|
||||||
submissionsOptions = submissionOptions;
|
submissionsOptions = submissionOptions;
|
||||||
# extraConfig = ''
|
|
||||||
# debug_peer_list =
|
|
||||||
# debug_peer_level = 3
|
|
||||||
# smtp_tls_security_level = encrypt
|
|
||||||
# '';
|
|
||||||
};
|
};
|
||||||
}
|
}
|
@@ -10,8 +10,8 @@
|
|||||||
mailserver.nixosModules.default
|
mailserver.nixosModules.default
|
||||||
./options.nix
|
./options.nix
|
||||||
./config.nix
|
./config.nix
|
||||||
./ldap-postfix.nix
|
./auth-postfix.nix
|
||||||
./ldap-dovecot.nix
|
./auth-dovecot.nix
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
configPathsNeeded =
|
configPathsNeeded =
|
||||||
|
Reference in New Issue
Block a user