I've had some troubles with the post formatting and filters. I went and did the following:
1) deleted all listhandler forum posts and comments.
2) removed Mailhandler and Listhandler modules.
3)Re-installe Mailhandler and Listhandler.
4)fetched all listser emails from pop account.

But now I get

"Cannot create account: The name 'UserXX' is already taken"

and

"Comment: unauthorized comment submitted or comment submitted to a closed node Alternate to Universal Client? One more time. "

messages.

How do I get passed this?

Comments

philipnet’s picture

Did you Uninstall the Listhandler and Mailhandler modules?
Getting the message

Comment: unauthorized comment submitted or comment submitted to a closed node

suggests you didn't.
To fix it, I suggest deleting the contents of the Listhandler table and reconfiguring Listhandler.

Did you delete all your users?
Is that an option?
Otherwise you will continue to get the message

Cannot create account: The name 'UserXX' is already taken

You don't need to delete the users (don't worry!), Listhandler will still work if it can't create a user account.

pcs305’s picture

Thank you philipnet.

I have stumbled upon some problems. Duplicate email addresses and illegal characters in usernames.
I have yet to go through and verify every error to one of these problems.

What I would like to know is if it is possible to check against email address if the user exist, and then create the ID if it does not?

philipnet’s picture

Version: 5.x-1.0-beta2 » master
Component: Miscellaneous » Code
Assigned: Unassigned » philipnet
Category: support » feature

Hi pcs305,

Listhandler should log messages like "Cannot create account: <reason>".

By default Drupal does enforce unique e-mail addresses for it's users, however that is something enforced by code rather than the database.

Listhandler currently checks if the username is not taken (case-insensitive) and if the email address is valid. If both cases are true then Listhandler creates the user.
Personally, I think it would be better if Listhandler checked the email address against the user table and either posted it under the first entry it found, or created a new user (*)

*: As long as that configuration option is checked.

However I'm not keen on functional changes to the Drupal 5 version.
Therefore I am moving this report into the Drupal 6 feature request queue so it can be worked on for Drupal 6.

Regards.

P.

P.S. You may want to install the Logintoboggan module: http://drupal.org/project/logintoboggan which allows users to login with their email address rather than user name.

philipnet’s picture

Title: Cannot Create account » Improved user detection: use email address rather than name
chrissearle’s picture

Subscribe

pcs305’s picture

Do we have any idea if this feature will be added and when?

I want to add listserver emails to my forum but need to be able to use emails rather than uid's.

Thank you

Bèrto ëd Sèra’s picture

+1 It's really annoying at the moment and I'd expect it to be quite an easy change.

philipnet’s picture

Status: Active » Needs review

I've been reading through the Mailhandler code (and Listhandler as well ;) ).

Can you try installing and enabling the Mailalias module: http://drupal.org/project/mailalias ?

Mailhandler does it's job of finding the sending user before passing the new node to Listhandler. But it will only fire off it's "check the email address" routine if Mailalias is installed.

shark’s picture

I've closed #56936: Look sender up on e-mail address rather than name since it is a duplicate but want to include the nice description from that report of the problem here:

Currently listhandler attempts to find a drupal user by "Name", and when that fails, it creates a new user with the name and email address in the email. As a result, when the name in the email doesnt exactly match the name provided in drupal, a new user is created with the same email address; this then prevents the real user account from being updated with an error message "The e-mail address xxxx is already taken."

Steps to reproduce:
1. create a drupal account using "First M Surname"
2. subscribe to an email list as "First Middle Surname"
3. post to the email list.

Expected results:
message associated with drupal user due to identical email address

Actual results
additional user created with same email address, preventing real account from being updated.

shark’s picture

With the Mailalias module installed, things work as expected (see comment 9, above).

Specifically,

1. I have a user with name "Firstname Surname", and some email address firstname-surname@tld.com.
2. I post to the mailing list using name "Firstname" and another address firstname@tld.com.
3. Result is a new user ("Firstname", email: firstname@tld.com), and new forum post authored by "Firstname". After deleting this user, I enable Mailalias and in the account settings for user "Firstname Surname" I set a mailalias to be firstname@tld.com. Repeat step 2.
4. Result is no new user; new forum post is now authored by user "Firstname Surname" as desired.

In step 3 above, instead of adding a mailalias in the user's account you can also just change the primary email account (e.g. to firstname@tld.com) and when new list messages come in the user will be matched against the email, so even if the mailing list sender is "Z" it will still record the author as Drupal user "John Smith" if sender "Z" and user "John Smith" have the same email.

As long as people don't mind the Mailalias dependency, I think this issue can be closed.

philipnet’s picture

Component: Code » Documentation
Status: Needs review » Fixed

Thanks,

I've added the following to the README file:

5) Users with multiple email addresses.
If you install MailAlias, enable it and configure it with the email
addresses of your users, MailHandler/ListHandler will associate the sender
with the right Drupal account.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.