1 (edited by yaroslavkhmel 2022-05-04 08:19:29)

Topic: roundcube-password_recovery

==== REQUIRED BASIC INFO OF YOUR IREDMAIL SERVER ====
- iRedMail version (check /etc/iredmail-release):  1.5.2 MARIADB edition
- Deployed with iRedMail Easy or the downloadable installer? https: //github . com/iredmail/iRedMail/archive/refs/tags/1.5.2.tar.gz
- Linux/BSD distribution name and version: AlmaLinux release 8.5
- Store mail accounts in which backend (LDAP/MySQL/PGSQL): MySQL
- Web server (Apache or Nginx): Nginx
- Manage mail accounts with iRedAdmin-Pro?
- [IMPORTANT] Related original log or error message is required if you're experiencing an issue.
====

I dont know what to put into this file link -->> https : //github . com/AlfnRU/roundcube-password_recovery/blob/main/config.inc.php.dist

I tried to put credentials from this file /opt/www/roundcubemail-1.5.2/config/config.inc.php

But I get this error in the /var/log/maillog

May  3 19:49:32 mail roundcube[719853]: <8n30ctnf> DB Error: [1146] Table 'roundcubemail.mailbox' doesn't exist (SQL Query: SELECT token FROM mailbox) in /opt/www/roundcubemail-1.5.2/program/lib/Roundcube/rcube_db.php on line 566 (GET /mail/)
May  3 19:49:32 mail roundcube[719853]: <8n30ctnf> DB Error: [1146] Table 'roundcubemail.mailbox' doesn't exist (SQL Query: ALTER TABLE mailbox ADD token VARCHAR(255) DEFAULT '') in /opt/www/roundcubemail-1.5.2/program/lib/Roundcube/rcube_db.php on line 566 (GET /mail/)
May  3 19:49:32 mail roundcube[719853]: <8n30ctnf> DB Error: [1146] Table 'roundcubemail.mailbox' doesn't exist (SQL Query: SELECT token_validity FROM mailbox) in /opt/www/roundcubemail-1.5.2/program/lib/Roundcube/rcube_db.php on line 566 (GET /mail/)
May  3 19:49:32 mail roundcube[719853]: <8n30ctnf> DB Error: [1146] Table 'roundcubemail.mailbox' doesn't exist (SQL Query: ALTER TABLE mailbox ADD token_validity DATETIME DEFAULT '2000-01-01 00:00:00') in /opt/www/roundcubemail-1.5.2/program/lib/Roundcube/rcube_db.php on line 566 (GET /mail/)
May  3 19:49:32 mail roundcube[719853]: <8n30ctnf> DB Error: [1146] Table 'roundcubemail.mailbox' doesn't exist (SQL Query: SELECT email_other FROM mailbox) in /opt/www/roundcubemail-1.5.2/program/lib/Roundcube/rcube_db.php on line 566 (GET /mail/)
May  3 19:49:32 mail roundcube[719853]: <8n30ctnf> DB Error: [1146] Table 'roundcubemail.mailbox' doesn't exist (SQL Query: ALTER TABLE mailbox ADD email_other VARCHAR(255) DEFAULT '') in /opt/www/roundcubemail-1.5.2/program/lib/Roundcube/rcube_db.php on line 566 (GET /mail/)
May  3 19:49:32 mail roundcube[719853]: <8n30ctnf> DB Error: [1146] Table 'roundcubemail.mailbox' doesn't exist (SQL Query: SELECT phone FROM mailbox) in /opt/www/roundcubemail-1.5.2/program/lib/Roundcube/rcube_db.php on line 566 (GET /mail/)
May  3 19:49:32 mail roundcube[719853]: <8n30ctnf> DB Error: [1146] Table 'roundcubemail.mailbox' doesn't exist (SQL Query: ALTER TABLE mailbox ADD phone VARCHAR(30) DEFAULT '') in /opt/www/roundcubemail-1.5.2/program/lib/Roundcube/rcube_db.php on line 566 (GET /mail/)
May  3 19:49:32 mail roundcube[719853]: <8n30ctnf> DB Error: [1146] Table 'roundcubemail.mailbox' doesn't exist (SQL Query: SELECT question FROM mailbox) in /opt/www/roundcubemail-1.5.2/program/lib/Roundcube/rcube_db.php on line 566 (GET /mail/)
May  3 19:49:32 mail roundcube[719853]: <8n30ctnf> DB Error: [1146] Table 'roundcubemail.mailbox' doesn't exist (SQL Query: ALTER TABLE mailbox ADD question VARCHAR(255) DEFAULT '') in /opt/www/roundcubemail-1.5.2/program/lib/Roundcube/rcube_db.php on line 566 (GET /mail/)
May  3 19:49:32 mail roundcube[719853]: <8n30ctnf> DB Error: [1146] Table 'roundcubemail.mailbox' doesn't exist (SQL Query: SELECT answer FROM mailbox) in /opt/www/roundcubemail-1.5.2/program/lib/Roundcube/rcube_db.php on line 566 (GET /mail/)
May  3 19:49:32 mail roundcube[719853]: <8n30ctnf> DB Error: [1146] Table 'roundcubemail.mailbox' doesn't exist (SQL Query: ALTER TABLE mailbox ADD answer VARCHAR(255) DEFAULT '') in /opt/www/roundcubemail-1.5.2/program/lib/Roundcube/rcube_db.php on line 566 (GET /mail/)

Thank you.

----

Spider Email Archiver: On-Premises, lightweight email archiving software developed by iRedMail team. Supports Amazon S3 compatible storage and custom branding.

