Project

General

Profile

Actions

Defect #2032

closed

email address case for importing mail

Added by Erik Ordway about 16 years ago. Updated about 16 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
Email notifications
Target version:
-
Start date:
2008-10-14
Due date:
% Done:

0%

Estimated time:
Resolution:
Fixed
Affected version:

Description

The mail server on my campus (Exchange) has most of the email addresses in the form of . 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

email_downcase.diff (965 Bytes) email_downcase.diff diff to make the noted changes Erik Ordway, 2008-10-14 23:05
Actions #1

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.

Actions

Also available in: Atom PDF