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 Rodrigo Zerlotti <ro...@dblive.com> on 2001/05/09 22:34:31 UTC

User to lowercase...

What you all think about make the user match not "case sensitive", i.e.
add toLowerCase on all "matchRecipient" methods? I see more and more
errors comming from people trying to do "Name@company.com" where should
be "name@company.com"

Thoughts?

Rod~

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


Re: User to lowercase...

Posted by Matthew Pangaro <mp...@lokitech.com>.
To echo what Serge said before, the RFC does specify that the username is
case sensitive. I think that it's important that James properly support the
standard, even if we make the default option set to be case-insensitive. To
that end, I think it's got to be a server or handler level configuration
setting to be case-sensitive or not.

Just my $.02
Matt Pangaro
Loki Technologies

----- Original Message -----
From: "Charles Benett" <ch...@benett1.demon.co.uk>
To: <ja...@jakarta.apache.org>
Sent: Thursday, May 10, 2001 12:14
Subject: Re: User to lowercase...


>
>
> Serge Knystautas wrote:
> >
> > I documented in the MailAddress.java code (and as seen in the RFCs it
> > references) that according to specs, the username portion of an email
> > address is case sensitive, and the domain name part is case insensitive.
> >
> > In practice though, all of the email address is case-insensitive.  It's
> > actually an easy change to modify MailAddress.java's equals() method to
do
> > case insensitive for both.
>
> MailAddress.equals() currently uses equalsIgnoreCase for both user and
> host.
>
> >  We had talked about making this a server
> > setting, so JAMES could either be case sensitive on the username part of
the
> > email address if you so choose, but we (I) never figured the best way to
do
> > this.
>
> I think my suggestion for UserRepository (below) plus matching changes
> for getInbox() should do the trick.
> Will experiment and report back ...
>
> Charles
> > Serge Knystautas
> > Loki Technologies
> > http://www.lokitech.com/
> > ----- Original Message -----
> > From: "Fedor Karpelevitch" <fe...@home.com>
> > To: <Ja...@jakarta.apache.org>
> > Sent: Wednesday, May 09, 2001 5:45 PM
> > Subject: Re: User to lowercase...
> >
> > > Just my 2 cents.
> > > I am 99% sure that emails are supposed to be case INsensitive (just as
> > domain
> > > names are). You can easily check it by looking at this email's "To:"
field
> > :-)
> > >
> > > I think that original case of the address should be preserved, but
> > matching
> > > should be case-insensitive. the easierst way to do it is
> > > String.equalsIgnoreCase(String);
> > >
> > > fedor.
> > >
> > > On Wednesday 09 May 2001 14:10, you wrote:
> > > > Good point, Rod,
> > > > Also very irritating is if you submit your address as me@somewhere
and
> > > > get email for ME@SOMEWHERE !
> > > > However, email addresses are supposed to be case sensitive (I'm 95%
> > > > sure, off hand).
> > > >
> > > > So, another alternative would be to:
> > > > 1) add a method containsCaseInsensitive(String name) to
UserRepository
> > > > 2) add a config element
> > > > <allowCaseInsensitive>true</allowCaseInsensitive> to the james
section.
> > > > 3) amend isLocalUser(String userAccount) so that it checks
> > > > UserRepository case sensitive/ insensitive as set by admin. This is
the
> > > > relevant method in MailetContext, I think. As used in
RecipientIsLocal.
> > > >
> > > > Giving us the best of both worlds.
> > > > Thoughts?
> > > > Charles
> > > >
> > > > Rodrigo Zerlotti wrote:
> > > > > What you all think about make the user match not "case sensitive",
> > i.e.
> > > > > add toLowerCase on all "matchRecipient" methods? I see more and
more
> > > > > errors comming from people trying to do "Name@company.com" where
> > should
> > > > > be "name@company.com"
> > > > >
> > > > > Thoughts?
> > > > >
> > > > > Rod~
> > >
> > > ---------------------------------------------------------------------
> > > 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
>
> ---------------------------------------------------------------------
> 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


