author | Pascal Volk <neverseen@users.sourceforge.net> |
Fri, 21 Aug 2009 07:30:00 +0000 | |
changeset 123 | 626c008a4a04 |
child 125 | 988b9a719929 |
permissions | -rw-r--r-- |
123
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
1 |
-- --- |
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
2 |
-- with Dovecot v1.2.x the service managesieve was renamed to sieve |
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
3 |
-- --- |
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
4 |
ALTER TABLE users RENAME managesieve TO sieve; |
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
5 |
|
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
6 |
DROP VIEW dovecot_password; |
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
7 |
CREATE OR REPLACE VIEW dovecot_password AS |
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
8 |
SELECT local_part || '@' || domain_name.domainname AS "user", |
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
9 |
passwd AS "password", smtp, pop3, imap, sieve |
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
10 |
FROM users |
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
11 |
LEFT JOIN domain_name USING (gid) |
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
12 |
WHERE domain_name.is_primary; |
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
13 |
|
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
14 |
-- --- |
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
15 |
-- Change the user name to the name of your dovecot database user. |
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
16 |
-- --- |
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
17 |
GRANT SELECT ON dovecot_password TO dovecot; |
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
18 |
-- ---^ |
626c008a4a04
Added update SQL scripts for Dovecot v1.2.x
Pascal Volk <neverseen@users.sourceforge.net>
parents:
diff
changeset
|
19 |