From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: jglauner@sbum.org Newsgroups: gmane.emacs.devel Subject: smtpmail.el and 1msg Date: Thu, 4 Mar 2004 15:29:10 -0600 Sender: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Message-ID: <16455.40870.198614.821339@freezer.sbum.org> Reply-To: jglauner+emacsdevel@sbum.org NNTP-Posting-Host: deer.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: sea.gmane.org 1078724973 26084 80.91.224.253 (8 Mar 2004 05:49:33 GMT) X-Complaints-To: usenet@sea.gmane.org NNTP-Posting-Date: Mon, 8 Mar 2004 05:49:33 +0000 (UTC) Original-X-From: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Mon Mar 08 06:49:26 2004 Return-path: Original-Received: from quimby.gnus.org ([80.91.224.244]) by deer.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 1B0Ddm-0006KS-00 for ; Mon, 08 Mar 2004 06:49:26 +0100 Original-Received: from monty-python.gnu.org ([199.232.76.173]) by quimby.gnus.org with esmtp (Exim 3.35 #1 (Debian)) id 1B0Ddl-0004jj-00 for ; Mon, 08 Mar 2004 06:49:25 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.30) id 1B0Dbs-0003hZ-RR for emacs-devel@quimby.gnus.org; Mon, 08 Mar 2004 00:47:28 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.30) id 1Az0Pc-0004Y2-Pd for emacs-devel@gnu.org; Thu, 04 Mar 2004 16:29:48 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.30) id 1Az0P6-00041y-4c for emacs-devel@gnu.org; Thu, 04 Mar 2004 16:29:47 -0500 Original-Received: from [207.115.63.101] (helo=pimout2-ext.prodigy.net) by monty-python.gnu.org with esmtp (Exim 4.30) id 1Az0P5-00041a-Mm for emacs-devel@gnu.org; Thu, 04 Mar 2004 16:29:15 -0500 Original-Received: from freezer.sbum.org (adsl-66-142-213-44.dsl.tpkaks.swbell.net [66.142.213.44]) by pimout2-ext.prodigy.net (8.12.10 out 1msg/8.12.10) with ESMTP id i24LTA2U100124 for ; Thu, 4 Mar 2004 16:29:11 -0500 Original-To: emacs-devel@gnu.org X-Mailer: VM 7.18 under Emacs 21.2.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.2 Precedence: list List-Id: Emacs development discussions. List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+emacs-devel=quimby.gnus.org@gnu.org Xref: main.gmane.org gmane.emacs.devel:20265 X-Report-Spam: http://spam.gmane.org/gmane.emacs.devel:20265 I'd like to propose a patch (and I'm not sure I'm in the right place) for smtpmail.el. The problem I experienced was that smtpmail would spin, waiting for response from the "QUIT" command. It would appear that my ISP changed its mail software and now has configured an option called 1msg which closes the connection when the end of "DATA" has been reached. The smtpmail package was still trying to read from the process, even though the process had closed. So I created a binding for a variable called smtpmail-1msg, parsing the greeting string, looking for the 1msg token to set and later use when deciding whether or not to bother sending "QUIT". Here's my diff: diff -c /usr/share/emacs/21.2/lisp/mail/smtpmail.el /home/jglauner/emacs/smtpmail.el *** /usr/share/emacs/21.2/lisp/mail/smtpmail.el Fri Mar 22 11:02:55 2002 --- /home/jglauner/emacs/smtpmail.el Fri Feb 20 09:35:48 2004 *************** *** 349,355 **** response-code greeting process-buffer ! (supported-extensions '())) (unwind-protect (catch 'done ;; get or create the trace buffer --- 349,356 ---- response-code greeting process-buffer ! (supported-extensions '()) ! (smtpmail-1msg nil)) (unwind-protect (catch 'done ;; get or create the trace buffer *************** *** 374,386 **** (make-local-variable 'smtpmail-read-point) (setq smtpmail-read-point (point-min)) - (if (or (null (car (setq greeting (smtpmail-read-response process)))) (not (integerp (car greeting))) (>= (car greeting) 400)) (throw 'done nil) ) ;; EHLO (smtpmail-send-command process (format "EHLO %s" (smtpmail-fqdn))) --- 375,388 ---- (make-local-variable 'smtpmail-read-point) (setq smtpmail-read-point (point-min)) (if (or (null (car (setq greeting (smtpmail-read-response process)))) (not (integerp (car greeting))) (>= (car greeting) 400)) (throw 'done nil) ) + (setq smtpmail-1msg (string-match "1msg/" (cadr greeting))) + ;; EHLO (smtpmail-send-command process (format "EHLO %s" (smtpmail-fqdn))) *************** *** 521,527 **** ; (and (null (car (smtpmail-read-response process))) ; (throw 'done nil)) t )) ! (if process (save-excursion (set-buffer (process-buffer process)) (smtpmail-send-command process "QUIT") --- 523,529 ---- ; (and (null (car (smtpmail-read-response process))) ; (throw 'done nil)) t )) ! (if (and process (not smtpmail-1msg)) (save-excursion (set-buffer (process-buffer process)) (smtpmail-send-command process "QUIT") Diff finished at Fri Feb 20 09:36:00 Cheers! --Jonathan