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

Closed
opened 2026-02-04 23:47:14 +03:00 by OVERLORD · 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_
OVERLORD added the nice to have label 2026-02-04 23:47:14 +03: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.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: immich-app/immich#983