all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ulrich Mueller <ulm@gentoo.org>
To: 26359@debbugs.gnu.org
Subject: bug#26359: 25.2; smtpmail.el tries useless unauthenticated connection
Date: Tue, 4 Apr 2017 12:21:22 +0200	[thread overview]
Message-ID: <22755.29602.119054.445527@a1i15.kph.uni-mainz.de> (raw)

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





             reply	other threads:[~2017-04-04 10:21 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-04 10:21 Ulrich Mueller [this message]
2019-07-26 10:17 ` bug#26359: 25.2; smtpmail.el tries useless unauthenticated connection Lars Ingebrigtsen
2019-07-26 12:12   ` Eli Zaretskii
2019-07-26 12:17     ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=22755.29602.119054.445527@a1i15.kph.uni-mainz.de \
    --to=ulm@gentoo.org \
    --cc=26359@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.