I added two domains to the main.inc.php file as follows (names changed for this post):
$rcmail_config['default_host'] = array('domain1.com', 'domain2.com');
I get the drop down box on the login page and I am able to login, but I get the mailbox of the other domain. In other words, if I login as "user" and select "domain2.com" from the 'Server' dropdown box, I get the mailbox of
[email protected] and the inbox page does not show any messages in IE7. If I use FF3, the messages are displayed, but they cannot be opened because the messages are not clickable links.
However, if I click on the 'Create a new message' icon, the correct e-mail address (
[email protected]) is displayed in the 'Sender' dropdown box.
I get similar results with RC2549, but the messages in the inbox are visible an they can be opened in both IE7 and FF3.
After thinking about this issue a little more, I've come to the conclusion that first I should have asked what the 'default_host' setting is used for.
I have one e-mail server (domain1.com) that is used by several domains (e.g. domain1.com, domain2.com, domain3.com).
Everything works if any user from any domain (e.g.
[email protected])enters their full e-mail address in the 'Username' field on the login page.
I wanted to use the 'default_host' array so users can just enter their username (user2) and select their domain (domain3.com) from the drop down box on the login page.
Can the 'default_domain' setting be used for one e-mail server with many domains or is this setting limited to multiple e-mail servers (one for each domain)?
I think perhaps you are changing the wrong congif var, default_host is for setting the IMAP server(s) you wish to connect to. username_domain is for setting the domain part of the username (eg @blah.com) and then also mail_domain is for which domain to use when setting up their identity.
I think you want something like username_domain = $_SERVER['HTTP_HOST']; but if you search the forum there are quite a few examples around iirc.
Quote from: JohnDoh;19260I think you want something like username_domain = $_SERVER['HTTP_HOST']; but if you search the forum there are quite a few examples around iirc.
Doesn't work, but thanks JD.
I have been searching and I have found a few examples but none of them are trying to do the same thing I'm attempting and some are outdated and do not work.