Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

GMail TLS problem

100 views
Skip to first unread message

Paul B.

unread,
May 3, 2005, 9:08:37 PM5/3/05
to
GMail doesn't seem to like Hamster Classic's implementation of
SSL, or maybe it's *my* implementation of Hamster's implementation...

Here's the command I'm sending:

HamSendMailAuth( "smtp.gmail.com", "587", "$13", "",
"<user>\@gmail\.com", "", 2, 0, "")

Here are the generic instructions from GMail:

Outgoing Mail (SMTP) Server – requires TLS: smtp.gmail.com
Use Authentication: Yes
Use STARTTLS: Yes (some clients call this SSL)
Port: 465 or 587
Account Name: your Gmail username (including '@gmail.com')
Email Address: your full Gmail email address
(user...@gmail.com)
Password: your Gmail password


The log follows. The mail is indeed sent successfully, but a
warning and an error is tripped. You'll see the error 7 lines up
from the bottom, "TSSLConnection.Read unexpected end of file".
For now I have warnings and errors turned off, but it would be
nice to get to the bottom of this. The only thing I'm not sure of
is the last parameter in my command, SSLFile. But changing that
to 0 doesn't help.

Paul


f20} {sendmail smtp.gmail.com} Start
{f20} {sendmail smtp.gmail.com}
From-Match(pbpublic\@gmail\.com,<pbpu...@gmail.com>) OK
{f20} {sendmail smtp.gmail.com} Use passwort from variable $13
{f20} Loading username/password for $13
{f20} "$13" not in TempList, trying FileList.
{f20} {sendmail smtp.gmail.com} Use username x...@gmail.com
{f20} {sendmail smtp.gmail.com} Password is not empty
{f20} {sendmail smtp.gmail.com} Connecting ...
{f20} TClientSocketSMTP.Create
{f20} TClientSocketSMTP.Connect smtp.gmail.com 587
{f20} TClientSocketSMTP.OnLookup from Hamster to
smtp.gmail.com:587 use smtp.gmail.com:587
{f20} TClientSocketSMTP.OnLookup with local socket eMachine
{f20} TClientSocketSMTP.OnConnecting from Hamster to
smtp.gmail.com:587 use smtp.gmail.com:587
{f20} TClientSocketSMTP.OnConnecting with local socket eMachine
{f20} TClientSocketSMTP.OnConnect from Hamster to
smtp.gmail.com:587 use smtp.gmail.com:587
{f20} TClientSocketSMTP.OnConnect with local socket eMachine:3300
with IP-address 192.168.1.47
{f20} TClientSocketSMTP.OnConnect with remote socket :587 with
IP-address 64.233.171.111
{f20} TClientSocketSMTP.Received: 220 mx.gmail.com ESMTP
r34sm282147rna

{f20} TClientSocketSMTP > EHLO localhost
2005/05/03 20:55:20 d {f20} TClientSocketSMTP.Received:
250-mx.gmail.com at your service
250-SIZE 20971520
250-8BITMIME
250-STARTTLS
250 ENHANCEDSTATUSCODES

2005/05/03 20:55:20 D {f20} TClientSocketSMTP < 250
ENHANCEDSTATUSCODES
250-STARTTLS
250-8BITMIME
250-SIZE 20971520
250-mx.gmail.com at your service
{f20} TClientSocketSMTP > STARTTLS
{f20} TClientSocketSMTP.Received: 220 2.0.0 Ready to start TLS

{f20} TClientSocketSMTP < 220 2.0.0 Ready to start TLS
{f20} [smtp.gmail.com] starting SSL/TLS handshake ...
{f20} TClientSocketSMTP.StartSSL
{f20} TSSLContext.Create
{f20} TSSLContext.SetOptions mode=0 options=010FFFFF
ciphers=ALL:!EXP:!aNULL:+SSLv2:+ADH:@STRENGTH verify locations=
{f20} TSSLConnection.Create
{f20} TSSLContext.Destroy
{f20} TSSLConnection.Connect
{f20} TSSLConnection.Info
{f20} Secure connection with SSLv3, cipher DES-CBC3-SHA, 168
secret bits (168 total)
{f20} TClientSocketSMTP.Login
{f20} TClientSocketSMTP > EHLO eMachine
{f20} TClientSocketSMTP.Received: 250-mx.gmail.com at your service
250-SIZE 20971520
250-8BITMIME
250-AUTH LOGIN PLAIN
250 ENHANCEDSTATUSCODES

