cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: SMTP stall issue

From: Eduardo Giacoman <giacoman_at_gmail.com>
Date: Sun, 25 Sep 2011 19:40:15 -0600

I looked at the sniffer in the client side and when SMTP stalls I do not see
the ESMTP message from the mail server though its log shows it was sent. So
I guess it is not a cURL issue but a problem with VirtualBox NAT network
losing the packet, probably confusing with the windows host.

Thanks for your help!
Eduardo

Date: Sun, 25 Sep 2011 10:41:58 -0600
> From: Eduardo Giacoman <giacoman_at_gmail.com>
> To: curl-library_at_cool.haxx.se
> Subject: SMTP stall issue
> Message-ID:
> <CAGaDn=DOj04zK63JOhq9XBWPdQawwdCb7=eo4gQ-rGzyWnvDpA_at_mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> Hi all,
> I am trying to send emails via SMTP with cURL so I already tried the
> examples and they seem to work. However, in my setup it sometimes works and
> sometimes it stalls after connecting to the mail server (random issue). I
> have made a long search but haven't been able to fix it.
>
> The verbose output is the following:
>
> About to connect() to inxxxxx.com port 25 (#0)
> * Trying 200.100.248.160... * connected
> * Connected to inxxxxx.com (200.100.248.160) port 25 (#0) <---- It
> stalls
> here for 30 minutes before server timeouts
> < 421 Connection timeout.
> * Got unexpected smtp-server response: 421
> > QUIT
> <
> * response reading failed
> * Closing connection #0
> * FTP: weird server reply
>
> The mail server log only says:
> SENT: 220 inxxxxx.com ESMTP
> SENT: 421 Connection timeout <---- After 30 minutes server timeouts
>
> So based on the error number it seems cURL couldn't parse the ESMTP line
> correctly and cURL didn't even send the HELO command to the smtp server.
>
> I am running cURL from Ubuntu inside Virtualbox in a Windows host. The mail
> server is in the Windows host. I am using NAT. My C code is basically the
> simplesmtp.c example with user and password authentication via curl set
> options. Instead of reading from stdin I am using a FILE * opened at the
> beginning.
>
> I appreciate your help,
>
> Eduardo
>
>
> Date: Sun, 25 Sep 2011 20:34:49 +0300
> From: Amr Shahin <amrnablus_at_gmail.com>
> To: libcurl development <curl-library_at_cool.haxx.se>
> Subject: Re: SMTP stall issue
> Message-ID:
> <CAM14sAiNW3Vix8mZP15w7Oc4gDrV9TZHczJMZEMftw4MZMb0cw_at_mail.gmail.com
> >
> Content-Type: text/plain; charset="iso-8859-1"
>
> On Sep 25, 2011 7:57 PM, "Eduardo Giacoman" <giacoman_at_gmail.com> wrote:
> >
> > Hi all,
> > I am trying to send emails via SMTP with cURL so I already tried the
> examples and they seem to work. However, in my setup it sometimes works and
> sometimes it stalls after connecting to the mail server (random issue). I
> have made a long search but haven't been able to fix it.
> >
> > The verbose output is the following:
> >
> > About to connect() to inxxxxx.com port 25 (#0)
> > * Trying 200.100.248.160... * connected
> > * Connected to inxxxxx.com (200.100.248.160) port 25 (#0) <---- It
> stalls here for 30 minutes before server timeouts
> > < 421 Connection timeout.
> > * Got unexpected smtp-server response: 421
> > > QUIT
> > <
> > * response reading failed
> > * Closing connection #0
> > * FTP: weird server reply
> >
> > The mail server log only says:
> > SENT: 220 inxxxxx.com ESMTP
> > SENT: 421 Connection timeout <---- After 30 minutes server timeouts
> >
> > So based on the error number it seems cURL couldn't parse the ESMTP line
> correctly and cURL didn't even send the HELO command to the smtp server.
> >
> > I am running cURL from Ubuntu inside Virtualbox in a Windows host. The
> mail server is in the Windows host. I am using NAT. My C code is basically
> the simplesmtp.c example with user and password authentication via curl set
> options. Instead of reading from stdin I am using a FILE * opened at the
> beginning.
> >
> > I appreciate your help,
> >
> > Eduardo
> >
> > -------------------------------------------------------------------
> > List admin: http://cool.haxx.se/list/listinfo/curl-library
> > Etiquette: http://curl.haxx.se/mail/etiquette.html
>
> Try to sniff the port and see the data going around.
>
>
> Date: Sun, 25 Sep 2011 19:44:15 +0200 (CEST)
> From: Daniel Stenberg <daniel_at_haxx.se>
> To: libcurl development <curl-library_at_cool.haxx.se>
> Subject: Re: SMTP stall issue
> Message-ID: <alpine.DEB.2.00.1109251940180.20823_at_tvnag.unkk.fr>
> Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII
>
> On Sun, 25 Sep 2011, Eduardo Giacoman wrote:
>
> > However, in my setup it sometimes works and sometimes it stalls after
> > connecting to the mail server (random issue). I have made a long search
> but
> > haven't been able to fix it.
>
> Which libcurl version?
>
> It sounds as if the lib/pingping.c:Curl_pp_readresp() function is what
> should
> do the most things you're looking into, so that where some debugging effort
> could be spent.
>
> And of course "sniffing" the network on the client side to see what
> actually
> is received.
>
> --
>
> / daniel.haxx.se
>

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-09-26