3 domain = "autogeree.net";
4 domainSuffix = "dc=autogeree,dc=net";
11 root@${domain} julm+root@${domain}
16 "/var/lib/acme/${domain}/key.pem"
17 "/var/lib/acme/${domain}/fullchain.pem"
21 "smtp.${domain}" = chain;
22 "mail.${domain}" = chain;
25 virtual_mailbox_domains = [ domain ];
26 virtual_mailbox_maps = [
27 # Map the main address and aliases to the main mail address.
28 # This is checked by permit_auth_recipient
29 ("ldap:" + pkgs.writeText "ldap-mail-${domain}.cf" ''
33 server_host = ldapi://
36 search_base = ou=posix,${domainSuffix}
39 query_filter = (&(|(mail=%s)(mailAlias=%s))(mailEnabled=TRUE))
41 result_attribute = mail
44 # Map MAIL FROM addresses to the SASL login names allowed to use it.
45 smtpd_sender_login_maps = [
46 ("ldap:" + pkgs.writeText "ldap-senders-${domain}.cf" ''
50 server_host = ldapi://
53 search_base = ou=posix,${domainSuffix}
56 query_filter = (&(|(mail=%s)(mailAlias=%s))(mailEnabled=TRUE))
57 result_format = %s@${domain}
58 result_attribute = uid
63 security.acme.certs."${domain}" = {
64 postRun = "systemctl try-restart postfix";
66 systemd.services.postfix = {
67 wants = [ "openldap.service" "acme-selfsigned-${domain}.service" "acme-${domain}.service" ];
68 after = [ "openldap.service" "acme-selfsigned-${domain}.service" ];