{f20} TClientSocketSMTP < 250 ENHANCEDSTATUSCODES
250-AUTH LOGIN PLAIN
250-8BITMIME
250-SIZE 20971520
250-mx.gmail.com at your service
{f20} TClientSocketSMTP > AUTH LOGIN
{f20} TClientSocketSMTP.Received: 334 VXNlcm5hbWU6

{f20} TClientSocketSMTP < 334 VXNlcm5hbWU6
{f20} TClientSocketSMTP > [...authorization...]
{f20} TClientSocketSMTP.Received: 334 UGFzc3dvcmQ6

{f20} TClientSocketSMTP < 334 UGFzc3dvcmQ6
{f20} TClientSocketSMTP > [...authorization...]
{f20} TClientSocketSMTP.Received: 235 2.7.0 Accepted

{f20} TClientSocketSMTP < 235 2.7.0 Accepted
{sendmail smtp.gmail.com} Send mail "18973.msg"
{f20} [smtp.gmail.com, SMTP] SendMail 18973.msg
{f20} TClientSocketSMTP > MAIL FROM:<pbpu...@gmail.com>
{f20} TClientSocketSMTP.Received: 250 2.1.0 OK

{f20} TClientSocketSMTP < 250 2.1.0 OK
{f20} TClientSocketSMTP > RCPT TO:<xx...@yahoo.com>
{f20} TClientSocketSMTP.Received: 250 2.1.5 OK

{f20} TClientSocketSMTP < 250 2.1.5 OK
{f20} TClientSocketSMTP > DATA
{f20} TClientSocketSMTP.Received: 354 Go ahead

{f20} TClientSocketSMTP < 354 Go ahead
{f20} TClientSocketSMTP > .
{f20} TClientSocketSMTP.Received: 250 2.0.0 OK 1115168121

{f20} TClientSocketSMTP < 250 2.0.0 OK 1115168121
{f20} Mail 18973.msg sent.
{f20} {sendmail smtp.gmail.com} Disconnecting ...
{f20} TClientSocketSMTP.Disconnect
{f20} TClientSocketSMTP > QUIT
ERR {f20} TSSLConnection.Read unexpected end of file
WAR {f20} Receiving data from smtp.gmail.com failed
{f20} TClientSocketSMTP.OnDisconnect
{f20} TSSLConnection.Shutdown
{f20} TClientSocketSMTP.Destroy
{f20} TSSLConnection.Destroy
Sys {f20} {sendmail smtp.gmail.com} End

Martin Germann

unread,
May 4, 2005, 4:36:00 PM5/4/05
to
Paul B. wrote:

> GMail doesn't seem to like Hamster Classic's implementation of
> SSL, or maybe it's *my* implementation of Hamster's implementation...

Neither. Hamster doesn't like GMail's implementation of SMTP over TLS...

> The log follows. The mail is indeed sent successfully, but a
> warning and an error is tripped.

[...]


> {f20} TClientSocketSMTP > QUIT
> ERR {f20} TSSLConnection.Read unexpected end of file
> WAR {f20} Receiving data from smtp.gmail.com failed

The server must respond with a 221 (or 421) reply after receiving the QUIT
command, but it seems as if the connection is dropped without any reply.
That would violate RFC 2821.

Does GMail do the same in SSL without STARTTLS? Please try:

HamSendMailAuth( "smtp.gmail.com", "465", "$13", "",
"<user>\@gmail\.com", "", 1, 0, "")


Martin

Paul B.

unread,
May 4, 2005, 6:22:04 PM5/4/05
to


