From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: wgreenhouse-sGOZH3hwPm2sTnJN9+BGXg@public.gmane.org (W. Greenhouse) Newsgroups: gmane.emacs.help Subject: Re: improving SMTP credential caching Date: Sun, 24 Mar 2013 15:39:35 +0000 Message-ID: <87ip4gq020.fsf@riseup.net> References: <87k3ozgo7k.fsf@pobox.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1364140013 9105 80.91.229.3 (24 Mar 2013 15:46:53 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 24 Mar 2013 15:46:53 +0000 (UTC) To: help-gnu-emacs-mXXj517/zsQ@public.gmane.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Sun Mar 24 16:47:16 2013 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1UJn8d-0008LC-Tr for geh-help-gnu-emacs@m.gmane.org; Sun, 24 Mar 2013 16:47:16 +0100 Original-Received: from localhost ([::1]:49787 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJn8G-00037W-B6 for geh-help-gnu-emacs@m.gmane.org; Sun, 24 Mar 2013 11:46:52 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:35640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJn7j-0002QR-Ix for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Sun, 24 Mar 2013 11:46:21 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UJn1R-00026k-Ec for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Sun, 24 Mar 2013 11:40:27 -0400 Original-Received: from plane.gmane.org ([80.91.229.3]:44749) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UJn1R-00025I-7X for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Sun, 24 Mar 2013 11:39:49 -0400 Original-Received: from list by plane.gmane.org with local (Exim 4.69) (envelope-from ) id 1UJn1k-0002Zu-Ji for help-gnu-emacs-mXXj517/zsQ@public.gmane.org; Sun, 24 Mar 2013 16:40:08 +0100 Original-Received: from tor-exit.boingboing.net ([204.11.50.131]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 24 Mar 2013 16:40:08 +0100 Original-Received: from wgreenhouse by tor-exit.boingboing.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Sun, 24 Mar 2013 16:40:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 42 Original-X-Complaints-To: usenet-dbVV3NMTNubNLxjTenLetw@public.gmane.org X-Gmane-NNTP-Posting-Host: tor-exit.boingboing.net X-Archive: encrypt User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) Cancel-Lock: sha1:29YuABAanu5tsdLpDdBccUSow1c= X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 80.91.229.3 X-BeenThere: help-gnu-emacs-mXXj517/zsQ@public.gmane.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org-mXXj517/zsQ@public.gmane.org Xref: news.gmane.org gmane.emacs.help:89717 Archived-At: Hi Tom, Tom Roche writes: > ...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 The dependency implicated here is the Emacs auth-source library, which handles credential caching for smtpmail and many other bits of Emacs. Any of these would eliminate your problem and hopefully make using auth-source more pleasant: + Best: Run Emacs under gpg-agent and using an encrypted auth-source file (e.g. ~/.authinfo.gpg) that includes your email account passwords. Then caching is guaranteed only to happen when you entered the GPG passphrase correctly, and expiry will be controlled through the gpg-agent, by setting the --max-cache-ttl option. + Manual and irksome: Invoke M-x auth-source-forget-all-cached after you flub an SMTP password. Or, possibly, find something in smtpmail's error handling to which to hook this function. + Worst and most inconvenient: Disable password caching entirely. (setq auth-source-do-cache nil) Hope this helps, Will -- BOFH excuse #4: static from nylon underwear