Re: User to lowercase...

Posted by Charles Benett <ch...@benett1.demon.co.uk>.

Serge Knystautas wrote:
> 
> I documented in the MailAddress.java code (and as seen in the RFCs it
> references) that according to specs, the username portion of an email
> address is case sensitive, and the domain name part is case insensitive.
> 
> In practice though, all of the email address is case-insensitive.  It's
> actually an easy change to modify MailAddress.java's equals() method to do
> case insensitive for both.

MailAddress.equals() currently uses equalsIgnoreCase for both user and
host.

>  We had talked about making this a server
> setting, so JAMES could either be case sensitive on the username part of the
> email address if you so choose, but we (I) never figured the best way to do
> this.

I think my suggestion for UserRepository (below) plus matching changes
for getInbox() should do the trick.
Will experiment and report back ...

Charles 
> Serge Knystautas
> Loki Technologies
> http://www.lokitech.com/
> ----- Original Message -----
> From: "Fedor Karpelevitch" <fe...@home.com>
> To: <Ja...@jakarta.apache.org>
> Sent: Wednesday, May 09, 2001 5:45 PM
> Subject: Re: User to lowercase...
> 
> > Just my 2 cents.
> > I am 99% sure that emails are supposed to be case INsensitive (just as
> domain
> > names are). You can easily check it by looking at this email's "To:" field
> :-)
> >
> > I think that original case of the address should be preserved, but
> matching
> > should be case-insensitive. the easierst way to do it is
> > String.equalsIgnoreCase(String);
> >
> > fedor.
> >
> > On Wednesday 09 May 2001 14:10, you wrote:
> > > Good point, Rod,
> > > Also very irritating is if you submit your address as me@somewhere and
> > > get email for ME@SOMEWHERE !
> > > However, email addresses are supposed to be case sensitive (I'm 95%
> > > sure, off hand).
> > >
> > > So, another alternative would be to:
> > > 1) add a method containsCaseInsensitive(String name) to UserRepository
> > > 2) add a config element
> > > <allowCaseInsensitive>true</allowCaseInsensitive> to the james section.
> > > 3) amend isLocalUser(String userAccount) so that it checks
> > > UserRepository case sensitive/ insensitive as set by admin. This is the
> > > relevant method in MailetContext, I think. As used in RecipientIsLocal.
> > >
> > > Giving us the best of both worlds.
> > > Thoughts?
> > > Charles
> > >
> > > Rodrigo Zerlotti wrote:
> > > > What you all think about make the user match not "case sensitive",
> i.e.
> > > > add toLowerCase on all "matchRecipient" methods? I see more and more
> > > > errors comming from people trying to do "Name@company.com" where
> should
> > > > be "name@company.com"
> > > >
> > > > Thoughts?
> > > >
> > > > Rod~
> >
> > ---------------------------------------------------------------------
> > 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

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


Re: User to lowercase...

Posted by Serge Knystautas <se...@lokitech.com>.
I documented in the MailAddress.java code (and as seen in the RFCs it
references) that according to specs, the username portion of an email
address is case sensitive, and the domain name part is case insensitive.

In practice though, all of the email address is case-insensitive.  It's
actually an easy change to modify MailAddress.java's equals() method to do
case insensitive for both.  We had talked about making this a server
setting, so JAMES could either be case sensitive on the username part of the
email address if you so choose, but we (I) never figured the best way to do
this.

Serge Knystautas
Loki Technologies
http://www.lokitech.com/
----- Original Message -----
From: "Fedor Karpelevitch" <fe...@home.com>
To: <Ja...@jakarta.apache.org>
Sent: Wednesday, May 09, 2001 5:45 PM
Subject: Re: User to lowercase...


