summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2022-05-05 19:46:04 +0200
committerGregor Kleen <gkleen@yggdrasil.li>2022-05-05 19:46:04 +0200
commitd29fa31de51a0c3c742df75a452961d29bae01a4 (patch)
tree35f3a4431e51caba0c53bab90e537a9a848695bb /hosts
parenta9381fe8b251135df9ade8b0078ca3fb6c88d821 (diff)
downloadnixos-d29fa31de51a0c3c742df75a452961d29bae01a4.tar
nixos-d29fa31de51a0c3c742df75a452961d29bae01a4.tar.gz
nixos-d29fa31de51a0c3c742df75a452961d29bae01a4.tar.bz2
nixos-d29fa31de51a0c3c742df75a452961d29bae01a4.tar.xz
nixos-d29fa31de51a0c3c742df75a452961d29bae01a4.zip
...
Diffstat (limited to 'hosts')
-rw-r--r--hosts/surtr/postgresql.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/hosts/surtr/postgresql.nix b/hosts/surtr/postgresql.nix
index 5773ef97..71fd6463 100644
--- a/hosts/surtr/postgresql.nix
+++ b/hosts/surtr/postgresql.nix
@@ -45,7 +45,7 @@ in {
45 ); 45 );
46 CREATE UNIQUE INDEX domain_unique ON mailbox_mapping (domain) WHERE local IS NULL; 46 CREATE UNIQUE INDEX domain_unique ON mailbox_mapping (domain) WHERE local IS NULL;
47 47
48 CREATE VIEW virtual_mailbox_domain (domain) AS SELECT DISTINCT domain FROM virtual_mailbox_mapping; 48 CREATE VIEW virtual_mailbox_domain (domain) AS SELECT DISTINCT domain FROM mailbox_mapping;
49 CREATE VIEW virtual_mailbox_mapping (mailbox, lookup) AS SELECT mailbox.mailbox as mailbox, (CASE WHEN local IS NULL THEN ''' ELSE local END) || '@' || domain AS lookup FROM mailbox_mapping INNER JOIN mailbox on mailbox.id = mailbox_mapping.mailbox; 49 CREATE VIEW virtual_mailbox_mapping (mailbox, lookup) AS SELECT mailbox.mailbox as mailbox, (CASE WHEN local IS NULL THEN ''' ELSE local END) || '@' || domain AS lookup FROM mailbox_mapping INNER JOIN mailbox on mailbox.id = mailbox_mapping.mailbox;
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;