From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Lars Magne Ingebrigtsen Newsgroups: gmane.emacs.devel Subject: Re: Opportunistic STARTTLS in smtpmail.el Date: Wed, 04 May 2011 00:04:06 +0200 Organization: Programmerer Ingebrigtsen Message-ID: References: <87d3kal0za.fsf@lifelogs.com> <874o5mky4o.fsf@lifelogs.com> <8762ptue8r.fsf@lifelogs.com> <87k4e8ucw3.fsf@lifelogs.com> <87liyofwxp.fsf@lifelogs.com> <874o5cfui5.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1304460272 1012 80.91.229.12 (3 May 2011 22:04:32 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 3 May 2011 22:04:32 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Wed May 04 00:04:25 2011 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QHNhg-00073j-G3 for ged-emacs-devel@m.gmane.org; Wed, 04 May 2011 00:04:24 +0200 Original-Received: from localhost ([::1]:42379 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHNhf-0005yU-Ur for ged-emacs-devel@m.gmane.org; Tue, 03 May 2011 18:04:23 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:33640) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHNhd-0005yP-PG for emacs-devel@gnu.org; Tue, 03 May 2011 18:04:22 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QHNhc-0007Zi-Ri for emacs-devel@gnu.org; Tue, 03 May 2011 18:04:21 -0400 Original-Received: from lo.gmane.org ([80.91.229.12]:33081) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QHNhc-0007Zc-GN for emacs-devel@gnu.org; Tue, 03 May 2011 18:04:20 -0400 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1QHNha-00070F-4J for emacs-devel@gnu.org; Wed, 04 May 2011 00:04:18 +0200 Original-Received: from cm-84.215.51.58.getinternet.no ([84.215.51.58]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 May 2011 00:04:18 +0200 Original-Received: from larsi by cm-84.215.51.58.getinternet.no with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 04 May 2011 00:04:18 +0200 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: emacs-devel@gnu.org Original-Lines: 47 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: cm-84.215.51.58.getinternet.no Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEUHBQYLCAkNCQoLBwgQ DAwIBgcFAgQ8PDEaDO44AAACdklEQVQ4jW1TTW+cMBAdqTK9ZuzQnjE0PRvLP6CILlcj1smVVsS5 JtUq/P2+MUkVJR0tCztv3odtlvT4oYbBjiPZ/wDWdgC6DwD6Atg3nOmy4zNO0yCMt2LD0NkBhIPx TmyQqyOry8A7AKmaYiVIJzkta7b9NaRwE8pQAPSNk44Fw0EMNZRLO++96zsBjGXb2JdybLzR1wKY Rfd9wwI1jXfGcOsslMmxdszGyHzLvjUN97IAWvzsHXtm3VgDfczAA4BJs9ccFqG13huPXIUR0rK4 lBZfswkAWouUssCUknfla/zmDVss8gDASKGOwZkBcRAcVv0BfFpCimmx8Da+QW4te0cijz4AUy/e t8dCh+KxhBhVZG8AcPMPiCpFMFLwdVi8dA9zGQcQVfDAfCGMhzkcwFB4CME0DQ5ukLckyHQUVMoj re6ERB5tSFHxSTMAlgAj1RimiHCqUPoe2y5GVEMqEpEioSXDztkWR0MSikrJLTnvXN80jumYp/UA Uz0zFhRVDQZ+V/RSsF+SwWwC4w1BNmjGuxGrmqIq7bVAiMzMdQqpfvVQr0osp98wv6Q55FZCH4ff HQCtVb6nfB8hBwY8cL5agCpnyuu0X9GqWErLlqCVpdYf58d1VWFmI1gn49LG9fs5r6q4Yxs1VRug dT/lvD3njJ2cJTFfU4XBvJ0vA93dYAIvE7C5/k45P0Jm2nf5wyLFlJSaUxIAjK876mnabzLdXcm+ QEqAbf+53+2XvD3l/PlEMKq5ANP+dBn3vcpbzg+nTEohLoBfMLiMsIFofvhyCwpPWN/zA1qXbRIb SN2e1nXuLoT4E+Qn6e/ycHuWLH/+AmgM+ImA0vcAAAAAAElFTkSuQmCC Mail-Copies-To: never X-Now-Playing: Various's _Every Noise Has a Note_: "Magnetize - Noise to Signal" User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:ldj/QuYX27MJ3ggqSbY64AcbiOM= X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 80.91.229.12 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:139082 Archived-At: Ted Zlatanov writes: > For example: > > (setq auth-sources '((:source (:user tzz :keyfile "mykeyfile" :host "myhost" :port 587)) > "~/.authinfo.gpg")) > > I think that's cleaner since the inlined data maps nicely to the netrc format. Won't this still require opening the ~/.authinfo.gpg file, or does it stop searching after you've find the first match? Anyway, I don't really like having long, complicated user-exposed variables. Users usually mess them up. Putting stuff like this in a file seems like a nice feature. Another idea occurred to me based on the /etc/passwd + /etc/secret split, plus the password in-memory obfuscation code. :-) That is, if we allow lines like machine smtp.mail.host login foo password .secrets.gpg:smtp1 port smtp keyfile mykeyfile in ~/.authinfo and then have a ~/.secrets.gpg file with smtp1 password bar we could allow mixing the queries for open and secret credentials. Let me explain. The typical usage will be (auth-source-search :host "smtp.mail.hos" :port "smtp") which would return an auth-source object, but will not read ~/.secrets.gpg. If we look at elements like :keyfile, we'll find the :keyfile element. If, however, we try to access the :password element, auth-source.el will *then* open ~/.secrets.gpg, read it, and return the password. So we defer reading the ~/.secrets.gpg file to the very last possible moment -- which is when we know that we actually need it. -- (domestic pets only, the antidote for overdose, milk.) bloggy blog http://lars.ingebrigtsen.no/