* bug#12424: 24.2; Gnus smtpmail not reprompting for failed password
@ 2012-09-12 15:32 Stephen Leake
2012-12-24 11:27 ` Lars Magne Ingebrigtsen
2012-12-24 12:14 ` Lars Magne Ingebrigtsen
0 siblings, 2 replies; 4+ messages in thread
From: Stephen Leake @ 2012-09-12 15:32 UTC (permalink / raw)
To: 12424
I have Gnus set up to get mail from an MS exchange server, using tls for
authentication.
Relevant settings:
(setq starttls-use-gnutls nil)
(setq starttls-extra-arguments nil)
(setq smtpmail-smtp-server "smtp02.ndc.nasa.gov")
(setq smtpmail-smtp-service 587)
(setq password-cache-expiry (* 24 3600)); only matters for tls
(setq smtpmail-starttls-credentials
'(
("smtp02.ndc.nasa.gov" 587 nil nil)
))
(setq smtpmail-auth-credentials
'(
;; The number of backslashes here seems to change from time to
;; time; experiment if it fails.
("smtp02.ndc.nasa.gov" 587 "ndc\\sleake" nil)
))
When first connecting, it prompts for my password. If I enter it
incorrectly, it never reprompts; I have to quit Emacs to get it to
reprompt.
I was unable to find the actual source of the problem; the smtp
authentication backends are a complicated system.
smtpmail-try-auth-methods does notice the failed login, and tries again
with ask-for-password t, but the backend does not respect that; it just
returns the bad cached password. I did not have the time to find out
which backend function is doing that.
One work-around is to set auth-source-do-cache nil, but then it prompts
all the time; the cache is nice to have.
Another work-around is to set password-cache nil; that forces a reprompt.
In GNU Emacs 24.2.1 (i686-pc-cygwin, GTK+ Version 2.24.11)
of 2012-08-27 on fiona
Windowing system distributor `The Cygwin/X Project', version 11.0.11204000
Configured using:
`configure
'--srcdir=/home/kbrown/src/cygemacs/emacs-24.2-1/src/emacs-24.2'
'--prefix=/usr' '--exec-prefix=/usr' '--bindir=/usr/bin'
'--sbindir=/usr/sbin' '--libexecdir=/usr/lib' '--datadir=/usr/share'
'--localstatedir=/var' '--sysconfdir=/etc' '--datarootdir=/usr/share'
'--docdir=/usr/share/doc/emacs' '-C' '--without-gsettings'
'--without-gconf' 'CC=gcc' 'CFLAGS=-ggdb -O2 -pipe
-fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-24.2-1/build=/usr/src/debug/emacs-24.2-1
-fdebug-prefix-map=/home/kbrown/src/cygemacs/emacs-24.2-1/src/emacs-24.2=/usr/src/debug/emacs-24.2-1'
'LDFLAGS=-L/usr/lib/ncursesw' 'LIBS='
'CPPFLAGS=-I/usr/include/ncursesw''
Important settings:
value of $LC_ALL: nil
value of $LC_COLLATE: nil
value of $LC_CTYPE: nil
value of $LC_MESSAGES: nil
value of $LC_MONETARY: nil
value of $LC_NUMERIC: nil
value of $LC_TIME: nil
value of $LANG: C
value of $XMODIFIERS: nil
locale-coding-system: utf-8-unix
default enable-multibyte-characters: t
Major mode: Message
Minor modes in effect:
shell-dirtrack-mode: t
gnus-message-citation-mode: t
mml-mode: t
display-time-mode: t
delete-selection-mode: t
tooltip-mode: t
mouse-wheel-mode: t
menu-bar-mode: t
file-name-shadow-mode: t
global-font-lock-mode: t
font-lock-mode: t
auto-composition-mode: t
auto-encryption-mode: t
auto-compression-mode: t
line-number-mode: t
transient-mark-mode: t
abbrev-mode: t
Recent input:
<return> M-x g <backspace> b u g <tab> <tab> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> <backspace> <backspace>
<backspace> <backspace> <backspace> r e p o <tab> r
<tab> <return>
Recent messages:
Sending via mail...
open-network-stream
Continue...
530 5.7.1 Client was not authenticated
334 VXNlcm5hbWU6
334 UGFzc3dvcmQ6
535 5.7.3 Authentication unsuccessful
221 2.0.0 Service closing transmission channel
smtpmail-send-it: Sending failed: 535 5.7.3 Authentication unsuccessful in response to OTZTYWxrYXRlLTY3
Making completion list... [2 times]
Load-path shadows:
/Projects/emacs_stephe.main/emacs_stephe_site_lisp/vc-git hides /usr/share/emacs/24.2/lisp/vc/vc-git
/Projects/emacs_stephe.main/emacs_stephe_site_lisp/ada-xref hides /usr/share/emacs/24.2/lisp/progmodes/ada-xref
/Projects/emacs_stephe.main/emacs_stephe_site_lisp/ada-stmt hides /usr/share/emacs/24.2/lisp/progmodes/ada-stmt
/Projects/emacs_stephe.main/emacs_stephe_site_lisp/ada-prj hides /usr/share/emacs/24.2/lisp/progmodes/ada-prj
/Projects/emacs_stephe.main/emacs_stephe_site_lisp/ada-mode hides /usr/share/emacs/24.2/lisp/progmodes/ada-mode
/Projects/emacs_stephe.main/emacs_stephe_site_lisp/nnnil hides /usr/share/emacs/24.2/lisp/gnus/nnnil
Features:
(shadow emacsbug debug copyright shell pcomplete cl-specs edebug
jka-compr find-func help-mode view misearch multi-isearch gnutls
network-stream starttls tls mailalias newcomment bbdb-gui smiley
gnus-cite qp mule-util parse-time sort gnus-async gnus-bcklg gnus-ml
disp-table utf-7 utf7 html2text bbdb-gnus bbdb-snarf mail-extr bbdb-com
bbdb-autoloads bbdb timezone imap nndraft nnmh nnml nnfolder nnnil
gnus-agent gnus-srvr gnus-score score-mode nnvirtual gnus-msg gnus-art
mm-uu mml2015 epg-config mm-view mml-smime smime dig mailcap nntp
gnus-cache gnus-sum nnoo gnus-group gnus-undo nnmail mail-source
gnus-start gnus-spec gnus-int gnus-range gnus-win gnus gnus-ems smtpmail
auth-source eieio byte-opt bytecomp byte-compile cconv macroexp assoc
password-cache sendmail nnheader gnus-util message format-spec rfc822
mml mml-sec mm-decode mm-bodies mm-encode mail-parse rfc2231 rfc2047
rfc2045 ietf-drums mm-util mail-prsvr mailabbrev mail-utils gmm-utils
mailheader uniquify advice help-fns advice-preload time delsel cus-start
cus-load ls-lisp color-theme edmacro kmacro wid-edit iswitchb whitespace
dired-x easymenu dired-aux dired compile comint regexp-opt ansi-color
ring cl time-date tooltip ediff-hook vc-hooks lisp-float-type mwheel
x-win x-dnd tool-bar dnd fontset image fringe lisp-mode register page
menu-bar rfn-eshadow timer select scroll-bar mouse jit-lock font-lock
syntax facemenu font-core frame cham georgian utf-8-lang misc-lang
vietnamese tibetan thai tai-viet lao korean japanese hebrew greek
romanian slovak czech european ethiopic indian cyrillic chinese
case-table epa-hook jka-cmpr-hook help simple abbrev minibuffer loaddefs
button faces cus-face files text-properties overlay sha1 md5 base64
format env code-pages mule custom widget hashtable-print-readable
backquote make-network-process dbusbind dynamic-setting
font-render-setting move-toolbar gtk x-toolkit x multi-tty emacs)
--
-- Stephe
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#12424: 24.2; Gnus smtpmail not reprompting for failed password
2012-09-12 15:32 bug#12424: 24.2; Gnus smtpmail not reprompting for failed password Stephen Leake
@ 2012-12-24 11:27 ` Lars Magne Ingebrigtsen
2012-12-24 11:40 ` Lars Ingebrigtsen
2012-12-24 12:14 ` Lars Magne Ingebrigtsen
1 sibling, 1 reply; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-12-24 11:27 UTC (permalink / raw)
To: Stephen Leake; +Cc: 12424
Stephen Leake <stephen.a.leake@nasa.gov> writes:
> I have Gnus set up to get mail from an MS exchange server, using tls for
> authentication.
>
> Relevant settings:
>
> (setq starttls-use-gnutls nil)
> (setq starttls-extra-arguments nil)
If you have an Emacs 24 with built-in gnutls support, then these
variables aren't used.
> (setq smtpmail-starttls-credentials
> '(
> ("smtp02.ndc.nasa.gov" 587 nil nil)
> ))
> (setq smtpmail-auth-credentials
> '(
> ;; The number of backslashes here seems to change from time to
> ;; time; experiment if it fails.
> ("smtp02.ndc.nasa.gov" 587 "ndc\\sleake" nil)
> ))
These variables no longer exist in Emacs 24.
> When first connecting, it prompts for my password. If I enter it
> incorrectly, it never reprompts; I have to quit Emacs to get it to
> reprompt.
Looking at the code in smtpmail.el, it looks like it should only save
the password if the login was successful. However, I don't have access
to any SMTP servers that require login, so I can't reproduce this.
I think.
--
(domestic pets only, the antidote for overdose, milk.)
http://lars.ingebrigtsen.no * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#12424: 24.2; Gnus smtpmail not reprompting for failed password
2012-12-24 11:27 ` Lars Magne Ingebrigtsen
@ 2012-12-24 11:40 ` Lars Ingebrigtsen
0 siblings, 0 replies; 4+ messages in thread
From: Lars Ingebrigtsen @ 2012-12-24 11:40 UTC (permalink / raw)
To: Stephen Leake; +Cc: 12424
Lars Magne Ingebrigtsen <lmi@gnus.org> writes:
> Looking at the code in smtpmail.el, it looks like it should only save
> the password if the login was successful. However, I don't have access
> to any SMTP servers that require login, so I can't reproduce this.
Yes, I do.
The problem is this call that's done the second time with
`ask-for-password' set to t. Then it will return the previous (wrong)
password for some reason or other...
(auth-source-search
:host "smtp.gmail.com"
:port "587"
:user nil
:max 1
:require (and ask-for-password
'(:user :secret))
:create ask-for-password)
--
(domestic pets only, the antidote for overdose, milk.)
http://lars.ingebrigtsen.no * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 4+ messages in thread
* bug#12424: 24.2; Gnus smtpmail not reprompting for failed password
2012-09-12 15:32 bug#12424: 24.2; Gnus smtpmail not reprompting for failed password Stephen Leake
2012-12-24 11:27 ` Lars Magne Ingebrigtsen
@ 2012-12-24 12:14 ` Lars Magne Ingebrigtsen
1 sibling, 0 replies; 4+ messages in thread
From: Lars Magne Ingebrigtsen @ 2012-12-24 12:14 UTC (permalink / raw)
To: Stephen Leake; +Cc: 12424
I've now fixed this bug on the Emacs trunk.
--
(domestic pets only, the antidote for overdose, milk.)
http://lars.ingebrigtsen.no * Lars Magne Ingebrigtsen
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2012-12-24 12:14 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-12 15:32 bug#12424: 24.2; Gnus smtpmail not reprompting for failed password Stephen Leake
2012-12-24 11:27 ` Lars Magne Ingebrigtsen
2012-12-24 11:40 ` Lars Ingebrigtsen
2012-12-24 12:14 ` Lars Magne 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.