From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Tim Cross Newsgroups: gmane.emacs.devel Subject: Re: Any interest in an XOAUTH2 patch for smtpmail (Gmail 2-factor auth)? Date: Sat, 6 Jan 2018 17:13:13 +1100 Message-ID: References: <87373j4tcf.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/alternative; boundary="001a1141b3cad7eafa05621575e0" X-Trace: blaine.gmane.org 1515219125 26025 195.159.176.226 (6 Jan 2018 06:12:05 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 6 Jan 2018 06:12:05 +0000 (UTC) To: Cesar Crusius , Emacs developers Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Jan 06 07:12:01 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1eXhhz-00064o-Es for ged-emacs-devel@m.gmane.org; Sat, 06 Jan 2018 07:11:55 +0100 Original-Received: from localhost ([::1]:50192 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXhjy-0002En-OD for ged-emacs-devel@m.gmane.org; Sat, 06 Jan 2018 01:13:58 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:34166) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eXhjI-0002EY-HI for emacs-devel@gnu.org; Sat, 06 Jan 2018 01:13:17 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eXhjH-0005Bj-Hn for emacs-devel@gnu.org; Sat, 06 Jan 2018 01:13:16 -0500 Original-Received: from mail-ot0-x234.google.com ([2607:f8b0:4003:c0f::234]:42758) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eXhjH-0005BZ-Bf for emacs-devel@gnu.org; Sat, 06 Jan 2018 01:13:15 -0500 Original-Received: by mail-ot0-x234.google.com with SMTP id d2so5559486oth.9 for ; Fri, 05 Jan 2018 22:13:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to; bh=1QPcpADnBUdlToUirztN2QvVLArSDap1Eh5dd8w3gf4=; b=O9JO7FsoXbsaP3fJjODK88kk061DfqUdbaXNSZDleDQ0MKRSOV0VuFofLuKTjRT17y QKL5tcMxMCOCkG9HbkStNHjBZB4kFahXuFYxsqsQ03cwE6dDcSWJ/BE/S9hQ814RLEZ+ Guyq+xjwztQgXPPIgnadFpFEmeqDeTTqZ0BhJ2WTQabISPZCqehv2aRJzntpGaQkh/FT fKY0oH1WuLd3smyTsGmRSadaH63DOzlV9yC1lQ0lHyf3ZANjMdfYJaqTp6StKKrJHLvF iJMO/ILWI97QbW6X0G4m5p+YXvoqRWXzAvMfCcc9KouqkPrPYqPfuNkU2l9JJbjEfSl2 iocw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to; bh=1QPcpADnBUdlToUirztN2QvVLArSDap1Eh5dd8w3gf4=; b=bCbgD4Mh5OSeAMIrSbk67GztSyyV7J6Cxgoe7pdGPIMwlbhBjHGba1aklDq6JhwmLo SEPfwy4THLjYoNsbwDn3Pz1OET6bG24VKL4svtMJer1z7pUN/BldLDSf/2PA2sh7MXlb 8a1TucIZrtBSQvDv4w6Fv0y65lGPnbH2W7yeOWYakpLw6bhK2RvmrxuaL94HPgIjwNRE 6Af+40R4Ki5TpnTovVf2kYegc2H5m+8iMX639FziKOT3Na9UEbtGOa40NjUGxUp0ElhV OtCTx63lKwBVuZLZNvy8ltLlC0sNwdFrMyPgVrY71OrKw22RHiw73OOLkZCMemDfP7qf pvbQ== X-Gm-Message-State: AKwxytcmzDSArlmOAmZ3ugAm9+g33yRcv8SqHucXcRdh3vSaR5m3rWmm yAQQxkquPx+YB6JtVfMqC5PpCboP/EpTE62POGU= X-Google-Smtp-Source: ACJfBotA3udvtION+LKVQKwVDyX50jiS12Vu6ZTLHf1rfYD7JPEFg/jsXFWMSeZ42Dn3lYaniqkX3dRHdU7lvzdHibg= X-Received: by 10.157.24.29 with SMTP id b29mr3369464ote.180.1515219194471; Fri, 05 Jan 2018 22:13:14 -0800 (PST) Original-Received: by 10.168.181.12 with HTTP; Fri, 5 Jan 2018 22:13:13 -0800 (PST) In-Reply-To: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:4003:c0f::234 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 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" Xref: news.gmane.org gmane.emacs.devel:221633 Archived-At: --001a1141b3cad7eafa05621575e0 Content-Type: text/plain; charset="UTF-8" I think this would be an excellent extension as it should mean you won't need to use the 'application' passwords hack, which sort of undermines 2fa configs anyway. On 6 January 2018 at 16:32, John Wiegley wrote: > >>>>> "CC" == Cesar Crusius writes: > > CC> I recently had to add XOAUTH2 support in smtpmail to access my > two-factor > CC> authenticated Gmail account, which turned out to be surprisingly simple > CC> (my hack has about 20 lines of code, I guess it would about double to > do > CC> it properly). > > CC> It uses oauth2.el, so my plan would be to make smtpmail load that > library > CC> on demand, in case the new smtpmail-xoauth2 variables are configured. I > CC> guess the required functionality could be copy-and-pasted, but that > seems > CC> a waste. > > CC> Is there any interest in a patch? > > This sounds useful to me. How will users know to enable the extra behavior? > > -- > John Wiegley GPG fingerprint = 4710 CF98 AF9B 327B B80F > http://newartisans.com 60E1 46C4 BD1A 7AC1 4BA2 > > -- regards, Tim -- Tim Cross --001a1141b3cad7eafa05621575e0 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
I think this would be an excellent extension as it should = mean you won't need to use the 'application' passwords hack, wh= ich sort of undermines 2fa configs anyway.
=
On 6 January 2018 at 16:32, John Wiegley <johnw= @gnu.org> wrote:
>>= >>> "CC" =3D=3D Cesar Crusius <cesar.crusius@gmail.com> writes:

CC> I recently had to add XOAUTH2 support in smtpmail to access my two-f= actor
CC> authenticated Gmail account, which turned out to be surprisingly sim= ple
CC> (my hack has about 20 lines of code, I guess it would about double t= o do
CC> it properly).

CC> It uses oauth2.el, so my plan would be to make smtpmail load that li= brary
CC> on demand, in case the new smtpmail-xoauth2 variables are configured= . I
CC> guess the required functionality could be copy-and-pasted, but that = seems
CC> a waste.

CC> Is there any interest in a patch?

This sounds useful to me. How will users know to enable the extra behavior?=

--
John Wiegley=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = GPG fingerprint =3D 4710 CF98 AF9B 327B B80F
htt= p://newartisans.com=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 60E1 46C4 BD1A 7AC1 4BA2




--
regards,

Tim

--
Tim Cross

--001a1141b3cad7eafa05621575e0--