From mboxrd@z Thu Jan 1 00:00:00 1970 X-Msuck: nntp://news.gmane.io/gmane.emacs.gnus.general/80880 Path: news.gmane.org!not-for-mail From: Ted Zlatanov Newsgroups: gmane.emacs.gnus.general Subject: Re: smtpmail authentication again Date: Wed, 11 Jan 2012 08:39:13 -0500 Organization: =?utf-8?B?0KLQtdC+0LTQvtGAINCX0LvQsNGC0LDQvdC+0LI=?= @ Cienfuegos Message-ID: <87ty429x4u.fsf@lifelogs.com> References: <87d3awtgda.fsf@lifelogs.com> <878vlktfy6.fsf@lifelogs.com> <874nw7slnv.fsf@lifelogs.com> <87fwfqouk3.fsf@lifelogs.com> <87wr8zei8c.fsf@lifelogs.com> <87k44zehr5.fsf@lifelogs.com> Reply-To: ding@gnus.org NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: dough.gmane.org 1326289197 21811 80.91.229.12 (11 Jan 2012 13:39:57 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 11 Jan 2012 13:39:57 +0000 (UTC) To: ding@gnus.org Original-X-From: ding-owner+M29162@lists.math.uh.edu Wed Jan 11 14:39:54 2012 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 1RkyP9-0002fa-R6 for ding-account@gmane.org; Wed, 11 Jan 2012 14:39:52 +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 1RkyP0-0005Um-Na; Wed, 11 Jan 2012 07:39:42 -0600 Original-Received: from mx2.math.uh.edu ([129.7.128.33]) by util0.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.63) (envelope-from ) id 1RkyOz-0005Ua-2J for ding@lists.math.uh.edu; Wed, 11 Jan 2012 07:39:41 -0600 Original-Received: from quimby.gnus.org ([80.91.231.51]) by mx2.math.uh.edu with esmtps (TLSv1:AES256-SHA:256) (Exim 4.76) (envelope-from ) id 1RkyOx-0002aH-MG for ding@lists.math.uh.edu; Wed, 11 Jan 2012 07:39:40 -0600 Original-Received: from lo.gmane.org ([80.91.229.12]) by quimby.gnus.org with esmtp (Exim 4.72) (envelope-from ) id 1RkyOu-0007eH-Fe for ding@gnus.org; Wed, 11 Jan 2012 14:39:36 +0100 Original-Received: from list by lo.gmane.org with local (Exim 4.69) (envelope-from ) id 1RkyOo-0002T4-Il for ding@gnus.org; Wed, 11 Jan 2012 14:39:30 +0100 Original-Received: from c-76-28-40-19.hsd1.vt.comcast.net ([76.28.40.19]) by main.gmane.org with esmtp (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 Jan 2012 14:39:30 +0100 Original-Received: from tzz by c-76-28-40-19.hsd1.vt.comcast.net with local (Gmexim 0.1 (Debian)) id 1AlnuQ-0007hv-00 for ; Wed, 11 Jan 2012 14:39:30 +0100 X-Injected-Via-Gmane: http://gmane.org/ Mail-Followup-To: ding@gnus.org Original-Lines: 42 Original-X-Complaints-To: usenet@dough.gmane.org X-Gmane-NNTP-Posting-Host: c-76-28-40-19.hsd1.vt.comcast.net 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" Mail-Copies-To: never User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.90 (gnu/linux) Cancel-Lock: sha1:LdTTHUmu0lGIi0dqed6XJqDXt1g= X-Spam-Score: -4.9 (----) List-ID: Precedence: bulk Xref: news.gmane.org gmane.emacs.gnus.general:80880 Archived-At: On Wed, 11 Jan 2012 06:45:23 +0100 Richard Riley wrote: RR> I pulled nognus from git but this function is not there. there is RR> an -or-password funtion RR> (auth-source-user-or-password MODE HOST PORT &optional USERNAME RR> CREATE-MISSING) RR> but that takes different args. Can you confirm RR> which repo this new function is in and sorry if Im wasting your time. It's in the Gnut Git repo. You did something wrong. Here's the function, anyhow: #+begin_src lisp (defun auth-source-user-and-password (host &optional user) (let* ((auth-info (car (if user (auth-source-search :host host :user "yourusername" :max 1 :require '(:user :secret) :create nil) (auth-source-search :host host :max 1 :require '(:user :secret) :create nil)))) (user (plist-get auth-info :user)) (password (plist-get auth-info :secret))) (when (functionp password) (setq password (funcall password))) (list user password auth-info))) #+end_src The old `auth-source-user-or-password' is obsolete. I named this one slightly differently to liven things up a bit (think "who's on first?" "user-or-password?" "no, user-AND-password" "AND is on second?" etc. :) Ted