GSASL(1)

πŸ’… GSASL(1) β€” the gsasl glow-up (GNU SASL command line interface)

okay bestie, so this is the manual page for gsasl β€” like, the whole thing, it lives in the User Commands section of the manual. Buckle up, we're going in 🌸


✨ SYNOPSIS ✨

gsasl [OPTION]... [HOST [PORT]]...

that's it, that's the shape of it. options first, then optionally a host and port. iconic.


πŸ¦‹ DESCRIPTION πŸ¦‹

So the whole vibe: gsasl authenticates a user to a server using the Simple Authentication and Security Layer (SASL, iykyk). Right now it's got your back for IMAP and SMTP servers specifically β€” those are the two supported ones. Basically it's the command line interface for the GNU SASL library πŸ’–

Right up top, the two classic little guys:

  • -h, --help β€” prints help and dips out (exit).
  • -V, --version β€” prints the version and dips out too.

πŸ‘‘ Commands

  • -c, --client β€” act as a client. this one's default=on so you're in client mode unless you say otherwise πŸ’…
  • -s, --server β€” act as a server. (default=off β€” so not unless you ask, bestie.)
  • --client-mechanisms β€” writes the names of supported client mechanisms to stdout, separated by a space. (default=off)
  • --server-mechanisms β€” same energy but for server mechanisms, space-separated, to stdout. (default=off)
  • -k, --mkpasswd β€” derive a password. you gotta pass --mechanism as SCRAM-SHA-1 or SCRAM-SHA-256. required inputs: the password (either through --password or read from the terminal); optional inputs: iteration count (through --iteration-count, or it defaults to 65536) and salt (through --salt, or generated randomly). the output is a string shaped exactly like this:
{mech}count,salt,stored-key,server-key[,salted-password]

where mech is the mechanism, count is the number of times the password was hashed, salt is the provided/generated base64-encoded salt, and stored-key and server-key are the two derived and base64-encoded server-side keys. When you pass --verbose, salted-password gets included too, as the hex-encoded PBKDF2-derived password. (default=off) slay.


🌈 Network options

  • --connect=HOST[:PORT] β€” connect to a TCP server and negotiate on the stream instead of stdin/stdout. PORT is either the protocol service name or an integer denoting the port, and it defaults to 143 (imap) if you don't specify. it also sets the --hostname default ✨

πŸŽ€ Generic options

  • -d, --application-data β€” after authentication, read data from stdin, run it through the mechanism's security layer, and print it base64 encoded to stdout. default behavior is to just terminate after authentication. (default=on)
  • --imap β€” use an IMAP-like logon procedure (client only). also sets the --service default to 'imap'. (default=off)
  • --smtp β€” use a SMTP-like logon procedure (client only). also sets the --service default to 'smtp'. (default=off)
  • -m, --mechanism=STRING β€” the mechanism to use.
  • --no-client-first β€” disallow the client from sending data first (client only). (default=off)

πŸ’œ SASL mechanism options (they get prompted for when required, so don't stress)

  • -n, --anonymous-token=STRING β€” token for anonymous authentication, usually a mail address (ANONYMOUS only).
  • -a, --authentication-id=STRING β€” identity of the credential owner.
  • -z, --authorization-id=STRING β€” identity to request service for.
  • -p, --password=STRING β€” password for authentication (insecure for non-testing purposes β€” like, seriously, not for prod, bestie 😭).
  • -r, --realm=STRING β€” realm. defaults to hostname.
  • --passcode=NUMBER β€” passcode for authentication (SECURID only).
  • --service=STRING β€” set the requested service name (should be a registered GSSAPI host based service name).
  • --hostname=STRING β€” set the name of the server with the requested service.
  • --service-name=STRING β€” set the generic server name in case of a replicated server (DIGEST-MD5 only).
  • --enable-cram-md5-validate β€” validate CRAM-MD5 challenge and response interactively. (default=off)
  • --disable-cleartext-validate β€” disable cleartext validate hook, forcing server to prompt for password. (default=off)
  • --quality-of-protection=TYPE β€” how the application payload will be protected. 'qop-auth' means no protection, 'qop-int' means integrity protection, and 'qop-conf' means integrity and confidentialiy protection. currently only used by DIGEST-MD5, where the default is 'qop-int'.
  • --iteration-count=NUMBER β€” indicate PBKDF2 hash iteration count (SCRAM only). (default = 65536)
  • --salt=B64DATA β€” indicate PBKDF2 salt as a base64-encoded string (SCRAM only).
  • --scram-salted-password=STRING β€” salted SCRAM password for authentication (SCRAM only; 40 hex characters for SCRAM-SHA-1 and 64 characters for SCRAM-SHA-256). count those characters, bestie πŸ”₯

🧚 STARTTLS options

  • --starttls β€” force use of STARTTLS. the default is to use STARTTLS when it's available. (default=off)
  • --no-starttls β€” unconditionally disable STARTTLS. (default=off)
  • --no-cb β€” don't use channel bindings from TLS. (default=off)
  • --x509-ca-file=FILE β€” file containing one or more X.509 Certificate Authorities certificates in PEM format, used to verify the certificate received from the server. if you don't specify it, verification uses system trust settings. and if FILE is the empty string, don't fail on X.509 server certificates verification errors πŸ™ˆ
  • --x509-cert-file=FILE β€” file containing the client X.509 certificate in PEM format. used together with --x509-key-file to specify the certificate/key pair.
  • --x509-key-file=FILE β€” private key for the client X.509 certificate in PEM format. used together with --x509-key-file to specify the certificate/key pair. (yes, the page says --x509-key-file both times β€” that's what it says, so that's what I'm telling you 🫢)
  • --priority=STRING β€” cipher priority string.

⭐ Other options

  • --verbose β€” produce verbose output. (default=off)
  • --quiet β€” don't produce any diagnostic output. (default=off)
lowkey pick one of --verbose and --quiet, they're kind of opposites, but the page doesn't police you. do with that what you will πŸ’€

🌸 AUTHOR 🌸

Written by Simon Josefsson. king behavior πŸ‘‘


πŸ¦‹ REPORTING BUGS πŸ¦‹

please actually report them instead of just suffering in silence, bestie πŸ˜­πŸ’–


Copyright Β© 2026 Simon Josefsson. License GPLv3+: GNU GPL version 3 or later https://gnu.org/licenses/gpl.html.

This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. (all caps warning, not me being dramatic ✨)


πŸ’œ SEE ALSO πŸ’œ

The full documentation for gsasl is maintained as a Texinfo manual. If the info and gsasl programs are properly installed at your site, the command

info gsasl

should give you access to the complete manual. go read it, it's giving ✨encyclopedia✨


πŸ’… and that's the whole page! this one's from GNU SASL 2.2.4, dated June 2026 β€” mwah, go authenticate something 🫢

πŸ“¦ where this page comes from
  • arch rolling: gsasl 2.2.4-1 Β· LGPL-2.1-or-later AND GPL-3.0-or-later AND GFDL-1.3-or-later
  • πŸ’– girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms