Feature #9196

Improve logging in MailHandler when user creation fails

Added by Alex Shulgin about 6 years ago. Updated almost 6 years ago.

Status:ClosedStart date:2011-09-06
Priority:NormalDue date:
Assignee:Jean-Philippe Lang% Done:

0%

Category:Email receiving
Target version:1.3.0
Resolution:Fixed

Description

The patch adds logging to MailHandler.create_user_from_email to report the reason if a user model cannot be created.

A "popular" reason appears to be that first/lastname limit is hit, so this also adds code to enforce the limits.

0001-Add-logging-to-create_user_from_email.-Force-limits-.patch Magnifier (2.55 KB) Alex Shulgin, 2011-09-06 20:51

History

#1 Updated by Terence Mill about 6 years ago

+1

#2 Updated by Roland Discein about 6 years ago

+1

#3 Updated by Jean-Philippe Lang almost 6 years ago

  • Tracker changed from Patch to Feature
  • Subject changed from Improve logging in MailHandler to Improve logging in MailHandler when user creation fails
  • Status changed from New to Closed
  • Assignee set to Jean-Philippe Lang
  • Target version set to 1.3.0
  • Resolution set to Fixed

r7952 improves user creation and log messages.

Note that it doesn't truncate email since it would result in an invalid email format (tld missing). We could change to a random email address in this case but I don't think it makes sense. If the user creation still fails, wouldn't it be better to use the anonymous user instead of ignoring the incoming email?

#4 Updated by Roland Discein almost 6 years ago

Nop, IMHO, it wouldn't be better. in my case, I ignore addr.name because of many users with quoted printable base64 encoded "From:" field, which redmine can't decode to a valid firstname/lastname and also increased limits to 100 chars in user DB and model.

#5 Updated by Alex Shulgin almost 6 years ago

Jean-Philippe Lang wrote:

r7952 improves user creation and log messages.

Note that it doesn't truncate email since it would result in an invalid email format (tld missing). We could change to a random email address in this case but I don't think it makes sense. If the user creation still fails, wouldn't it be better to use the anonymous user instead of ignoring the incoming email?

Makes sense to me.

Also available in: Atom PDF