I tried your command (I had already tried this, before I realized
GMail preferred TLS to SSL) with no luck. I didn't use the regex
escapes in the From identifier, and Hamster still picks up the
need to send the mail. Here's the Error/debug log. The error is
near the bottom.

At least it's good to know I'm not doing anything wrong.

Thanks,
Paul

2005/05/04 18:10:34 d {ad8} {sendmail smtp.gmail.com}
From-Match(pbpu...@gmail.com,<pbpu...@gmail.com>) OK
2005/05/04 18:10:34 d {ad8} {sendmail smtp.gmail.com} Use
passwort from variable $13
2005/05/04 18:10:34 d {ad8} Loading username/password for $13
2005/05/04 18:10:34 d {ad8} "$13" not in TempList, trying FileList.
2005/05/04 18:10:34 d {ad8} {sendmail smtp.gmail.com} Use
username pbpu...@gmail.com
2005/05/04 18:10:34 d {ad8} {sendmail smtp.gmail.com} Password
is not empty
2005/05/04 18:10:34 I {ad8} {sendmail smtp.gmail.com}
Connecting ...
2005/05/04 18:10:34 d {ad8} TClientSocketSMTP.Create
2005/05/04 18:10:34 d {ad8} TClientSocketSMTP.Connect
smtp.gmail.com 465
2005/05/04 18:10:34 d {ad8} TClientSocketSMTP.OnLookup with
local socket eMachine
2005/05/04 18:10:35 d {ad8} TClientSocketSMTP.OnConnecting with
local socket eMachine
2005/05/04 18:10:35 d {ad8} TClientSocketSMTP.OnConnect with
local socket eMachine:1292 with IP-address 192.168.1.47
2005/05/04 18:10:40 d {ad8} TClientSocketSMTP.OnConnect with
remote socket :465 with IP-address 64.233.185.111
2005/05/04 18:10:40 d {ad8} TClientSocketSMTP.StartSSL
2005/05/04 18:10:40 d {ad8} TSSLContext.Create
2005/05/04 18:10:40 d {ad8} TSSLContext.SetOptions mode=0

options=010FFFFF ciphers=ALL:!EXP:!aNULL:+SSLv2:+ADH:@STRENGTH
verify locations=

2005/05/04 18:10:40 d {ad8} TSSLConnection.Create
2005/05/04 18:10:40 d {ad8} TSSLContext.Destroy
2005/05/04 18:10:40 d {ad8} TSSLConnection.Connect
2005/05/04 18:10:40 d {ad8} TSSLConnection.Info
2005/05/04 18:10:40 I {ad8} Secure connection with SSLv3,

cipher DES-CBC3-SHA, 168 secret bits (168 total)

2005/05/04 18:10:40 d {ad8} TClientSocketSMTP.Received: 220
mx.gmail.com ESMTP 26sm575430wrl

2005/05/04 18:10:40 d {ad8} TClientSocketSMTP.Login
2005/05/04 18:10:40 d {ad8} TClientSocketSMTP.Received:

250-mx.gmail.com at your service
250-SIZE 20971520
250-8BITMIME
250-AUTH LOGIN PLAIN
250 ENHANCEDSTATUSCODES

2005/05/04 18:10:40 d {ad8} TClientSocketSMTP.Received: 334
VXNlcm5hbWU6

2005/05/04 18:10:40 d {ad8} TClientSocketSMTP.Received: 334
UGFzc3dvcmQ6

2005/05/04 18:10:40 d {ad8} TClientSocketSMTP.Received: 235
2.7.0 Accepted

2005/05/04 18:10:40 I {ad8} {sendmail smtp.gmail.com} Send mail
"19014.msg"
2005/05/04 18:10:40 d {ad8} TClientSocketSMTP.Received: 250
2.1.0 OK

2005/05/04 18:10:40 d {ad8} TClientSocketSMTP.Received: 250
2.1.5 OK

2005/05/04 18:10:40 d {ad8} TClientSocketSMTP.Received: 354 Go
ahead

