Hi! I think this is a feature request, but I'm new to Drupal, so forgive me if I've missed something and it's actually a support request!
I'm using Listhandler to archive a mailing list on a Drupal forum. Most mailing list members are already users in Drupal, and if they have a second email address that I know about, it's often (but not always!) already defined in Mailalias. Brand new list members posting for the first time have a Drupal account automatically created. So far, so good...
The problem occurs when an existing user posts from a second email address which isn't known to Mailalias. Listhandler then cannot create a new user (Cannot create account: The name 'Ian Harris' is already taken.) and the incoming email gets posted as "Anonymous". On my site this fails because I do not allow anonymous postings (eg "Comment: unauthorized comment submitted or comment submitted to a closed post..."). But even if I were to allow anonymous content, it'd still end up being filed under Anonymous, rather than the correct user.
Would it be possible for Listhandler to automatically add email addresses to Mailalias, should its attempt to create a new user fail due to the username being already taken?
Comments
Comment #1
pcs305 commentedThere is a feature request open for having Listhandler to use email rather than name.
If this is implimented it may solve your problem.
http://drupal.org/node/277848
Comment #2
shark commentedpcs305, #277848: Improved user detection: use email address rather than name may be almost fixed but I don't think that would solve this issue.
If I understand correctly, the desired behavior is:
1. Email comes in and passed to Listhandler.
2. Listhandler determines user based on From: name (e.g. email sender 'Jason a@site.com' matches site user 'Jason a@anothersite.com')
3. User (e.g. 'Jason') already exists (but has different email). Instead of reporting an error about the user already existing, it would add 'a@site.com' to the list of mail aliases for the site user, and set the author to the existing site user.
This seems like a good idea. However, an implementation should only modify the mailalias if there is a match for "Firstname Surname", not just "Firstname".
Comment #3
rmyoung commentedI have been having this issue on my own site since upgrading to 6.x from 5.x . We have an integrated mailing list/forum which has been going for years and some users have changed their email addresses in the mailing list. Because their email address is different but the account name is exactly the same a new user can't be created and the posts are dropped.
Comment number #2 sums the problem up well and the proposed solution.
Comment #4
cor3huis commentedIMHO good feature request. If I have time left and other patches I've made are added to current codebase, then lets see what is possible.
Comment #5
cor3huis commentedComment #6
pcs305 commentedFYI:
Mailalias (http://drupal.org/project/mailalias) is now deprecated in favor of http://drupal.org/project/multiple_email
Comment #7
cor3huis commentedThe #1037598: The timestamp of creation of a new users is not set from date of first arriving email issue contains a patch that has more intelligent new user creation even if the name already exists. This might solve your problem as far as I can see.
Comment #8
kentr commented@#7:
Sounds like that won't fix this issue.
Comment #9
kentr commentedHow would listhandler know which user to attach the email address to?
FWIW, I think this issue lies with mailhandler.
Mailhandler first tries to locate the user for the new node according to the incoming email. Listhandler only kicks in to create the user if mailhandler fails to locate the author.
Mailhandler already integrates with mailalias, and there is a patch to integrate with multiple_email: #846392: Support for Multiple Email module.
So, I'd call this issue postponed or closed.