summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'hosts')
-rw-r--r--hosts/surtr/postgresql/default.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/hosts/surtr/postgresql/default.nix b/hosts/surtr/postgresql/default.nix
index 891b6ce0..b9086e73 100644
--- a/hosts/surtr/postgresql/default.nix
+++ b/hosts/surtr/postgresql/default.nix
@@ -236,6 +236,12 @@ in {
236 236
237 CREATE OR REPLACE VIEW virtual_mailbox_access (lookup, action) AS SELECT (CASE WHEN local IS NULL THEN ''' ELSE local END) || (CASE WHEN extension IS NULL THEN ''' ELSE '+' || extension END) || '@' || domain AS lookup, CASE WHEN mailbox IS NULL OR reject THEN 'REJECT' ELSE 'DUNNO' END AS action FROM mailbox_mapping; 237 CREATE OR REPLACE VIEW virtual_mailbox_access (lookup, action) AS SELECT (CASE WHEN local IS NULL THEN ''' ELSE local END) || (CASE WHEN extension IS NULL THEN ''' ELSE '+' || extension END) || '@' || domain AS lookup, CASE WHEN mailbox IS NULL OR reject THEN 'REJECT' ELSE 'DUNNO' END AS action FROM mailbox_mapping;
238 COMMIT; 238 COMMIT;
239
240 BEGIN;
241 SELECT _v.register_patch('009-spm-update-mapping', ARRAY['000-base', '002-citext', '003-extensions'], null);
242
243 GRANT UPDATE ON "mailbox_mapping" TO "spm";
244 COMMIT;
239 ''} 245 ''}
240 246
241 psql etebase postgres -eXf ${pkgs.writeText "etebase.sql" '' 247 psql etebase postgres -eXf ${pkgs.writeText "etebase.sql" ''