After migrating all our domains to a new server, whenever you wanted to access emails using the Horde webmail UI, you’d see the default Plesk page instead of the Horde login page.
Executing the following didn’t help (so Horde was already properly installed):
# /opt/psa/admin/bin/webmailmng --install --name=horde # /opt/psa/admin/bin/webmailmng --enable --name=horde # /opt/psa/admin/sbin/httpdmng --reconfigure-all
Webmail was turned on for these domains. After some time I also noticed that horde.webmail.mydomain.com was showing the login page instead of webmail.mydomain.com. So it seemed to be more of an Apache configuration issue than a problem with the Plesk installation itself.
First I looked for the httpd.conf file for Plesk:
# l /etc/apache2/conf.d/*psa* -rw-r----- 1 root www-data 402 Jan 2 23:20 /etc/apache2/conf.d/zz010_psa_httpd.conf
Then looked for the corresponding horde file:
# grep horde /etc/apache2/conf.d/zz010_psa_httpd.conf Include '/etc/apache2/plesk.conf.d/horde.conf'
In this file, you’ll see the following:
# grep webmail /etc/apache2/plesk.conf.d/horde.conf ServerName horde.webmail ServerAlias horde.webmail.* Include "/etc/apache2/plesk.conf.d/webmails/horde/*.conf" FcgidInitialEnv PP_CUSTOM_PHP_INI "/etc/psa-webmail/horde/horde/php.ini"
Ok, so I’ve now found out the reason why horde.webmail is used instead of webmail. While looking for a solution, I’ve also seen that the very first domain I had migrated (ams-traduction.com) didn’t have this problem. So there was something different about this domain.
Looking at the files in /etc/apache2/plesk.conf.d/webmails/horde/ I saw that it was the only domain for which there was a file in there (ams-traduction.com_webmail.conf).
This file contained the following:
#DO NOT MODIFY THIS FILE BECAUSE IT WAS GENERATED AUTOMATICALLY,
#SO ALL YOUR CHANGES WILL BE LOST THE NEXT TIME THE FILE IS GENERATED.
So that’s why I could use the webmail URL instead of the horde.webmail URL for this domain. But why didn’t I have files for the other domains ? Since it you basically only needed the last line in the file, I added files for all domains. After that it worked… Until the next Plesk update. During the Plesk update all files in there except the first one (which I hadn’t added) got deleted and I had again the same problem.
Of course one solution is to replace horde.webmail by webmail in /etc/apache2/plesk.conf.d/horde.conf. But I wasn’t sure whether this wouldn’t also get deleted.
After a long search I finally figured out what was the difference between this one domain and the others. They belonged to different Plesk subscriptions. Looking at the subscription settings in Plesk I saw that there was also a Webmail configuration. After selecting Horde there, all the files were created automatically and the problem was solved.
This doesn’t really make sense to me. Why would you be able to enable Horde both for a subscription or for a domain but have a different behavior… Well, everything is not always logical in Plesk… Now let’s see whether the next update will again break it !