From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Tom Roche Newsgroups: gmane.emacs.help Subject: extract smtpmail data from .authinfo (or .authinfo.gpg)? Date: Tue, 16 Aug 2011 20:56:18 -0400 Message-ID: <87liusrh3h.fsf@pobox.com> Reply-To: help-gnu-emacs@gnu.org, Tom Roche NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1313542598 28502 80.91.229.12 (17 Aug 2011 00:56:38 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 17 Aug 2011 00:56:38 +0000 (UTC) To: help-gnu-emacs@gnu.org, Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Wed Aug 17 02:56:31 2011 Return-path: Envelope-to: geh-help-gnu-emacs@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 1QtUQp-00061Q-MS for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Aug 2011 02:56:31 +0200 Original-Received: from localhost ([::1]:58827 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtUQo-0001TX-OK for geh-help-gnu-emacs@m.gmane.org; Tue, 16 Aug 2011 20:56:30 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:34695) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtUQl-0001TS-Cc for help-gnu-emacs@gnu.org; Tue, 16 Aug 2011 20:56:28 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QtUQk-0002gu-Ea for help-gnu-emacs@gnu.org; Tue, 16 Aug 2011 20:56:27 -0400 Original-Received: from b-pb-sasl-quonix.pobox.com ([208.72.237.35]:55682 helo=smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QtUQk-0002gq-Ai for help-gnu-emacs@gnu.org; Tue, 16 Aug 2011 20:56:26 -0400 Original-Received: from smtp.pobox.com (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id 6DD2B4817; Tue, 16 Aug 2011 20:56:24 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to :subject:reply-to:date:message-id:mime-version:content-type; s= sasl; bh=FEPBjpAev/w5JGxPKNenH/cOJQM=; b=YwYsUdrRJ8nGACj5FU9FuKO czYT6SUVUVlTEu77Y+weVbh7ABy6mafPDbJsL6YtvFEBXX6WzeoQp1bH5AFUxU4h 7KN+hfizK8u1iC9LX2n8YneiEPpU6xb4BdPFIFJWzzpOoEJoSUSicp3G87cpqhM0 U4Y/ysRzyWLWhr0PtGtY= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:subject :reply-to:date:message-id:mime-version:content-type; q=dns; s= sasl; b=crDkdFTjsnJXX5fy4OUCFxKZwUST+cpf/eTDg1smi5Z7kdordeY7VU4O tDnOjf5EprhJxhVJ0/p3UjD3y4qwCSjxHCXNwJ2sjY8QJSKJ/cJGFd1/pi33azhS bhD7ouj/xStRSdNty8OpmT4GaAQs63giOzcl28sNx5oGdGu1Hdg= Original-Received: from b-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by b-sasl-quonix.pobox.com (Postfix) with ESMTP id 657E74816; Tue, 16 Aug 2011 20:56:24 -0400 (EDT) Original-Received: from tlrPanP5.pobox.com (unknown [75.177.137.62]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) by b-sasl-quonix.pobox.com (Postfix) with ESMTPSA id CCB9D4815; Tue, 16 Aug 2011 20:56:23 -0400 (EDT) User-Agent: GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.4) X-Pobox-Relay-ID: BAA89A50-C86B-11E0-8B29-1DC62E706CDE-07218935!b-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 (beta) X-Received-From: 208.72.237.35 X-BeenThere: help-gnu-emacs@gnu.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@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:81964 Archived-At: summary: To send email, I currently use smtpmail and .authinfo: the latter doesn't store any passwords, but does have hostname, id, and port. The latter are duplicated in an elisp file I load from my init.el. I'd prefer to have the latter use, or read the data from, .authinfo: how to do? details: I'm using GNU Emacs 23.3.1 (x86_64-pc-linux-gnu, GTK+ Version 2.24.4) of 2011-04-10 on brahms, modified by Debian on $ lsb_release -ds Linux Mint Debian Edition $ uname -rv 2.6.39-2-amd64 #1 SMP Tue Jul 5 02:51:22 UTC 2011 I send email using plain smtpmail configured by a file name=tlrMail.el which I load from init.el. Among other things (like (require 'smtpmail) ) tlrMail loads some SMTP info, e.g., (setq foo-smtp-server-port 26) (setq foo-smtp-server-hostname "smtp.foo.com") (setq foo-user-mail-id "me") (setq foo-starttls-credentials (list (list foo-smtp-server-hostname foo-smtp-server-port 'nil 'nil))) where "foo" is like a profile name in some email clients. This works, but it duplicates data that's also in my .authinfo (e.g., machine smtp.foo.com login me port 26 ). Is there a way I can make my elisp use .authinfo directly, or scrape the relevant data from .authinfo? Or better yet, from .authinfo.gpg? (And I'd appreciate pointers to tutorials regarding use of .authinfo.gpg, and GPG with smtpmail generally.) Feel free to reply directly to me as well as the list. Your suggestions are appreciated, Tom Roche