EMAIL_VALIDATOR(1)
๐ email_validator(1) โ the user-commands era ๐
okay bestie, pull up a chair ๐ you've stumbled into email_validator, section 1 of the User Commands lineup. yes, the girl from the terminal. she validates email addresses and she does it flawlessly.
โจ NAME โจ
email_validator โ validate email addresses ๐
๐ฆ SYNOPSIS ๐ฆ
email_validator test@example.org
email_validator < LIST_OF_ADDRESSES.TXT
๐ DESCRIPTION ๐
so here's the tea โ you hand her email addresses to validate, and you can do it two ways: as a command-line argument, or piped in through STDIN with newlines separating each one. literally either/or, your call, she's flexible like that ๐
Validation errors get printed for invalid email addresses. no hiding, no sugarcoating, she will tell you.
When you pass an email address on the command line, and it's valid, information about it will be printed. a little treat, as a reward ๐
When you're using STDIN instead? no output will be given for valid email addresses. silence = slay. only the problems get to speak up.
and the icon behavior: keyword arguments to the Python email_validator.validate_email function can be set in environment variables of the same name but uppercase ๐ so if you know the function, you already know the vibe. (see ENVIRONMENT below, i gotchu)
๐ ENVIRONMENT ๐
๐ BOOLEAN ๐
For these environment variables, the rules are simple and honestly iconic: any non-empty string value is interpreted as True, the empty string is interpreted as False, and a default value is used if the variable is unset. that's it, that's the whole system โจ
ALLOW_SMPTUTF8โ set to false to prohibit internationalized addresses that would require the SMTPUTF8 extension. default: trueALLOW_EMPTY_LOCALโ set to true to allow an empty local part (i.e.@example.com), e.g. for validating Postfix aliases. ๐ซถALLOW_QUOTED_LOCALโ set to true to allow obscure and potentially problematic email addresses in which the part of the address before the@-sign contains spaces,@-signs, or other surprising characters when the local part is surrounded in quotes (so-called quoted-string local parts). ๐ญ In the object returned on successful validation, the normalized local part removes any unnecessary backslash-escaping and even removes the surrounding quotes if the address would be valid without them. default: falseALLOW_DOMAIN_LITERALโ set to true to allow bracketed IPv4 and"IPv6:"-prefixed IPv6 addresses in the domain part of the email address. ๐ฅ No deliverability checks are performed for these addresses. In the object returned on successful validation, the normalized domain will use the condensed IPv6 format, if applicable. The object'sdomain_addressattribute will hold the parsedipaddress.IPv4Addressoripaddress.IPv6Addressobject if applicable. default: falseALLOW_DISPLAY_NAMEโ set to true to allow a display name and bracketed address in the input string, likeMy Name <me@example.org>. ๐ It's implemented in the spirit but not the letter of RFC 5322 3.4, so it may be stricter or more relaxed than what you want. (she said what she said.) The display name, if present, is provided in the returned object's field after being unquoted and unescaped. default: falseGLOBALLY_DELIVERABLEโ default: trueCHECK_DELIVERABILITYโ If true, DNS queries are made to check that the domain name in the email address (the part after the@-sign) can receive mailโbasically, that the domain name in the email address has a (non-Null) DNS MX record indicating that it can receive email. ๐ If false, skip this DNS-based check. It is recommended to set this to false when performing validation for login pages (but not account creation pages) since re-validation of a previously validated domain in your database by querying DNS at every login is probably undesirable. ngl that's just common sense. default: trueTEST_ENVIRONMENTโ If true, DNS-based deliverability checks are disabled andtestand**.testdomain names are permitted. default: false
๐งฎ FLOATING-POINT ๐งฎ
For these environment variables, any non-empty string is parsed as a floating-point value, and a default value is used if the variable is unset. โญ
DEFAULT_TIMEOUTโ default: 15
๐ fr fr, remember: the boolean ones eat any non-empty string as True. even"no". even"false". even"girl what". the string is non-empty, so it's True. that's the rules, no cap.
and that's the whole page, bestie ๐ซถ she's from September 2025, she's email_validator(1) in the User Commands section, and she ate. periodt. ๐
โจ
๐ฆ where this page comes from
- epel 10: python3-email-validator 2.3.0-1.el10_2 ยท Unlicense
- fedora 43: python3-email-validator 2.3.0-2.fc43 ยท Unlicense
- fedora 44: python3-email-validator 2.3.0-3.fc44 ยท Unlicense
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms