• Please be aware: Kaspersky Anti-Virus has been deprecated
    With the upgrade to Plesk Obsidian 18.0.64, "Kaspersky Anti-Virus for Servers" will be automatically removed from the servers it is installed on. We recommend that you migrate to Sophos Anti-Virus for Servers.
  • The Horde webmail has been deprecated. Its complete removal is scheduled for April 2025. For details and recommended actions, see the Feature and Deprecation Plan.
  • We’re working on enhancing the Monitoring feature in Plesk, and we could really use your expertise! If you’re open to sharing your experiences with server and website monitoring or providing feedback, we’d love to have a one-hour online meeting with you.

Horde login username

Here's a quick fix to the login issue.

/* Patch for PSA: I not found a config based-way to disable
* short names, without @ so apply this patch */
if (!preg_match('/^(.+)@(.+)$/', $imapuser, $matches)){
// ** Comment out $DomainName as it's not passed into lib/Session.php
// ** use $args['maildomain'] taken from variable set in config/servers.php
// $imapuser .= '@' . $DomainName;
$imapuser .= '@' . $args['maildomain'];
$_SESSION['imp']['user'] = trim($imapuser);
}
 
In Ubuntu 8.04 the file in question is /usr/share/psa-horde/imp/lib/Session.php starting from line 113. Sorry forgot to mention the files. There's another issue though with the version of Turba which is causing some problems as there appears to be a mis-match.
 
Horde logins using short names definitely seem to be broken since 9.5.1 (was working fine on 9.3.0), with short name logins enabled in Plesk. Full names work, but clients are not happy being forced to switch. Smells like a bug to me.
 
Horde logins using short names definitely seem to be broken since 9.5.1 (was working fine on 9.3.0), with short name logins enabled in Plesk. Full names work, but clients are not happy being forced to switch. Smells like a bug to me.

It is a bug on the part of the Plesk development team because Horde itself doesn't do anything fancy with the domain name. From what I can tell they just copied and pasted their code into the new Horde version without testing it and there were some changes in Horde structure. If you look at /usr/share/psa-horde/imp/lib/Session.php starting from line 104 you'll see how the code shows it is testing to see if configuration options have been loaded in, if not to include the /usr/share/psa-horde/imp/config/servers.php file. The configuration exists so it doesn't bring the servers.php file in as it already read it and processed it in the first place, no need to do the work twice. Now if it didn't do the check in the first place and just loaded the 'servers.php' file, then $DomainName variable should work as it is set in the 'servers.php' file.
 
Regarding mimp:

The 'login.php' is deperecated for mimp package. You have to open standard url like:

http://webmail.<domain>/

There is mobile version should be used if 'isMobile' is 'true'.
 
When I go to http://webmail.<domain>/ (running on Plesk 9.5.1) using my iPhone I get redirected to http://webmail.<domain>/mimp/login.php?url=%2Findex.php which returns 404 Not Found.
 
Strange... Developers can't reproduce it but will try. I will update thread later with results.
 
I agree. You have to do this on a mobile device. I also sm accessing https://webmail.domain.com I am getting kicked to the mimp login URL.

If it's depreciated that is fine then the kicking to mimp should also be depreciated.

I tried putting a symlink in mimp it does not work just loops me endlessly between the plain login and the one with mimp.

Can a workaround be put in simply to disable mimp it's broken for all mobile only devices.

Strictly speaking iPhone is not a mobile device it should be using full horde anyway.
 
Developers still can't reproduce this problem. As you see in attached screenshots mobile version is working. You can see redirected URL on 'step 3' screenshot. Possible wrong browser's cache.
 

Attachments

  • scrshot.png
    scrshot.png
    17.5 KB · Views: 8
  • scrshot2.png
    scrshot2.png
    11.5 KB · Views: 8
  • scrshot3.png
    scrshot3.png
    14.9 KB · Views: 9
  • scrshot4.png
    scrshot4.png
    18.9 KB · Views: 6
Hi IgorG,

Could you ask them to test on a iPhone as this may be iPhone specific.

I clear the cache.

I type in:

https://webmail.domain.com

I get kicked to:

https://webmail.domain.com/mimp/login.php and hence file not found and it stops dead.

I even put in:

https://webmail.domain.com/login.php

I get kicked to:

https://webmail.domain.com/mimp/login.php

No matter what I do I end up here at file not found.

iPhone also is not a mobile device it should be using plain:
https://webmail.domain.com/login.php
 
Try this patch from developers:

