[Tickets #2402] NEW: Multidomain - user.domain.tld@hostname
bugs@bugs.horde.org
bugs at bugs.horde.org
Sun Aug 7 05:17:07 PDT 2005
DO NOT REPLY TO THIS MESSAGE. THIS EMAIL ADDRESS IS NOT MONITORED.
Ticket URL: http://bugs.horde.org/ticket/?id=2402
-----------------------------------------------------------------------
Ticket | 2402
Created By | info at peter.st
Summary | Multidomain - user.domain.tld at hostname
Queue | IMP
Version | 4.0
State | New
Priority | 1. Low
Type | Enhancement
Owners |
-----------------------------------------------------------------------
info at peter.st (2005-08-07 05:17) wrote:
Hi guys,
I noticed that under IMP4 there is no function like
imp_expand_fromaddress($imp). So if I want to compose a new mail on a fresh
installation, as "From" address there you can see "user.domain.tld at hostname"
instead of "user at domain.tld".
I made some changes to get it work again, but perhaps there is an other way
to enable this function which I didn't find.
My changes (backup) to the origin source (current):
<snip>
diff -uNr ./current/imp/lib/Identity/imp.php
./backup/imp/lib/Identity/imp.php
--- ./current/imp/lib/Identity/imp.php 2005-01-03 13:25:35.000000000 +0100
+++ ./backup/imp/lib/Identity/imp.php 2005-07-12 19:52:25.000000000 +0200
@@ -232,9 +232,13 @@
$val = $imp['user'];
}
- if (!strstr($val, '@')) {
+ $val = imp_expand_fromaddress($imp);
+
+ /*
+ if (!strstr($val, '@')) {
$val .= '@' . $imp['maildomain'];
}
+ */
$this->_fromList[$ident] = $val;
<snip>
I also added these lines to my imp/config/conf.php:
[..]
/* CONFIG END. DO NOT CHANGE ANYTHING IN OR BEFORE THIS LINE. */
if (!function_exists('imp_expand_fromaddress')) {
function imp_expand_fromaddress ($imp) {
$db = mysql_pconnect($db_mail_host,$db_mail_user,$db_mail_pass);
mysql_select_db($db_mail_database,$db);
$user= $imp['user'];
$sql = "SELECT alias FROM virtual WHERE username = '".$user."'";
$result = mysql_query($sql,$db);
$name = mysql_result($result,0,"alias");
return (empty($name) ? $imp['user'] : $name );
}
}
The alias-field comes from another database, not horde.
<snap>
So it works again. Perhaps I missed something to get multidomains to run
without these patches.
Greetings, Peter
More information about the bugs
mailing list