<?xml version="1.0" encoding="UTF-8"?> 
<?xml-stylesheet href="https://dev.horde.org/themes/horde//default/feed-rss.xsl" type="text/xsl"?> 
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"> 
 <channel> 
  <title>Virtual domain support</title> 
  <pubDate>Fri, 10 Apr 2026 14:48:37 +0000</pubDate> 
  <link>https://bugs.horde.org/ticket/9709</link> 
  <atom:link rel="self" type="application/rss+xml" title="Virtual domain support" href="https://bugs.horde.org/ticket/9709/rss" /> 
  <description>Virtual domain support</description> 
 
   
   
  <item> 
   <title>In my Horde3/IMP4, I used to have a custom hook function in </title> 
   <description>In my Horde3/IMP4, I used to have a custom hook function in the horde/imp/config/hooks.php to support multidomains that I am hosting.
The user points its browser to mail.domain.com, the the login window displays &quot;@domain.com&quot; at the end of the username field and horde/imp provides username@domain.com to the IMAP server (qmail/vpopmail/courier-imap).

This function looks like this:
if (!function_exists(&#039;_imp_hook_vinfo&#039;)) {
    function _imp_hook_vinfo($type = &#039;username&#039;)
    {
        $vdomain = getenv(&#039;HTTP_HOST&#039;);
        $vdomain = preg_replace(&#039;|^(web)?mail\.|i&#039;, &#039;&#039;, $vdomain);
        $vdomain = preg_replace(&#039;|^imp\.|i&#039;, &#039;&#039;, $vdomain);
        $vdomain = String::lower($vdomain);

        if ($type == &#039;username&#039;) {
                if ($vdomain == &#039;&#039;) {
                        return $_SESSION[&#039;imp&#039;][&#039;user&#039;];
                } else {
            return (preg_replace(&#039;|@.*$|&#039;, &#039;&#039;, $_SESSION[&#039;imp&#039;][&#039;user&#039;]) . &#039;@&#039; . $vdomain);
          }
        } elseif ($type == &#039;vdomain&#039;) {
            return $vdomain;
        } else {
            return PEAR::raiseError(&#039;invalid type: &#039; . $type);
        }
    }
}

I did not find such a feature in Horde4/IMP5.
I have tried to play a bit with the hook public function authusername($userId, $toHorde) in horde/config/hooks.php
but users still need to provide user@domain.com to logon (and they are recognized as user@domain.com@domain.com by horde) and the logon window does not displays &quot;@domain.com&quot; after the username field.

Am I missing something ?

Thanks for your support,
Antoine.</description> 
   <pubDate>Thu, 24 Mar 2011 17:22:51 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9709#t62617</link> 
  </item> 
   
  <item> 
   <title>See imp/docs/UPGRADING</title> 
   <description>See imp/docs/UPGRADING</description> 
   <pubDate>Thu, 24 Mar 2011 17:38:09 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9709#t62618</link> 
  </item> 
   
  <item> 
   <title>&gt; See imp/docs/UPGRADING

Sorry, but I can not find a prop</title> 
   <description>&gt; See imp/docs/UPGRADING

Sorry, but I can not find a propre information in this document:
for &quot;The &#039;vinfo&#039; hook has been removed.  Use Horde&#039;s &#039;authusername&#039; and/or IMP&#039;s
&#039;preauthenticate&#039; hooks instead.&quot;
I tried to play with this in Horde/config/hooks.php but I did not succeed

Regarding
&quot;All hooks that are specific to IMP have been moved from the
``horde/config/hooks.php`` file. Move your existing IMP Hooks from there to
``imp/config/hooks.php``.&quot;
this was already in imp/config/hooks.php in Horde3/IMP4. Should I copy/paste the code to Horde5/IMP4 ?

Thanks for your support,
Antoine.</description> 
   <pubDate>Thu, 24 Mar 2011 17:55:14 +0000</pubDate> 
   <link>https://bugs.horde.org/ticket/9709#t62622</link> 
  </item> 
   
   
 
 </channel> 
</rss> 
