james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Norman Maurer <nor...@apache.org>
Subject Re: [PROPOSAL] MailServer interface make sense / Move methods ?
Date Wed, 15 Dec 2010 08:08:16 GMT
I created an issue which has a patch attached..

https://issues.apache.org/jira/browse/JAMES-1147

If I hear nothing against it I will commit the changes..

Bye,
Norman

2010/12/14 Norman Maurer <norman@apache.org>:
> Hi there,
>
> after spending some thoughts about last optimization before the next
> release, I stumpled again over the MailServer interface.
> The Mailserver interface has corrently 5 methods listed. I think a few
> of them should be moved and a few should get removed at all. Let me
> propose the following changes:
>
> * MailServer.getId();
>    This method is only used by MailImpl to generate a new Mail name.
> I think there are two things which would make sense...
>
>    1) Remove the method from the interface and just move the Id
> generation code to MailImpl. In fact its only some kind of UUID and
> long combination
>    2) Create a new Interface called MailNameGenerator with the method
> createName() which will generate a new name to use in the Mail.
>
>     I think I would prefer 1.
>
> * MailServer.supportVirtualHosting();
>   This method returns true if the server supports virtualhosting.
> Which in fact means that the users must be added with an
> "@domainpart". So your users would look like: user1@domain1,
> user2@domain2 etc.
>   So I think it would make more sense to move the method to
> UsersRepository interface. By default it would return false
>
> * MailServer.getDefaultDomain();
>  Return the default domain which will get used if an email is
> delivered to an user via smtp and no domainpart was given. As this is
> clearly about domains I would suggest to move it to DomainList
> interface
>
> * MailServer.getHelloName();
>  Return the default hello name which will be used if no other is
> configured for the service. I would just remove this method at all and
> fallback to dnsservice.getLocalHost() by default if no hello name is
> configured for the service.
>
> * MailServer.getPostMaster():
>  Is only used by MailetContext.getPostMaster()  as a wrapped call. So
> just remove it.
>
>
> Wdyt ?
>
> Bye,
> Norman
>

---------------------------------------------------------------------
To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org


Mime
View raw message