mirror of
https://github.com/iredmail/iRedMail
synced 2026-06-08 14:51:59 +00:00
20 lines
597 B
PL/PgSQL
20 lines
597 B
PL/PgSQL
-- create SQL view in vmail database.
|
|
|
|
CREATE VIEW sogo_users AS
|
|
SELECT username AS c_uid,
|
|
username AS c_name,
|
|
password AS c_password,
|
|
name AS c_cn,
|
|
username AS mail,
|
|
domain AS domain,
|
|
enablesogowebmail AS c_webmail,
|
|
enablesogocalendar AS c_calendar,
|
|
enablesogoactivesync AS c_activesync
|
|
FROM mailbox
|
|
WHERE enablesogo=1 AND active=1;
|
|
|
|
-- allow end users to change their own passwords.
|
|
GRANT SELECT,UPDATE ON mailbox TO sogo;
|
|
|
|
GRANT SELECT,UPDATE ON sogo_users TO sogo;
|