SMTPTEST(1)

πŸ’Œ SMTPTEST(1) β€” Cyrus IMAP, section 1

okay bestie, sit down, hydrate, and let me tell you about smtptest πŸ’– This is the Cyrus IMAP documentation for it, and it's an interactive SMTP test program.

Here's the lil plot twist: this is actually installed as a hard linked copy of imtest(1) πŸ‘€ so the whole thing is imtest wearing a little SMTP hat.

What it does? It lets you authenticate and send SMTP commands to the server. That's the whole vibe. ✨


πŸ¦‹ SYNOPSIS πŸ¦‹

imtest [ -t keyfile ] [ -p port ] [ -m mechanism ]
    [ -a userid ] [ -u userid ] [ -k num ] [ -l num ]
    [ -r realm ] [ -f file ] [ -n num ] [ -s ] [ -q ]
    [ -c ] [ -i ] [ -z ] [ -v ] [ -I file ] [ -x file ]
    [ -X file ] [ -w passwd ] [ -o option=value ]
    [ -H client-ip ] hostname

🌸 DESCRIPTION 🌸

So imtest is this utility that lets you authenticate to an IMAP server and then interactively throw commands at it. Once you're authenticated, you can just… type any IMAP command. That's it. That's the whole interaction. Type it in, it goes. πŸ’…

It's got multiple SASL authentication mechanisms and it handles encryption layers transparently, like a queen who does not make a fuss. πŸ‘‘

People use this thing a lot for testing how an IMAP server is operating. And honestly? The devs building IMAP clients are obsessed with it too, because it's genuinely useful. No cap. πŸ”₯


✨ OPTIONS ✨

  • -t keyfile, --keyfile=keyfile β€” Turns on TLS. The keyfile holds the TLS public and private keys. If you pass "" it'll negotiate a TLS encryption layer but won't actually use TLS authentication. Sneaky but valid. πŸ’š
  • -p port, --port=port β€” Which port to connect to. Leave it off and it defaults to imap as defined in /etc/services.
  • -m mechanism, --mechanism=mechanism β€” Forces imtest to use mechanism for authentication. Don't specify one and it picks the strongest auth mechanism the server supports. Pass login and it uses the LOGIN command instead of AUTHENTICATE. Iconic behavior tbh.
  • -a userid, --authname=userid β€” The userid used for authentication. Defaults to the current user. This is the userid whose password or credentials get presented to the server for verification, i.e. the one doing the proving. 🫢
  • -u userid, --username=userid β€” The userid used for authorization. Defaults to the current user. This is the userid whose identity will be assumed after authentication. The glow-up identity, if you will.
NOTE: this is only used with SASL mechanisms that allow proxying (e.g. PLAIN).
  • -k num, --minssf=num β€” Minimum protection layer required.
  • -l num, --maxssf=num β€” Maximum protection layer to use (0=none; 1=integrity; etc). Example time: if you're using the GSSAPI authentication mechanism, specifying 0 forces imtest to use no layer at all, and specifying 1 forces it to use the integrity layer. By default, the maximum supported protection layer gets used. Maximum effort, literally. πŸ’ͺ
  • -r realm, --realm=realm β€” Specify the realm to use. Some authentication mechanisms may require you to specify one, so don't be surprised.
  • -f file, --input-filename=file β€” Pipes file into the connection after authentication. Feed it. πŸ“
  • -n num, --reauth-attempts=num β€” Number of authentication attempts; default is 1. The client will attempt to do SSL/TLS session reuse and/or fast reauth if possible.
  • -s, --require-tls β€” Enable SSL over the chosen protocol. πŸ”’
  • -q, --require-compression β€” Enable IMAP COMPRESSion (after authentication).
  • -c, --do-challenge β€” Enable challenge prompt callbacks. This makes the OTP mechanism ask for the one-time password instead of the secret pass-phrase β€” the library generates the correct response for you. Look at the library carrying the team. 😭
  • -i, --no-initial-response β€” Don't send an initial client response for SASL mechanisms, even if the protocol supports it. Boundaries. βœ‹
  • -I file, --pidfile=file β€” Echoes the PID of the running process into file. This can be useful with -X. πŸ‘€
  • -v, --verbose β€” Verbose. Prints out more information than usual. It's giving yapper mode. πŸ’¬
  • -z, --run-stress-test β€” Timing test. ⏱️
  • -x file, --output-socket=file β€” Opens the named socket for the interactive portion.
  • -X file β€” Like -x, except it also closes all file descriptors and daemonizes the process. Two jobs, one flag. πŸ’€
  • -w password, --password=password β€” The password to use. If you don't supply one, it will prompt you. No silent guessing around here.
  • -o option=value, --sasl-option=option=value β€” Sets the SASL option to value.
  • -H client-ip β€” Enables the HAProxy protocol and sends the specified client IP address in a v1 header. If the address is "unknown", a v1 header with UNKNOWN protocol will be sent. If the address is "local", a v2 header with LOCAL command will be sent. Very specific, very demure. πŸŽ€

🌈 EXAMPLES 🌈

ok bestie there are literally no examples here. empty. a void. the vibes are immaculate and the content is nonexistent. πŸ™ˆ (the original section is just… sitting there, being a heading with nothing under it. respect.)


πŸ’œ SEE ALSO πŸ’œ


πŸ‘‘ AUTHOR πŸ‘‘

The Cyrus Team, Nic Bernstein (Onlight)


1993–2026, The Cyrus Team


and that's the whole page, bestie!! 🫢 you made it to the end, which is honestly main character energy. this was Cyrus IMAP, version 3.12.4, dated Sep 09, 2026 β€” go forth and test your SMTP, and remember: authenticate responsibly. πŸ’…βœ¨

πŸ“¦ where this page comes from