all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* improving SMTP credential caching
@ 2013-03-22 20:43 Tom Roche
  2013-03-24 15:39 ` W. Greenhouse
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Tom Roche @ 2013-03-22 20:43 UTC (permalink / raw)
  To: help-gnu-emacs


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>



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

end of thread, other threads:[~2013-03-27 13:22 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-22 20:43 improving SMTP credential caching Tom Roche
2013-03-24 15:39 ` 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

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.