From: Tom Roche <Tom_Roche@pobox.com>
To: help-gnu-emacs@gnu.org,
Subject: improving SMTP credential caching
Date: Fri, 22 Mar 2013 16:43:27 -0400 [thread overview]
Message-ID: <87k3ozgo7k.fsf@pobox.com> (raw)
How to either
* cause emacs (or whatever dependency emacs is driving for SMTP mail)
to not cache failed credentials?
* force reauthentication from smtpmail, without restarting emacs or
waiting? I'd most appreciate something bindable to `C-u C-c C-c` or
similar.
Why I ask:
I send email from a debian box
$ cat /etc/debian_version
wheezy/sid
$ uname -rv
3.2.0-4-amd64 #1 SMP Debian 3.2.32-1
$ gcc --version | head -n 1
gcc (Debian 4.6.3-1) 4.6.3
using GNU Emacs 24.2.50.1 (package=emacs-snapshot), smtpmail, TLS
(package=gnutls-bin et al), and .authinfo. If I `compose-mail` and
then `C-c C-c` (message-send-and-exit), one of 3 results follows, as
determined by 5 parameters. The parameters are
P0. t_0: time at which I started emacs.
P1. t_s: time of most recent successful TLS authentication.
P2. t_f: time of most recent TLS authentication failure (typically due
to typing the wrong password at the prompt).
P3. t_c: duration of credential cache.
P4. t: time at which I attempt to send mail.
The results they determine are:
R0. If either
t_s < t_0
(t_s + t_c) < t
(t_f + t_c) < t
I get prompted for the password corresponding to the {server,
account} matched from my .authinfo, and message send succeeds or
fails on my typing.
R1. If all of
t_f < t_s
t_0 < t_s
t < (t_s + t_c)
I get no password prompt, and my message sends successfully.
R2. If all of
t_s < t_f
t_0 < t_f
t < (t_f + t_c)
I get no password prompt, but message send fails with error like
> smtpmail-send-it: Sending failed: 535 5.7.8 Error: authentication
> failed: authentication failure in response to AUTH PLAIN
My problem is R2: smtpmail, or some dependency, is caching
_failed_ credentials, which blocks sending email until either
- I restart emacs, thus making ((t_s < t_0) && (t_f < t_0))
- I wait until the failed credentials expire, thus making
(t_f + t_c) < t
both of which are suboptimal. I would prefer either
+ to make emacs (or dependency) *not* cache failed credentials
+ to force reauthentication (e.g., via `C-u C-c C-c`)
+ something else short of restarting or waiting
How to do?
TIA, Tom Roche <Tom_Roche@pobox.com>
next reply other threads:[~2013-03-22 20:43 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-22 20:43 Tom Roche [this message]
2013-03-24 15:39 ` improving SMTP credential caching W. Greenhouse
2013-03-25 18:33 ` Stefan Monnier
[not found] ` <mailman.22817.1364236429.855.help-gnu-emacs@gnu.org>
2013-03-27 13:22 ` Ted Zlatanov
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87k3ozgo7k.fsf@pobox.com \
--to=tom_roche@pobox.com \
--cc=help-gnu-emacs@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.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).