From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Ulrich Mueller Newsgroups: gmane.emacs.bugs Subject: bug#26359: 25.2; smtpmail.el tries useless unauthenticated connection Date: Tue, 4 Apr 2017 12:21:22 +0200 Message-ID: <22755.29602.119054.445527@a1i15.kph.uni-mainz.de> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: blaine.gmane.org 1491301337 4276 195.159.176.226 (4 Apr 2017 10:22:17 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Tue, 4 Apr 2017 10:22:17 +0000 (UTC) To: 26359@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue Apr 04 12:22:14 2017 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvLbG-0000Is-9j for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Apr 2017 12:22:10 +0200 Original-Received: from localhost ([::1]:34804 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvLbK-0001rc-Kt for geb-bug-gnu-emacs@m.gmane.org; Tue, 04 Apr 2017 06:22:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53610) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvLbD-0001rI-7m for bug-gnu-emacs@gnu.org; Tue, 04 Apr 2017 06:22:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cvLb8-0001U5-6z for bug-gnu-emacs@gnu.org; Tue, 04 Apr 2017 06:22:07 -0400 Original-Received: from debbugs.gnu.org ([208.118.235.43]:33372) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cvLb8-0001Tz-33 for bug-gnu-emacs@gnu.org; Tue, 04 Apr 2017 06:22:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1cvLb7-0006Fd-RG for bug-gnu-emacs@gnu.org; Tue, 04 Apr 2017 06:22:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ulrich Mueller Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 04 Apr 2017 10:22:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 26359 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.149130130424001 (code B ref -1); Tue, 04 Apr 2017 10:22:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 4 Apr 2017 10:21:44 +0000 Original-Received: from localhost ([127.0.0.1]:59804 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvLap-0006F3-SX for submit@debbugs.gnu.org; Tue, 04 Apr 2017 06:21:44 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:34291) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1cvLao-0006Er-5T for submit@debbugs.gnu.org; Tue, 04 Apr 2017 06:21:43 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cvLai-0001I4-2a for submit@debbugs.gnu.org; Tue, 04 Apr 2017 06:21:37 -0400 Original-Received: from lists.gnu.org ([2001:4830:134:3::11]:55881) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1cvLah-0001Ho-Vp for submit@debbugs.gnu.org; Tue, 04 Apr 2017 06:21:36 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:53486) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cvLag-0001nE-OJ for bug-gnu-emacs@gnu.org; Tue, 04 Apr 2017 06:21:35 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cvLab-0001Ca-LM for bug-gnu-emacs@gnu.org; Tue, 04 Apr 2017 06:21:34 -0400 Original-Received: from mail.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4]:38069 helo=smtp.gentoo.org) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cvLab-0001Ap-FV for bug-gnu-emacs@gnu.org; Tue, 04 Apr 2017 06:21:29 -0400 Original-Received: from a1i15.kph.uni-mainz.de (host2092.kph.uni-mainz.de [134.93.134.92]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: ulm) by smtp.gentoo.org (Postfix) with ESMTPSA id B45FE3413B7; Tue, 4 Apr 2017 10:21:25 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6.x X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 208.118.235.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.org gmane.emacs.bugs:131269 Archived-At: Some mail servers implement a policy that limits the number of concurrent or quasi-concurrent connections per host. The method how smtpmail.el connects to a server doesn't help to avoid such limits. In detail: smtpmail.el will always try an unauthenticated connection first by calling smtpmail-via-smtp without the ask-for-password argument. If the mail server allows only authenticated connections, it will reject the connection either with status 530 "auth required" or with status 554 "relaying denied". smtpmail-via-smtp catches these errors and subsequently calls itself, but now with ask-for-password set to t. However, if the server has implemented a policy as mentioned above, that retry may be enough to trip the limit and the second connection will be refused by the server. So could this be made configurable please, such that smtpmail will immediately try with an authenticated connection? AFAICS, this should be easily possible in either smtpmail-via-smtp or in its callers, by conditionally setting ask-for-password depending on some configuration variable. Currently I am working around the problem with an advice: (defadvice smtpmail-via-smtp (around always-ask-for-password (recipient smtpmail-text-buffer &optional ask-for-password) activate) (let ((ask-for-password t)) ad-do-it)) In GNU Emacs 25.2.1 (x86_64-pc-linux-gnu, X toolkit) of 2017-03-28 built on juno Windowing system distributor 'The X.Org Foundation', version 11.0.11903000 System Description: Gentoo Base System release 2.3 Configured using: 'configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --disable-dependency-tracking --disable-silent-rules --docdir=/usr/share/doc/emacs-25.2_rc2 --htmldir=/usr/share/doc/emacs-25.2_rc2/html --libdir=/usr/lib64 --program-suffix=-emacs-25 --infodir=/usr/share/info/emacs-25 --localstatedir=/var --enable-locallisppath=/etc/emacs:/usr/share/emacs/site-lisp --with-gameuser=:gamestat --without-compress-install --with-file-notification=inotify --enable-acl --with-dbus --without-modules --with-gpm --without-hesiod --without-kerberos --without-kerberos5 --with-xml2 --without-selinux --with-gnutls --without-wide-int --with-zlib --with-sound=alsa --with-x --without-ns --without-gconf --with-gsettings --without-toolkit-scroll-bars --with-gif --with-jpeg --with-png --with-rsvg --with-tiff --with-xpm --with-imagemagick --with-xft --without-cairo --with-libotf --with-m17n-flt --with-x-toolkit=lucid --with-xaw3d GENTOO_PACKAGE=app-editors/emacs-25.2_rc2 'CFLAGS=-march=core2 -ggdb -O2 -pipe' CPPFLAGS= 'LDFLAGS=-Wl,-O1 -Wl,--as-needed'' Configured features: XAW3D XPM JPEG TIFF GIF PNG RSVG IMAGEMAGICK SOUND GPM DBUS GSETTINGS NOTIFY ACL GNUTLS LIBXML2 FREETYPE M17N_FLT LIBOTF XFT ZLIB LUCID X11 Important settings: value of $LC_CTYPE: en_GB.UTF-8 value of $LANG: POSIX locale-coding-system: utf-8-unix