[wplug] Squirrelmail Config for Multi-Domains
Chris Romano
romano.chris at gmail.com
Fri Oct 12 08:44:14 EDT 2007
On 10/11/07, Kevin Squire <gentgeen at linuxmail.org> wrote:
>
>
> I know this is not the SM mailing list, just hoping someone could answer
> this for me...
>
> It a little while, we are going to be using our SM install for 2 different
> domains. I found that I can set the org/domain name to be based on the
> server name, which is exactly what we needed. Before I changed it, I had:
> $org_name = "mygroup.org';
> and SM is reached by going to mail.mygroup.org
>
> Now from what I read, I can set the $org_name and $domain settings in the
> config file to be:
> $org_name = $_SERVER['SERVER_NAME'];
> $domain = $_SERVER['SERVER_NAME'];
>
> The problem I have noticed is that the $org_name now is showing up as "
> mail.mygroup.org" on the login page and elsewhere. I would really prefer
> that it was without the mail part.
>
> The other domain will follow the same settings (mail.newgroup.com and a
> prefered $org_name of newgroup.com)
>
> So any thoughts on how to remove the mail. part of the name for the
> $org_name setting?
>
>
>
I would do something like this
$org_name = substr(stristr($_SERVER['SERVER_NAME'], '.'), 1)
stristr($_SERVER['SERVER_NAME'], '.') should return ".mygroup.org"
substr should strip out the "." and return "mygroup.org"
I didn't test this, but it should be pretty close
Chris
--
"They that would trade essential liberty for a little temporary safety
deserve neither." -- Benjamin Franklin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.wplug.org/pipermail/wplug/attachments/20071012/1d05f973/attachment.html
More information about the wplug
mailing list