Defect #2032
closedemail address case for importing mail
0%
Description
The mail server on my campus (Exchange) has most of the email addresses in the form of OrdwayE@bla.fake . Note the capitalization. You can send emails to it in any case (upper, lower, mixed case)as is the spec for email but when it sends it an email the from field is in the mixed case as above. This breaks the email --> to issue code as I and everyone else always enter our email addresses in lowercase and when the code tries to find the User it fails.
Redmine needs to be agnostic about email address case.
right now I fixed it in mail_handler.rb by adding a downcase
user user = User.find_active(:first, :conditions => {:mail => email.from.first.downcase})
but the email address should probably also be stored in a know case , like lowercase, so that all the comparisons will always work.
This could be done by altering the before_save method in user.rb
def before_save
# update hashed_password if password was set
self.hashed_password = User.hash_password(self.password) if self.password
self.mail.downcase!
end
Files
Updated by Jean-Philippe Lang about 16 years ago
- Status changed from New to Closed
- Resolution set to Fixed
I prefer not to force email addresses to be saved in lower case but the problem is now fixed in r1933.
Thanks for pointing out this problem.