curl-library
Re: SMTP stall issue
Date: Sun, 25 Sep 2011 20:34:49 +0300
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.
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2011-09-25