james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Blas Rodriguez Somoza" <b...@puertareal.com>
Subject Re: Patch for multiple domains
Date Fri, 08 Mar 2002 01:59:20 GMT
Hello

    I find a better solution to the different user name systems that the one
I mention in the last mail.

    The mail server uses two different concepts, MailAdresses and
LocalUsers, between the two must exist a mapping method. Now the only
mapping is that the user in the address must be one of the LocalUsers.

    The easiest mapping method to allow multiple domains is to add an
attribute in the configuration file (james-config.xml)  for each servername
that gives the domain name that a local user must have. Let me give an
example
    <servername>localhost</servername>
    <servername userDomain="">domain1</servername>
    <servername userDomain="domain2.com">domain2.com</servername>
    <servername userDomain="domain2.com">domain3.com</servername>

    A mail to "user" of the first and second servernames (user@localhost
user@domain1) maps to a LocalUser "user" without domain name. The
name of the mail box will be "user"

    A mail to "user" of the third and fourth servernames
(user@domain2.com user@domain3.com) maps to a LocalUser
user@domain2.com. The name of the mail box will be "user@domain2.com" but it
is very easy to change that, for example to "/domain2.com/user".

    This way the two user naming method can work simultaneously. If the
attribute userDomain don't exists, then the systems works as it do now.

    The great mayority of changes are only method declaration or cast
changes.

    To allow the mapping between LocalUsers and MailAddress there are 1 more
method in the MailServer interface and 2 more in the MailetContext
interface.

    Also the serverNames collection must be changed to a Hashtable to store
the userDomain for each server name.

    There are three places where getAttributes and test methods was addded
to satisfy the implemented interface requirements.
        ListUsersJdbcRepository.java
        JamesUsersJdbcRepository.java
        DefaultUsersJdbcRepository.java

    I test the patches with remoteManager, STMP and POP3 using authorized
SMTP.

    I send the patch file and the org.apache.james.services.LocalUser class
in the mail.

Regards
Blas Rodriguez Somoza.

----- Original Message -----
From: "Danny Angus" <danny@thought.co.uk>
To: "James Developers List" <james-dev@jakarta.apache.org>
Sent: Thursday, March 07, 2002 3:07 PM
Subject: RE: Patch for multiple domains


> certainly worth trying I think.
>
> > -----Original Message-----
> > From: Blas Rodriguez Somoza [mailto:blas@puertareal.com]
> > Sent: Thursday, March 07, 2002 2:10 PM
> > To: James Developers List
> > Subject: Re: Patch for multiple domains
> >
> >
> > Hello
> >
> > In the present form this system invalidate the present identification
> > system. I prefer to give an acceptable solution to everyone if it is
> > possible, and make the complete work.
> >
> > There is very simple to give alternate user naming system if the
> > systems has
> > not to work simultaneously.
> >
> > The solution I propose is adding one attribute more to the
> > james-config.xml:
> >     <servernames multidomain="true/false">
> >
> > With this parameter each administrator can select one of the two
> > user naming
> > systems. For each naming system the only difference is how the UserName
> > class works, mainly the equal, equalsIgnoreCase and toString methods.
> >
> > Is this system acceptable?. If it is I will do the modifications and
then
> > send the diffs.
> >
> > Regards
> > Blas Rodriguez Somoza
> >
> > ----- Original Message -----
> > From: "Danny Angus" <danny@thought.co.uk>
> > To: "James Developers List" <james-dev@jakarta.apache.org>
> > Sent: Thursday, March 07, 2002 12:11 PM
> > Subject: RE: Patch for multiple domains
> >
> >
> > > we'd be happy to consider your changes, send them to this list as
diffs
> > > (either in seperate files or one big file)
> > > if your not sure how to do this read this:
> > > http://jakarta.apache.org/site/source.html section marked "Patches"
> > >
> > > Do your diff from the src directory and ensure that you include
> > the whole
> > > ouput from cvs diff including the lines that look like this:
> > >
> > > cvs diff -u
java/org/apache/james/transport/mailets/RemoteDelivery.java
> > > Index: java/org/apache/james/transport/mailets/RemoteDelivery.java
> > > ===================================================================
> > > RCS file:
> > >
> > /home/cvs/jakarta-james/src/java/org/apache/james/transport/mailet
> > s/RemoteDe
> > > livery.java,v
> > > retrieving revision 1.14
> > > diff -u -r1.14 RemoteDelivery.java
> > > --- java/org/apache/james/transport/mailets/RemoteDelivery.java
> > 1 Mar 2002
> > > 15:58:40 -0000 1.14
> > > +++ java/org/apache/james/transport/mailets/RemoteDelivery.java
> > 7 Mar 2002
> > > 11:04:12 -0000
> > >
> > > This makes it easier for us to use "Patch" 'cos it allows it to find
the
> > > files it needs to patch
> > >
> > > We've been talking around this subject for some while now, and
> > have always
> > > stuck on the issue of user identification.
> > > I suspect that your scheme using mailaddresses as usernames may
> > not be to
> > > everyones tastes, and therefore we ought to make sure that by
> > making your
> > > scheme operational it doesn't preclude any other naming
> > schemes, including
> > > the current one.
> > >
> > > d.
> > >
> > >
> > > > -----Original Message-----
> > > > From: Blas Rodriguez Somoza [mailto:blas@puertareal.com]
> > > > Sent: Wednesday, March 06, 2002 3:38 PM
> > > > To: james-dev@jakarta.apache.org
> > > > Subject: Patch for multiple domains
> > > >
> > > >
> > > > Hello
> > > >
> > > >     I'm testing james to use it as my mail server. I see that
> > presently
> > > > there is no real support for domains, so I get the code from CVS
> > > > and try to
> > > > make the changes to allow domains.
> > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> > <mailto:james-dev-unsubscribe@jakarta.apache.org>
> > > For additional commands, e-mail:
> > <mailto:james-dev-help@jakarta.apache.org>
> > >
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:james-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:james-dev-help@jakarta.apache.org>
>
>
> --
> To unsubscribe, e-mail:
<mailto:james-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
<mailto:james-dev-help@jakarta.apache.org>
>
>









Mime
View raw message