Roundcube Community Forum

 

Vacation Assistent, Forward Tab, Password Tab - hMailserver

Started by ZabbensX, January 23, 2008, 07:44:04 AM

Previous topic - Next topic

kevinb

Hey Rol, hope you're enjoying Tenerife. I'm not sure I have RC2. I'll check their site. I actually installed it a few months back so I may not. Thanks! I'll let you know how I make out.

Kev

Greta

Hi Roland,

Why do I have to set database connections for the hmail database in the db.inc.php?

Greta

rosali

Regards,
Rosali

Greta

Ok, but when you change anything in the hmail database directly you also need to restart hmail to apply this changes. To make changes to hmail you should use DCOM. (see also http://www.hmailserver.com/forum/viewtopic.php?p=35125#35125 about this).
Version 5 of hmail it is possible to do this directly into the database. Only version 5 is at this stage only an alpha version.

Greta.

rosali

Adding users works without re-starting hmail 4.x. I don´t use DCOM because I like to have RoundCube on a different [linux] host and not on the winbox where hmail resides.

-Roland
Regards,
Rosali

Greta

Ok, thanks for your answer. I shall try to get this also working.

torias

Quote from: ZabbensX In the fwd.inc and the away.inc you have to set the adminpassword of the hmailserver,
and the host where hmailserver is running, mostly localhost...
The setting have to be done twice in each file.

Well ... NO! The COM-Interface allows to change these values with normal user-rights, just change the COM-Init from
 $hCOMApp->Authenticate("Administrator", $admpasshmail);
to this

  $hCOMApp->Authenticate($_SESSION['username'], decrypt_passwd($_SESSION['password']));
This will use the logged on users credentials as it should be.

You could also optimize more by using this
 $obAccount = $hCOMApp->Authenticate($_SESSION['username'], decrypt_passwd($_SESSION['password']));
and drop the later $obAccount = .... and all that $domain and $obDomain stuff since you're not using it either

And last but not least for full COM-usage, change the rcmail_save_passwd function
function rcmail_save_passwd($curpasswd, $newpasswd)
{
 global $CONFIG, $_SESSION, $DB;

  //COM Objekt erstellen
  $hCOMApp = new COM("hMailServer.Application");
  $obAccount = $hCOMApp->Authenticate($_SESSION['username'], decrypt_passwd($_SESSION['password']));
   
  if ($obAccount->ValidatePassword($curpasswd)) {
    $obAccount->Password = $newpasswd;
    $obAccount->Save();
    $_SESSION['password'] = encrypt_passwd($newpasswd);
    return(1);
  }
}

SimonSez07

#22
thanks for your updates torias

EDIT: i have updated ZabbensX's patched files so they work properly with the latest stable roundcube (0.1.1) and i have included torias's method of using com.

you can grab my patch here: http://www.sturmer.org/download/1437/hmail-roundcube.zip

Edit (2008.08.30): updated Link
Edit (2009.06.21): added new version for RC 0.2.2 (see later post)



webneo82

hello,

I have found a bug in passwd function:

If the user has a password with umlauts (like ä,ö,ü) the passwd form can't handle this and response with error saving new password.

Could anybody solve that?

Many thanks!

desiredforsome

I cannot get any of this working, I need to get these tabs working

Im running MYSQL, what do i change to make this work as well as,,, if i have to enable COM what file and where is it usualy located to edit? Im new to this hackign thing.

SimonSez07

Here is the plugin that has been modified for RoundCube v0.2.2.

http://www.sturmer.org/download/1478/rc-hmail_(0.2.2).zip

@webneo82: I have not looked into this bug, but I will see if anything can be done.

@desiredforsome: there is many things that can be wrong with your installation including com access not working. see the hmailserver docs for enabling com and permissions related to iis.