cURL / Mailing Lists / curl-library / Single Mail

curl-library

Curl using STARTTLS even if mailserver does not support it?

From: Volker Schmid <volker.schmid_at_regify.com>
Date: Wed, 20 Feb 2013 15:26:12 +0100

Hello,

I'm using CURL to send SMTP mails.

I initiate it using curl_easy_setopt with CURLOPT_USE_SSL = CURLUSESSL_TRY. I assume that it should use STARTTLS only if the mailserver replies to support it. But this happens at some customer:

2013-02-20 14:36:13 : CURL: About to connect() to mailrelay.company.com port 25 (#0)
2013-02-20 14:36:13 : CURL: Trying xxx.xxx.72.20...
2013-02-20 14:36:13 : CURL: connected
2013-02-20 14:36:13 : CURL: Connected to mailrelay.company.com (xxx.xxx.72.20) port 25 (#0)
2013-02-20 14:36:13 : CURL: 220 USEA-NARELAY2.na.uis.company.com Microsoft ESMTP MAIL Service, Version: 7.5.7601.17514 ready t Wed, 20 Feb 2013 07:36:13 -0600
2013-02-20 14:36:13 : CURL: EHL FRPAR-PAQUETJ
2013-02-20 14:36:14 : CURL: 250-USEA-NARELAY2.na.xxxx.company.com Hello [xxx.xxx.166.52]
2013-02-20 14:36:14 : CURL: 250-AUTH NTLM LOGIN
2013-02-20 14:36:14 : CURL: 250-AUTH=LOGIN
2013-02-20 14:36:14 : CURL: 250-TURN
2013-02-20 14:36:14 : CURL: 250-SIZE 51322880
2013-02-20 14:36:14 : CURL: 250-ETRN
2013-02-20 14:36:14 : CURL: 250-PIPELINING
2013-02-20 14:36:14 : CURL: 250-DSN
2013-02-20 14:36:14 : CURL: 250-ENHANCEDSTATUSCODES
2013-02-20 14:36:14 : CURL: 250-8bitmime
2013-02-20 14:36:14 : CURL: 250-BINARYMIME
2013-02-20 14:36:14 : CURL: 250-CHUNKING
2013-02-20 14:36:14 : CURL: 250-VRFY
2013-02-20 14:36:14 : CURL: 250 OK
2013-02-20 14:36:14 : CURL: STARTTLS
2013-02-20 14:36:14 : CURL: 554 5.7.3 Unable to initialize security subsystem
2013-02-20 14:36:14 : CURL: MAIL FROM:<xxxxxxxxxxx_at_fr.company.com>
2013-02-20 14:36:14 : CURL: Recv failure: Connection was aborted
2013-02-20 14:36:14 : CURL: Send failure: Connection was aborted
2013-02-20 14:36:14 : CURL: Closing connection #0
2013-02-20 14:36:14 : CURL: Failure when receiving data from the peer
2013-02-20 14:36:14 : CURL_SendMail: Error performing GET. Curl ec:56

I can not see any reason why CURL should use STARTTLS and obviously it fails. But should CURL not use standard AUTH-LOGIN in this case?

Best,

Volker
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2013-02-20