Roundcube Community Forum

Third Party Contributions => Old Style Plug-Ins => Topic started by: oslad on June 30, 2006, 10:51:23 PM

Title: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: oslad on June 30, 2006, 10:51:23 PM
Is pleased to announce the PRETTY "Change Password" patch/module for Roundcube v0.1RC1(2007-7-3) (http://www.roundcubeforum.net/attachment.php?attachmentid=652&stc=1&d=1224143600) is available now!
Add support to cPanel --tested cPanel [10.9.0-RELEASE_57] (pro), md5crypt and verify current password.
Support IMAP database such as mysql, postgresql (and more? see also (http://www.vulcanonet.com/soft/index.php?pack=pear_tut)).

================v0.1-RC1(2007-7-3)================
You have two choice:

1. Download the package directy (http://www.roundcubeforum.net/attachment.php?attachmentid=653&stc=1&d=1224143600) (the patch has been applied already)

2. Download the patch and apply it
Download roundcubemail-0.1-rc1-dep.tar.gz (http://downloads.sourceforge.net/roundcubemail/roundcubemail-0.1-rc1-dep.tar.gz?modtime=1183484328&big_mirror=0) and this patch (http://www.roundcubeforum.net/attachment.php?attachmentid=652&stc=1&d=1224143600)(right click, save as...) to a directory(say that /tmp).
$ cd /tmp
$ tar -xzf roundcubemail-0.1-rc1-dep.tar.gz
$ cd roundcubemail-0.1-rc1-dep/
$ patch -p1 < ../roundcubemail-0.1-rc1-dep-pw1.diff
$ tar -czf roundcubemail-0.1-rc1-dep-pw1.tar.gz roundcubemail-0.1-rc1-dep
you will get a file named "/tmp/roundcubemail-0.1-rc1-dep-pw1.tar.gz" has been applied this patch already(it's same as above).

Now, you can use this package just like the original Roundcubemail.

And a additional configuration is required, open "config/db.inc.php" (copy form "config/db.inc.php.dist") to edit. Change the value for your special environment.

// The 'change_pwd_proc' can be 'change_pwd_for_db' or 'change_pwd_for_cpanel',
// If 'change_pwd_for_cpanel' is selected, the value of 'db_imap_xxxxxx' is omitted
$rcmail_config['change_pwd_proc'] = 'change_pwd_for_db';
$rcmail_config['db_imap_dsn'] = 'mysql://dbuser:your_passwd@localhost/mail_db';
$rcmail_config['db_imap_users_table'] = 'accountuser';
$rcmail_config['db_imap_user_field'] = 'username';
$rcmail_config['db_imap_passwd_field'] = 'password';
$rcmail_config['db_imap_passwd_type'] = '';  // '' (Plaintext), 'PASSWORD' or 'ENCRYPT'

For cPanel with non-english version, you may need to edit "program/steps/settings/passwd.inc" and modify:
$success = "Changed password";

Enjoy!


"After upgrade from v0.1beta2 to v0.1-RC1, I can not view e-mail?"
Here is how to resolve it (http://roundcubeforum.net/forum/index.php?topic=1872.0).


--------------------------------
SCREENSHOT

(http://www.roundcubeforum.net/attachment.php?attachmentid=654&stc=1&d=1224143600)
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: igeoffi on June 30, 2006, 11:21:33 PM
thanks!
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: Prasad1337 on July 01, 2006, 05:31:52 AM
as said before, looks good :) thanks.
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: flosoft on July 01, 2006, 05:54:34 AM
As just posted in the other thread... how does it change the IMAP Password?
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: oslad on July 01, 2006, 09:16:00 AM
As a short/temporary solution, it change the IMAP password from mysql DB directly, not via IMAP protocol.
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: flosoft on July 01, 2006, 12:21:29 PM
hmm. That might be confusing for the users later on.
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: igeoffi on July 03, 2006, 01:01:46 AM
correct me if im wrong but by changing it from the database directly, shouldnt that solve the prob of changing passwords in roundcube on diff types of mail servers?
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: oslad on July 03, 2006, 01:41:25 AM
Quote from: igeoffi
correct me if im wrong but by changing it from the database directly, shouldnt that solve the prob of changing passwords in roundcube on diff types of mail servers?

Any types of mail server will be work fine, while the imap/pop user's info(such as: username/password) is stored by mysql.

i have setup a mail server with postfix + cyrus-imap + sasl + mysql, this patch work very well.
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: rjswilson on July 03, 2006, 11:24:17 AM
yeah..this plugin won't work for me... i have xmail + courier imap + mysql, but mysql stores the password only for courier, not for xmail.
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: oslad on July 04, 2006, 12:28:31 AM
Quote from: rjswilson
yeah..this plugin won't work for me... i have xmail + courier imap + mysql, but mysql stores the password only for courier, not for xmail.

you are correct at this point, i config postfix and cyrus-imap to use the same table for user info.
but store the same user info into different position, is reasonable?
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: zwone on July 04, 2006, 04:24:45 AM
Umm.. I can't download this patch... or maybe I just don't know how...
I just get to page with some chinese characters which I don't understand and from there I can go only back "home"...

Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: SKaero on July 04, 2006, 04:55:12 AM
I like this! I wil be good for RC ;)
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: oslad on July 04, 2006, 10:11:37 AM
Quote from: zwone
Umm.. I can't download this patch... or maybe I just don't know how...
I just get to page with some chinese characters which I don't understand and from there I can go only back "home"...

I'm sorry, please goto: http://oslad.com/component/option,com_remository/Itemid,19/func,select/id,2/ (http://oslad.com/component/option,com_remository/Itemid,19/func,select/id,2/)

then click the download icon: (http://oslad.com/components/com_remository/images/download_trans.gif)
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: simoesp on July 05, 2006, 11:47:57 AM
it's preeety interessing i'll try to do a vacation module to use with the standard postfixadmin (panel) ;D


i'll see what i can do :P

Regards
Pedro Simões
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: oslad on July 05, 2006, 09:04:31 PM
Quote from: simoesp
it's preeety interessing i'll try to do a vacation module to use with the standard postfixadmin (panel) ;D

Hi, Simoesp, it's welcome!

you can modify function "rcmail_save_passwd" in "passwd.inc" file to do that.

but it will be lots of thing to consider. as you can not consider postfix only, else other smtp server such as sendmail, Qmail etc. won't work. i don't know if a standard smtp or imap or pops protocol can use with.

the source code of squirrelmail maybe a very useful reference, but i have no time to read it recently.
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: simoesp on July 06, 2006, 05:46:44 AM
 :-\ i'll see what i can do for it :P

Regards
Pedro Simões
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: mbx5nitro on July 14, 2006, 09:22:42 PM
Ok how do i install this patch. I get all thing code in a page when i click one of those links or the download one. Waht do i need to do to install it.
I am on windows XP but my server is Linux but no shell access
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: oslad on July 14, 2006, 10:44:27 PM
you can goto: http://oslad.com/component/option,com_remository/Itemid,19/func,select/id,2/ (http://oslad.com/component/option,com_remository/Itemid,19/func,select/id,2/)

and click the download icon((http://oslad.com/components/com_remository/images/download_trans.gif)) from right side of Patched Roundcube Mail cvs-20060413 to download it.

after that, modify config on XP, see how to config (http://oslad.com/content/view/9/17/) for this patch.
when finish cofig, just upload it to your server.

if you keep insisting on using Change Password Patch for Roundcube Mail on XP, "WinPatch" is recommended.
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: xoqez on July 16, 2006, 08:07:39 AM
I have spoken with a friend of mine who is a developer and he is going to have a look if it is possible to change an Imap password.

Changing it in the database posses some issues with if they are using webmail sometimes and a mail client others.

You can create pages based on your control panel or mail server to change the password. I saw there was a document on integrating roundcube with cpanel which when you logged in you could change these settings. This solves the problem for cpanel users.

I would be careful using this patch unless your mail is based on webmail ONLY

Hopefully there will be a IMAP command to change the password. I have been looking for this for a project I am working on at the moment so when I find it I will let you know
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: oslad on July 16, 2006, 11:37:33 PM
Quote
Changing it in the database posses some issues with if they are using webmail sometimes and a mail client others.

this patch will work correctly with webmail and other clients(such as Evolution, Thunderbird, Outlook, etc), as it change IMAP password and RCmail password both. the limit is IMAP password need store in mysql.

Quote
You can create pages based on your control panel or mail server to change the password.

it's for admin, and this patch for logined user self only.
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: ledhed on July 18, 2006, 01:07:37 PM
I have downloaded roundcubemail-cvs-20060413-cp.tar.gz and extracted it.

When I try to apply the patch "rcmail-20060413-cp.patch" I get the following:

patching file index.php
Reversed (or previously applied) patch detected! Assume -R? [n]

Does this mean the patch has already been applied?

I assumed this and continued with my installation, but get an error when I try to access roundcube.

Firefox returns this error:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /var/www/roundcube/program/include/main.inc on line 1170


Any Ideas?

Thanks
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: oslad on July 19, 2006, 04:38:57 AM
yeah, roundcubemail-cvs-20060413-cp.tar.gz is Patched!
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: simoesp on July 19, 2006, 07:44:32 PM
you can dig in this site for RFC's but i've googled and didn't found nothing special :S.... so... it's not plausible
http://www.rfc-editor.org/cgi-bin/rfcsearch.pl
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: xoqez on July 20, 2006, 08:25:36 PM
wait so does it now change the password on the IMAP server?
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: oslad on July 20, 2006, 10:40:18 PM
Quote from: xoqez
wait so does it now change the password on the IMAP server?

The veryyyyyy basic task of this patch is "change the password on the IMAP server" since release.

-------------------------------
Configuration
# vi config/db.inc.php
// Add rows below, and modify to suit you.
$rcmail_config['db_mail_dsn'] = 'mysql://dbuser:your_passwd@localhost/mail_db';
$rcmail_config['db_mail_users_table'] = 'accountuser';
$rcmail_config['db_mail_user_field'] = 'username';
$rcmail_config['db_mail_passwd_field'] = 'password';
$rcmail_config['db_mail_passwd_type'] = '';       // ''-- for Plaintext, 'ENCRYPT', 'PASSWORD'
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: lasombra on July 31, 2006, 01:48:04 PM
I'm having the exact same problem. Any ideas on how to solve it?

Quote from: ledhed
I have downloaded roundcubemail-cvs-20060413-cp.tar.gz and extracted it.

When I try to apply the patch "rcmail-20060413-cp.patch" I get the following:

patching file index.php
Reversed (or previously applied) patch detected! Assume -R? [n]

Does this mean the patch has already been applied?

I assumed this and continued with my installation, but get an error when I try to access roundcube.

Firefox returns this error:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /var/www/roundcube/program/include/main.inc on line 1170


Any Ideas?

Thanks
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: oslad on July 31, 2006, 11:30:50 PM
OK, again,
roundcubemail-cvs-20060413-cp.tar.gz is Patched "rcmail-20060413-cp.patch" already, you don't need apply the patch again.
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: lasombra on August 01, 2006, 09:51:18 AM
Yes, I know that.
I didn't try to "re-patch" it.
I've just uncompress it and the problem occurs.
Is there any way to apply this patch on the SVN trunk?
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: oslad on August 02, 2006, 09:02:44 AM
Quote
Firefox returns this error:
Parse error: parse error, unexpected T_CONSTANT_ENCAPSED_STRING, expecting ')' in /var/www/roundcube/program/include/main.inc on line 1170

Any Ideas?

sorry, so careless! :-[

To solve it, please swap line 1170 and line 1169.(and the files is updated)

Quote
Is there any way to apply this patch on the SVN trunk?
this patch only for roundcubemail-cvs-20060413.
for SVN trunk, you need hack it. i'll make a patch for next cvs version.
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: ric on August 09, 2006, 10:26:04 AM
Patched files and all works well until I try to change the password, onceI click SAVE it comes up 'An error occurred will saving'. Any ideas, using Hmailserver.
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: oslad on August 10, 2006, 09:30:40 PM
are you have a correctly config, see Reply #24 in this topic.

or any more info relation this error?
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: leopard on August 12, 2006, 01:36:04 AM
Quote from: ric
Patched files and all works well until I try to change the password, onceI click SAVE it comes up 'An error occurred will saving'. Any ideas, using Hmailserver.

Also and i get this error :(
Title: Re: [Update to v0.1-beta2!] A pretty "Change Password" patch for Roundcube
Post by: oslad on August 21, 2006, 08:18:26 AM
Change Password Patch for Roundcube Mail v0.1beta2 release!
http://roundcubeforum.net/forum/index.php?topic=42.msg144#msg144 (http://roundcubeforum.net/forum/index.php?topic=42.msg144#msg144)
Title: Re: A pretty "Change Password" patch/module for Roundcube
Post by: Adam on August 21, 2006, 02:02:58 PM
Quote from: leopard
Quote from: ric
Patched files and all works well until I try to change the password, onceI click SAVE it comes up 'An error occurred will saving'. Any ideas, using Hmailserver.

Also and i get this error :(

Me too:

Log file gives:

Quote
[21-Aug-2006 18:55:01 +0100] DB Error: DB Error: not found in /var/www/html/roundcubemail-0.1beta2cp/program/include/rcube_db.inc on line 105
I use Ensim..

Ad
Title: Re: [Update to v0.1-beta2!] A pretty "Change Password" patch for Roundcube
Post by: oslad on August 22, 2006, 10:13:43 AM
1. Your configuration is incorrect or database permissions incorrectly.

Since the patch for v0.1-beta2 change from 'db_mail_*' to 'db_imap_*', so edit db.inc.php
Code: [Select]
# vi config/db.inc.php

Add these lines, and modify it to accord with your IMAP server.
Code: [Select]
$rcmail_config['db_imap_dsn'] = 'mysql://dbuser:your_passwd@localhost/imap_db';
$rcmail_config['db_imap_users_table'] = 'accountuser';
$rcmail_config['db_imap_user_field'] = 'username';
$rcmail_config['db_imap_passwd_field'] = 'password';
$rcmail_config['db_imap_passwd_type'] = '';       // ''-- for Plaintext, 'ENCRYPT', 'PASSWORD'

$rcmail_config['db_imap_dsn'] is the database connect string for IMAP server, such as
"mysql://root@localhost/imap_db"
"mysql://root:pass@localhost/imap_db"
"pgsql://postgres@unix+localhost/imap_db"
"pgsql://postgres:pass@localhost/imap_db"

This tutorial is very helpful:
http://www.vulcanonet.com/soft/index.php?pack=pear_tut (http://www.vulcanonet.com/soft/index.php?pack=pear_tut)

2. Please confirm you can connect to your database, for mysql, try
Code: [Select]
# telnet localhost 3306
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: asdrhyme on August 24, 2006, 04:23:39 AM
Hi,

When i change password it says successfully changed but stil at login screen it takes the original one.I have created the empty database. If i have to create table inside that please tell me sql for that.Further if you think any other reason for this please let me know.

Best Regards,
ASD Rhyme
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: oslad on August 24, 2006, 08:54:08 PM
Quote from: asdrhyme
When i change password it says successfully changed but stil at login screen it takes the original one.I have created the empty database. If i have to create table inside that please tell me sql for that.Further if you think any other reason for this please let me know.

Oh, the database named "imap_db" in connect string "mysql://root:pass@localhost/imap_db" is no need to create, just use it directly !

Generally, it has been created while building your SMTP or/and IMAP server(that is, for example, the database contain user's info for postfix and cyrus-imap ).
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: eghigo on August 26, 2006, 04:29:15 AM
Hi Oslad, sorry for my bad english :'( but why you not write a simple text for apply the patch ?
For example:

Open file: XXXX
Search: xxxxxxxxxxxxxxxxxxxx
and replace with.............
or
add before..........
add after........

Thanks ! ;)
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: igeoffi on August 26, 2006, 02:33:06 PM
Quote from: eghigo
Hi Oslad, sorry for my bad english :'( but why you not write a simple text for apply the patch ?
For example:

Open file: XXXX
Search: xxxxxxxxxxxxxxxxxxxx
and replace with.............
or
add before..........
add after........

Thanks ! ;)
you use something like tortoise SVN to apply the patch
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: eghigo on August 27, 2006, 03:56:11 AM
Thank you igeoffi but i don't know to use it ! :-[
I need very simply istructions for apply this patch !  :-\
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: 123123 on August 27, 2006, 12:45:27 PM
Quote from: eghigo
Thank you igeoffi but i don't know to use it ! :-[
I need very simply istructions for apply this patch !  :-\
Me to ???
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: oslad on August 27, 2006, 09:07:05 PM
Quote from: eghigo

Hi Oslad, sorry for my bad english :'( but why you not write a simple text for apply the patch ?


so sorry to hear that.

In this topic:
Quote
================v0.1beta2================
For more detail, and HOW TO USE THIS PATCH click here (http://oslad.com/content/view/29/17/)

In Reply #17 by me
Quote
if you keep insisting on using Change Password Patch for Roundcube Mail on XP, "WinPatch" is recommended.

If you still don't know howto apply this patch, please download:
Roundcube Mail v0.1beta2 (Change Password Patched)
It is applied the patch already.
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: Heritz on August 28, 2006, 08:23:23 PM
Hi,

My server use EXIM as mailserver. I've been looking for the "imap_db" database and I can't find it. So it means that I wont be able to connect and take the user info. I am logged as root looking all the databases in my server, and there is not such "imap_db".

I think you really have a lack of information on this patch. You should post more detailed instructions about how to set it up, requirements and stuff. For example, this patch doesn't seem to work on EXIM, and you are not explaining that.

Have you tried in on EXIM?

Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: oslad on August 30, 2006, 10:50:35 AM
Quote from: Heritz
My server use EXIM as mailserver. I've been looking for the "imap_db" database and I can't find it. So it means that I wont be able to connect and take the user info. I am logged as root looking all the databases in my server, and there is not such "imap_db".
the "imap_db" just as a example, not really exist on your server. it is created while setup your SMTP/IMAP server, and the name of it determined by yourself.

Quote from: Heritz
I think you really have a lack of information on this patch. You should post more detailed instructions about how to set it up, requirements and stuff. For example, this patch doesn't seem to work on EXIM, and you are not explaining that.

Sorry Heritz, i have no plan to post more detailed instructions about how to set it up, as it so complex that can write one or two books.

Quote from: Heritz
Have you tried in on EXIM?
Postfix is my favorite, but EXIM also support mysql, please google it.
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: Heritz on August 30, 2006, 11:02:59 AM
Hi man,

Thanks for your answer. So, what I need is to set up my mail server to work with MySQL database?
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: ufocek on September 20, 2006, 07:18:18 AM
Hi all :)

Today I find this patch and install , it's work wery vell , but I have question about password encryption
I use postfixadmin and when I add user his encrypted password like this:
$1$d1X891Cx$LGqdWmPk/mUEt5f5JHYhW. = test123
Now If change password with RC ,his encrypted password like Z15Vz.eugYaj2 , because I use "encrypt" options
but in postfixadmin i use "md5crypt", it's possibly add this options to this patch ?
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: Heritz on September 20, 2006, 11:55:16 AM
Can I do any modification to this script to update the passwords stored in shadow files?

My EXIM is configured to store the passwords in shadow files. What can I do about it?
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: kmikze on October 04, 2006, 04:52:47 AM
Hello,

when trying to change my passwd, i got this error:
DB Error: DB Error: no such field Query: UPDATE users SET password = ENCRYPT('test') WHERE email='kmikze@fragtime.net' OR (email='kmikze@fragtime.net' AND domain_name = '') [nativecode=1054 ** Unknown column 'domain_name' in 'where clause'] in /var/www/www-root/roundcubemail/program/include/rcube_db.inc on line 479

Using RC beta2 already patch.
here's my SQL users table:
+----------+-------------+------+-----+------------+-------+---------------------------------+
| Field  | Type    | Null | Key | Default  | Extra | Privileges           |
+----------+-------------+------+-----+------------+-------+---------------------------------+
| email  | varchar(80) |   | PRI |      |    | select,insert,update,references |
| password | varchar(20) |   |   |      |    | select,insert,update,references |
| quota  | int(10)   | YES |   | 1073741824 |    | select,insert,update,references |
+----------+-------------+------+-----+------------+-------+---------------------------------+

and my RC db.inc.php for changing password:
//Chagement de mot de passe:
$rcmail_config['db_imap_dsn'] = 'mysql://*****:*****@localhost/mail';
$rcmail_config['db_imap_users_table'] = 'users';
$rcmail_config['db_imap_user_field'] = 'email';
$rcmail_config['db_imap_passwd_field'] = 'password';
$rcmail_config['db_imap_passwd_type'] = 'ENCRYPT';       // ''-- for Plaintext, 'ENCRYPT', 'PASSWORD'


Any idea ??
thanks for your help
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: jeeth on October 04, 2006, 06:12:13 AM
Quote from: SKaero
Thanks For posting this, It will be a good tool!

I have chaged the function rcmail_save_passwd() in file program/steps/settings/passwd.inc , which now can accept the imap password change through the port 106, let me know if it is usefull.

Thanks
jeeth
-----------------------------------------------------------------
function rcmail_save_passwd($new_pw){
 global $CONFIG, $_SESSION;
 $poppassd_server = "localhost"; //imap server address

 $old_pw = decrypt_passwd($_SESSION['password']);
 $username = $_SESSION['username'];

 $pop_socket = fsockopen($poppassd_server, 106, $errno, $errstr);
  if (!$pop_socket) {
    $messages[] = _("ERROR") . ': ' . "$errstr ($errno)";
    return FALSE;
    return $messages;
  }

  cpw_poppassd_readfb($pop_socket, $result, $messages, $debug);
  if(!preg_match('/^2\d\d/', $result) ) {
    cpw_poppassd_closeport($pop_socket, $messages, $debug);
    return FALSE;
    return $messages;
  }

  fputs($pop_socket, "user $username\r\n");
  cpw_poppassd_readfb($pop_socket, $result, $messages, $debug);
  if(!preg_match('/^[23]\d\d/', $result) ) {
    cpw_poppassd_closeport($pop_socket, $messages, $debug);
    return FALSE;
    return $messages;
  }


 fputs($pop_socket, "pass $old_pw\r\n");
  cpw_poppassd_readfb($pop_socket, $result, $messages, $debug);
  if(!preg_match('/^[23]\d\d/', $result) ) {
    cpw_poppassd_closeport($pop_socket, $messages, $debug);
    return FALSE;
    return $messages;
  }
 fputs($pop_socket, "newpass $new_pw\r\n");
  cpw_poppassd_readfb($pop_socket, $result, $messages, $debug);
  cpw_poppassd_closeport($pop_socket, $messages, $debug);
   $_SESSION['password'] = encrypt_passwd($new_pw);
  if(!preg_match('/^2\d\d/', $result) ) {
    return FALSE;
    return $messages;
  }

  return TRUE;

}
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: oslad on October 09, 2006, 08:49:41 PM
Quote from: kmikze
Hello,

when trying to change my passwd, i got this error:
DB Error: DB Error: no such field Query: UPDATE users SET password = ENCRYPT('test') WHERE email='kmikze@fragtime.net' OR (email='kmikze@fragtime.net' AND domain_name = '') [nativecode=1054 ** Unknown column 'domain_name' in 'where clause'] in /var/www/www-root/roundcubemail/program/include/rcube_db.inc on line 479

Using RC beta2 already patch.
here's my SQL users table:
+----------+-------------+------+-----+------------+-------+---------------------------------+
| Field  | Type    | Null | Key | Default  | Extra | Privileges           |
+----------+-------------+------+-----+------------+-------+---------------------------------+
| email  | varchar(80) |   | PRI |      |    | select,insert,update,references |
| password | varchar(20) |   |   |      |    | select,insert,update,references |
| quota  | int(10)   | YES |   | 1073741824 |    | select,insert,update,references |
+----------+-------------+------+-----+------------+-------+---------------------------------+

sorry for the long delay!

you can modify "program/steps/settings/passwd.inc" file:
change:
Code: [Select]
$IMAPDB->query(&quot;UPDATE &quot; . $CONFIG['db_imap_users_table'] .
             &quot; SET &quot; . $CONFIG['db_imap_passwd_field'] . &quot; = &quot; . $CONFIG['db_imap_passwd_type'] . &quot;(?)&quot; .
       &quot; WHERE &quot; . $CONFIG['db_imap_user_field'] . &quot;=? OR (&quot; . $CONFIG['db_imap_user_field'] . &quot;=? AND domain_name = '')&quot;,
       $newpasswd, $_SESSION['username'], $_SESSION['username']);
to:
Code: [Select]
$IMAPDB->query("UPDATE " . $CONFIG['db_imap_users_table'] .
             " SET " . $CONFIG['db_imap_passwd_field'] . " = " . $CONFIG['db_imap_passwd_type'] . "(?)" .
       " WHERE " . $CONFIG['db_imap_user_field'] . "=?", $newpasswd, $_SESSION['username']);

OR add a field "domain_name" to your users table.
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: oslad on October 09, 2006, 09:54:07 PM
Thanks for your work! jeeth.

Code: [Select]
which now can accept the imap password change through the port 106
It's POP/IMAP, not only IMAP

Code: [Select]
let me know if it is usefull.at least, it is not work for me now. i've found your code is from SquirrelMail directly, but some function's define is missing.

i'll try to port it for next release of RoundCube mail, so this patch can change password for most IMAP/POP mail server.

THANK YOU, JEETH!
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: kmikze on October 10, 2006, 05:39:21 AM
Quote from: oslad
sorry for the long delay!

you can modify "program/steps/settings/passwd.inc" file:
change:
Code: [Select]
$IMAPDB->query(&quot;UPDATE &quot; . $CONFIG['db_imap_users_table'] .
             &quot; SET &quot; . $CONFIG['db_imap_passwd_field'] . &quot; = &quot; . $CONFIG['db_imap_passwd_type'] . &quot;(?)&quot; .
       &quot; WHERE &quot; . $CONFIG['db_imap_user_field'] . &quot;=? OR (&quot; . $CONFIG['db_imap_user_field'] . &quot;=? AND domain_name = '')&quot;,
       $newpasswd, $_SESSION['username'], $_SESSION['username']);
to:
Code: [Select]
$IMAPDB->query("UPDATE " . $CONFIG['db_imap_users_table'] .
             " SET " . $CONFIG['db_imap_passwd_field'] . " = " . $CONFIG['db_imap_passwd_type'] . "(?)" .
       " WHERE " . $CONFIG['db_imap_user_field'] . "=?", $newpasswd, $_SESSION['username']);

OR add a field "domain_name" to your users table.

Thanks a lot, i've just added domain_name field in users table. Working fine ! :D
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: awmartin on October 19, 2006, 10:21:23 AM
Quote from: jeeth
Quote from: SKaero
Thanks For posting this, It will be a good tool!

I have chaged the function rcmail_save_passwd() in file program/steps/settings/passwd.inc , which now can accept the imap password change through the port 106, let me know if it is usefull.

Thanks
jeeth
-----------------------------------------------------------------
function rcmail_save_passwd($new_pw){
 global $CONFIG, $_SESSION;
 $poppassd_server = "localhost"; //imap server address

 $old_pw = decrypt_passwd($_SESSION['password']);
 $username = $_SESSION['username'];

 $pop_socket = fsockopen($poppassd_server, 106, $errno, $errstr);
  if (!$pop_socket) {
    $messages[] = _("ERROR") . ': ' . "$errstr ($errno)";
    return FALSE;
    return $messages;
  }

  cpw_poppassd_readfb($pop_socket, $result, $messages, $debug);
  if(!preg_match('/^2\d\d/', $result) ) {
    cpw_poppassd_closeport($pop_socket, $messages, $debug);
    return FALSE;
    return $messages;
  }

  fputs($pop_socket, "user $username\r\n");
  cpw_poppassd_readfb($pop_socket, $result, $messages, $debug);
  if(!preg_match('/^[23]\d\d/', $result) ) {
    cpw_poppassd_closeport($pop_socket, $messages, $debug);
    return FALSE;
    return $messages;
  }


 fputs($pop_socket, "pass $old_pw\r\n");
  cpw_poppassd_readfb($pop_socket, $result, $messages, $debug);
  if(!preg_match('/^[23]\d\d/', $result) ) {
    cpw_poppassd_closeport($pop_socket, $messages, $debug);
    return FALSE;
    return $messages;
  }
 fputs($pop_socket, "newpass $new_pw\r\n");
  cpw_poppassd_readfb($pop_socket, $result, $messages, $debug);
  cpw_poppassd_closeport($pop_socket, $messages, $debug);
   $_SESSION['password'] = encrypt_passwd($new_pw);
  if(!preg_match('/^2\d\d/', $result) ) {
    return FALSE;
    return $messages;
  }

  return TRUE;

}


After I applied this to the Patch it just gives me a blank screen when I submit the new password change. I checked in the errors log file and it shows this:

[19-Oct-2006 09:15:17] PHP Fatal error: Call to undefined function: cpw_poppassd_readfb() in /mail/program/steps/settings/passwd.inc on line 34

I would assume that I would need to define that function, but I'm not sure exactly where i need to define it.

Any Ideas???
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: jnorth on October 26, 2006, 09:49:36 AM
Quote from: awmartin
After I applied this to the Patch it just gives me a blank screen when I submit the new password change. I checked in the errors log file and it shows this:

[19-Oct-2006 09:15:17] PHP Fatal error: Call to undefined function: cpw_poppassd_readfb() in /mail/program/steps/settings/passwd.inc on line 34

I would assume that I would need to define that function, but I'm not sure exactly where i need to define it.

Any Ideas???

I would really like to use the MySQL version of this but my hosting setup (VHCS2.4.7.1) uses its own table and request engine to change passwords, and it's a bit hard (for me) to rewrite the passwd.inc function to work with its tables.

So - I'm attempting to use the poppassd daemon as described here. I had the same error as awmartin initially, so I found that adding this to the passwd.inc file, just above the rcmail_save_passwd function, took care of the missing functions:
Code: [Select]
function cpw_poppassd_readfb($pop_socket, &$result, &$messages, $debug = 0) {
  $strResp = '';
  $result = '';

  if (!feof($pop_socket)) {
   $strResp = fgets($pop_socket, 1024);
   $result = substr(trim($strResp), 0, 3); // 200, 500
   if(!preg_match('/^[23]\d\d/', $result) || $debug) {
     $messages&#91;] = &quot;--> $strResp&quot;;
   }
  }
}

function cpw_poppassd_closeport($pop_socket, &$messages, $debug = 0) {
  if ($debug) {
    array_push($messages, _(&quot;Closing Connection&quot;));
  }
  fputs($pop_socket, &quot;quit\r\n&quot;);
  fclose($pop_socket);
}

Now - I'm back to the "Error occurred while saving" error and I can;t find any entries in log files to help me figure out what the error is.

Help?
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: jnorth on October 26, 2006, 10:04:10 AM
OK, I think I can help now -

I'm getting an 'incorrect old password' error in my logs now. So, trying to run telnet localhost 106 on my server, entering "user josh@domain.com", waiting, then "pass oldpassword" - I still get the error.

So - it seems as if once you get the functions in place it would work. Except I am using virtual users for email accounts, so I don't think (from what I can find) that poppassd will work with them.

Please let me know if I am incorrect!
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: diego on October 29, 2006, 05:05:52 PM
Hi

I modify passwd.inc to support md5crypt password (like postfixadmin).

program/steps/settings/passwd.inc
find
Code: [Select]
function rcmail_save_passwd($newpasswd)
 {
 global $CONFIG, $_SESSION;
append
Code: [Select]
  if($CONFIG['db_imap_passwd_type'] == 'crypt'){
  $newpasswd = crypt($newpasswd);
$sqlset = "(?)";
  }else{
$sqlset = $CONFIG['db_imap_passwd_type'] . "(?)";
  }

find
Code: [Select]
" SET " . $CONFIG['db_imap_passwd_field'] . " = " . $CONFIG['db_imap_passwd_type'] . "(?)" .
replace with
Code: [Select]
" SET " . $CONFIG['db_imap_passwd_field'] . " = " . $sqlset .

now the crypt settings in config/db.inc.php
find
Code: [Select]
$rcmail_config['db_imap_passwd_type'] = ''; // ''(Plaintext) or 'ENCRYPT', 'PASSWORD'replace with
Code: [Select]
$rcmail_config['db_imap_passwd_type'] = 'crypt'; // ''(Plaintext), 'ENCRYPT', 'PASSWORD', 'crypt'(md5crypt)
I know, it is a dirty code, but it works and I'm not a programmer :)
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: psenechal on November 11, 2006, 02:28:03 PM
Need a little help if someone has experience applying this patch to hMail.

I downloaded the patched version of RoundCube and added my IMAP database settings to the db.inc.php file. I can login and everything works fine. When I go to the password screen and change my password, it says the action completed successfully, but the password has not been changed.

I've been trying to track down the problem and the only thing I can think of is that the hMail database field for username is actually username@domain.com not just username.

Does this patch anticipate that, or do I need to add something so it looks for the right entry in the hMail table?

Anyone have success applying this to hMail and did you need to change anything to make it work?

Thanks for the help :)
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: toto99x on November 13, 2006, 03:12:25 AM
This sounds good, but I'm pretty paranoid about something going wrong, so...

Could someone clarify whether this patch changes the password at the OS level, or is it a db thing? 'Cos my users are all in /etc/passwd. Does this change the UNIX password, à la passwd ?

Thanks.
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: daashag on November 13, 2006, 04:27:06 AM
Here's the patch you want to change shadow passwords.

http://roundcubeforum.net/forum/index.php?topic=551.0
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: oslad on November 14, 2006, 01:04:13 AM
Quote from: psenechal
Need a little help if someone has experience applying this patch to hMail.
.......
I've been trying to track down the problem and the only thing I can think of is that the hMail database field for username is actually username@domain.com not just username.

you can modify the SQL update clause
See: http://roundcubeforum.net/forum/index.php?topic=42.msg3213#msg3213 (http://roundcubeforum.net/forum/index.php?topic=42.msg3213#msg3213)
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: oslad on November 14, 2006, 01:06:24 AM
Quote from: diego

I modify passwd.inc to support md5crypt password (like postfixadmin).


Thanks! diego
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: Jonn3 on November 28, 2006, 03:52:12 AM
Will this patch work with roundcube svn?
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: oslad on November 28, 2006, 07:47:08 PM
No! It's a patch, not a module. so, sorry!
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: [GuS] on December 29, 2006, 08:59:10 AM
Could you please do something like this for SVN?

Thanks.
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: Thommy on January 03, 2007, 06:30:53 PM
Hi!

Here is a change-password-patch for the svn-trunk. It was build with r414 but it also works with the current r445!

Here you are: http://tiffy.rids.de/roundcubemail-svn-r414-passwd-patch.diff

The needed SQL query for password update can be configured in "config/main.inc.php". To do this, search and edit the following section:

Quote
// Query to change passwords from the user database
// %u will be replaced with the current username for login.
// %p will be replaced with the current password for login.
// %n will be replaced with the new password for login.
$rcmail_config['virtpasswd_query'] = '';

Then it should read something like:

Quote
$rcmail_config['virtpasswd_query'] = 'UPDATE mail.vmailboxes SET mbox_passwd = MD5(\'%n\') WHERE mbox_username = \'%u\' AND mbox_passwd = MD5(\'%p\');';

Don't forget to set the database rights correctly for the roundcubemail user... ;)

Have fun!

Cheers,
-Thomas
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: nejc on January 05, 2007, 09:39:55 AM
Hi

Firstly just let me say the webmail rocks! :o

secondly, i have a problem... I am using BlueTabby template, and this change password patch, the webmail is version beta2... Now in BlueTabby template its like the change password patch isnt installed... Can someone tell me what to do, that this will work also in BlueTabby? in template default it works fine...

thanks
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: EqUaTe on February 15, 2007, 12:15:45 PM
Quote from: IQplay
Thanks for your work! jeeth.

Code: [Select]
which now can accept the imap password change through the port 106
It's POP/IMAP, not only IMAP

Code: [Select]
let me know if it is usefull.at least, it is not work for me now. i've found your code is from SquirrelMail directly, but some function's define is missing.

i'll try to port it for next release of RoundCube mail, so this patch can change password for most IMAP/POP mail server.

THANK YOU, JEETH!


Have you managed to make any progress with this?

I'd love to integrate it into my setup, which is presently using svn rev 445..

I'd appreciate any updates :)

Thanks
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: Thommy on February 19, 2007, 04:32:12 PM
Hi again!

I have seen that some people have tried to find a patch on my server for the new SVN trunk... :P

So, here it is...for SVN trunk #486: http://tiffy.rids.de/roundcubemail-svn-r486-passwd-patch.diff

Cheers,
-Thomas
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: samvertex on February 25, 2007, 07:43:24 PM
Hi

Can someone do this patch for r498 too


I am using ... qmail , vpopmail
roundcubemail-0.1beta2-courierpassd

Using this one for the password change ... but i wanted to switch to a new SVN as i like some new features.

Thanks



Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: TTr0 on February 28, 2007, 02:17:08 AM
hello!

Problem Query :'(

logs/errors

DB Error: no such field Query: UPDATE users SET crypt = ENCRYPT('test') WHERE id='ab@exemple.ru' OR (id='ab@exemple.ru' AND domain_name = '') [nativecode=1054 ** Unknown column 'domain_name' in 'where clause'] in /usr/local/www/..../include/rcube_db.inc on line 479

User table DB
-----------+------------------+------+-----+----------------------------+-------+
| Field  | Type      | Null | Key | Default          | Extra |
+-----------+------------------+------+-----+----------------------------+-------+
| id    | varchar(64)   | NO | PRI |              |   |
| crypt  | varchar(64)   | NO |
 
...


mysql> select id,crypt from users;
+----------+---------------++
| id   | crypt    |
+----------+---------------+
| ab   | VfRDtKAGIkVX6 |
...

MTA: Exim+courier-imap

HELP People!!
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: jaigo on March 03, 2007, 12:13:13 AM
Quote from: kmikze
Hello,

when trying to change my passwd, i got this error:
DB Error: DB Error: no such field Query: UPDATE users SET password = ENCRYPT('test') WHERE email='kmikze@fragtime.net' OR (email='kmikze@fragtime.net' AND domain_name = '') [nativecode=1054 ** Unknown column 'domain_name' in 'where clause'] in /var/www/www-root/roundcubemail/program/include/rcube_db.inc on line 479


First I want they excuse my english, not my language. Also I had that error, the solution was to change in that line the row 'domain_name' by the real name of the row, in my case: 'domain_name' by 'email'

Greetings
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: Satrap on March 06, 2007, 04:58:48 AM
Hello,

I have some problems with patched roundcube. Anytime I change password a get a success message:
(http://img170.imageshack.us/img170/4844/saveja9.jpg)

but the password is the same. It doesn't change at all. Does anyone know why?

EDIT

After some modifications in rucube/program/steps/settings/passwd.inc everything working now.

 ;D
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: plistkin on March 13, 2007, 04:02:40 AM
though, it took me a while...
but now... works like a charm...
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: j99 on May 09, 2007, 03:46:55 AM
Anyone managed to put this patch on latest SVN trunk ? I tried using the patch for SVN trunk #486 by Thommy and all patched OK except file program/include/main.inc

Here's the rejected part:

***************
*** 1361,1366 ****
 
     // USER SETTINGS
     'userprefs' => 'rcmail_user_prefs_form',
     'itentitieslist' => 'rcmail_identities_list',
     'identityframe' => 'rcmail_identity_frame',
     'identityform' => 'rcube_identity_form',
--- 1361,1367 ----
 
     // USER SETTINGS
     'userprefs' => 'rcmail_user_prefs_form',
+    'userpasswd' => 'rcmail_passwd_form',
     'itentitieslist' => 'rcmail_identities_list',
     'identityframe' => 'rcmail_identity_frame',
     'identityform' => 'rcube_identity_form',


This was part of function rcube_xml_command which does not exist anymore... Anyone has any idea what to do?
I really like this patch and I used it in older versions without problems. But in this new version I can't make it work and
also don't have skills to do it..

Thanx!
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: rockwilda on May 24, 2007, 05:04:12 PM
Hallo!

Does this patch work with roundcube rc1?

best regards,
nico
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: FatJonny on May 24, 2007, 06:07:22 PM
No it doesnt yet. But I know the author is working on an RC1 compatible version. I'm eagerly waiting for it's release :D
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: SKaero on May 24, 2007, 06:12:03 PM
Same here, its a very good plug in to have, for any one giving out email accounts. ;D
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: Julien on May 26, 2007, 01:09:44 PM
Hi,
Here comes an updated version working with RC1 : http://blog.julienwadin.be/index.php/2007/05/26/72-modification-du-password-email-dans-roundcube

Sory, its written in French, but you've the filenames and the modifications you've to do in each of them.

You can contact me for any questions by PM !

Have fun !

Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: kalimati on May 27, 2007, 01:52:33 AM
Thanks for posting the link, but the Labels and Messages in in French. I hope some will translate them into English.

Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: Julien on May 27, 2007, 05:39:33 AM
+$labels['changepasswd'] = 'Password';
+$labels['curpasswd'] = 'Current password';
+$labels['newpasswd'] = 'New password';
+$labels['confpasswd'] = 'Again';

+$messages['nopassword'] = 'Please choose a new password !';
+$messages['passwordinconsistency'] = 'New password and its confirmation do not match';
+$messages['badpassword'] = 'Current password looks like to be bad';
+$messages['passwordmodified'] = 'Password successfully changed !';
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: rockwilda on May 27, 2007, 10:11:42 AM
@Julien: Its possible to make a patch-file for this patch?
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: kalimati on May 27, 2007, 11:33:19 AM
Julien, Thanks for translating the Labels and Messages.
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: Julien on May 27, 2007, 03:19:35 PM
Quote from: rockwilda
@Julien: Its possible to make a patch-file for this patch?

Yes. You want an archive containing all the modified files ?

As I said, you should probably have to customise the password.inc file, regarding your own mail server...
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: wshamroukh on May 27, 2007, 05:24:55 PM
i have done what is said in the link provided by Julien but still i can't get the change password tab in the personal settings??
By the way i have the RC1 of round cube?? is there something messing?
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: Julien on May 27, 2007, 05:34:13 PM
Quote from: wshamroukh
i have done what is said in the link provided by Julien but still i can't get the change password tab in the personal settings??
By the way i have the RC1 of round cube?? is there something messing?



Oups, I've updated the link
A file was missing in the list. I've added it at the end of the page
Sory and thanks for your feedback
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: kalimati on May 28, 2007, 07:30:04 AM
No, I am not able to get it functioning. On entering the Current Password and New Passowrd it responds with "Current password looks like to be bad". I don't know if that can be corrected by the server specific customisation that Julien has talked of. I am on BlueHost.com and I wonder what change that would mean.
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: Julien on May 28, 2007, 07:36:22 AM
You have to customize the following lines
I'm not sure that you've the same system. I don't now how BlueHost is working...
Were are your password stocked ?

+function rcmail_save_passwd($curpassword, $newpassword){
+   global $DB, $CONFIG, $OUTPUT;
+      
+   $DB->query('select password from postfix.mailbox where username=\''.$_SESSION['username'].'\'');
+   $row = $DB->fetch_assoc();
+   $actualCryptedPassword = md5($curpassword);
+   
+   if ($actualCryptedPassword != $row['password'])
+      return false;
+   else {//ok, we can proceed
+      $DB->query('update postfix.mailbox set password=\''.md5($newpassword).'\',modified=NOW() where username=\''.$_SESSION['username'].'\'');
+      if (!$DB->is_error()) {
+         $_SESSION['password'] = encrypt_passwd($newpassword); //save the new password in the session
+        return true;
+      } else
+        return false;
+         
+   }
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: kalimati on May 30, 2007, 09:15:52 AM
On BlueHost, we change password through the CPanel. Does that indicate anything to you about where it could be stored?
Title: Re: A pretty "Change Password" patch for Roundcube [Update to v0.1-beta2!]
Post by: Julien on May 30, 2007, 03:45:49 PM
You should read this thread, whose talking about Cpanel password changing : http://roundcubeforum.net/forum/index.php?topic=711.0
Look their password.inc how it's done, then you copy/paste :-)
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: oslad on July 06, 2007, 03:01:18 AM
Hi, Everyone!

The Pretty "Change Password" patch update to v0.1RC1(07-7-3), add cPanel, md5 and more!

Go to here! (http://roundcubeforum.net/forum/index.php?topic=42.msg144#msg144)
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: SKaero on July 06, 2007, 05:01:22 AM
Wow nice update, thanks!
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: Bononi on July 06, 2007, 01:59:04 PM
Very very good IQplay!! Congratulations....
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: GunFro on July 12, 2007, 11:20:57 AM
.......................
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: bschneider on August 13, 2007, 01:38:51 PM
Hi Everyone! First port here. Hopefuly this will benefit alot of people. And by the way, thank you so much for this Roundcube project. I just love the interface.

Here is what needs to be changed and modified to get the change password patch from IQPlay to work with courierpassd on port 106 for those of us that does not use cPanel or MySql with IMAP. This works with Qmail and vpopmail. Perhaps IQPlay can add it to his patch? I just did what was suggested and use the Squirrelmail plugin and modify it to work with RoundCube.


Here is the modified code for db.inc.php. There are basically two lines that were added, the last two; the first was the IP address of your IMAP/POP server and the other is the port your server is listening on, this is usually 106. Then you'll see another option to add, which is 'change_pwd_for_poppass'.

Code: [Select]
// The 'change_pwd_proc' can be 'change_pwd_for_db' or 'change_pwd_for_cpanel' or 'change_pwd_for_poppass' now,
// If 'change_pwd_for_cpanel' is selected, the value of 'db_imap_xxxxxx' is omitted
$rcmail_config['change_pwd_proc'] = 'change_pwd_for_poppass';
$rcmail_config['db_imap_dsn'] = 'mysql://ic_webmail:roundcube@localhost/roundcube';
$rcmail_config['db_imap_users_table'] = 'accountuser';
$rcmail_config['db_imap_user_field'] = 'username';
$rcmail_config['db_imap_passwd_field'] = 'password';
$rcmail_config['db_imap_passwd_type'] = '';  // '' (Plaintext), 'PASSWORD', 'MD5CRYPT', or 'ENCRYPT'
$rcmail_config['poppass_server'] = 'xxx.xxx.xxx.xxx';
$rcmail_config['poppass_port'] = '106';

Next you'll need to add three functions to the passwd.inc file. The first section is the actual code to change the password. You'll want to add it just after the function change_pwd_for_db section but before 'you may not change the code below' lines

Code: [Select]
function change_pwd_for_poppass($curpasswd, $newpasswd)
{
  global $username, $CONFIG;

  $poppass_server = $CONFIG['poppass_server'];
  $poppass_port = $CONFIG['poppass_port'];

  $pop_socket = fsockopen($poppass_server, $poppass_port);
  if (!$pop_socket) {
     return FALSE;
  }

  change_pass_readfb($pop_socket, $result);
  if(!preg_match('/^2\d\d/', $result) ) {
    change_pass_closeport($pop_socket);
     return FALSE;
  }

  fputs($pop_socket, "user $username\r\n");
  change_pass_readfb($pop_socket, $result);
  if(!preg_match('/^[23]\d\d/', $result) ) {
    change_pass_closeport($pop_socket);
    return FASLSE;
  }

  fputs($pop_socket, "pass $curpasswd\r\n");
  change_pass_readfb($pop_socket, $result);
  if(!preg_match('/^[23]\d\d/', $result) ) {
    change_pass_closeport($pop_socket);
    return FALSE;
  }

  fputs($pop_socket, "newpass $newpasswd\r\n");
  change_pass_readfb($pop_socket, $result);
  change_pass_closeport($pop_socket);
  if(!preg_match('/^2\d\d/', $result) ) {
     return FALSE;
  }


  return TRUE;
}

Then add the following two function code to the end of the file just above //add some labels to client


Code: [Select]
function change_pass_closeport($pop_socket, &$messages) {
  if ($debug) {
    array_push($messages, _("Closing Connection"));
  }
  fputs($pop_socket, "quit\r\n");
  fclose($pop_socket);
}

function change_pass_readfb($pop_socket, &$result, &$messages) {
 $strResp = '';
 $result = '';

 if (!feof($pop_socket)) {
   $strResp = fgets($pop_socket, 1024);
   $result = substr(trim($strResp), 0, 3); // 200, 500
   if(!preg_match('/^[23]\d\d/', $result) || $debug) {
     $messages[] = "--> $strResp";
   }
 }
}

That's it. Simple as that.

Bryan
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: Julien PHAM on September 10, 2007, 02:48:14 PM
This thing seems wonderful, but my passwords are unix passwords, stored in the .passwd stuff I think, as I use postfix, dovecot and cyrus-sasl... so is it possible to make this patch works for this kind of server?

Thanks
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: yavor on September 26, 2007, 07:23:13 AM
Does anyone get a blank screen after the patch?
Also in my error log there is a message:

Code: [Select]
PHP Fatal error: Call to undefined function: mcrypt_module_open() in /var/www/mydomain/rc/program/include/main.inc on line 790
How does the function's code looks like and can I define it by myself?
Please, help?
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: tom28 on September 26, 2007, 02:05:14 PM
Quote from: yavor
Does anyone get a blank screen after the patch?
Also in my error log there is a message:

Code: [Select]
PHP Fatal error: Call to undefined function: mcrypt_module_open() in /var/www/mydomain/rc/program/include/main.inc on line 790
How does the function's code looks like and can I define it by myself?
Please, help?


I also had the same problem, solved the issue by installing libmcrypt.
Thanks
Thomas
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: yavor on September 27, 2007, 03:03:42 AM
Yes, I've installed the php4-mcrypt module and the blank screen disappeared. But after that another issue has raised. I see the "change password" tab in the settings, but when I try to change it, it says "an error occured while saving". In the error log there is a message:

Code: [Select]
[27-Sep-2007 09:52:17 +0300] DB Error: DB Error: no such table Query: UPDATE email SET p_crypt = ENCRYPT('asd') WHERE local_part='*****' OR (local_part='*****' AND domain_name = '') [nativecode=1146 ** Table 'rc.email' doesn't exist] in /var/www/plov.net/rc/program/include/rcube_db.inc on line 505
It seems the script is trying to update a table rc.email which is actually email. I don't know why is this rc.-prefix.
Any ideas? Thanks in advance!
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: tom28 on September 27, 2007, 10:55:27 AM
Quote from: yavor
Yes, I've installed the php4-mcrypt module and the blank screen disappeared. But after that another issue has raised. I see the "change password" tab in the settings, but when I try to change it, it says "an error occured while saving". In the error log there is a message:

Code: [Select]
[27-Sep-2007 09:52:17 +0300] DB Error: DB Error: no such table Query: UPDATE email SET p_crypt = ENCRYPT('asd') WHERE local_part='*****' OR (local_part='*****' AND domain_name = '') [nativecode=1146 ** Table 'rc.email' doesn't exist] in /var/www/plov.net/rc/program/include/rcube_db.inc on line 505
It seems the script is trying to update a table rc.email which is actually email. I don't know why is this rc.-prefix.
Any ideas? Thanks in advance!

Open you db.inc.php and goto last section displayed as
// The 'change_pwd_proc' can be 'change_pwd_for_db' or 'change_pwd_for_cpanel' now,
// If 'change_pwd_for_cpanel' is selected, the value of 'db_imap_xxxxxx' is omitted

and configure this according to your mail server/IMAP tables

Thanks
Thomas
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: yavor on September 27, 2007, 11:05:52 AM
I did it already, but somewhere in the code something append this rc. prefix.
Here is my db.inc.php part you are talking about:

Code: [Select]
// The 'change_pwd_proc' can be 'change_pwd_for_db' or 'change_pwd_for_cpanel' now,
// If 'change_pwd_for_cpanel' is selected, the value of 'db_imap_xxxxxx' is omitted
$rcmail_config['change_pwd_proc'] = 'change_pwd_for_db';
$rcmail_config['db_imap_dsn'] = 'mysql://user:pass@localhost/rc';
$rcmail_config['db_imap_users_table'] = 'email';
$rcmail_config['db_imap_user_field'] = 'local_part';
$rcmail_config['db_imap_passwd_field'] = 'p_crypt';
$rcmail_config['db_imap_passwd_type'] = 'ENCRYPT';  // '' (Plaintext), 'PASSWORD', 'MD5CRYPT', or 'ENCRYPT'

// end db config file

Hopefully it will helps.
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: driggs on October 12, 2007, 02:01:50 PM
Using the RC1 version, I had to edit 'program/steps/settings/passwd.inc' to remove the hard-coded column name "domain_name" from the SQL query. This should either be removed entirely, or placed into the db config. My users' user names are their full email addresses, so the extra "or" clause wasn't needed at all.

After making this small change to the SQL query, the patch works great, and all my users are able to change their own passwords (Postfix / MySQL virtual users).

Thanks!
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: ami on October 31, 2007, 10:59:09 PM
dear all,

i have postfix and rouncube installed, but when i test with roundcubemail-0.1-rc1-dep-pw1.tar.gz, there are some problem, in the last my finding was like this:

[Thu Nov 01 09:46:46 2007] [error] [client 202.155.6.225] PHP Notice: DB Error: mismatch Query: UPDATE mailbox SET password =  WHERE username =  [DB Error: mismatch] in /usr/local/apache2/htdocs/tes/program/include/bugs.inc on line 80, referer:


that error shows after i remove the lines in program/steps/settings/passwd.inc, the goal is to remove the domain_name

before:
 $sqlset = "UPDATE " . $CONFIG['db_imap_users_table'] . " SET " . $CONFIG['db_imap_passwd_field'] . " = " . $sqlset .
    " WHERE " . $CONFIG['db_imap_user_field'] . "=? OR (" . $CONFIG['db_imap_user_field'] . "=? AND domain_name = '
')";


after:
  $sqlset = "UPDATE " . $CONFIG['db_imap_users_table'] . " SET " . $CONFIG['db_imap_passwd_field'] . " = " . $sqlset .
    " WHERE " . $CONFIG['db_imap_user_field'] . " =? " ;


also my db.inc was like this (using table "mailbox" in postfixadmin)
$rcmail_config['change_pwd_proc'] = 'change_pwd_for_db';
$rcmail_config['db_imap_dsn'] = 'mysql://postfix:xxxxxxxxx@localhost/postfix';
$rcmail_config['db_imap_users_table'] = 'mailbox';
$rcmail_config['db_imap_user_field'] = 'username';
$rcmail_config['db_imap_passwd_field'] = 'password';
$rcmail_config['db_imap_passwd_type'] = 'MD5CRYPT'; // '(Plaintext)', 'PASSWORD', 'MD5CRYPT', or 'ENCRYPT'


anyone can help me about this error?

rgrds,

ami
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: driggs on November 01, 2007, 12:38:08 PM
Quote from: ami
that error shows after i remove the lines in program/steps/settings/passwd.inc, the goal is to remove the domain_name

I believe that you must also remove it from the query in program/steps/settings/func.inc.
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: ami on November 04, 2007, 11:13:40 PM
hi driggs,

thanks for the info, but i didn't find the domain_name as u comment. in that file i just find the lines like this:

// get user record
$sql_result = $DB->query("SELECT username, mail_host FROM ".get_table_name('users')."
             WHERE user_id=?",
             $_SESSION['user_id']);

if ($USER_DATA = $DB->fetch_assoc($sql_result))
 $OUTPUT->set_pagetitle(sprintf('%s %s@%s', rcube_label('settingsfor'), $USER_DATA['username'], $USER_DATA['mail_host']));

and i modified the query into like this:
// get user record
$sql_result = $DB->query("SELECT username WHERE user_id=?", $_SESSION['user_id']);

if ($USER_DATA = $DB->fetch_assoc($sql_result))
 $OUTPUT->set_pagetitle(sprintf('%s %s@%s', rcube_label('settingsfor'), $USER_DATA['username']));

after that, i change the password but still error like this:
[Mon Nov 05 11:15:58 2007] [error] [client 202.155.6.225] PHP Notice: DB Error: syntax error Query: SELECT username WHERE user_id='3' [nativecode=1064 ** You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'WHERE user_id='3'' at line 1] in /usr/local/apache2/htdocs/tes/program/include/bugs.inc on line 80,

[Mon Nov 05 11:15:58 2007] [error] [client 202.155.6.225] PHP Notice: DB Error: mismatch Query: UPDATE mailbox SET password =  WHERE username =  [DB Error: mismatch] in /usr/local/apache2/htdocs/tes/program/include/bugs.inc on line 80,


fyi, my round cube db :
mysql> show tables;
+----------------+
| Tables_in_cube |
+----------------+
| cache     |
| contacts    |
| identities   |
| messages    |
| session    |
| users     |
+----------------+

mysql> desc users;
+-------------+------------------+------+-----+---------------------+----------------+
| Field    | Type       | Null | Key | Default       | Extra     |
+-------------+------------------+------+-----+---------------------+----------------+
| user_id   | int(10) unsigned | NO  | PRI | NULL        | auto_increment |
| username  | varchar(128)   | NO  |   |           |        |
| mail_host  | varchar(128)   | NO  |   |           |        |
| alias    | varchar(128)   | NO  |   |           |        |
| created   | datetime     | NO  |   | 0000-00-00 00:00:00 |        |
| last_login | datetime     | NO  |   | 0000-00-00 00:00:00 |        |
| language  | varchar(5)    | NO  |   | en         |        |
| preferences | text       | NO  |   |           |        |
+-------------+------------------+------+-----+---------------------+----------------+


the query seems not match, even i was remove the mail_host (may be i was wrong). is there anything that i can do much?

regards,

ami
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: rockwilda on March 14, 2008, 02:49:07 AM
Is there a working version of this patch for RC 0.1 stable?
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: damjan on March 25, 2008, 10:56:03 AM
How can I install "Change Password" feature on windows OS?

Regards,
Damjan
Title: Re: Pretty "Change Password" patch/module for v0.1RC1(07-7-3), +cPanel, +md5
Post by: finity on April 02, 2008, 06:36:59 AM
I have a simple scenario.

I have an hosting account, C-Panel 11, but users kind of don't like to use web url with all kind of ports and stuff. This suchs: http://.com:2095/webmail/x3/?login=1
They just need to access http://mail..com and get a web interface to see there emails when they cant have access to outlook express.
So I have created a sub-domain http://mail..com that points to the roundcube installation. I have created a database to be used by the roundcube. The email works just fine with the following configuration files.

Code: [Select]
<?php


#      /public_html/mail/config/db.inc.php

$rcmail_config = array();

// PEAR database DSN for read/write operations
// format is db_provider://user:password@host/databse
// currently supported db_providers: mysql, sqlite

$rcmail_config['db_dsnw'] = 'mysql://rootsyst_mail:[******]@localhost/rootsyst_mail';
// postgres example: 'pgsql://roundcube:pass@localhost/roundcubemail';
// sqlite example: 'sqlite://./sqlite.db?mode=0646';

// PEAR database DSN for read only operations (if empty write database will be used)
// useful for database replication
$rcmail_config['db_dsnr'] = '';

// database backend to use (only db or mdb2 are supported)
$rcmail_config['db_backend'] = 'db';

// maximum length of a query in bytes
$rcmail_config['db_max_length'] = 512000// 500K

// use persistent db-connections
// beware this will not &quot;always&quot; work as expected
// see: [url]http://www.php.net/manual/en/features.persistent-connections.php[/url]
$rcmail_config['db_persistent'] = FALSE;


// you can define specific table names used to store webmail data
$rcmail_config['db_table_users'] = 'users';

$rcmail_config['db_table_identities'] = 'identities';

$rcmail_config['db_table_contacts'] = 'contacts';

$rcmail_config['db_table_session'] = 'session';

$rcmail_config['db_table_cache'] = 'cache';

$rcmail_config['db_table_messages'] = 'messages';

?>





<?php

#    /public_html/mail/config/main.inc.php

/*
+-----------------------------------------------------------------------+
| Main configuration file |
| |
| This file is part of the RoundCube Webmail client |
| Copyright (C) 2005-2007, RoundCube Dev. - Switzerland |
| Licensed under the GNU GPL |
| |
+-----------------------------------------------------------------------+

*/

$rcmail_config = array();


// system error reporting: 1 = log; 2 = report (not implemented yet), 4 = show, 8 = trace
$rcmail_config['debug_level'] = 4;

// enable caching of messages and mailbox data in the local database.
// this is recommended if the IMAP server does not run on the same machine
$rcmail_config['enable_caching'] = FALSE;

// lifetime of message cache
// possible units: s, m, h, d, w
$rcmail_config['message_cache_lifetime'] = '10d';

// automatically create a new RoundCube user when log-in the first time.
// a new user will be created once the IMAP login succeeds.
// set to false if only registered users can use this service
$rcmail_config['auto_create_user'] = TRUE;

// the mail host chosen to perform the log-in
// leave blank to show a textbox at login, give a list of hosts
// to display a pulldown menu or set one host as string.
// To use SSL connection, enter ssl://hostname:993
$rcmail_config['default_host'] = 'localhost';

// TCP port used for IMAP connections
$rcmail_config['default_port'] = 143;

// Automatically add this domain to user names for login
// Only for IMAP servers that require full e-mail addresses for login
// Specify an array with 'host' => 'domain' values to support multiple hosts
//$rcmail_config['username_domain'] = '';

// This domain will be used to form e-mail addresses of new users
// Specify an array with 'host' => 'domain' values to support multiple hosts
//$rcmail_config['mail_domain'] = '';

// Path to a virtuser table file to resolve user names and e-mail addresses
//$rcmail_config['virtuser_file'] = '';

// 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'] = '';

// use this host for sending mails.
// to use SSL connection, set ssl://smtp.host.com
// if left blank, the PHP mail() function is used

$rcmail_config['smtp_server'] = 'localhost';

// SMTP port (default is 25; 465 for SSL)
$rcmail_config['smtp_port'] = 25;

// SMTP username (if required) if you use %u as the username RoundCube
// will use the current username for login
$rcmail_config['smtp_user'] = '%u';

// SMTP password (if required) if you use %p as the password RoundCube
// will use the current user's password for login
$rcmail_config['smtp_pass'] = '%p';

// SMTP AUTH type (DIGEST-MD5, CRAM-MD5, LOGIN, PLAIN or empty to use
// best server supported one)
$rcmail_config['smtp_auth_type'] = '';

$rcmail_config['smtp_helo_host'] = '';

// Log sent messages
$rcmail_config['smtp_log'] = TRUE;

// these cols are shown in the message list
// available cols are: subject, from, to, cc, replyto, date, size, encoding
$rcmail_config['list_cols'] = array('subject''from''date''size');

// relative path to the skin folder
$rcmail_config['skin_path'] = 'skins/default/';

// includes should be interpreted as PHP files
$rcmail_config['skin_include_php'] = FALSE;

// use this folder to store temp files (must be writebale for apache user)
$rcmail_config['temp_dir'] = '../tmp/';

// use this folder to store log files (must be writebale for apache user)
$rcmail_config['log_dir'] = 'logs/';

// session lifetime in minutes
$rcmail_config['session_lifetime'] = 10;

// check client IP in session athorization
$rcmail_config['ip_check'] = false;

// Use an additional frequently changing cookie to athenticate user sessions.
// There have been problems reported with this feature.
$rcmail_config['double_auth'] = false;

// this key is used to encrypt the users imap password which is stored
// in the session record (and the client cookie if remember password is enabled).
// please provide a string of exactly 24 chars.
$rcmail_config['des_key'] = 'rcmail-!24ByteDE%^rg*Str';

// the default locale setting
$rcmail_config['locale_string'] = 'en';

// use this format for short date display
$rcmail_config['date_short'] = 'D H:i';

// use this format for detailed date/time formatting
$rcmail_config['date_long'] = 'd.m.Y H:i';

// use this format for today's date display
$rcmail_config['date_today'] = 'H:i';

// add this user-agent to message headers when sending
$rcmail_config['useragent'] = 'RoundCube Webmail/0.1-rc2';

// use this name to compose page titles
$rcmail_config['product_name'] = 'RoundCube Webmail';

// only list folders within this path
$rcmail_config['imap_root'] = '';

// store draft message is this mailbox
// leave blank if draft messages should not be stored
$rcmail_config['drafts_mbox'] = 'Drafts';

// store spam messages in this mailbox
$rcmail_config['junk_mbox'] = 'Junk';

// store sent message is this mailbox
// leave blank if sent messages should not be stored
$rcmail_config['sent_mbox'] = 'Sent';

// move messages to this folder when deleting them
// leave blank if they should be deleted directly
$rcmail_config['trash_mbox'] = 'Trash';

// display these folders separately in the mailbox list.
// these folders will automatically be created if they do not exist
$rcmail_config['default_imap_folders'] = array('INBOX''Drafts''Sent''Junk''Trash');

// protect the default folders from renames, deletes, and subscription changes
$rcmail_config['protect_default_folders'] = TRUE;

// Set TRUE if deleted messages should not be displayed
// This will make the application run slower
$rcmail_config['skip_deleted'] = FALSE;

// Set true to Mark deleted messages as read as well as deleted
// False means that a message's read status is not affected by marking it as deleted
$rcmail_config['read_when_deleted'] = TRUE;

// When a Trash folder is not present and a message is deleted, flag
// the message for deletion rather than deleting it immediately. Setting this to
// false causes deleted messages to be permanantly removed if there is no Trash folder
$rcmail_config['flag_for_deletion'] = TRUE;

// Make use of the built-in spell checker. It is based on GoogieSpell.
// Since Google only accepts connections over https your PHP installatation
// requires to be compiled with Open SSL support
$rcmail_config['enable_spellcheck'] = TRUE;

// For a locally installed Nox Spell Server, please specify the URI to call it.
// Get Nox Spell Server from [url]http://orangoo.com/labs/?page_id=72[/url]
// Leave empty to use the Google spell checking service, what means
// that the message content will be sent to Google in order to check spelling
$rcmail_config['spellcheck_uri'] = '';

// These languages can be selected for spell checking.
// Configure as a PHP style hash array: array('en'=>'English', 'de'=>'Deutsch');
// Leave empty for default set of Google spell check languages
$rcmail_config['spellcheck_languages'] = NULL;

// path to a text file which will be added to each sent message
// paths are relative to the RoundCube root folder
$rcmail_config['generic_message_footer'] = '';

// this string is used as a delimiter for message headers when sending
// leave empty for auto-detection
$rcmail_config['mail_header_delimiter'] = NULL;

// enable composing html formatted messages (experimental)
$rcmail_config['enable_htmleditor'] = FALSE;

// don't allow these settings to be overriden by the user
$rcmail_config['dont_override'] = array();

// list of configuration option names that need to be available in Javascript.
$rcmail_config['javascript_config'] = array('read_when_deleted''flag_for_deletion');

// try to load host-specific configuration
$rcmail_config['include_host_config'] = FALSE;


/***** these settings can be overwritten by user's preferences *****/

// show up to X items in list view
$rcmail_config['pagesize'] = 40;

// use this timezone to display date/time
$rcmail_config['timezone'] = intval(date('O'))/100 date('I');

// is daylight saving On?
$rcmail_config['dst_active'] = (bool)date('I');

// prefer displaying HTML messages
$rcmail_config['prefer_html'] = TRUE;

// show pretty dates as standard
$rcmail_config['prettydate'] = TRUE;

// default sort col
$rcmail_config['message_sort_col'] = 'date';

// default sort order
$rcmail_config['message_sort_order'] = 'DESC';

// save compose message every 300 seconds (5min)
$rcmail_config['draft_autosave'] = 300;

// don't let users set pagesize to more than this value if set
$rcmail_config['max_pagesize'] = 200;

// end of config file
?>



Considering these default settings and the fact that the users will not be able to access the control panel what solutions do I have to let them change there own password ? Try to imagine the scenario without thinking that a simple user on a server will know stuff like database settings of the server where all users are stored. No decent server administrator will provide you these information as long as he integrated squirrelmail in his C-Panel installation. I mean if I can login using an email address and a password it means I have enough information to also change my own password. I don't really understand why I have to know how email users are stored and where, and shadow files and stuff while in roundcube I only need some simple decent configuration information to make it work.  
Title: windows + Hmail + roundcube... cannot change pass
Post by: tmsam on April 08, 2010, 04:18:39 AM
Hi every body, I have install :
1. windows xp
2. wampserver 2.0
3. Hmail 5.3.2
4. Roucube mail 0.3.1

Now can send/Reicv with webmail, pop.. but cannot change password. I have try password

plugin but now success. I think infomation data of user in hmail\database

folder\hmailserver.sdf not in mysql (mysql.initial.sql) . Pls help me.