Author Topic: How to setup a plugin for hmailserver  (Read 8505 times)

Offline gemini_life

  • Jr. Member
  • **
  • Posts: 13
How to setup a plugin for hmailserver
« on: October 24, 2009, 12:19:17 PM »
As I am a junior in setup a mail system , I've got lot of problems . I am using hmail+roundcube+mssql2005express @win2003 iis6, when I am config the plugin for hmail it seems doesn't work !

the config.inc.php setting is :
rcmail_config['db_hmail_password_dsn'] = 'mssql://sa:123456@ZZWLINE\SQLEXPRESS/hmail';

and everytime when I try to change password in the webmail panel, it shows a error message:
DB Error in C:\Program Files\hMailServer\webmail\program\include\rcube_mdb2.php (627): MDB2 Error: syntax error Query: _doQuery: [Error message: Could not execute statement] [Last executed query: UPDATE `hm_accounts` SET `accountlastlogontime` = '2009-10-12 13:50:42', `accountpassword` = '670b14728ad9902aecba32e22fa4f6bd', `accountpwencryption` = '2' WHERE `accountaddress` = 'joe@webhost.com.hk' LIMIT 1;] [Native code: 102] [Native message: '`' ��������������]


Also got the similar error when config the other hmail plugins.
How can I make it work ??? Thank you very much!

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
How to setup a plugin for hmailserver
« Reply #1 on: October 25, 2009, 02:47:17 AM »
I have not tested it with SQLite. Try to remove '`', '´' and spaces ...

UPDATE hm_accounts SET accountlastlogontime = '2009-10-12 13:50:42', accountpassword= '670b14728ad9902aecba32e22fa4f6bd', accountpwencryption= '2' WHERE accountaddress= 'joe@webhost.com.hk' LIMIT 1;
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline gemini_life

  • Jr. Member
  • **
  • Posts: 13
How to setup a plugin for hmailserver
« Reply #2 on: October 25, 2009, 11:04:00 PM »
I don't understand , first I am using Mssql not Sqllite ; second , those messages are the errors shows in the browser and how can I modify them ?

Any modification I can do in the specific php file ?
like main.inc.php , db.inc.php, or the plugin config.inc.php?

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
How to setup a plugin for hmailserver
« Reply #3 on: October 28, 2009, 02:00:42 AM »
Download recent plugins package and try again.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline mishoddt

  • Jr. Member
  • **
  • Posts: 11
How to setup a plugin for hmailserver
« Reply #4 on: October 28, 2009, 02:47:20 PM »
I'm triyng with the plugins from trunk-r-3061.zip, but no success. The hmail_password and hmail_autoresponder both show error message "MDB2 Error: not found".

My config.inc.php.dist and config.inc.php is:


/* hmail_password plugin */

// navigation config (requires plugin settings @website myroundcube - Project Hosting on Google Code)
$rcmail_config['settingsnav'][] = array('part' => '', 'locale' => 'settings.password', 'href' => './?_task=settings&_action=plugin.hmail_password', 'onclick' => '', 'descr' => 'hmail_password');

// user needs current password to perform change request
$rcmail_config['password_confirm_current'] = TRUE;

// password min length (min 6 digitis)
$rcmail_config['password_min_length'] = 4;

// hmailserver database configuration
//$rcmail_config['db_hmail_password_dsn'] = 'mysql://root:@localhost/hmailserver?new_link=true';
$rcmail_config['db_hmail_password_dsn'] = 'mssql://mssqluser:password@SQLINSTANCE/databasename';

?>


I'll appreciate if Rosali or anyone else help here, thanks!

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
How to setup a plugin for hmailserver
« Reply #5 on: October 29, 2009, 08:29:00 AM »
Code: [Select]

'mssql://mssqluser:password@SQLSERVER\\SQLEXPRESS/hmailserver'
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline manuelberger

  • Newbie
  • *
  • Posts: 1
How to setup a plugin for hmailserver
« Reply #6 on: October 29, 2009, 10:23:33 AM »
hi!

i have the same error. the connection-string seems to be right. any further idea to debug it?

thanks!

Offline rosali

  • Hero Member
  • *****
  • Posts: 2,533
How to setup a plugin for hmailserver
« Reply #7 on: October 29, 2009, 12:53:38 PM »
Issue 19 - myroundcube - Autoresponder and MsSQL - Project Hosting on Google Code

I don't use MSSQL. Try to contact the guy which provided a fix for MSSQL regarding hmail_autoresponder plugin.
Regards,
Rosali
__________________
MyRoundcube Project (commercial)

Offline gemini_life

  • Jr. Member
  • **
  • Posts: 13
How to setup a plugin for hmailserver
« Reply #8 on: October 31, 2009, 01:32:40 PM »
Comment 3 by johan.ni...@gmail.com, Oct 21, 2009

It was a matter of SQL syntax differences. Solved it by setting the variables
instead of * in the sql SELECT query in the file hmail_autoresponder.php
I also removed the spaces and `´ between variable and = and %v originally: `variable
´ = %v.

private $sql_select = 'SELECT accountlastlogontime, accountvacationmessageon,
accountvacationsubject, accountvacationmessage, accountvacationexpires,
accountvacationexpiredate FROM hm_accounts WHERE accountaddress=%u;';
  private $sql_update = 'UPDATE hm_accounts SET accountlastlogontime=%t,
accountvacationmessageon=%o, accountvacationsubject=%s, accountvacationmessage=%m,
accountvacationexpires=%e, accountvacationexpiredate=%d WHERE accountaddress=%u;';


It's true that mssql and mysql have the different "sql query ", the existing plugin is using the mysql query for the selete update purpose, so if you want to use mssql for the database method , you have to change all the "sql query " of the plugin , no matter which plugin it is . of course I mean hmail plugins.

I believe all the configuration is right for us ,see anyone could help and provide us the correct php file for mssql.
« Last Edit: October 31, 2009, 01:35:16 PM by gemini_life »

Offline tmsam

  • Newbie
  • *
  • Posts: 1
windows + Hmail + roundcube... cannot change pass
« Reply #9 on: April 08, 2010, 04:17:20 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.