From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/77925 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general,gmane.emacs.devel Subject: Re: Outgoing mail defaults Date: Thu, 17 Mar 2011 14:35:46 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87bp19v8tp.fsf@lifelogs.com> References: <87vczh4qgj.fsf@lifelogs.com> <87r5a5390x.fsf@lifelogs.com> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1300390586 14688 80.91.229.12 (17 Mar 2011 19:36:26 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 17 Mar 2011 19:36:26 +0000 (UTC) Cc: emacs-devel@gnu.org To: ding@gnus.org Original-X-From: ding-owner+M26242@lists.math.uh.edu Thu Mar 17 20:36:22 2011 Return-path: Envelope-to: ding-account@gmane.org Original-Received: from util0.math.uh.edu ([129.7.128.18]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Q0Izb-0007LM-L8 for ding-account@gmane.org; Thu, 17 Mar 2011 20:36:19 +0100 Original-Received: from localhost ([127.0.0.1] helo=lists.math.uh.edu) by util0.math.uh.edu with smtp (Exim 4.63) (envelope-from ) id 1Q0IzX-0003jR-La; Thu, 17 Mar 2011 14:36:15 -0500 Original-Received: from mx1.math.uh.edu ([129.7.128.32]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1Q0IzW-0003jC-9V for ding@lists.math.uh.edu; Thu, 17 Mar 2011 14:36:14 -0500 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx1.math.uh.edu with esmtp (Exim 4.72) (envelope-from ) id 1Q0IzS-0001rc-3W for ding@lists.math.uh.edu; Thu, 17 Mar 2011 14:36:14 -0500 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1Q0IzR-0001mx-Ao for ding@gnus.org; Thu, 17 Mar 2011 20:36:09 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1Q0IzQ-0007Hm-FE for ding@gnus.org; Thu, 17 Mar 2011 20:36:08 +0100 Original-Received: from 38.98.147.130 ([38.98.147.130]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Mar 2011 20:36:08 +0100 Original-Received: from tzz by 38.98.147.130 with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Thu, 17 Mar 2011 20:36:08 +0100 X-Injected-Via-Gmane: http://gmane.org/ Original-Lines: 72 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: 38.98.147.130 X-Face: bd.DQ~'29fIs`T_%O%C\g%6jW)yi[zuz6;d4V0`@y-~$#3P_Ng{@m+e4o<4P'#(_GJQ%TT= D}[Ep*b!\e,fBZ'j_+#"Ps?s2!4H2-Y"sx" User-Agent: Gnus/5.110014 (No Gnus v0.14) Emacs/24.0.50 (gnu/linux) Cancel-Lock: sha1:yetxmNlwutuoPq0/EV0xMJ8Cy3A= X-Spam-Score: -0.7 (/) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:77925 gmane.emacs.devel:137363 Archived-At: On Thu, 17 Mar 2011 19:33:22 +0100 Lars Magne Ingebrigtsen wrote: LMI> Ted Zlatanov writes: LMI> machine smtp.gmail.com port smtp >> >> Right, it would be the first SMTP host found or none if they don't have >> one. I think that's the right thing either way for most new cases. LMI> The complicating factor here is that auth-source writes to LMI> ~/.authinfo.gpg by default, which probably isn't appropriate if you just LMI> want to store the SMTP server name. Hm. Perhaps auth-source could LMI> write to ~/.authinfo if there's nothing secret in the credentials? LMI> But then it'd have to move stuff from ~/.authinfo to ~/.authinfo.gpg if LMI> the user later is prompted for a password from the SMTP server. Why isn't it appropriate to encrypt authentication tokens and connection parameters by default? All we need to "bootstrap" `auth-source-search' is the port in this case and we can add the server to the query if the user specifies it: (let* ((auth-source-creation-prompts '((user . "SMTP user at %h: ") (host . "SMTP host: ") (port . "SMTP port (25 or 993 or smtp typically): ") (secret . "SMTP password for %u@%h: "))) (search '(:max 1 :create t :require '(:user :host :secret :foo) :port '("smtp" "25" "993"))) (search (if smtpmail-server (append search (list :host smtpmail-server)) search)) (cred (nth 0 (apply 'auth-source-search search))) (saver (plist-get cred :save-function)) (host (plist-get cred :host)) (user (plist-get cred :user)) (secret (plist-get cred :secret)) (secret (if (functionp secret) (funcall secret) secret))) (when (debug user host secret) ; do connection here (funcall saver))) ; save result if the entry worked (does nothing if the entry is not newly created) LMI> Sounds overly complicated. :-) Compared to doing the same setup in Customize it's not much more, especially since choosing the auth-source backend is a one-time task. But you can prepend the step where we configure smtpmail-server by some external means, like a defcustom. On Thu, 17 Mar 2011 15:02:08 -0400 David Reitter wrote: DR> On Mar 17, 2011, at 1:43 PM, Lars Magne Ingebrigtsen wrote: >> And the open SMTP server could also listen on an alternative port to >> avoid firewall issues slightly more. DR> Making it listen on port 80 would be easier than installing a DR> server-side script taking a POST request on port 80. Most firewalls will do packet inspection so this is not as useful as it used to be. It sucks but it's what people consider "normal" security I guess... DR> OTOH, Ted's suggestion about the hashcash seems very attractive, DR> especially if the SMTP server would forward bug reports to other DR> packages in the process. Yay! :) Ted