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
Organization Planix, Inc.
Message-ID <m1hMeOb-0036tPC__28968.8212609448$1556913896$gmane$org@more.local>
--pgp-sign-Multipart_Fri_May__3_13:02:50_2019-1
Content-Type: text/plain; charset=ISO-2022-JP

Is anyone else is seeing a problem with Gmail$B!G(Bs 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 $B!H(B* OK$B!I(B
prompt.  No further response was received from gmail.

Yesterday after a few reconnects it would work.  Today it won$B!G(Bt work for
me from any of at least three source IP address I$B!G(Bve tried, two widely
separated in North America, and another in Europe.

Here$B!G(Bs 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]>

--pgp-sign-Multipart_Fri_May__3_13:02:50_2019-1
Content-Type: application/pgp-signature
Content-Transfer-Encoding: 7bit
Content-Description: OpenPGP Digital Signature

-----BEGIN PGP SIGNATURE-----

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

--pgp-sign-Multipart_Fri_May__3_13:02:50_2019-1--