summaryrefslogtreecommitdiff
path: root/hosts/surtr/postgresql.nix
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-05-05 23:53:26 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2022-05-05 23:53:26 +0200
commitc0391046dc0d4859841c56788d53fb37c7e84e15 (patch)
tree0652e6296f3c3f4ec93df6b8edae6ce953dd9d9e /hosts/surtr/postgresql.nix
parentfbe1b755f3cfc0eda924c0810a938c8ab157933c (diff)
downloadnixos-c0391046dc0d4859841c56788d53fb37c7e84e15.tar
nixos-c0391046dc0d4859841c56788d53fb37c7e84e15.tar.gz
nixos-c0391046dc0d4859841c56788d53fb37c7e84e15.tar.bz2
nixos-c0391046dc0d4859841c56788d53fb37c7e84e15.tar.xz
nixos-c0391046dc0d4859841c56788d53fb37c7e84e15.zip
surtr: ...
Diffstat (limited to 'hosts/surtr/postgresql.nix')
-rw-r--r--hosts/surtr/postgresql.nix6
1 files changed, 6 insertions, 0 deletions
diff --git a/hosts/surtr/postgresql.nix b/hosts/surtr/postgresql.nix
index c1993431..4899b972 100644
--- a/hosts/surtr/postgresql.nix
+++ b/hosts/surtr/postgresql.nix
@@ -50,6 +50,12 @@ in {
50 50
51 CREATE VIEW imap_user ("user", quota_rule) AS SELECT mailbox AS "user", (CASE WHEN quota_bytes IS NULL THEN '*:ignore' ELSE '*:bytes=' || quota_bytes END) AS quota_rule FROM mailbox; 51 CREATE VIEW imap_user ("user", quota_rule) AS SELECT mailbox AS "user", (CASE WHEN quota_bytes IS NULL THEN '*:ignore' ELSE '*:bytes=' || quota_bytes END) AS quota_rule FROM mailbox;
52 COMMIT; 52 COMMIT;
53
54 BEGIN;
55 SELECT _v.register_patch('001-lmtp-mapping', ARRAY['000-base'], null);
56
57 CREATE VIEW lmtp_mapping ("user", quota_rule, local, domain) AS SELECT mailbox.mailbox AS "user", (CASE WHEN quota_bytes IS NULL THEN '*:ignore' ELSE '*:bytes=' || quota_bytes END) AS quota_rule FROM mailbox INNER JOIN mailbox_mapping ON mailbox.id = mailbox_mapping.mailbox;
58 COMMIT;
53 ''} 59 ''}
54 ''; 60 '';
55 }; 61 };