Author Topic: HOWTO password for rc3.1 on ispconfig3 (for a client)  (Read 4937 times)

Offline syadnom

  • Newbie
  • *
  • Posts: 6
HOWTO password for rc3.1 on ispconfig3 (for a client)
« on: March 18, 2010, 11:30:30 AM »
in config.inc.php set:

$rcmail_config['password_db_dsn'] = 'mysql://user:pass@localhost/dbispconfig';

$rcmail_config['password_query'] = 'UPDATE `mail_user` SET `password` = %c WHERE `email` = %u LIMIT 1';

for a client, their login info for their database doesnt come over to the main dbispconfig database.  You need to work this out.  You can test this by putting your root database login info in but be sure to change it.  You wont want to leave this here as the client can see the config file.  You should set appropriate permissions for the client on the dbispconfig database.

I suggest creating a view (lets call it c1rcview) of the dbispconfig database like
CREATE VIEW c1rcview AS SELECT * FROM mail_user WHERE email LIKE '%client1domain';

then giving update permissions on the 'table/view'
do this in phpmyadmin or webmin.  Grant just on the 'view' c1rcview which should show up in the tables list in phpmyadmin.


change

$rcmail_config['password_query'] = 'UPDATE `mail_user` SET `password` = %c WHERE `email` = %u LIMIT 1';
to

$rcmail_config['password_query'] = 'UPDATE `c1rcview` SET `password` = %c WHERE `email` = %u LIMIT 1';

now you can use your limited priviledge database user assigned to client1 in ispconfig the ability to change passwords for their domain and setting roundcube up with these credentials.

good luck.