Is anyone else is seeing a problem with Gmail’s IMAP service when using "openssl s_client"?

"Greg A. Woods" <[email protected]> Fri, 03 May 2019 13:03:01 -0700
Newsgroups gmane.mail.wanderlust.general.japanese
Organization Planix, Inc.
Message-ID <[email protected]>
Is anyone else is seeing a problem with Gmail’s IMAP service when using
"openssl s_client"?

My WL connection attempts to Gmail started hanging a few days ago (watch
cursor, interrupts with ^G just leave the process buffer but there's no
password prompt), and manual tests were sticking at the IMAP “* OK”
prompt.  No further response was received from gmail.

Yesterday after a few reconnects it would work.  Today it won’t work for
me from any of at least three source IP address I’ve tried, two widely
separated in North America, and another in Europe.

Here’s the manual test I was using, with the command-line copied from
what Emacs was doing (i.e. from my `tls-program' setting):

	{ echo ". capability"; echo ". logout"; } | openssl s_client -connect imap.gmail.com:993 -ign_eof

Interestingly the "imtest" program from Cyrus IMAPd still works fine,
even with a much older OpenSSL library:

	{ echo '. capability'; sleep 5; echo '. logout'; } | imtest -s imap.gmail.com

Unfortunately "imtest" doesn't have a "quiet" option to suppress all its
debug and status messages, else it might be a nearly drop-in replacement
for "openssl s_client".

However, after moaning and complaining about this I finally tried typing
a reasonable search string into google, i.e. one that mentioned "openssl
s_client", and the first hit was this SO answer:

	https://stackoverflow.com/a/14960067/816536

Adding "-crlf" to my command-line test gave instant success.

However it seems Emacs/WL/elmo is smart enough to send the CRLF
properly, and adding "-crlf" to the command-line in `tls-program' is not
needed and not wanted as it causes failures if it is there.

Unfortunately even with `elmo-imap4-debug' set the hang happens before
login and so before logging starts, and I'm not even seeing a "*IMAP4
DEBUG*" buffer being created.

So now I've got tests that work fine, but still no Gmail access from WL.

--
					Greg A. Woods <[email protected]>

+1 250 762-7675                           RoboHack <[email protected]>
Planix, Inc. <[email protected]>     Avoncote Farms <[email protected]>
signature.asc (application/pgp-signature, 195 B)
-----BEGIN PGP SIGNATURE-----

iF0EABECAB0WIQRuK6dmwVAucmRxuh9mfXG3eL/0fwUCXMyebgAKCRBmfXG3eL/0
fw3fAKD52jfoMYMkZDP/58fkZxemeQWJaQCdF/ED+QeRL7Nji5Ecx9zb01t4+dw=
=qp6y
-----END PGP SIGNATURE-----