EMAIL_VALIDATOR(1)

๐Ÿ“ฆ version 2.3.0, in epel 10, fedora 43, fedora 44

๐Ÿ’Œ 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: true
  • ALLOW_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: false
  • ALLOW_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's domain_address attribute will hold the parsed ipaddress.IPv4Address or ipaddress.IPv6Address object if applicable. default: false
  • ALLOW_DISPLAY_NAME โ€” set to true to allow a display name and bracketed address in the input string, like My 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: false
  • GLOBALLY_DELIVERABLE โ€” default: true
  • CHECK_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: true
  • TEST_ENVIRONMENT โ€” If true, DNS-based deliverability checks are disabled and test and **.test domain 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