Use mailing lists instead of aliases for stalwart
This commit is contained in:
parent
56b71230e9
commit
f09444d832
6 changed files with 78 additions and 52 deletions
12
migrations/20231008100114_lists_recipients.sql
Normal file
12
migrations/20231008100114_lists_recipients.sql
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
-- Add migration script here
|
||||
|
||||
ALTER TABLE emails
|
||||
ADD CONSTRAINT email_type_unique UNIQUE (mail, type);
|
||||
|
||||
CREATE TABLE list_recipients (
|
||||
list TEXT NOT NULL,
|
||||
type mail_type NOT NULL CHECK (type = 'list'),
|
||||
recipient TEXT NOT NULL,
|
||||
PRIMARY KEY (list, recipient),
|
||||
FOREIGN KEY (list, type) REFERENCES emails (mail, type)
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue