MAILTEST(1)

πŸ’– MAILTEST(1) πŸ’–

okay so bestie, sit DOWN, because we're talking about mailtest today and she's honestly kind of iconic for what she is. she's a little diagnostic gremlin that pokes at SMTP servers and tells you what's up. no cap. let's get into it 🩷

✨ NAME ✨

mailtest β€” Simple SMTP sending for diagnostics.

periodt, that's the whole name section, she's lowkey humble.


🌸 SYNOPSIS 🌸

mailtest --host host.example.com --rcptto recipient@example.com [
send_options ... ] [ additional recipients ...]

Options:
  --help                brief help message
  --debug               enable debugging

  --host host           host to connect to
  --rcptto recipient    recipient for message

  --helo machine        machine name for EHLO

  --vrfy                request VRFY of recipient
  --expn                request EXPN of recipient

  --mailfrom from       use as MAIL FROM value
  --from822 from        content From:

  --port port           port to connect to

  --body                generate body
  --include_options     include Options in body
  --include_headers     include generated headers in body

  --tls                 perform TLS on connect
  --nostarttls          do no attempt STARTTLS
  --stricttls           Enable strict verification on TLS connection

  --tlsargs arg=value[,arg=value]
                        Explicitly define TLS options.

  --bounce              sending as bounce (<>)

  --wellknown path      well-known path
  --output file         Output file to receive well-known data

like, yes, that's a lot of flags, but she's a diagnostic tool, she's ALLOWED to be extra πŸ’…


πŸ‘‘ OPTIONS πŸ‘‘

here's every single one of them, no skipping, bestie, I would never do that to you 🫢

  • --help β€” Prints a brief help message and exits. short, sweet, does what it says on the tin.
  • -d, --debug β€” Enables debugging, outputs additional information whilst processing requests. so when things are being weird you turn this on and she starts yapping about what she's doing. obsessed.
  • -h, --host=host β€” Specifies the host to connect to. Must be specified and must be IP-resolvable. like bestie, you cannot skip this one, it's not optional, it will simply not work. mandatory πŸ’€
  • -m, --ehlo=machine β€” Specifies the machine name to use as the EHLO value. Defaults to the fully-qualified name of the host running the command. so if you don't say anything, she's just gonna announce herself as whoever's machine she's running on. main character behaviour, honestly.
  • -r, --rcptto=recipient β€” Specifies the recipient of message. This is used as the RCPT TO value. it's giving "who am I sending this to" energy.
  • -v, --vrfy β€” Uses the recipient parameter for the value in a VRFY request. This disables the sending of an email. so she just asks "does this person exist?" and dips. no email leaves the building. πŸ¦‹
  • -e, --expn β€” Uses the recipient parameter for the value in an EXPN request. This disables the sending of an email. same vibe as -v, different question.
  • -f, --mailfrom=from_address β€” Specifies the value to use in the MAIL FROM command. Defaults to the current username at the FQDN of the machine -m unless the -B option is used.
  • -u, --from822=from_user β€” Specifies the value to use in the message headers. Defaults to the -f from_address value unless the -B option is used.
  • -B, --bounce β€” Replace the --mailfrom from_address with <> and the --from833 from_user with mailer-daemon@host, where the host is the value of --ehlo machine. (yes the page really writes --from833 there, I'm just relaying the gossip, not my typo, not my problem πŸ™ˆ)
  • -p, --port=port β€” Specifies the port to connect to on the specified host. Defaults to port 25 unless -S is given, in which case it defaults to 465.
  • -S, --tls β€” Specifies that TLS be used directly on the connection prior to any SMTP commands. Changes the connection port to 465 unless it has been explicitly provided. Disables any attempts at STARTTLS. straight to TLS, no small talk. πŸ”₯
  • -s, --nostarttls β€” Disables attempting STARTTLS if offered. Disabled by use of -S. so if the server offers to upgrade and you're like "no thank u", this is the flag.
  • --stricttls β€” Enables strict verification of the TLS connection. Sets the underlying SSL option SSL_verify_mode to 1/SSL_VERIFY_PEER rather than 0/SSL_VERIFY_NONE. Since the aim of this tool is to test the SMTP protocol behaviour and not the TLS behaviour, the decision was made to default the SSL_verify_mode to 0/SSL_VERIFY_NONE. so yeah β€” by default she is NOT checking certs, because she's here for SMTP drama, not TLS drama. if you want the strict version, ask for it. ✨
  • --sslargs=argname=argvalue[,argname=argvalue...] β€” Allow full control over underlying SSL options. Overrides --stricttls. See the documentation for IO::Socket::SSL for further details.

like so:

--sslargs SSL_verifycn_name=certname.example.com

(heads up bestie, the synopsis up top spells this one --tlsargs and this list spells it --sslargs β€” the page says both, I'm saying both, that's the whole situation 😭)

  • -b, --body β€” Generate a body for the message being sent. she can write, she contains multitudes.
  • -O, --include-options β€” Include details of options used in the message body. so the body literally tells you what flags you ran with. self-documenting queen πŸ‘‘
  • -H, --include-headers β€” Include a copy of the generated headers in the message body. receipts, but in the email itself.
  • -w, --wellknown=well-known-path β€” Provides the path value for a WELLKNOWN command.
  • -W, --output=output_file β€” Provides the output file where the WELLKNOWN data should be stored.

🧚 DESCRIPTION 🧚

mailtest is a simple utility for testing SMTP connections. she is designed to debug endpoints and not for full email generation β€” so like, do not try to run your newsletter through her, that's not the assignment bestie. πŸŽ€

It support a number of basic operations, SEND, VRFY, EXPN, WELLKNOWN. four little moves, and she does them well.


🌈 COMPATIBILITY 🌈

"mailtest" only requires modules that should be in all normal distributions. lowkey the easiest dependency situation you'll ever meet, no cap. πŸ“


πŸ’œ AUTHOR πŸ’œ

Bernard Quatermass <bernardq@exim.org>

we love a credited author, respect the icon.


This software is Copyright (c) 2008,2020,2024 by Bernard Quatermass.


and that's the whole page, bestie!! go forth and VRFY responsibly πŸ’…

this page came to you from perl v5.42.3, dated 2026-09-08, and it lives in section MAILTEST(1) β€” stay slaying, drink water, and don't forget your mandatory --host πŸ«ΆπŸ’–

πŸ“¦ where this page comes from