Configuration Request

Bezaleel Support support at bezaleel.net
Fri Oct 21 13:48:06 CEST 2005


Dave,

I have attached a copy of an email I sent to the list earlier last week. 
It should help you with the domain problem. If nothing else, perhaps it 
will give you some idea of how to accomplish what you wish to.

Off hand, if you did not use this to auto-config the domain name, then 
perhaps you could at least have the PHP script parse your @domain.com to 
the value of your username variable.

Kevin L.
-------------

Ok, so our company hosts several domains on one server. When 
implementing a software such as roundcube, we like to have one central 
install that eases the pains fo configuring and maintaining. Each domain 
hosted simply references the central install via sym-links.

Anyways, whether that makes sense or not, I wanted to setup a way that 
the login screen would figure out the mail server domain name without me 
having to manually set it in a config file or the user inputting it at 
each login. So, I basically switched out line 33 of main.inc.php with 
this line:

$rcmail_config['default_host'] = 'mail.' . '' . str_replace("www. <http://www.>", "", $_SERVER['HTTP_HOST']);  

Basically, it takes the address in the address bar, removes the "www. <http://www.>" 
and adds "mail." to the beginning of the domain name.

Ex) www.yourname.com <http://www.yourname.com> to yourname.com to mail.yourname.com

I am sure this all seems very basic and straight forward to the more 
seasoned programmer, but I was excited about getting it to work.

Hope it helps others in some way.

Kevin Landers



The DUdeMaN dAvE wrote:

> Regarding the login page: I have a site which is now using roundcube. 
> The actual IMAP server is housing several different domains for mail 
> exchange (more technically I believe mail.domain.com 
> <http://mail.domain.com> gets routed to one server, where 'domain' 
> could be several domains). The problem this creates is that on the 
> login screen it is necessary for users to specify which domain they 
> have an account on. So, for my username, I would put in 
> 'webadmin at domain.com <mailto:webadmin at domain.com>' (assuming 
> 'domain.com <http://domain.com>' is my domain of course), instead of 
> just my username. Anybody using this particular roundcube interface is 
> going to also be from 'domain.com <http://domain.com>' and thus, it 
> becomes pointless to have to specify the domain each time.
>
> I suggest an option in the config file for automatically appending a 
> string (in this case, my domain name) to the username that is put into 
> the text box. This would be very helpful and perhaps might even act as 
> a security measurement: only people from certain domains can login.
>
> I haven't had time to look into the code myself and it's been awhile 
> since I've programmed PHP, but I would be willing to implement this 
> and submit a patch file or something. It just might take awhile for me.
>
> Let me know what you think, and if it sounds like a valid feature to 
> add, I'll join the mailing list and do what I can to help with the 
> development of it.
>
> Much thanks,
>
> David L. erdmaN II (the dudeMAN davE
> _)
>
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.roundcube.net/pipermail/dev/attachments/20051021/b5a6b52e/attachment-0001.html>


More information about the Dev mailing list