Using hMailServer with RoundCube front end (DCOM Errors)

I installed hMailserver and then installed the RoundCube front end. I then installed a few of the plugins (‘archive’, ‘settings’, ‘userinfo’, ‘emoticons’, ‘markasjunk’, ‘additional_message_headers’, ‘jqueryui’, ‘rss_feeds’, ‘google_contacts’, ‘hmail_password’) but was having an issue with the hmail_password plugin, which was fairly critical in rolling out this solution.

These wasn’t a great deal of documentation for this, but this was my working config for hmail_password:

<?php

/* hmail_password plugin */

// hmailserver database configuration
$rcmail_config['db_hmail_password_dsn'] = ‘mysql://root:PASSWORD@#@localhost/mail?new_link=true’;

// navigation config (requires plugin settings @website http://myroundcube.googlecode.com)
$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'] = 6;

?>

I was getting this error in the event viewer when users were trying to change their password on the Web GUI:

It turned out to be an error using DCOM (Distributed Component Object Model). There was a handy guide here on fixing it.

Follow these steps to give IIS or Apache the required permissions to connect to hMailServer using DCOM.

  1. Start DCOM config by selecting Start, Run, enter dcomcnfg.exe and press OK.
  2. In the Component Services program, expand the Component Services folder
  3. Expand down to Computers | My Computer | DCOM Config
  4. Right-click on hMailServer and select properties
  5. Select the Security tab
  6. Under “Launch and Activation Permissions”, select Customize and click on Edit
  7. Under “Group or user names”, click Add
  8. For IIS6: add the built-in anonymous IIS user account
  9. For Apache: add the Apache user account
  10. Set the Local Launch and Local Activation permissions for this user to Allow

Once that was sorted, the password change worked and everything was dandy.