1 { pkgs, lib, config, ... }:
3 domain = "sourcephile.fr";
6 systemd.services.postfix.after = [
7 "${domain}.key.pem-key.service"
13 root@${domain} julm+root@${domain}
16 virtual_mailbox_domains = [ domain ];
17 virtual_mailbox_maps = [
18 # Map the main address and aliases to the main mail address.
19 # This is checked by permit_auth_recipient
20 ("ldap:"+pkgs.writeText "ldap-mail-${domain}.cf" ''
24 server_host = ldapi://
27 search_base = ou=posix,dc=sourcephile,dc=fr
30 query_filter = (&(|(mail=%s)(mailAlias=%s))(mailEnabled=TRUE))
32 result_attribute = mail
35 # Map MAIL FROM addresses to the SASL login names allowed to use it.
36 smtpd_sender_login_maps = [
37 ("ldap:"+pkgs.writeText "ldap-senders-${domain}.cf" ''
41 server_host = ldapi://
44 search_base = ou=posix,dc=sourcephile,dc=fr
47 query_filter = (&(|(mail=%s)(mailAlias=%s))(mailEnabled=TRUE))
48 result_format = %s@${domain}
49 result_attribute = uid