CURLOPT_SASL_IR(3)
okay so literally welcome to the libcurl Library Functions Manual, bestie β todayβs main character is CURLOPT_SASL_IR(3), and itβs giving βsend initial response in first packetβ energy. π
β¨
π NAME π
CURLOPT_SASL_IR β send initial response in first packet
π¦ SYNOPSIS π¦
#include <curl/curl.h>
CURLcode curl_easy_setopt(CURL *handle, CURLOPT_SASL_IR, long enable);
π DESCRIPTION π
You pass a long. If the value is 1, curl sends the initial response to the server in the first authentication packet in order to reduce the number of ping pong requests. No cap, itβs just trying to make auth less back-and-forth. πβ¨
Only applicable to the following supporting SASL authentication mechanisms:
LoginPlainGSSAPINTLMOAuth 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. So likeβ¦ it already knows, bestie. π«Ά
πΈ DEFAULT πΈ
0
π PROTOCOLS π
This functionality affects imap and smtp.
β¨ EXAMPLE β¨
Hereβs the lil code moment, bestie β copy it exactly, no cap:
int main(void)
{
CURL *curl = curl_easy_init();
if(curl) {
CURLcode result;
curl_easy_setopt(curl, CURLOPT_URL, "smtp://example.com/");
curl_easy_setopt(curl, CURLOPT_SASL_IR, 1L);
result = curl_easy_perform(curl);
curl_easy_cleanup(curl);
}
}
π§ AVAILABILITY π§
Added in curl 7.31.0.
π RETURN VALUE π
curl_easy_setopt(3) returns a CURLcode indicating success or error.
CURLE_OK (0) means everything was OK, non-zero means an error occurred, see libcurl-errors(3).
π SEE ALSO π
mwah π β this page came from libcurl, dated 2026-10-12, and the footer vibes are literally CURLOPT_SASL_IR(3). Bye bestie, go slay your SASL auth! π«Άπ
π¦ where this page comes from
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- fedora 44: libcurl-devel 8.18.0-14.fc44 Β· curl
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms