vrfy(1)
๐ vrfy(1) โ General Commands Manual โจ
okay bestie, sit down, because this one is a whole moment. it's vrfy, from the General Commands Manual (section 1, the general commands girlies ๐), and it's about verifying electronic mail addresses. yes, like, actually checking if an address is real before you send your feelings into the void. no cap. ๐
๐ธ NAME ๐ธ
vrfy โ Verify electronic mail addresses
โจ SYNTAX โจ
okay so here's how you actually invoke her, verbatim, don't come for me:
vrfy [options] [-v] address [host]
vrfy [options] [-v] -f [file] [host]
vrfy [options] [-v] -p domain
vrfy [options] [-v] -T domain [name]
๐ฆ DESCRIPTION ๐ฆ
so vrfy is the tool you use to verify electronic mail addresses. the only parameter you actually need is the address you wanna verify. the actual verification happens at the remote machine where mail to that address would normally land โ and heads up, that might be a mail exchange host, not the final destination host. plot twist. if you give an explicit host as the second argument on the command line, then the address gets verified at that machine instead.
the output shows whether or not the address can be handled at the contacted host. if the address is invalid, you get error messages. if the address is recognized, the output shows the remote host's notion of the (possibly translated) address. and if it represents a local user at that host, you might get extra info about the user too. cute. ๐
lowkey important: if the address is accepted by the contacted host but that's not the final destination host, you still can't be sure the address represents a valid recipient. so don't get too comfy.
it's a handy tool for verifying local mail addresses, fr fr. if you've set up a .forward file, you can verify your own address to check the forwarding is actually done properly (we love a working forward ๐ซถ). and if you specify an arbitrary name, you can check whether it resolves to any valid recipients at all.
๐ SPECIAL OPERATION MODES ๐
some flags put the program in a whole special operation mode. main character energy each time. โญ
๐ FILE MODE
if the -f option is specified, the program enters a special file mode. the (optional) parameter is the name of a file containing electronic mail addresses, such as the kind you'd use for mailing lists. it attempts to verify all the addresses present in the file. and if you don't specify a filename at all? vrfy acts as a filter and reads the addresses to be verified from standard input. slay. ๐
๐ PING MODE
if the -p option is specified, the program enters a special ping mode. the required parameter is an electronic mail domain, and it'll verify whether the corresponding mail exchangers are currently responding to SMTP requests. like a little wellness check for your MX records. ๐
๐ฎ ETRN MODE
if the -T option is specified, the program enters a special etrn mode. the required parameter is an electronic mail domain, and an ESMTP ETRN command gets delivered to its corresponding mail exchangers. an optional name is used as the ETRN parameter โ and if you don't specify it, the local host name is used instead. ETRN is defined in RFC 1985, and it's implemented in sendmail 8.8. iykyk. ๐
๐ RECURSIVE MODE
if the -L level option is specified, the received replies to an address verification get recursively verified up to level levels deep. this is handy for checking mailing list expansions and detecting possible mail forwarding loops. obsessed with the diligence honestly.
recursion stops automatically if the reply represents a local recipient address, or if a forwarding loop is detected. and if the received reply is the same (modulo comments) as the address that was asked for, the request is retried at its domain itself โ unless this was the machine we just queried, or it's not an internet domain host.
the option -R is equivalent to `-L 17`. that's the maximum hop count normally used during actual mail relaying. and this option also implies `-s`. periodt. ๐
๐ OPTIONS ๐
-vโ Sets verbose mode. prints the action the program is going to take.- If specified as
-vv, very verbose output is printed, and the SMTP transactions with the remote host are shown in detail. - If the verbose mode level is set to 3 with
-vvv, the actions taken by the remote host are shown, such as alias and forward expansions. this can be quite amusing ๐ญ. the remote host must support the SMTPVERBcommand for this to work. - In ping mode, verbose mode level 3 will cause an extra SMTP command
HELOto be generated.
- If specified as
-dโ Prints debugging output showing the various phases of the SMTP connection with the remote host. this is normally not of any interest, ngl. also prints various messages that are otherwise shown in very verbose mode.- If specified as
-dd, in addition all nameserver query transactions are shown in detail. the receipts, basically. - A level 3 debug mode
-dddwill not make any SMTP connections at all. ๐
- If specified as
-aโ If multiple mail exchange hosts were found, this option causes the operation to be carried out at each of these hosts. normally only the primary mail exchanger is contacted.-lโ Sets local mode for error handling. address syntax and parsing errors are handled entirely by the program. the default is to pass faulty addresses to the local host to get the official error messages.-sโ Strips all comments from full address specifications, and presents only the plain address to the remote host to be verified. some hosts may get confused when a multiple bracketed address is presented ๐. this option is implied when-Ris given.-eโ Uses theEXPNcommand instead of theVRFYcommand. some systems may have different treatment for these commands, so this option may be a possible alternative. by sendmail V5 they're usually treated the same, but not by the sendmail V8 versions. in case treatment is different, theVRFYcommand will just show whether the presented address is valid or not, but theEXPNcommand will return alias expansions, if appropriate. some systems allowVRFYbut disallowEXPNfor privacy reasons.-hโ This option causes an SMTPHELOcommand to be issued to the contacted server before subsequent commands are attempted. servers can be configured to refuse commands unless aHELOcommand is given first. theHELOis not issued by default, since old versions of sendmail refuse SMTP connections originating on the same machine (i.e. if the domain name in theHELOcommand is its own name).-Hโ Similar to the-hoption, but now the ESMTPEHLOcommand is tried first. if the contacted server doesn't understand this, the SMTPHELOcommand is tried next. little fallback queen. ๐-nโ Many non-sendmail hosts do not, or incorrectly or incompletely, implement theVRFYcommand. other systems haveVRFYorEXPNdisabled for privacy reasons. this option uses an alternative protocol suite with the regularHELO,MAIL,RCPTandRSETcommands. this gives only a global indication whether the recipient is valid. recursive mode is not possible, and will be disabled.-S senderโ Defines an explicit envelope sender address to be used in theMAILcommand during the alternative protocol suite, to overrule the default empty sender address`<>`. this option implies`-n`.-c secsโ Sets a connect timeout value to override the default timeout of6seconds. this may be necessary if it takes considerable time to connect to the remote host. we've all been there. ๐ญ-t secsโ Sets a read timeout value to override the default timeout of60seconds. this may be necessary if it takes considerable time for the remote host to assemble all addresses in long mailing lists.
๐ DEFAULT OPTIONS ๐
default options and parameters can be preset in an environment variable VRFY_DEFAULTS using the same syntax as on the command line. they'll be evaluated before the command line arguments. so it's like your pregame. ๐
๐ฅ DIAGNOSTICS ๐ฅ
vrfy sets up an SMTP connection with the remote host where the verifying is to be carried out. SMTP is the TCP/IP protocol for electronic mail exchange, just so we're all on the same page bestie.
- If the given host does not speak SMTP, the error message
"Connection refused"is printed. - If the SMTP protocol is blocked, a
"Host is unreachable"message is printed. - If the remote host doesn't respond in time, you'll get a
"Connection timed out"message. - The remote host must support the SMTP
VRFYcommand for doing the verification. if not, a"Command not implemented"is printed.
๐บ๏ธ STRATEGY ๐บ๏ธ
here's the whole strategy used to find the remote host where the verification is to be carried out. get comfy:
- If an explicit verification host is specified, that host is contacted unconditionally.
- If the address to be verified has no domain part after an
@sign, it's supposed to be a local recipient and will be verified at the local host. - If the address contains a domain part after an
@sign, mail exchange hosts will be fetched for that domain. if no such mail exchangers are found, the domain part is supposed to represent a specific host, and that host itself will be contacted. - If mail exchangers were found, the verification will be carried out at the primary mail exchange host.
- If the
-aoption was given, and multiple mail exchangers exist, the verification is also carried out at all other mail exchange hosts. - For the pseudo domains
.uucpand.bitneta specific server can be compiled-in. the default is to contact the local host. - If no mail exchangers were found for an unqualified single hostname, the local host is contacted by default. the actual meaning of such addresses depends on your local strategy.
๐ ENVIRONMENT ๐
environment variables can be used to overrule several compiled-in defaults. the customization era. โจ
๐ VRFY_LOCALHOST
this is your nearest host running the sendmail daemon. it's contacted in case local addresses without a domain are given. also (unless the -l is given) when domain parsing errors were encountered, assuming that this host can give a more appropriate error message. the default value is localhost.
๐ง VRFY_UUCPRELAY
this host is contacted when a .uucp address is specified. you probably won't get much useful information ๐ฅฒ. the default value is localhost.
๐ง VRFY_BITNETRELAY
this host is contacted when a .bitnet or .earn address is specified. you probably won't get much useful information ๐ฅฒ. the default value is localhost.
๐ธ VRFY_SINGLERELAY
this host is contacted when a single unqualified host name could not be resolved to a fully qualified MX domain host. it's assumed that single hosts in your own domain can be resolved, i.e. they have an MX record. it depends on your local strategy for unqualified hosts what they mean: a .uucp host, a .bitnet host, or just a local host without MX. the default value is localhost.
๐ LIMITATIONS ๐
Okay bestie, moment of honesty, because I would never lie to you: some hosts have a genuinely lousy VRFY handling. ๐ญ Like, sometimes the command isn't even implemented at all. Rude. Other hosts will only verify local recipients, no cap, which means the -n option may be necessary.
Other servers may straight-up refuse the VRFY command for privacy reasons. ๐ Iconic of them, honestly, but inconvenient for us.
And here's the tea you really need to internalize: if the verification is not performed at the final destination host, one cannot be sure that the given address is valid. That's just how it is. No notes. ๐ซถ
๐ MAILING LISTS ๐
Now THIS is where it gets spicy, because there are some subtle differences you need to clock if you want to check an existing mailing list. Let's set the scene:
Suppose that list-users is the local alias to include the actual file /mail/lists/list-users with recipients. ๐ธ
Here's the three scenarios, bestie, and they are NOT the same thing:
- The command
vrfy list-userswill verify the proper expansion of the mailing list at the local host. No remote hosts are contacted to verify addresses. It's giving cozy, local, staying home. ๐ - The command
vrfy -f /mail/lists/list-userswill verify each individual address at the appropriate remote hosts. Now we're travelling. โ๏ธ - The same effect can be reached when you give the command
vrfy -L 1 list-users. And lowkey, if you want to see further expansion of the mailing list, just use a higher recursion level. ๐
So like: same destination, different routes.-fand-L 1get you to the same place, and-Labove 1 goes deeper. Choose your fighter. ๐
๐ AUTHOR ๐
Eric Wassenaar, Nikhef-H, <e07@nikhef.nl> โ the actual legend who made all of this happen. Respect where respect is due, periodt. ๐ซก๐
okay and that's the whole page, bestie!! ๐ this was vrfy(1), dated 971114 โ yes the date is literally giving vintage, and honestly? she's timeless. ๐ฐ๏ธโจ go verify something and slay responsibly. bye mwah ๐
๐
๐ฆ where this page comes from
- debian bookworm: vrfy 990522-11 ยท BSD-2-Clause
- debian trixie: vrfy 990522-11 ยท BSD-2-Clause
- ubuntu jammy: vrfy 990522-11 ยท BSD-2-Clause
- ubuntu noble: vrfy 990522-11 ยท BSD-2-Clause
- ubuntu resolute: vrfy 990522-11 ยท BSD-2-Clause
- ubuntu stonking: vrfy 990522-11 ยท BSD-2-Clause
- ๐ girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms