]> gitweb.michael.orlitzky.com - mailshears.git/blob - test/sql/postfixadmin-fixtures.sql
Fix the new AgenDAV fixtures SQL.
[mailshears.git] / test / sql / postfixadmin-fixtures.sql
1 /* This is a magic record, always included as the first row of the
2 * domain table.
3 */
4 INSERT INTO domain (domain) VALUES ('ALL');
5
6 /* Create two domains, example.com, and example.net. */
7 INSERT INTO domain (domain) VALUES ('example.com');
8 INSERT INTO domain (domain) VALUES ('example.net');
9
10 /*
11 * Now create their mailboxes, two in one domain, and three in the
12 * other.
13 */
14 INSERT INTO mailbox (username, domain, local_part)
15 VALUES ('alice@example.com', 'example.com', 'alice');
16 INSERT INTO mailbox (username, domain, local_part)
17 VALUES ('bob@example.com', 'example.com', 'bob');
18
19 INSERT INTO mailbox (username, domain, local_part)
20 VALUES ('adam@example.net', 'example.net', 'adam');
21 INSERT INTO mailbox (username, domain, local_part)
22 VALUES ('beth@example.net', 'example.net', 'beth');
23 INSERT INTO mailbox (username, domain, local_part)
24 VALUES ('carol@example.net', 'example.net', 'carol');
25
26 /* Each mailbox has an alias pointing to (at least) itself. */
27 INSERT INTO alias (address, goto, domain)
28 VALUES ('bob@example.com', 'bob@example.com', 'example.com');
29 INSERT INTO alias (address, goto, domain)
30 VALUES ('adam@example.net', 'adam@example.net', 'example.net');
31 INSERT INTO alias (address, goto, domain)
32 VALUES ('beth@example.net', 'beth@example.net', 'example.net');
33 INSERT INTO alias (address, goto, domain)
34 VALUES ('carol@example.net', 'carol@example.net', 'example.net');
35
36 /* Alice is aliased to some other people, too. */
37 INSERT INTO alias (address, goto, domain)
38 VALUES
39 ('alice@example.com',
40 'alice@example.com,adam@example.net,bob@example.com,carol@example.net',
41 'example.com');
42
43 /* Create a domain admin for both example.com and example.net. */
44 INSERT INTO domain_admins (username, domain)
45 VALUES ('admin@example.com', 'example.com');
46 INSERT INTO domain_admins (username, domain)
47 VALUES ('admin@example.com', 'example.net');
48