Vesta Control Panel - Forum

Community Forum

Skip to content

Advanced search
  • Quick links
    • Main site
    • Github repo
    • Google Search
  • FAQ
  • Login
  • Register
  • Board index Main Section Mail Server
  • Search

Roundcube Password Plugin

Questions regarding the Mail Server
Dovecot, Exim, RoundCube
Post Reply
  • Print view
Advanced search
27 posts
  • 1
  • 2
  • 3
  • Next
mike08
Posts: 160
Joined: Sat Jun 20, 2015 7:12 am

Os: Debian 6x
Web: apache + nginx
Roundcube Password Plugin
  • Quote

Post by mike08 » Wed Dec 23, 2015 3:24 pm

Has someone been able to successfully install this plugin for roundcube under vesta? If so do you have an updated guide?
Regards,
Top

hafeezksa
Posts: 81
Joined: Mon Apr 27, 2015 5:45 pm
Contact:
Contact hafeezksa
Website

Re: Roundcube Password Plugin
  • Quote

Post by hafeezksa » Sun Dec 27, 2015 6:21 am

mike08 wrote:Has someone been able to successfully install this plugin for roundcube under vesta? If so do you have an updated guide?
Regards,
I think this plugin already installed with default vesta installation. You can verify it from roundcube "about".
Top

mike08
Posts: 160
Joined: Sat Jun 20, 2015 7:12 am

Os: Debian 6x
Web: apache + nginx
Re: Roundcube Password Plugin
  • Quote

Post by mike08 » Mon Dec 28, 2015 9:18 pm

Well, whenever I try to change the password it just shows a message:
Could not save password.
Top

hafeezksa
Posts: 81
Joined: Mon Apr 27, 2015 5:45 pm
Contact:
Contact hafeezksa
Website

Re: Roundcube Password Plugin
  • Quote

Post by hafeezksa » Tue Dec 29, 2015 10:59 am

mike08 wrote:Well, whenever I try to change the password it just shows a message:
Could not save password.
What is your vesta port 8083 or other and what is your roundcube version ?
Top

mike08
Posts: 160
Joined: Sat Jun 20, 2015 7:12 am

Os: Debian 6x
Web: apache + nginx
Re: Roundcube Password Plugin
  • Quote

Post by mike08 » Tue Dec 29, 2015 12:43 pm

Hey,

Right now on presentation port 8083, I have Roundcube Webmail IMAP Client | | Version 0.7.2 with the latest password plugin and the two files that Vesta requires on drivers

Code: Select all

http://c.vestacp.com/0.9.8/debian/roundcube-pw.conf saved as pluging/password/config.inc.php
http://c.vestacp.com/0.9.8/debian/roundcube-driver.php saved as plugins/password/drivers/vesta.php
And I'm getting the following error:

Code: Select all

[28-Dec-2015 10:20:26 -0600]: PHP Error: Failed to load plugin file /var/lib/roundcube/plugins/password/password.php in /usr/share/roundcube/program/include/rcube_plugin_api.php on line 204 (GET /?_task=mail&_action=check-recent&_mbox=INBOX&_list=1&_remote=1&_unlock=0&_=1451319585926)
The suggested line on the php file that error shows, has the following

Code: Select all

'file' => __FILE__, 'line' => __LINE__,
'message' => "Failed to load plugin file $fn"), true, false);
On the other hand trying with the latest stable version which is Version 1.1.4 I get this error message:

Code: Select all

[28-Dec-2015 21:17:26 +0000]: <olo1olva> PHP Error: Password plugin: Broken driver vesta in /home/cer/web/rmail.localehost.com/public_html/plugins/password/password.php on line 292 (POST /?_task=settings&_action=plugin.password-save?_task=&_action=)
And that line on the file shows this message:

Code: Select all

'file' => __FILE__, 'line' => __LINE__,
'message' => "Password plugin: Broken driver $driver"
Basically the logs doesn't say anything relevant is just redundant info.
Top

dpeca
VestaCP Team
Posts: 473
Joined: Wed Nov 25, 2015 7:30 pm

Re: Roundcube Password Plugin
  • Quote

Post by dpeca » Sun Jan 31, 2016 12:05 am

After a lot of debuging, I finaly figured out what is going on.

Someone who wrote a ''Rondcube password changer driver for VestaCP'' should convert a function to class in file /usr/share/roundcube/plugins/password/drivers/vesta.php
Plugin 'passwod' is expecting a class in that file, but there is only a function.

