[imp] Problem with "preferred" server logic.
Mike Cisar
mcisar at starmania.net
Sun Jan 12 11:13:31 PST 2003
Using IMP 3.1.2 and just finished setting it up to host mail for a half
dozen virtual domains in addition to the main domain of the machine. I did
have one problem with the logic of the "preferred" server setting
servers.php. I set the server up with the vinfo hooks with the plan that
the mail server, etc would be picked up automatically based on the URL the
users typed. Unfortunately the problem I was running into was that no
matter which URL was entered, everything always kept picking up the main
domain of the machine rather than the appropriate vdomain.
I was finally able to resolve this problem by replacing the occurrances of
the SERVER_NAME environment variable with HTTP_HOST in
horde/config/registry.php and horde/imp/message.php... and to also remove
the queries of SERVER_NAME leaving only the queries of HTTP_HOST in
horde/imp/lib/IMP.php
It seems that because the physical hostname of the machine is in x.com that
information was getting picked up first by the SERVER_NAME variable and the
virtual domains were never getting seen... rather than using the HTTP_HOST
info exclusively(x.com, y.com, z.com, a.com) which is seen whether the base
domain or the virtual domains are called.
I've got everything working the way I want, the proper domain is selected
whether called by the main domain, or any of the virtual domains... so I'm
happy. I am wondering, however, if there would have been a more elegant
solution to this problem than hacking at the code.
Thanks,
>>>>> Mike <<<<<
More information about the imp
mailing list