Skip to content
AdminKit

SASL authentication

What is SASL authentication?

SASL, defined in RFC 4422, is a pluggable authentication framework that protocols like SMTP, IMAP, and LDAP use instead of each defining their own login mechanism; SMTP AUTH (RFC 4954) is its mail-specific extension. AdminKit's STARTTLS checker confirms a mail server encrypts the connection SASL credentials are expected to travel over.

By AdminKit team, Netbase JSC · Updated

SASL (Simple Authentication and Security Layer), defined in RFC 4422, is a general-purpose framework that lets a protocol like SMTP, IMAP, or LDAP plug in a choice of authentication mechanisms — PLAIN, LOGIN, CRAM-MD5, OAUTHBEARER, and others, all tracked in IANA’s SASL Mechanisms registry — without the base protocol needing to define its own authentication scheme or be rewritten every time a new one is adopted. For mail, RFC 4954 adds the SMTP AUTH extension, which lets a mail client authenticate to a server using any SASL mechanism the server advertises before it’s allowed to submit messages for relay — this is what stops an SMTP server from being an open relay anyone can send mail through. Because mechanisms like PLAIN and LOGIN send credentials with only base64 encoding, not encryption, SASL authentication is expected to run inside an already-encrypted connection, typically established with STARTTLS first, rather than over a plaintext one — NIST’s digital identity guidelines require that same protection, an encrypted channel, for any authenticator exchange. The Postfix SASL Howto gives the same warning for mail servers: plaintext mechanisms such as PLAIN and LOGIN send credentials unencrypted and should be protected by a TLS-encrypted SMTP session, with Postfix handing the actual authentication to Dovecot SASL or Cyrus SASL.

AdminKit groups sASL authentication under its email authentication cluster — browse the AdminKit glossary index for other related terms.

Frequently asked questions

What problem does SASL solve for protocols like SMTP, IMAP and LDAP?

It lets each protocol plug in a choice of authentication mechanisms without needing to define its own login scheme or be rewritten every time a new one is adopted.

What is the SMTP-specific extension built on SASL?

SMTP AUTH, defined in RFC 4954, which lets a mail client authenticate to a server using any SASL mechanism the server advertises before submitting mail for relay.

Why must SASL authentication run inside an already-encrypted connection?

Mechanisms like PLAIN and LOGIN only base64-encode credentials rather than encrypt them, so SASL is expected to run after STARTTLS has established an encrypted connection.

What does SASL-based SMTP AUTH prevent?

It stops a mail server from being an open relay anyone can send mail through, since a client must authenticate before being allowed to submit messages.