| 21 | |
| 22 | sample database setup |
| 23 | |
| 24 | please note that sogo uses postgresql views to access the database (not clearly defined) and this needs to be setup before trying to auth |
| 25 | |
| 26 | ** Also note that a view in the config file actual points to a table (or view) to access the database |
| 27 | |
| 28 | again not very clearly defined. |
| 29 | |
| 30 | |
| 31 | {{{ |
| 32 | |
| 33 | CREATE DATABASE sogo CHARSET='UTF8'; |
| 34 | GRANT ALL ON sogo.* TO sogo@localhost IDENTIFIED BY 'password'; |
| 35 | |
| 36 | GRANT SELECT ON vmail.mailbox TO sogo@localhost; |
| 37 | |
| 38 | CREATE VIEW sogo.users (c_uid, c_name, c_password, c_cn, mail, domain) AS SELECT username, username, password, name, username, domain FROM vmail.mailbox WHERE enablesogo=1 AND active=1; |
| 39 | |
| 40 | }}} |
| 41 | |