Feature #9196
closed
Improve logging in MailHandler when user creation fails
Added by Alex Shulgin about 13 years ago.
Updated almost 13 years ago.
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
- 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?
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.
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