1

I am experiment with poste.io mail server. It uses rouncube as its web interface. I tried to enable the password plugin.

I see below error whenever I try to set the password:

[21-Mar-2017 13:00:31 +0100]: DB Error: [1] no such function: update_passwd (SQL Query: SELECT update_passwd('$1$LXeDlIT0$NGunS8gcCOSrKK2ZJ6RIW/', 'naidu@example.com')) in /opt/www/webmail/program/lib/Roundcube/rcube_db.php on line 539 (POST /webmail/?_task=settings&_action=plugin.password-save)

The internet is full of using mysql as the database. I think I have to update the password change query in

/opt/www/webmail/plugins/password/config.inc.php

from

$sql = 'SELECT update_passwd(%c, %u)';

to

$sql = 'UPDATE mailaccount SET password=%c WHERE nname=%u LIMIT 1';

The UPDATE statement above is valid for mysql. What is the equivalent for sqlite3 database?

BTR Naidu
  • 1,063
  • 3
  • 18
  • 45

1 Answers1

0

I have a setup consist of postfix with sqlite and my sql query is as below:

UPDATE mailbox SET password=%c WHERE username=%u LIMIT 1

My sqlite config as below:

$config['password_db_dsn'] = 'sqlite:////var/vmail/postfixadmin.db?mode=0646';
$config['password_query'] = 'UPDATE mailbox SET password=%c WHERE username=%u LIMIT 1';

Add this for debugging:

$config['debug_level'] = 4;
$config['sql_debug'] = true;
$config['imap_debug'] = true;
$config['ldap_debug'] = true;
$config['smtp_debug'] = true;

Hope this helps.

phd
  • 82,685
  • 13
  • 120
  • 165
Tikus.L4ju
  • 71
  • 1
  • 7
  • I'm using this same config but the only I get is a log entry with the query. The data doesn't change in the database. And the rouncube web interface shows error. Any ideas about what could be failing? – 1087427 Jan 19 '23 at 22:00