cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SMTP connection re-use possible?

From: Volker Schmid <volker.schmid_at_regify.com>
Date: Sat, 01 Dec 2012 16:47:27 +0100

Hello,

> Have you tried disabling SSL and connecting to port 25, letting libcurl
> perform an AUTH LOGIN or AUTH PLAIN to authenticate?

Yes, it is exactly the same even without SSL. First message is accepted. Second try is "502 Unimplemented":

(...)
.
CURL: 250 2.6.0 Message accepted {mp035}
CURL: Connection #0 to host mail.gmx.net left intact

CURL: Re-using existing connection! (#0) with host mail.gmx.net
CURL: Connected to mail.gmx.net (213.165.64.21) port 25 (#0)
CURL: MAIL FROM:alice.master_at_xxxxxxxxxxxxxxxxxxxxxxxx.de
CURL: 502 5.5.2 Unimplemented {mp035}
CURL: Access denied: 502
CURL: QUIT
CURL: 502 5.5.2 Unimplemented {mp035}
CURL: Closing connection #0
CURL: Login denied
CURL_SendMail: Error performing GET. Curl ec:67

> You could also try telneting onto mail.gmx.net on the same port and typing
> in the SMTP commands yourself to see if multiple mails are possible.

This is my manual telnet session. Interestingly, it works using telnet. But I can not see the difference. This is my complete telnet session (anonymized):

C:\>telnet mail.gmx.de 25
220 mail.gmx.net GMX Mailservices ESMTP {mp024}
EHLO Volker-PC
250-mail.gmx.net GMX Mailservices
250-8BITMIME
250-ENHANCEDSTATUSCODES
250-SIZE
250-AUTH=LOGIN PLAIN
250-AUTH LOGIN PLAIN
250-STARTTLS
250 STARTTLS
AUTH PLAIN xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
235 2.7.0 Go ahead {mp024}
MAIL FROM:alice.master_at_xxxxxxxxxxxxx.de
250 2.1.0 ok {mp024}
RCPT TO:<dummy_at_xxxxxxxxxx.de>
250 2.1.5 ok {mp024}
DATA
354 mail.gmx.net Go ahead {mp024}
To: dummy_at_xxxxxxxxxxxx.de
From: Alice Meister <alice.master_at_xxxxxxxxxxx.de>
Reply-To: alice.meister_at_xxxxxxxx.de
Date: Sat, 01 Dec 2012 15:16:16 +0100
Subject: Multiuse test dummy_at_xxxxxxxxxxxxxx.de
MIME-Version: 1.0
Message-Id: <rgfOUADWFCUMBZCGHMKUANBRMQVQCTXWPUGDQrgf_at_www.xxxxxxxxxx.com>
Content-Type: multipart/mixed; boundary="3f9fa49b82ea31b4c7d741a195a894c2"

--3f9fa49b82ea31b4c7d741a195a894c2
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><b>This</b> is the <h1>body</h1>...</html>
CURL: --3f9fa49b82ea31b4c7d741a195a894c2
.
250 2.6.0 Message accepted {mp024}

MAIL FROM:alice.master_at_xxxxxxxxxxxxxxx.de
250 2.1.0 ok {mp024}
RCPT TO:<dummy_at_xxxxxxxxxxxx.de>
250 2.1.5 ok {mp024}
DATA
354 mail.gmx.net Go ahead {mp024}
To: dummy_at_xxxxxxxxxxxxxx.de
From: Alice Meister <alice.master_at_xxxxxxxxxxxx.de>
Reply-To: alice.meister_at_xxxxxxxxxxxx.de
Date: Sat, 01 Dec 2012 15:16:16 +0100
Subject: Multiuse test dummy_at_xxxxxxxxxxxxxx.de
MIME-Version: 1.0
Message-Id: <rgfOUADWFCUMBZCGHMKUANBRMQVQCTXWPUGDQrgf_at_www.xxxxxxxxxxxx.com>
Content-Type: multipart/mixed; boundary="3f9fa49b82ea31b4c7d741a195a894c2"

--3f9fa49b82ea31b4c7d741a195a894c2
Content-Type: text/html; charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><b>This</b> is the <h1>body</h1>...</html>
--3f9fa49b82ea31b4c7d741a195a894c2
.
250 2.6.0 Message accepted {mp024}
QUIT
221 2.0.0 GMX Mailservices {mp024}

Verbindung zu Host verloren.

C:\>

Any idea whay this does not work for CURL?

Best,

Volker
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-12-01