Project

General

Profile

Actions

Feature #9196

closed

Improve logging in MailHandler when user creation fails

Added by Alex Shulgin over 12 years ago. Updated over 12 years ago.

Status:
Closed
Priority:
Normal
Category:
Email receiving
Target version:
Start date:
2011-09-06
Due date:
% Done:

0%

Estimated time:
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.


Files

Actions #1

Updated by Terence Mill over 12 years ago

+1

Actions #2

Updated by Roland Discein over 12 years ago

+1

Actions #3

Updated by Jean-Philippe Lang over 12 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?

Actions #4

Updated by Roland Discein over 12 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.

Actions #5

Updated by Alex Shulgin over 12 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.

Actions

Also available in: Atom PDF