2005/05/04 18:10:40 d {ad8} TClientSocketSMTP.Received: 250
2.0.0 OK 1115244639

2005/05/04 18:10:40 I {ad8} Mail 19014.msg sent.
2005/05/04 18:10:40 I {ad8} {sendmail smtp.gmail.com}
Disconnecting ...
2005/05/04 18:10:40 d {ad8} TClientSocketSMTP.Disconnect
2005/05/04 18:10:41 d {ad8} TClientSocketSMTP.OnDisconnect
2005/05/04 18:10:41 d {ad8} TSSLConnection.Shutdown
2005/05/04 18:10:41 d {ad8} TClientSocketSMTP.Destroy
2005/05/04 18:10:41 d {ad8} TSSLConnection.Destroy

Paul B.

unread,
May 9, 2005, 10:58:49 AM5/9/05
to
Paul B. wrote:
> GMail doesn't seem to like Hamster Classic's implementation of SSL, or
> maybe it's *my* implementation of Hamster's implementation...
>
> Here's the command I'm sending:
>
> HamSendMailAuth( "smtp.gmail.com", "587", "$13", "",
> "<user>\@gmail\.com", "", 2, 0, "")

> {f20} {sendmail smtp.gmail.com} Disconnecting ...
> {f20} TClientSocketSMTP.Disconnect
> {f20} TClientSocketSMTP > QUIT
> ERR {f20} TSSLConnection.Read unexpected end of file
> WAR {f20} Receiving data from smtp.gmail.com failed

> Sys {f20} {sendmail smtp.gmail.com} End


Just an addendum to say that since this problem surfaced I've had
a massive problem with Hamster freezing in the middle of a
recurring script. This is not consistent behavior, but it is
inevitable behavior. H. has to be shut down and after a moment
restarted to free everything up.

Adding "HamWaitIdle" (I thought that I was perhaps jamming up the
ports with too many requests too quickly) all over the script has
done nothing. The only way to avoid the problem is to delete
pulling Gmail from the script. That leads me to suspect it's a
protocol problem behind the whole thing. In fact, probably the
HamWaitIdles are now working against me, as they make Hamster
wait until the Gmail transaction is complete, which Hamster
believes never happens.

Paul

Martin Germann

unread,
May 10, 2005, 4:36:26 PM5/10/05
to
Paul B. wrote:

> Just an addendum to say that since this problem surfaced I've had
> a massive problem with Hamster freezing in the middle of a
> recurring script. This is not consistent behavior, but it is
> inevitable behavior. H. has to be shut down and after a moment
> restarted to free everything up.

Sorry, i have no idea how this could be related to the ssl error.

[...]


> In fact, probably the HamWaitIdles are now working against me, as they
> make Hamster wait until the Gmail transaction is complete, which
> Hamster believes never happens.

As a workaround, you could use HamWaitIdle with a timeout value:
| HamWaitIdle( <timeout> )

Martin

Paul B.

unread,
May 11, 2005, 5:48:48 AM5/11/05
to
Martin Germann wrote:
> Paul B. wrote:
>
>
>>Just an addendum to say that since this problem surfaced I've had
>>a massive problem with Hamster freezing in the middle of a
>>recurring script. This is not consistent behavior, but it is
>>inevitable behavior. H. has to be shut down and after a moment
>>restarted to free everything up.
>
>
> Sorry, i have no idea how this could be related to the ssl error.


Perhaps it isn't; I'm far from sure. Taking Gmail out of the
script solved the problem except for one time, which occurred on
my non-SSL verizon account. Verizon did have network problems,
but they seem to have since been resolved. But I'm not really
clear on what's going on at this point.

>>In fact, probably the HamWaitIdles are now working against me, as they
>>make Hamster wait until the Gmail transaction is complete, which
>>Hamster believes never happens.
>
>
> As a workaround, you could use HamWaitIdle with a timeout value:
> | HamWaitIdle( <timeout> )
>
> Martin


That might be a good idea for use with the Gmail lines.

Thanks,
Paul

0 new messages