SlideShare une entreprise Scribd logo
1  sur  23
Télécharger pour lire hors ligne
Quand et comment ne
PAS
valider une adresse email
Who?@am.i
Adresse e-mail
ASV: 43 ans, neutre, @everywhere
32 ans d’XP professionelle en
adressage d’emails !
Fonctionnalité
principale
Faire parvenir
des messages électroniques
dans des boites aux lettres
virtuelles
Autres
fonctionnalités utiles
Tags
jean.helou+humantalks@example.com
Commentaires
(humantalks)jeanhelou@example.com
Insensibilité à la casse
JEAN.HELOU@example.com
JeAn.HeLoU@example.com
Un peu d’histoire
Née en Automne 1971
3 standards IETF + extensions
RFC 822 (1982) + 1327, 1138, 1148,1123, 2156
RFC 2822 (2001) + 5335, 5336
RFC 5322 (2008) + 6854
On ne compte plus les spin-offs
Format d’une
adresse mail
local-part @ domain-part
Format
domain-part
RFC 1034, 1035 & 1123
<domain> ::= <subdomain> | " "
<subdomain> ::= <label> | <subdomain> "." <label>
<label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]
<ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>
<let-dig-hyp> ::= <let-dig> | "-"
<let-dig> ::= <letter> | <digit>
Facile !
^(([a-zA-Z]{1})|([a-zA-Z]{1}[a-zA-Z]{1})|([a-zA-Z]{1}[0-9]{1})|([0-9]{1}[a-zA-
Z]{1})|([a-zA-Z0-9][a-zA-Z0-9-_]{1,61}[a-zA-Z0-9])).([a-zA-Z]{2,6}|[a-zA-
Z0-9-]{2,30}.[a-zA-Z]{2,3})$
Format
domain-part
RFC 1034, 1035 & 1123
<domain> ::= <subdomain> | " "
<subdomain> ::= <label> | <subdomain> "." <label>
<label> ::= <letter> [ [ <ldh-str> ] <let-dig> ]
<ldh-str> ::= <let-dig-hyp> | <let-dig-hyp> <ldh-str>
<let-dig-hyp> ::= <let-dig> | "-"
<let-dig> ::= <letter> | <digit>
Facile !
^(([a-zA-Z]{1})|([a-zA-Z]{1}[a-zA-Z]{1})|([a-zA-Z]{1}[0-9]{1})|([0-9]{1}[a-zA-
Z]{1})|([a-zA-Z0-9][a-zA-Z0-9-_]{1,61}[a-zA-Z0-9])).([a-zA-Z]{2,6}|[a-zA-
Z0-9-]{2,30}.[a-zA-Z]{2,3})$
EPIC
FAIL!
Format
domain-part
Hostname : labels séparés par des points
Label :
a to z, 0 to 9, - (hyphen), or _
(underscore)
tout le reste sous forme {octal}
Depuis 2009 : UTF-8 (IDNA RFC 5890,…)
Format
local-part
le point ne peut pas être le premier caractère
le point ne peut pas être le dernier caractère
le point ne peut pas être immédiatement répété
Espace et "(),:;<>@[] (ASCII: 32, 34, 40, 41, 44,
58, 59, 60, 62, 64, 91–93) doivent être entre
guillemets ou précédés d’un 
UTF-8 au dessus de U+007 => valide !
En vrai c’est encore un peu plus compliqué
Seuls Chuck Norris
& SENDMAIL
peuvent valider
une adresse email
Quelques Invalides
Abc.example.com
A@b@c@example.com
a"b(c)d,e:f;g<h>i[jk]l@example.com
just"not"right@example.com
this is"notallowed@example.com
this still"notallowed@example.com
email@brazil.b
Tous valides
disposable.style.email.with+symbol@example.com
other.email-with-dash@example.com
user@[IPv6:2001:db8:1ff::a0b:dbd0]
"much.more unusual"@example.com
"very.unusual.@.unusual.com"@example.com
"very.(),:;<>[]".VERY."very@ "very
".unusual"@strange.example.com
!#$%&'*+-/=?^_`{}|~@example.org
"()<>[]:,;@"!#$%&'*+-/=?^_`{}| ~.a"@example.org
üñîçøðé@üñîçøðé.com (Unicode)
Quand vérifier le format
d’une adresse email ?
Quand vérifier le format
d’une adresse email ?
JAMAIS !
Exceptions
Vous écrivez une nouvelle
implémentation de sendmail ou de
postfix
Vous êtes Chuck Norris
Vous voulez frustrer tous les
internautes du monde
Fin ?
Comment verifier le format
d’une adresse email ?
Règle n°1
Ne vérifiez pas le format des
adresses mail
Règle n°2
ENVOYEZ UN MAIL
Le serveur émetteur
vérifie le « domain-part »
envoie le mail au serveur destination
Le serveur destination
valide le format de la « local-part »
vérifie l’existence de la boite de réception
Règle n°3
RFC3696
Application Techniques for Checking
and Transformation of Names
Quelques faits
Il est impossible de valider une
adresse avec une regex
Même si c’était le cas ça ne garantit
pas l’existence de la boite
Merci
who?@am.i
@jeanhelou | jeantil
Freelance scala/java
Utilisateur d’emails depuis 1996

