1 { pkgs, lib, config, ... }:
3 domain = "sourcephile.fr";
6 systemd.services.postfix.after = [
7 "${domain}.key.pem-key.service"
11 virtual_mailbox_domains = [ domain ];
14 root@${domain} julm@${domain}
15 admin@${domain} julm@${domain}
16 webmaster@${domain} julm@${domain}
17 postmaster@${domain} julm@${domain}
20 virtual_alias_maps = [
21 ("ldap:"+pkgs.writeText "ldap-forward.cf" ''
24 server_host = ldapi://
27 search_base = ou=posix,dc=sourcephile,dc=fr
30 query_filter = (&(mail=%s)(mailEnabled=TRUE))
32 result_attribute = mailForwardingAddress
34 ("ldap:"+pkgs.writeText "ldap-virtual_alias_maps.cf" ''
37 server_host = ldapi://
40 search_base = ou=posix,dc=sourcephile,dc=fr
43 query_filter = (&(mailAlias=%s)(mailEnabled=TRUE))
45 result_attribute = mail
49 # Allowed MAIL FROM addresses that belong to a given SASL authenticated user.
50 submissions.smtpd_sender_login_maps = [
51 ("ldap:"+pkgs.writeText "ldap-senders.cf" ''
54 server_host = ldapi://
57 search_base = ou=posix,dc=sourcephile,dc=fr
60 query_filter = (&(|(mail=%s)(mailAlias=%s))(mailEnabled=TRUE))
62 result_attribute = uid