Непрочитанное сообщение
trop1k » 2008-04-29 13:13:26
Спасибо у меня уже работает, только немогу связать с базой MYSQL postfix.
2) virtuser_query (SQL)
$rcmail_config['virtuser_query'] = "SELECT email_address FROM database.table WHERE login = '%u'";
If you are using postfix and/or some kind of hosting panel, chances are your email accounts are already stored in a SQL table. If that is the case, you want to lookup the emails with a virtuser_query. The parts of the example query:
// email_address - the first column returned by the query must be the complete email address
// database - name of the database where your table is located, the roundcube db user must have read access
// table - name of the table where your email addresses are stored
// login - name of the field that contains the username that is used to log in to roundcube (and send/receive email)
У себя пишу main.inc.php:
// Query to resolve user names and e-mail addresses from the database
// %u will be replaced with the current username for login.
// The query should select the user's e-mail address as first col
$rcmail_config['virtuser_query'] = "SELECT email_address FROM postfix.mailbox WHERE login = '%u'";
и неработает.База postfix, таблица mailbox.
Database: postfix Table: mailbox
+----------+--------------+-------------------+------+-----+---------------------+-------+---------------------------------+---------+
| Field | Type | Collation | Null | Key | Default | Extra | Privileges | Comment |
+----------+--------------+-------------------+------+-----+---------------------+-------+---------------------------------+---------+
| username | varchar(255) | latin1_swedish_ci | NO | PRI | | | select,insert,update,references | |
| password | varchar(255) | latin1_swedish_ci | NO | | | | select,insert,update,references | |
| name | varchar(255) | latin1_swedish_ci | NO | | | | select,insert,update,references | |
| maildir | varchar(255) | latin1_swedish_ci | NO | | | | select,insert,update,references | |
| quota | int(10) | | NO | | 0 | | select,insert,update,references | |
| domain | varchar(255) | latin1_swedish_ci | NO | | | | select,insert,update,references | |
| created | datetime | | NO | | 0000-00-00 00:00:00 | | select,insert,update,references | |
| modified | datetime | | NO | | 0000-00-00 00:00:00 | | select,insert,update,references | |
| active | tinyint(1) | | NO | | 1 | | select,insert,update,references | |
+----------+--------------+-------------------+------+-----+---------------------+-------+---------------------------------+---------+
localhost#