3 domain = "sourcephile.fr";
4 domainSuffix = "dc=sourcephile,dc=fr";
11 root@${domain} julm+root@${domain}
18 "/var/lib/acme/${domain}/key.pem"
19 "/var/lib/acme/${domain}/fullchain.pem"
23 "smtp.${domain}" = chain;
24 "mail.${domain}" = chain;
27 virtual_mailbox_domains = [
30 virtual_mailbox_maps = [
31 # Map the main address and aliases to the main mail address.
32 # This is checked by permit_auth_recipient
33 ("ldap:" + pkgs.writeText "ldap-mail-${domain}.cf" ''
37 server_host = ldapi://
40 search_base = ou=posix,${domainSuffix}
43 query_filter = (&(|(mail=%s)(mailAlias=%s))(mailEnabled=TRUE))
45 result_attribute = mail
48 # Map MAIL FROM addresses to the SASL login names allowed to use it.
49 smtpd_sender_login_maps = [
50 ("ldap:" + pkgs.writeText "ldap-senders-${domain}.cf" ''
54 server_host = ldapi://
57 search_base = ou=posix,${domainSuffix}
60 query_filter = (&(|(mail=%s)(mailAlias=%s))(mailEnabled=TRUE))
61 result_format = %s@${domain}
62 result_attribute = uid
67 security.acme.certs."${domain}" = {
68 postRun = "systemctl try-restart postfix";
70 systemd.services.postfix = {
71 wants = [ "openldap.service" "acme-selfsigned-${domain}.service" "acme-${domain}.service" ];
72 after = [ "openldap.service" "acme-selfsigned-${domain}.service" ];