[imp] Virtual domains & Multiple domains (popaccount to name.surname)

Antti Liljo antti.liljo@graafinenstudio.com
Wed, 07 Aug 2002 15:11:42 +0300


Hi,

I have a problem. Im using Red hat 7.2 (2.4.18), Apache/1.3.22 (Unix),
Sendmail and Horde 2.0 with IMP 3.0.

I host more than 200 virtual domains on one single server. All the domains
have a lot of e-mail addresses configured in Sendmail. I would like to make
a webmail service that everyone could use - as easily as possible. I would
like to make one single address that everyone could use, but im starting to
think that is is not possible with new version of Horde and Imp.. ?

At the moment I created a solution, that doesnt do everything I want, but
does something. The solution is that first I create VirtualHost
webmail.domain.com and make its DocumentRoot point to IMP. This works
finely, becouse I edited imp/config/servers.php and did some changes I
found from mailinglist archives of IMP, and this is what I did:

--copycopycopycopy--
$domain=preg_replace("/(\w+)\.([\w\-]+)\.(\w+)\:*.*/",
"\\2.\\3",$GLOBALS['HTTP_SERVER_VARS']['SERVER_NAME']);

$servers['imap'] = array(
    'name' => 'IMAP protokolla',
    'server' => 'imap.gstdomain.net',
    'protocol' => 'imap',
    'port' => 143,
    'folders' => 'mail/',
    'namespace' => '',
    'maildomain' => $domain,
    'preferred' => "webmail.$domain"
);
--copycopycopycopy--

Now it works fine, if my client opens for example
http://webmail.hisdomain.com, but I still face one small problem.. when the
client logs in his maildomain will be of course right, @hisdomain.com, but
the problem that is still there is that hes email-address (when he sends
mail from IMP) is popaccount@hisdomain.com, and it should be
his.name@hisdomain.com (taken from where ever, /etc/mail/virtusertable is
my guess.. ?)

Can anyone tell me how I could do this with as little modifications or
"stabbing" possible.. :)

Yours, Antti Liljo

Antti Liljo, Internet-suunnittelija
GST Graafinen Studio
Rautatienkatu 13 B, 90100 OULU
Puhelin (08) 3121 540, GSM 044 276 5713, FAX (08) 3121 541
sähköposti: antti.liljo@graafinenstudio.com
Internet: http://www.graafinenstudio.com