cURL / Mailing Lists / curl-users / Single Mail

curl-users

CURL SMTP - Bypass Authentication

From: Tom Sparrow <tom.sparrow25_at_gmail.com>
Date: Mon, 24 Mar 2014 22:19:31 +0900

Dear Members,

In case of relay server without authentication . I am getting error at
following location.

     lib/smtp.c - function smtp_perform_authentication()
     infof(conn->data, "No known authentication mechanisms supported!\n");
     result = CURLE_LOGIN_DENIED;

This occured when I have supplied dummy username and password with
curl_easy_setopt(curl, CURLOPT_USERPWD, userpasswordstring). (code works
fine without setting this, but I require this dummy user/password )

SMTP Server properties

- No Authentication
- NO TLS/SSL

So to bypass authentication I have modified - >lib/smtp.c - function
smtp_perform_authentication()

=============================================
Old Code
     infof(conn->data, "No known authentication mechanisms supported!\n");
      result = CURLE_LOGIN_DENIED;
==============================================
Modified Code
   infof(conn->data, "Bypass Authentication. Try Anyway\n");
   state(conn, SMTP_STOP);
   result = CURLE_OK;
===============================================

Now it works fine. I have doubt regarding side effect of this change.

Please give your inputs.

Thanks and Regards
Tom

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2014-03-24