From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/33948 Path: main.gmane.org!not-for-mail From: NAGY Andras Newsgroups: gmane.emacs.gnus.general Subject: imap: Garbage: RENEGOTIATING Date: 30 Dec 2000 17:23:30 +0100 Sender: owner-ding@hpc.uh.edu Message-ID: <87snn5ho8t.fsf@lovi.inf.elte.hu> NNTP-Posting-Host: coloc-standby.netfonds.no Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: main.gmane.org 1035169963 27817 80.91.224.250 (21 Oct 2002 03:12:43 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Mon, 21 Oct 2002 03:12:43 +0000 (UTC) Return-Path: Original-Received: from spinoza.math.uh.edu (spinoza.math.uh.edu [129.7.128.18]) by mailhost.sclp.com (Postfix) with ESMTP id 76D05D049D for ; Sat, 30 Dec 2000 11:25:48 -0500 (EST) Original-Received: from sina.hpc.uh.edu (lists@Sina.HPC.UH.EDU [129.7.3.5]) by spinoza.math.uh.edu (8.9.1/8.9.1) with ESMTP id KAB12438; Sat, 30 Dec 2000 10:25:40 -0600 (CST) Original-Received: by sina.hpc.uh.edu (TLB v0.09a (1.20 tibbs 1996/10/09 22:03:07)); Sat, 30 Dec 2000 10:23:44 -0600 (CST) Original-Received: from mailhost.sclp.com (postfix@66-209.196.61.interliant.com [209.196.61.66] (may be forged)) by sina.hpc.uh.edu (8.9.3/8.9.3) with ESMTP id KAA22400 for ; Sat, 30 Dec 2000 10:23:33 -0600 (CST) Original-Received: from mail.elte.hu (mail.elte.hu [157.181.151.13]) by mailhost.sclp.com (Postfix) with ESMTP id 706FDD049D for ; Sat, 30 Dec 2000 11:23:58 -0500 (EST) Original-Received: from lovi.inf.elte.hu (proxy.inf.elte.hu [157.181.161.14]) by mail.elte.hu (Postfix) with ESMTP id 703B96DC81 for ; Sat, 30 Dec 2000 17:23:30 +0100 (CET) Original-Received: from nagya by lovi.inf.elte.hu with local (Exim 3.12 #1 (Debian)) id 14COn4-0006Hh-00 for ; Sat, 30 Dec 2000 17:23:30 +0100 Original-To: ding@gnus.org Mail-Followup-To: ding@gnus.org Original-Lines: 65 User-Agent: Gnus/5.090001 (Oort Gnus v0.01) XEmacs/21.1 (Capitol Reef) Precedence: list X-Majordomo: 1.94.jlt7 Xref: main.gmane.org gmane.emacs.gnus.general:33948 X-Report-Spam: http://spam.gmane.org/gmane.emacs.gnus.general:33948 --=-=-= I'm using openssl to connect to my imap server, and sometimes emacs prints "Garbage: RENEGOTIATING" and the connection hangs. Figured out that actually openssl (OpenSSL 0.9.4 09 Aug 1999) prints this and confuses imap.el. The reason is that openssl interprets an R as the first character on a line as some kind of escape sequence and reacts: lovi:~% openssl s_client -ssl3 -connect pandora.inf.elte.hu:993 [...] --- * OK pandora Cyrus IMAP4 v2.0.7 server ready RABCD # I type this RENEGOTIATING depth=0 /C=HU/ST=Hungary/L=Budapest/O=ELTE/OU=Department of Computer Science/CN=mailbox.inf.elte.hu/Email=root@inf.elte.hu verify error:num=20:unable to get local issuer certificate verify return:1 depth=0 /C=HU/ST=Hungary/L=Budapest/O=ELTE/OU=Department of Computer Science/CN=mailbox.inf.elte.hu/Email=root@inf.elte.hu verify error:num=21:unable to verify the first certificate verify return:1 * BYE Error 0 read:errno=0 Using the -quiet option[1] to s_client is the solution: lovi:~% openssl s_client -quiet -ssl3 -connect pandora.inf.elte.hu:993 [...] * OK pandora Cyrus IMAP4 v2.0.7 server ready RABCD * BAD Invalid tag Therefore uploading a message matching the regexp "^R" makes the connection hang. (At least, sometimes, as most messages stored in my archive groups are followups, containing a _R_eferences header, but only a few upload results in garbage: renegotiating. Can't find the pattern.) See attached patch for fix. Not sure whether this does not break compatibility with older openssl versions, as the -quiet option might not be available there. Andras [1] -quiet inhibit printing of session and certificate information. This implicitely turns on -ign_eof as well. -ign_eof inhibit shutting down the connection when end of file is reached in the input. --=-=-= Content-Type: text/x-patch Content-Disposition: attachment; filename=imap-quiet.diff diff -u -r6.3 imap.el --- imap.el 2000/12/19 22:18:56 6.3 +++ imap.el 2000/12/30 16:06:56 @@ -188,10 +188,10 @@ :group 'imap :type '(repeat string)) -(defcustom imap-ssl-program '("openssl s_client -ssl3 -connect %s:%p" - "openssl s_client -ssl2 -connect %s:%p" - "s_client -ssl3 -connect %s:%p" - "s_client -ssl2 -connect %s:%p") +(defcustom imap-ssl-program '("openssl s_client -quiet -ssl3 -connect %s:%p" + "openssl s_client -quiet -ssl2 -connect %s:%p" + "s_client -ssl3 -quiet -connect %s:%p" + "s_client -ssl2 -quiet -connect %s:%p") "A string, or list of strings, containing commands for SSL connections. Within a string, %s is replaced with the server address and %p with port number on server. The program should accept IMAP commands on --=-=-=--