You are viewing a plain text version of this content. The canonical link for it is here.
Posted to server-dev@james.apache.org by Harmeet Bedi <hb...@yahoo.com> on 2001/03/17 12:59:56 UTC

Re: Question or Request to change mailet/MailetContext

----- Original Message -----
From: "Serge Knystautas" <se...@lokitech.com>
Sent: Friday, March 16, 2001 8:07 PM
> This sounds like a good idea to me.  I don't have any time as of late to
> change or apply patches, but if you send them into the list, someone can
> apply them.

Here are the files changed and attached.
- mailet/MailetContext.java
- james/James.java
- james/transport/matchers/RecipientIsLocal.java
- james/transport/matchers/HostIsLocal.java
- james/transport/mailets/PostmasterAlias.java

Also attached Emacs ediff resutls describing the changes wrt to latest cvs
snapshot.  This was a somewhat painful process for me, but I hope it helps
commit the files minimun work.

Would appreciate checkin by commiter.
There were 2 other changes that I suggested in the  last few days on the
james-dev list, that have not yet been committed.
a)  Fix for thread safety problem in <getId> generation in james/James.java.
Nobody has commented on the fix, but I am pretty sure the original could
have some thread issues.
b) Improved lock-unlock semantics in the james.mailrepository package. This
was reviewed by Peter Donald.

Harmeet

----- Original Message -----
From: "Serge Knystautas" <se...@lokitech.com>
To: <ja...@jakarta.apache.org>
Sent: Friday, March 16, 2001 8:07 PM
Subject: Re: Question or or Request to change mailet/MailetContext


> This sounds like a good idea to me.  I don't have any time as of late to
> change or apply patches, but if you send them into the list, someone can
> apply them.
>
> Serge Knystautas
> Loki Technologies
> http://www.lokitech.com/
> ----- Original Message -----
> From: "Harmeet Bedi" <hb...@yahoo.com>
> To: <ja...@jakarta.apache.org>
> Sent: Thursday, March 15, 2001 10:31 PM
> Subject: Question or or Request to change mailet/MailetContext
>
>
> > The mailet/MailetContext contains these methods
>
> --------------------------------------------------------------------------
> > 1)
> > /**
> >  * Returns a Collection of the server names that are considered "local"
> >  * by this mailet context.
> >  */
> > Collection getServerNames();
> >
> > 2)
> > /**
> >  * Returns a Collection of the local user accounts within this mailet
> >  * context.
> >  */
> > Collection getLocalUsers();
> >
> >
> >
> > These methods are used to check if a server is local or if a user is
> local.
> > I think it would be better to have these methods instead
> >
> > ------------------------------------------------------------------
> > 1)
> > /** Checks if a server is considered local by the mailet context. */
> > boolean isLocalServer(String name);
> >
> >
> > 2)
> > /** Checks if a user account is considered local by the mailet context.
*/
> > boolean isLocalUser(String userAccount);
> >
> >
> >
> > The advantage would be
> > ------------------------------------------
> > - allows the MailetContext to hide and possibly plugin alternate
strategy
> > for the local server name and user check.
> > - The entire collection is never exposed, only a way to ask if an entity
> > exists in the collection. This could have scalability benefits.
> >
> >
> > The changes/impact would be minimal.
> > ------------------------------------------------------------
> > 1)
> > /** Checks if a server is considered local by the mailet context. */
> > boolean isLocalServer(String name);
> >
> > would require these changes
> > a) james/transport/mailets/PostmasterAlias would need to be changed. It
> > would be simpler, because it determines from context if host in
postmaster
> > address is a local server.
> > b) james/transport/matchers/HostIsLocal would need to be changed. It
would
> > be simpler, because it determines if a host is local.
> > b) james/transport/matchers/RecipientIsLocal would need to be changed.
It
> > would be simpler, because it determines if the host in recipient address
> is
> > local.
> >
> > 2)
> > /** Checks if a user account is considered local by the mailet context.
*/
> > boolean isLocalUser(String userAccount);
> > would require these changes
> >
> > a) james/transport/matchers/RecipientIsLocal would need to be changed.
It
> > would be simpler, because it basically determines from context if a user
> is
> > local.
> >
> >
> >
> > If this makes sense, would someone fix this, or I can do this and send
> > modified files.
> > If not, what are the disadvantages.
> >
> > thanks,
> > Harmeet
> >
> >
> >
> >
> > _________________________________________________________
> >
> > Do You Yahoo!?
> >
> > Get your free @yahoo.com address at http://mail.yahoo.com
> >
> >
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> > For additional commands, e-mail: james-dev-help@jakarta.apache.org
> >
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: james-dev-unsubscribe@jakarta.apache.org
> For additional commands, e-mail: james-dev-help@jakarta.apache.org