[BUG] Email normalization doesn't handle subaddresses, dots, etc. #985

Closed
opened 2026-02-20 00:00:27 -05:00 by deekerman · 1 comment
Owner

Originally created by @mertalev on GitHub (Jun 21, 2023).

The bug

I was looking through validator and noticed they have a normalizeEmail function that does more thorough sanitation beyond converting to lowercase. For instance, Gmail ignores dots so it handles removing them for Gmail accounts. I imagine this would be good to prevent duplicate emails from being registered. At the same time, I'm not sure if there's a good way to apply this to emails in the database so existing accounts still work. Thoughts?

The OS that Immich Server is running on

N/A

Version of Immich Server

v1.62.1

Version of Immich Mobile App

N/A

Platform with the issue

  • Server
  • Web
  • Mobile

Your docker-compose.yml content

N/A

Your .env content

N/A

Reproduction steps

N/A

Additional information

No response

Originally created by @mertalev on GitHub (Jun 21, 2023). ### The bug I was looking through [validator](https://www.npmjs.com/package/validator) and noticed they have a `normalizeEmail` function that does more thorough sanitation beyond converting to lowercase. For instance, Gmail ignores dots so it handles removing them for Gmail accounts. I imagine this would be good to prevent duplicate emails from being registered. At the same time, I'm not sure if there's a good way to apply this to emails in the database so existing accounts still work. Thoughts? ### The OS that Immich Server is running on N/A ### Version of Immich Server v1.62.1 ### Version of Immich Mobile App N/A ### Platform with the issue - [X] Server - [ ] Web - [ ] Mobile ### Your docker-compose.yml content ```YAML N/A ``` ### Your .env content ```Shell N/A ``` ### Reproduction steps ```bash N/A ``` ### Additional information _No response_
deekerman 2026-02-20 00:00:27 -05:00
Author
Owner

@jrasm91 commented on GitHub (Aug 6, 2023):

I don't think there is much benefit to adding this. I'd say we leave it as is for now.

@jrasm91 commented on GitHub (Aug 6, 2023): I don't think there is much benefit to adding this. I'd say we leave it as is for now.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/immich#985
No description provided.