Normally servers uses user@domain.com... The patch i made is for
servers with many different hosts, to get your hostname you can try to
use php_uname('n'), this will return the local server hostname.
Apologies, just realised that my first point about my @debian login
doesn't apply anyway, as this is picked up by the default_host setting,
so it's just the mail.* eventuality that needs addressing from my point
of view.
Thanks,
Richard
Richard Green wrote:
> Unfortunately that will not work for me... I actually host my webmail
> on my home server, so, for example, my actual imap login is
> rgreen@debian, but my external URL (and therefore HTTP_HOST) is
> completely different.
>
> Additionally, my webmail on my burninghorizons server goes by the name
> MAIL.burninghorizons.net, so you can't just replace www!
>
> Maybe we could extend that a little so that if there is a mail_suffix
> (or something) setting, it uses that primarily, otherwise tries to
> parse the HTTP_HOST by removing www / mail prefixes as you have
> described below?
>
> Richard
>
> Norman Franke wrote:
>
>>
>> Instead, I've replaced it with this:
>>
>> if (!strpos($user, "@")) {
>> $hn = $_SERVER["HTTP_HOST"];
>> $hn = preg_replace('/^www\./', '', $hn);
>> $user .= "@". $hn;
>> }
>>
>> which will always substitute the correct username based on the
>> server name. It removes the www part from the name, however.
>>
>> Seems to work for me under the recently released beta.
>>
>> -Norman
>>
>> On Feb 28, 2006, at 4:13 AM, Richard Green wrote:
>>
>>> I have implemented a botch-job just to get this working myself,
>>>
>>> In /program/include/main.inc
>>>
>>> After line 251 I added this:
>>>
>>> if (!strpos($user, "@"))
>>> {
>>> $user .= "@ burninghorizons.net";
>>> }
>>>
>>> Replace with your domain suffix and hey presto.
>>>
>>> This would obviously be better to parameterise the domain suffix in
>>> the settings file.
>>> Not having submitted any stuff to CVS before, can anyone point me
>>> to what I need to do to submit work?
>>>
>>> Richard
>>>
>>>
>>> On Mon, 27 Feb 2006 17:27:48 -0800 (PST), <franke@bethzur.com> wrote:
>>>
>>>>
>>>> I second this, it would be very handy and it can be inferred from
>>>> the URL.
>>>> Perhaps put it after the username box as static text so users know
>>>> what it
>>>> will do.
>>>>
>>>> -Norman
>>>>
>>>>> I posted this a while back on the users list and don't recall
>>>>> whether it
>>>>> was possible or not.
>>>>>
>>>>> I simply want the text box portion of the username field to be
>>>>> pre-populated with my domain name (@domainxyz.com) so my users
>>>>> just have
>>>>> to type in their username.
>>>>>
>>>>> Is this possible?
>>>>
>>>>
>>>
>>>
>>>
>>
>