From 78915bb737db0bbbf584b09cd463b816d6c36ab7 Mon Sep 17 00:00:00 2001 From: Gregor Kleen Date: Fri, 6 May 2022 00:11:54 +0200 Subject: surtr: ... --- hosts/surtr/postgresql.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'hosts/surtr') diff --git a/hosts/surtr/postgresql.nix b/hosts/surtr/postgresql.nix index 083bc979..abd2cb26 100644 --- a/hosts/surtr/postgresql.nix +++ b/hosts/surtr/postgresql.nix @@ -71,7 +71,7 @@ in { ALTER TABLE mailbox_mapping ALTER local TYPE citext; ALTER TABLE mailbox_mapping ALTER domain TYPE citext; - CREATE VIEW mailbox_quote_rule (id, mailbox, quota_rule) AS SELECT id, mailbox, (CASE WHEN quota_bytes IS NULL THEN '*:ignore' ELSE '*:bytes=' || quota_bytes END) AS quota_rule FROM mailbox; + CREATE VIEW mailbox_quota_rule (id, mailbox, quota_rule) AS SELECT id, mailbox, (CASE WHEN quota_bytes IS NULL THEN '*:ignore' ELSE '*:bytes=' || quota_bytes END) AS quota_rule FROM mailbox; CREATE VIEW virtual_mailbox_domain (domain) AS SELECT DISTINCT domain FROM mailbox_mapping; CREATE VIEW virtual_mailbox_mapping (lookup) AS SELECT (CASE WHEN local IS NULL THEN ''' ELSE local END) || '@' || domain AS lookup FROM mailbox_mapping; -- cgit v1.2.3