Penguin
Annotated edit history of IMP version 7, including all changes. View license author blame.
Rev Author # Line
1 CraigBox 1 IMP is the Internet Messaging Program. It is written in [PHP] and provides WebMail access to [IMAP] and [POP3] accounts. Built on the [Horde] framework.
7 JohnMcPherson 2
2 CraigBox 3
5 AristotlePagaltzis 4 !! Notes
2 CraigBox 5
5 AristotlePagaltzis 6 ! Using multiple servers in [IMP]
2 CraigBox 7
5 AristotlePagaltzis 8 AddToMe: you can log into multiple servers based on vhost: edit the array in <tt>/etc/imp3/servers.conf</tt>
2 CraigBox 9
5 AristotlePagaltzis 10 ! Adding a prefix based on the domain
2 CraigBox 11
5 AristotlePagaltzis 12 Set <tt>$conf~['hooks']~['vinfo'] = 'imp_get_vinfo';</tt> and create a function like so (__note:__ new syntax for 3.2.2)
2 CraigBox 13
5 AristotlePagaltzis 14 <verbatim>
15 if (!function_exists('imp_get_vinfo')) {
16 function imp_get_vinfo ($type = 'username') {
17 global $conf, $imp;
2 CraigBox 18
5 AristotlePagaltzis 19 $vdomain = getenv('HTTP_HOST');
20 $vdomain = preg_replace('|^webmail\.|i', '', $vdomain);
21 $vdomain = strtolower($vdomain);
2 CraigBox 22
5 AristotlePagaltzis 23 if ($type == 'username') {
6 AristotlePagaltzis 24 return strtolower($_SESSION['imp']['user'] . '@' . $vdomain);
5 AristotlePagaltzis 25 } elseif ($type == "vdomain") {
26 return $vdomain;
27 } else {
28 return new PEAR_Error('invalid type: ' . $type);
29 }
30 }
31 }
32 </verbatim>
2 CraigBox 33
5 AristotlePagaltzis 34 This syntax is for MetaNet Mail, where you log into [Cyrus] as <tt>user@domain.tld</tt>. It will remove <tt>webmail.</tt> from the vhost you connected from, and offer <tt>@the.rest.of.it</tt> as the suffix for the login, so you only have to enter <tt>user</tt> into the webmail box.
2 CraigBox 35
36 Smarter people can make it domain by domain specific by editing the function.
4 MichaelBordignon 37
5 AristotlePagaltzis 38 ! Errors using the alpha version of IMP/Horde
4 MichaelBordignon 39
5 AristotlePagaltzis 40 You need to upgrade your version of [PHP] if you're getting errors such as
4 MichaelBordignon 41
5 AristotlePagaltzis 42 <verbatim>
43 Fatal error: Call to undefined function: is_a() in /var/www/webmail2/horde/lib/base.php on line 35
44 </verbatim>
4 MichaelBordignon 45
5 AristotlePagaltzis 46 <tt>is_a()</tt> was introduced in [PHP] 4.2.0. You have to either revert to a really old version of [PEAR] (does [PEAR] even support pre-4.2.0 [PHP]?) or upgrade your [PHP] installation.