Code:
--- conf.php.orig
+++ conf.php
@@ -41,28 +41,9 @@
 $conf['auth']['checkbrowser'] = true;
 $conf['auth']['alternate_login'] = false;
 $conf['auth']['redirect_on_logout'] = false;
+$conf['auth']['params']['app'] = 'imp';
+$conf['auth']['driver'] = 'application';
 
-$conf['auth']['driver'] = 'composite';
-$conf['auth']['params']['drivers'] = array(
-    'imp' => array('driver' => 'application',
-                   'params' => array('app' => 'imp')),
-    'mimp' => array('driver' => 'application',
-                    'params' => array('app' => 'mimp')));
-
-$conf['auth']['params']['loginscreen_switch'] = '_horde_select_loginscreen';
-       if (!function_exists('_horde_select_loginscreen')) {
-               function _horde_select_loginscreen()
-               {
-                       @define(HORDE_BASE,'@HORDE_DATADIR@');
-                       require_once HORDE_BASE . '/lib/Horde/Browser.php';
-                       $browser = new Browser();
-                       if ($browser->isMobile() && $GLOBALS['registry']->applications['mimp']){
-                               return 'mimp';
-                       }
-                       return 'imp';
-               }
-}
-
 
Hi IgorG,

I could not get the patch to run, it kept complaining:

[root@server ~]# patch /etc/psa-webmail/horde/horde/conf.php horde.patch
patching file /etc/psa-webmail/horde/horde/conf.php
Hunk #1 FAILED at 41.
1 out of 1 hunk FAILED -- saving rejects to file /etc/psa-webmail/horde/horde/conf.php.rej


I just ended up editing it and it works - thank you!

Can the developers include this in the next update it DOES fix the iphone issue.

For anyone wanting to fix this by hand do the following:

Edit /etc/psa-webmail/horde/horde/conf.php


Find:

$conf['auth']['checkbrowser'] = true;
$conf['auth']['alternate_login'] = false;
$conf['auth']['redirect_on_logout'] = false;

$conf['auth']['driver'] = 'composite';
$conf['auth']['params']['drivers'] = array(
'imp' => array('driver' => 'application',
'params' => array('app' => 'imp')),
'mimp' => array('driver' => 'application',
'params' => array('app' => 'mimp')));

$conf['auth']['params']['loginscreen_switch'] = '_horde_select_loginscreen';
if (!function_exists('_horde_select_loginscreen')) {
function _horde_select_loginscreen()
{
@define(HORDE_BASE,'/usr/share/psa-horde');
require_once HORDE_BASE . '/lib/Horde/Browser.php';
$browser = new Browser();
if ($browser->isMobile() && $GLOBALS['registry']->applications['mimp']){
return 'mimp';
}
return 'imp';
}
}

$conf['signup']['allow'] = false;

Replace as:

$conf['auth']['checkbrowser'] = true;
$conf['auth']['alternate_login'] = false;
$conf['auth']['redirect_on_logout'] = false;
$conf['auth']['driver'] = 'application';
$conf['auth']['params']['app'] = 'imp';
$conf['signup']['allow'] = false;



Yes in other words delete all of this:

'imp' => array('driver' => 'application',
'params' => array('app' => 'imp')),
'mimp' => array('driver' => 'application',
'params' => array('app' => 'mimp')));

$conf['auth']['params']['loginscreen_switch'] = '_horde_select_loginscreen';
if (!function_exists('_horde_select_loginscreen')) {
function _horde_select_loginscreen()
{
@define(HORDE_BASE,'/usr/share/psa-horde');
require_once HORDE_BASE . '/lib/Horde/Browser.php';
$browser = new Browser();
if ($browser->isMobile() && $GLOBALS['registry']->applications['mimp']){
return 'mimp';
}
return 'imp';
}
}

and replace:
$conf['auth']['driver'] = 'composite';
$conf['auth']['params']['drivers'] = array(

with:
$conf['auth']['driver'] = 'application';
$conf['auth']['params']['app'] = 'imp';
 
Of course patch will be included to the next Plesk update.
 
Thanks once again IgorG!

You have helped fix so many bugs and issues. Really appreciate the effort and it also gets the plesk product better by getting bugs and flaws fixed.

Cheers!
 
This works thanks.

One final question, on my iPhone I am now directed to the mobile version of webmail. Prior to 9.5 this did not happen and I was directed to the standard webmail product. How do I do that?

On an iPhone the standard version works better than the mobile version.

Oh, and did we ever find the solution to short username login?
 
Workaround for short name login has been requested. I will post it when it will be ready.

Probably there will be many people who consider that mobile horde version is better for iPhone...
 
Back
Top