all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#26359: 25.2; smtpmail.el tries useless unauthenticated connection
@ 2017-04-04 10:21 Ulrich Mueller
  2019-07-26 10:17 ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Ulrich Mueller @ 2017-04-04 10:21 UTC (permalink / raw)
  To: 26359

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





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#26359: 25.2; smtpmail.el tries useless unauthenticated connection
  2017-04-04 10:21 bug#26359: 25.2; smtpmail.el tries useless unauthenticated connection Ulrich Mueller
@ 2019-07-26 10:17 ` Lars Ingebrigtsen
  2019-07-26 12:12   ` Eli Zaretskii
  0 siblings, 1 reply; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-26 10:17 UTC (permalink / raw)
  To: Ulrich Mueller; +Cc: 26359

Ulrich Mueller <ulm@gentoo.org> writes:

> 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.

Makes sense.  I've now added smtpmail-servers-requiring-authorization to
the trunk.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#26359: 25.2; smtpmail.el tries useless unauthenticated connection
  2019-07-26 10:17 ` Lars Ingebrigtsen
@ 2019-07-26 12:12   ` Eli Zaretskii
  2019-07-26 12:17     ` Lars Ingebrigtsen
  0 siblings, 1 reply; 4+ messages in thread
From: Eli Zaretskii @ 2019-07-26 12:12 UTC (permalink / raw)
  To: Lars Ingebrigtsen; +Cc: ulm, 26359

> From: Lars Ingebrigtsen <larsi@gnus.org>
> Date: Fri, 26 Jul 2019 12:17:25 +0200
> Cc: 26359@debbugs.gnu.org
> 
> I've now added smtpmail-servers-requiring-authorization to the
> trunk.

Please add a :version tag to it.

Thanks.





^ permalink raw reply	[flat|nested] 4+ messages in thread

* bug#26359: 25.2; smtpmail.el tries useless unauthenticated connection
  2019-07-26 12:12   ` Eli Zaretskii
@ 2019-07-26 12:17     ` Lars Ingebrigtsen
  0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2019-07-26 12:17 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: ulm, 26359

Eli Zaretskii <eliz@gnu.org> writes:

>> I've now added smtpmail-servers-requiring-authorization to the
>> trunk.
>
> Please add a :version tag to it.

Sorry; I keep forgetting to do that...  Fixed now.

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2019-07-26 12:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-04-04 10:21 bug#26359: 25.2; smtpmail.el tries useless unauthenticated connection Ulrich Mueller
2019-07-26 10:17 ` Lars Ingebrigtsen
2019-07-26 12:12   ` Eli Zaretskii
2019-07-26 12:17     ` Lars Ingebrigtsen

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.