GNURLOPT_SASL_IR(3)

πŸ“¦ version 7.72.0, in nixos 26.05, nixpkgs unstable

πŸ’– GNURLOPT_SASL_IR(3) πŸ’–

okay bestie, welcome to the curl_easy_setopt options manual β€” today we’re hyperfixating on GNURLOPT_SASL_IR(3), and it’s giving tiny option, very specific job. ✨


🌸 NAME 🌸

CURLOPT_SASL_IR β€” enable sending initial response in first packet


✨ SYNOPSIS ✨

#include <gnurl/curl.h>

CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SASL_IR, long enable);

πŸ¦‹ DESCRIPTION πŸ¦‹

You pass a long here β€” that’s the whole vibe. If the value is 1, curl will send the initial response to the server in the first authentication packet in order to reduce the number of ping pong requests. πŸ“

Only applicable to the following supporting SASL authentication mechanisms:

  • Login
  • Plain
  • GSSAPI
  • NTLM
  • OAuth 2.0
Note: Whilst IMAP supports this option there is no need to explicitly set it, as libcurl can determine the feature itself when the server supports the SASL-IR CAPABILITY. πŸ’…

πŸŽ€ DEFAULT πŸŽ€

0 β€” that’s the default, no cap.


🌈 PROTOCOLS 🌈

IMAP, POP3 and SMTP β€” that’s the squad for this one.


πŸ’… EXAMPLE πŸ’…

Here’s the example, verbatim, so you can copy the vibe exactly:

CURL *curl = curl_easy_init();
if(curl) {
  curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
  curl_easy_setopt(curl, CURLOPT_SASL_IR, 1L);
  ret = curl_easy_perform(curl);
  curl_easy_cleanup(curl);
}

⭐ AVAILABILITY ⭐

Added in 7.31.0 β€” vintage but iconic.


πŸ”₯ RETURN VALUE πŸ”₯

Returns CURLE_OK if the option is supported, and CURLE_UNKNOWN_OPTION if not. Periodt.


🫢 SEE ALSO 🫢

Go check out these besties:


πŸ’– cute sign-off: libcurl 7.37.0, dated 19 Jun 2014, page tag GNURLOPT_SASL_IR(3) β€” bye bestie, go slay your SASL setup πŸ’…βœ¨

πŸ“¦ where this page comes from