Contenu connexe

En vedette

Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
Kurio // The Social Media Age(ncy)
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Saba Software
 

En vedette (20)

Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)Content Methodology: A Best Practices Report (Webinar)
Content Methodology: A Best Practices Report (Webinar)
 
How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024How to Prepare For a Successful Job Search for 2024
How to Prepare For a Successful Job Search for 2024
 
Social Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie InsightsSocial Media Marketing Trends 2024 // The Global Indie Insights
Social Media Marketing Trends 2024 // The Global Indie Insights
 
Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024Trends In Paid Search: Navigating The Digital Landscape In 2024
Trends In Paid Search: Navigating The Digital Landscape In 2024
 
5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary5 Public speaking tips from TED - Visualized summary
5 Public speaking tips from TED - Visualized summary
 
ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd ChatGPT and the Future of Work - Clark Boyd
ChatGPT and the Future of Work - Clark Boyd
 
Getting into the tech field. what next
Getting into the tech field. what next Getting into the tech field. what next
Getting into the tech field. what next
 
Google's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search IntentGoogle's Just Not That Into You: Understanding Core Updates & Search Intent
Google's Just Not That Into You: Understanding Core Updates & Search Intent
 
How to have difficult conversations
How to have difficult conversations How to have difficult conversations
How to have difficult conversations
 
Introduction to Data Science
Introduction to Data ScienceIntroduction to Data Science
Introduction to Data Science
 
Time Management & Productivity - Best Practices
Time Management & Productivity -  Best PracticesTime Management & Productivity -  Best Practices
Time Management & Productivity - Best Practices
 
The six step guide to practical project management
The six step guide to practical project managementThe six step guide to practical project management
The six step guide to practical project management
 
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
Beginners Guide to TikTok for Search - Rachel Pearson - We are Tilt __ Bright...
 
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
Unlocking the Power of ChatGPT and AI in Testing - A Real-World Look, present...
 
12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work12 Ways to Increase Your Influence at Work
12 Ways to Increase Your Influence at Work
 
ChatGPT webinar slides
ChatGPT webinar slidesChatGPT webinar slides
ChatGPT webinar slides
 
More than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike RoutesMore than Just Lines on a Map: Best Practices for U.S Bike Routes
More than Just Lines on a Map: Best Practices for U.S Bike Routes
 
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
Ride the Storm: Navigating Through Unstable Periods / Katerina Rudko (Belka G...
 
Barbie - Brand Strategy Presentation
Barbie - Brand Strategy PresentationBarbie - Brand Strategy Presentation
Barbie - Brand Strategy Presentation
 
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them wellGood Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
Good Stuff Happens in 1:1 Meetings: Why you need them and how to do them well
 

Comment et quand ne pas valider un email