diff options
author | Gregor Kleen <gkleen@yggdrasil.li> | 2022-12-16 20:54:42 +0100 |
---|---|---|
committer | Gregor Kleen <gkleen@yggdrasil.li> | 2022-12-16 20:54:42 +0100 |
commit | eb06678a24f63532d12e52a7abe29eba7bb3605b (patch) | |
tree | 58ba4e1683a5e6093189499f7de07e67c59da736 | |
parent | 68a207261c7d0b420cb1b2514db942f2fa97dd88 (diff) | |
download | nixos-eb06678a24f63532d12e52a7abe29eba7bb3605b.tar nixos-eb06678a24f63532d12e52a7abe29eba7bb3605b.tar.gz nixos-eb06678a24f63532d12e52a7abe29eba7bb3605b.tar.bz2 nixos-eb06678a24f63532d12e52a7abe29eba7bb3605b.tar.xz nixos-eb06678a24f63532d12e52a7abe29eba7bb3605b.zip |
...
-rw-r--r-- | hosts/surtr/postgresql/default.nix | 6 |
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" '' |