aboutsummaryrefslogtreecommitdiff
path: root/modules/private/mail/relay.nix
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2020-05-06 00:18:28 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2020-05-06 00:18:28 +0200
commit4e07970c88f474bc45ae3e723c62df5f6711833e (patch)
tree638ddadb1cd5d86511cbe0dd096a7954195e00a3 /modules/private/mail/relay.nix
parent91b3d06b6a9147e0e03b49d25cdcecb8a617a4f7 (diff)
downloadNix-4e07970c88f474bc45ae3e723c62df5f6711833e.tar.gz
Nix-4e07970c88f474bc45ae3e723c62df5f6711833e.tar.zst
Nix-4e07970c88f474bc45ae3e723c62df5f6711833e.zip
Add sympa mailing lists to MX backup
Diffstat (limited to 'modules/private/mail/relay.nix')
-rw-r--r--modules/private/mail/relay.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/modules/private/mail/relay.nix b/modules/private/mail/relay.nix
index ae74112..52288fc 100644
--- a/modules/private/mail/relay.nix
+++ b/modules/private/mail/relay.nix
@@ -69,6 +69,19 @@
69 ''; 69 '';
70 } 70 }
71 { 71 {
72 dest = "postfix/sympa_mailbox_maps";
73 user = config.services.postfix.user;
74 group = config.services.postfix.group;
75 permissions = "0440";
76 text = ''
77 hosts = ${config.myEnv.mail.sympa.postgresql.host}
78 user = ${config.myEnv.mail.sympa.postgresql.user}
79 password = ${config.myEnv.mail.sympa.postgresql.password}
80 dbname = ${config.myEnv.mail.sympa.postgresql.database}
81 query = SELECT DISTINCT CONCAT(name_list, '@', robot_list) FROM list_table
82 '';
83 }
84 {
72 dest = "postfix/ldap_ejabberd_users_immae_fr"; 85 dest = "postfix/ldap_ejabberd_users_immae_fr";
73 user = config.services.postfix.user; 86 user = config.services.postfix.user;
74 group = config.services.postfix.group; 87 group = config.services.postfix.group;
@@ -95,6 +108,7 @@
95 paths = [ 108 paths = [
96 config.secrets.fullPaths."postfix/mysql_alias_maps" 109 config.secrets.fullPaths."postfix/mysql_alias_maps"
97 config.secrets.fullPaths."postfix/mysql_mailbox_maps" 110 config.secrets.fullPaths."postfix/mysql_mailbox_maps"
111 config.secrets.fullPaths."postfix/sympa_mailbox_maps"
98 config.secrets.fullPaths."postfix/ldap_ejabberd_users_immae_fr" 112 config.secrets.fullPaths."postfix/ldap_ejabberd_users_immae_fr"
99 ]; 113 ];
100 }; 114 };
@@ -182,6 +196,7 @@
182 virtual_mailbox_maps = [ 196 virtual_mailbox_maps = [
183 "hash:/etc/postfix/host_dummy_mailboxes" 197 "hash:/etc/postfix/host_dummy_mailboxes"
184 "mysql:${config.secrets.fullPaths."postfix/mysql_mailbox_maps"}" 198 "mysql:${config.secrets.fullPaths."postfix/mysql_mailbox_maps"}"
199 "pgsql:${config.secrets.fullPaths."postfix/sympa_mailbox_maps"}"
185 ]; 200 ];
186 in 201 in
187 backup_recipients ++ virtual_alias_maps ++ virtual_mailbox_maps; 202 backup_recipients ++ virtual_alias_maps ++ virtual_mailbox_maps;