
Markus Grandpré writes:
Dear Steve, dear list
That's not true on the systems I've worked with most recently -- those will be recognized as duplicate addresses (...)
You are right. I am sorry for this confusion. Please let me correct my initial posting to this list from yesterday, saying:
(...) <markus.grandpre@uni-konstanz.de> and <Markus.Grandpre@uni-konstanz.de> are being recognized as separate identities.
That is not the case. Meanwhile I discovered an error with logging into Postorius when an account is associated with two semantically identical email addresses that differ in their formatting, e.g.,
Yes. Apparently this is a problem of a policy difference between Mailman 3 and the Django allauth package, as Bernhard Lichtinger pointed out in <https://lists.mailman3.org/archives/list/mailman-users@mailman3.org/message/...>
allauth takes the point of view that the localpart of an email address is the "property" of the provider of the mailbox, and therefore should be taken verbatim by third parties. Mailman takes the more practical point of view that, in practice, almost all providers treat localparts as case insensitive. (Some -- Gmail, grrrrr -- go farther and ignore whole characters such as periods.) The problem is that users treat email addresses as case insensitive, and aren't very careful about using the same case every time. That's why I think the Mailman approach is appropriate.
To resolve the issue, the only solution I found was to manually delete the second email address from the database:
That will work in the short run, but I'm not sure that's a long-term solution. It's not clear to me that allauth won't do the same thing again.
Could I have achieved the same deletion using the REST interface?
I don't know. I would think not. I suspect Mailman code can only find the lowercase version. Mark has a script that looks for such duplicates using psycopg, not mailmanclient, so it accesses the database via the PostgreSQL API, not Mailman's REST API. It deletes any duplicate that is not all-lowercase:
https://github.com/pennersr/django-allauth/issues/3019#issuecomment-24402316...
I am not entirely sure how the duplicate email address came into the system.
allauth did it. It's explained in the issue where Mark's script is attached. It's not very easy to follow the discussion, though. And there's something weird going on because in your stack trace, it appears that allauth is doing a case insensitive database search. So I would just grab the script and run it, in case there are other users with extra addresses that compare equal when comparison is case insensitive.
I apologize again for the incorrect information in my initial message to this list.
No need to apologize. It's extremely complicated. Of course we're happy if you look around and figure out most of it for us!
Steve