2

Re: roundcube-password_recovery

it is a 3rd party plugin which is not related to iredmail or any of its components, and iredmail doesnt have a password recovery option

3

Re: roundcube-password_recovery

Cthulhu wrote:

it is a 3rd party plugin which is not related to iredmail or any of its components, and iredmail doesnt have a password recovery option

Hi thank you for your reply.
I understand it is not a plugin shipped with iRedMail. My question is, if I want to install the roundcube plugin like Enigma, it is possible.

For example in this link.
https : //forum . iredmail . org/topic3058-how-to-install-roundcube-plugins-on-iredmail.html

But I want to know where I can find the credentials / information to install this 3rd party plugin successfully.

this is the file I need to fill in with credentials to access the postfix database


<?php

// Database connection string and table name with user passwords
$config['pr_db_dsn']      = 'mysql://_USER_:_PASSWORD_@localhost/postfix';
$config['pr_users_table'] = 'mailbox';

// Array with names for ext_fields in 'pr_users_table': [name_for_plugin => name_in_db]
// When using the postfix database 'mailbox' table, you must add two columns to this table: 'question' and 'answer'
// If the plugin does not find the columns it needs in the database, they will be created automatically
$config['pr_fields'] = [
    'altemail' => 'email_other',
    'phone'    => 'phone',
    'question' => 'question',
    'answer'   => 'answer',
];

// Admin email (this account will receive alerts when an user does not have an alternative email and phone)
$config['pr_admin_email'] = 'postmaster@your . domain . com';

// Use secret question/answer to confirmation password recovery
$config['pr_use_question'] = false;

// Use message with code to confirmation password recovery
$config['pr_use_confirm_code'] = true;

// Confirmation code length
$config['pr_confirm_code_length'] = 6;

// Maximum number of attempts to send confirmation code
$config['pr_confirm_code_count_max'] = 3;

// Confirmation code duration (in minutes)
$config['pr_confirm_code_validity_time'] = 30;

// Use the Password plugin to save a new password
$config['pr_use_password_plugin'] = true;

// Minimum length of new password
// !!! Note: needed if not used Password plugin)
$config['pr_password_minimum_length'] = 8;

// Require the new password to have at least the specified strength score.
// Password strength is scored from 1 (weak) to 5 (strong).
// !!! Note: needed if not used Password plugin)
$config['pr_password_minimum_score'] = 1;


// SMTP settings
// $config['pr_default_smtp_server'] = 'tls://your . domain . com';
// $config['pr_default_smtp_user']   = 'no-reply@your . domain . com';
// $config['pr_default_smtp_pass']   = 'YOUR_SMTP_USER_PASSWORD';
$config['pr_default_smtp_server'] = 'localhost';
$config['pr_default_smtp_user']   = '';
$config['pr_default_smtp_pass']   = '';


// Full path to SMS send function
// This function must accept 2 parameters: phone number and message,
// and return true on success or false on failure
//
// Example of send SMS function using Clickatell HTTP API - see /lib/send.php
//
$config['pr_sms_send_function'] = dirname(__FILE__) . '/bin/sendsms.sh';


// Enables logging of password changes into /logs/password.log
$config['pr_password_log'] = true;

// Set to TRUE if you need write debug messages into /log/console.log
$config['pr_debug'] = false;

?>

Thank you for any help you can provide.

The Error that I get is related to the
$config['pr_users_table'] = 'mailbox';

Thanks again.

4

Re: roundcube-password_recovery

maybe the problem is that iRedMail has the table mailbox in vmail instead of in roundcubemail?

Database changed
MariaDB [roundcubemail]> show tables;
+-------------------------+
| Tables_in_roundcubemail |
+-------------------------+
| cache                   |
| cache_index             |
| cache_messages          |
| cache_shared            |
| cache_thread            |
| collected_addresses     |
| contactgroupmembers     |
| contactgroups           |
| contacts                |
| dictionary              |
| filestore               |
| identities              |
| searches                |
| session                 |
| system                  |
| users                   |
+-------------------------+
16 rows in set (0.000 sec)

MariaDB [roundcubemail]> use vmail;
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A

Database changed
MariaDB [vmail]> show tables;
+----------------------+
| Tables_in_vmail      |
+----------------------+
| admin                |
| alias                |
| alias_domain         |
| anyone_shares        |
| deleted_mailboxes    |
| domain               |
| domain_admins        |
| forwardings          |
| last_login           |
| mailbox              |
| maillist_owners      |
| maillists            |
| moderators           |
| recipient_bcc_domain |
| recipient_bcc_user   |
| sender_bcc_domain    |
| sender_bcc_user      |
| sender_relayhost     |
| share_folder         |
| used_quota           |
+----------------------+
20 rows in set (0.001 sec)

Thank you for your help.

5

Re: roundcube-password_recovery

Now the error is
May  4 04:14:46 mail roundcube[753305]: <8n30ctnf> DB Error: [1142] ALTER command denied to user 'roundcube'@'localhost' for table 'mailbox' (SQL Query: ALTER TABLE mailbox ADD token_validity DATETIME DEFAULT '2000-01-01 00:00:00') in /opt/www/roundcubemail-1.5.2/program/lib/Roundcube/rcube_db.php on line 566 (GET /mail/)

6

Re: roundcube-password_recovery

as i said: this is not working, and there is and will be no support

7

Re: roundcube-password_recovery

Cthulhu wrote:

as i said: this is not working, and there is and will be no support

Still not working