Thx for the info.. I will see if I can do something similar in latest trunk...

Bye,
Norman

2010/7/14 冉兵 <[email protected]>:
> Got it working!
>
> Two changes made to the James.java
>
> 1. Replaced the last line of isLocalEmail(MailAddress ) to
>
>       boolean contains = localusers.contains(userName);
>        if (!contains) {
>                userName = mailAddress.getUser();
>                contains = localusers.contains(userName);
>        }
>        return contains;
>
> 2. Replaced the first if block in the getUserInbox with
>
>      if (virtualHosting == false) {
>        if  (userName.contains("@")) {
>                userName = userName.split("@")[0];
>        }
>       }
>       else {
>        if (!userName.contains("@")) {
>                userName += "@" + getDefaultDomain();
>        }
>       }
>
>
> Thanks so much, Norman!
>
> Bing
>
>
> --------------------------------------------------
> From: "Norman Maurer" <[email protected]>
> Sent: Wednesday, July 14, 2010 9:01 PM
> To: "James Users List" <[email protected]>
> Subject: Re: virtual domain in early 3.0 snapshot
>
>> Hi Bing,
>>
>> I guess you could patch the getUserInbox method:
>>
>>
>> http://svn.apache.org/viewvc/james/server/trunk/spoolmanager-function/src/main/java/org/apache/james/James.java?revision=722820&view=markup&pathrev=802641
>>
>> Bye,
>> Norman
>>
>>
>> 2010/7/14 冉兵 <[email protected]>:
>>>
>>> Hi Norman,
>>>
>>> The revision number is 802641.
>>>
>>> Thanks for the time.
>>>
>>> Bing
>>>
>>>
>>> --------------------------------------------------
>>> From: "Norman Maurer" <[email protected]>
>>> Sent: Wednesday, July 14, 2010 2:03 PM
>>> To: "James Users List" <[email protected]>
>>> Subject: Re: virtual domain in early 3.0 snapshot
>>>
>>>> Hi Bing,
>>>>
>>>> could you tell me the exact revision number of the SNAPSHOT you use,
>>>> then I could prolly help you with this..
>>>>
>>>> Bye.
>>>> Norman
>>>>
>>>>
>>>> 2010/7/13 冉兵 <[email protected]>:
>>>>>
>>>>> Hi
>>>>>
>>>>> Appending the domain to current users seemed to work fine. But updating
>>>>> all
>>>>> hundreds of users is a big change in the organization. Ideally I'd like
>>>>> to
>>>>> pick the default domain at the runtime so anyone without the domain
>>>>> appendix
>>>>> will use the default value.
>>>>>
>>>>> Where is the interesting code that I can modify to implement the logic?
>>>>>
>>>>> Thanks
>>>>>
>>>>>
>>>>> Bing
>>>>>
>>>>>
>>>>> --------------------------------------------------
>>>>> From: "Norman Maurer" <[email protected]>
>>>>> Sent: Tuesday, July 13, 2010 3:15 PM
>>>>> To: "James Users List" <[email protected]>
>>>>> Subject: Re: virtual domain in early 3.0 snapshot
>>>>>
>>>>>> I think you will either need to modify the existing users and add a
>>>>>> @domain part to it or start from scratch..
>>>>>>
>>>>>> Bye,
>>>>>> Norman
>>>>>>
>>>>>>
>>>>>> 2010/7/12 冉兵 <[email protected]>:
>>>>>>>
>>>>>>> OK, I'd like to add a new domain to an existing instance of the old
>>>>>>> 3.0
>>>>>>> snapshot. The user accounts don't have domain associated with them
>>>>>>> explicitly. Do I have to regenerate all the account and assign a
>>>>>>> domain
>>>>>>> to
>>>>>>> each of them? Is it safe to switch to multi-domains "in the middle"
>>>>>>> of
>>>>>>> using
>>>>>>> James or I must start from empty user database to support virtual
>>>>>>> domains?
>>>>>>>
>>>>>>> Bing
>>>>>>>
>>>>>>>
>>>>>>> --------------------------------------------------
>>>>>>> From: "冉兵" <[email protected]>
>>>>>>> Sent: Monday, July 12, 2010 3:27 PM
>>>>>>> To: "James Users List" <[email protected]>
>>>>>>> Subject: Re: virtual domain in early 3.0 snapshot
>>>>>>>
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> My initial test with the old version went thru fine.
>>>>>>>>
>>>>>>>> Thanks Norman!
>>>>>>>>
>>>>>>>> Bing
>>>>>>>>
>>>>>>>> --------------------------------------------------
>>>>>>>> From: "Norman Maurer" <[email protected]>
>>>>>>>> Sent: Monday, July 12, 2010 3:22 PM
>>>>>>>> To: "James Users List" <[email protected]>
>>>>>>>> Subject: Re: virtual domain in early 3.0 snapshot
>>>>>>>>
>>>>>>>>> Hi Bing,
>>>>>>>>>
>>>>>>>>> I think it should work there too.. But not 100 % sure..
>>>>>>>>>
>>>>>>>>> Bye,
>>>>>>>>> Norman
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> 2010/7/12 冉兵 <[email protected]>:
>>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> While I'm testing the latest 3.0 in trunk, I have a almost one
>>>>>>>>>> year
>>>>>>>>>> old
>>>>>>>>>> 3.0 snapshot running (just POP3/SMTP, no IMAP4). I'm wondering if
>>>>>>>>>> the
>>>>>>>>>> virtual domain support works already in the old version. Does it
>>>>>>>>>> worth
>>>>>>>>>> trying?
>>>>>>>>>>
>>>>>>>>>> Thanks
>>>>>>>>>>
>>>>>>>>>> Bing
>>>>>>>>>>
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ---------------------------------------------------------------------
>>>>>>>>> To unsubscribe, e-mail: [email protected]
>>>>>>>>> For additional commands, e-mail: [email protected]
>>>>>>>>>
>>>>>>>>>
>>>>>>>>
>>>>>>>>
>>>>>>>> ---------------------------------------------------------------------
>>>>>>>> To unsubscribe, e-mail: [email protected]
>>>>>>>> For additional commands, e-mail: [email protected]
>>>>>>>>
>>>>>>>>
>>>>>>>
>>>>>>> ---------------------------------------------------------------------
>>>>>>> To unsubscribe, e-mail: [email protected]
>>>>>>> For additional commands, e-mail: [email protected]
>>>>>>>
>>>>>>>
>>>>>>
>>>>>> ---------------------------------------------------------------------
>>>>>> To unsubscribe, e-mail: [email protected]
>>>>>> For additional commands, e-mail: [email protected]
>>>>>>
>>>>>>
>>>>>
>>>>> ---------------------------------------------------------------------
>>>>> To unsubscribe, e-mail: [email protected]
>>>>> For additional commands, e-mail: [email protected]
>>>>>
>>>>>
>>>>
>>>> ---------------------------------------------------------------------
>>>> To unsubscribe, e-mail: [email protected]
>>>> For additional commands, e-mail: [email protected]
>>>>
>>>>
>>>
>>> ---------------------------------------------------------------------
>>> To unsubscribe, e-mail: [email protected]
>>> For additional commands, e-mail: [email protected]
>>>
>>>
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: [email protected]
>> For additional commands, e-mail: [email protected]
>>
>>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [email protected]
> For additional commands, e-mail: [email protected]
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to