Anyway, here is a solution to fix this.

1. Open file /usr/share/roundcube/plugins/password/drivers/vesta.php

2. Find a line that contain: function password_save($curpass, $passwd)

3. Delete that line

4. On the same place, paste this:

Code: Select all

class rcube_vesta_password {
    function save($curpass, $passwd)
5. Find a line that contain: $fp = fsockopen('ssl://' . $vesta_host, $vesta_port);

6. Delete that line

7. On that place paste this:

Code: Select all

        $errno = "";
        $errstr = "";
        $context = stream_context_create();

        $result = stream_context_set_option($context, 'ssl', 'verify_peer', false);
        $result = stream_context_set_option($context, 'ssl', 'verify_host', false);
        $result = stream_context_set_option($context, 'ssl', 'allow_self_signed', true);

        $fp = stream_socket_client('ssl://' . $vesta_host . ':'.$vesta_port, $errno, $errstr, 60, STREAM_CLIENT_CONNECT, $context);
8. At the end of file write: }

9. Save the file.

-------------

Also, you need to change one configuration file, to make it works.

1. Open /etc/roundcube/plugins/password/config.inc.php
2. Find: $rcmail_config['password_vesta_host'] = 'localhost';
3. Change localhost to your server hostname (if you are not sure what is your hostname, open /etc/hostname file)
4. Also, if you changed Vesta port, change it here too, you will find in next line $rcmail_config['password_vesta_port']
5. Save the file.

----------

Also, you need this:
Run as root in SSH console:

Code: Select all

cp /var/lib/roundcube/plugins/jqueryui/config.inc.php.dist /var/lib/roundcube/plugins/jqueryui/config.inc.php

chown admin:admin /var/log/roundcube
Last edited by dpeca on Sun Feb 14, 2016 5:05 pm, edited 4 times in total.
Top

kallovsky
Posts: 19
Joined: Thu Mar 05, 2015 12:00 pm

Re: Roundcube Password Plugin
  • Quote

Post by kallovsky » Mon Feb 15, 2016 11:30 am

Hello dpeca,

thanks a lot for posting your results here. Sounds like a lot work.
Anyway, it drove me crazy to figure out that failure. But I ask myself how it was possible to occur. I guess it was an Roundcube update or something like that. In any case, VestaCP should definitely update their Roundcube password driver file to harmonize again with it.



Thank's again. I'm sure this is gonna help a lot of other people here.
Cheers,
Kalle
Top

dpeca
VestaCP Team
Posts: 473
Joined: Wed Nov 25, 2015 7:30 pm

Re: Roundcube Password Plugin
  • Quote

Post by dpeca » Mon Feb 15, 2016 11:20 pm

Two things.
1. Roundcube updated password plugin, so it require modifications on driver side.
2. Vesta driver was not written very well... for example it does not support self-signed SSL... and Vesta is not updating config.inc.php of password plugin to adjust hostname...

So, my modifications fixes both things.
Top

skurudo
VestaCP Team
Posts: 8099
Joined: Fri Dec 26, 2014 2:23 pm
Contact:
Contact skurudo
Website Facebook Google+ Skype
Twitter

Re: Roundcube Password Plugin
  • Quote

Post by skurudo » Tue Feb 16, 2016 7:24 pm

Link to this bug:
https://bugs.vestacp.com/issues/143

dpeca, great work, man! Thanks.
Top

dpeca
VestaCP Team
Posts: 473
Joined: Wed Nov 25, 2015 7:30 pm

Re: Roundcube Password Plugin
  • Quote

Post by dpeca » Wed Feb 17, 2016 1:31 am

BTW, pull request for password driver is here - https://github.com/serghey-rodin/vesta/pull/619
Unfortunately, I patched only it - other steps should be probably patched in Vesta instalation script for Debian, but it is out of my knowledge :)
(I don't have a time to analyze instalation script, and Vesta developers probably will not be happy to see that I'm trying to 'cook' in instalation script :D )
Top


Post Reply
  • Print view

27 posts
  • 1
  • 2
  • 3
  • Next

Return to “Mail Server”



  • Board index
  • All times are UTC
  • Delete all board cookies
  • The team
Powered by phpBB® Forum Software © phpBB Limited
*Original Author: Brad Veryard
*Updated to 3.2 by MannixMD
 

 

Login  •  Register

I forgot my password