> Just my 2 cents.
> I am 99% sure that emails are supposed to be case INsensitive (just as
domain
> names are). You can easily check it by looking at this email's "To:" field
:-)
>
> I think that original case of the address should be preserved, but
matching
> should be case-insensitive. the easierst way to do it is
> String.equalsIgnoreCase(String);
>
> fedor.
>
> On Wednesday 09 May 2001 14:10, you wrote:
> > Good point, Rod,
> > Also very irritating is if you submit your address as me@somewhere and
> > get email for ME@SOMEWHERE !
> > However, email addresses are supposed to be case sensitive (I'm 95%
> > sure, off hand).
> >
> > So, another alternative would be to:
> > 1) add a method containsCaseInsensitive(String name) to UserRepository
> > 2) add a config element
> > <allowCaseInsensitive>true</allowCaseInsensitive> to the james section.
> > 3) amend isLocalUser(String userAccount) so that it checks
> > UserRepository case sensitive/ insensitive as set by admin. This is the
> > relevant method in MailetContext, I think. As used in RecipientIsLocal.
> >
> > Giving us the best of both worlds.
> > Thoughts?
> > Charles
> >
> > Rodrigo Zerlotti wrote:
> > > What you all think about make the user match not "case sensitive",
i.e.
> > > add toLowerCase on all "matchRecipient" methods? I see more and more
> > > errors comming from people trying to do "Name@company.com" where
should
> > > be "name@company.com"
> > >
> > > Thoughts?
> > >
> > > Rod~
>
> ---------------------------------------------------------------------
> 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


Re: User to lowercase...

Posted by Fedor Karpelevitch <fe...@home.com>.
Just my 2 cents.
I am 99% sure that emails are supposed to be case INsensitive (just as domain 
names are). You can easily check it by looking at this email's "To:" field :-)

I think that original case of the address should be preserved, but matching 
should be case-insensitive. the easierst way to do it is 
String.equalsIgnoreCase(String);

fedor.

On Wednesday 09 May 2001 14:10, you wrote:
> Good point, Rod,
> Also very irritating is if you submit your address as me@somewhere and
> get email for ME@SOMEWHERE !
> However, email addresses are supposed to be case sensitive (I'm 95%
> sure, off hand).
>
> So, another alternative would be to:
> 1) add a method containsCaseInsensitive(String name) to UserRepository
> 2) add a config element
> <allowCaseInsensitive>true</allowCaseInsensitive> to the james section.
> 3) amend isLocalUser(String userAccount) so that it checks
> UserRepository case sensitive/ insensitive as set by admin. This is the
> relevant method in MailetContext, I think. As used in RecipientIsLocal.
>
> Giving us the best of both worlds.
> Thoughts?
> Charles
>
> Rodrigo Zerlotti wrote:
> > What you all think about make the user match not "case sensitive", i.e.
> > add toLowerCase on all "matchRecipient" methods? I see more and more
> > errors comming from people trying to do "Name@company.com" where should
> > be "name@company.com"
> >
> > Thoughts?
> >
> > Rod~

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


Re: User to lowercase...

Posted by Charles Benett <ch...@benett1.demon.co.uk>.
Good point, Rod,
Also very irritating is if you submit your address as me@somewhere and
get email for ME@SOMEWHERE !
However, email addresses are supposed to be case sensitive (I'm 95%
sure, off hand).

So, another alternative would be to:
1) add a method containsCaseInsensitive(String name) to UserRepository
2) add a config element
<allowCaseInsensitive>true</allowCaseInsensitive> to the james section.
3) amend isLocalUser(String userAccount) so that it checks
UserRepository case sensitive/ insensitive as set by admin. This is the
relevant method in MailetContext, I think. As used in RecipientIsLocal.

Giving us the best of both worlds.
Thoughts?
Charles



Rodrigo Zerlotti wrote:
> 
> What you all think about make the user match not "case sensitive", i.e.
> add toLowerCase on all "matchRecipient" methods? I see more and more
> errors comming from people trying to do "Name@company.com" where should
> be "name@company.com"
> 
> Thoughts?
> 
> Rod~
> 
> ---------------------------------------------------------------------
> 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