From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Cesar Crusius Newsgroups: gmane.emacs.devel Subject: Re: Any interest in an XOAUTH2 patch for smtpmail (Gmail 2-factor auth)? Date: Sun, 07 Jan 2018 08:50:57 -0800 Message-ID: <87vagd395a.fsf@gmail.com> References: <87373j4tcf.fsf@gmail.com> <87wp0u2ntv.fsf@gmail.com> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" X-Trace: blaine.gmane.org 1515343966 23965 195.159.176.226 (7 Jan 2018 16:52:46 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sun, 7 Jan 2018 16:52:46 +0000 (UTC) User-Agent: mu4e 0.9.18; emacs 25.3.1 Cc: emacs-devel@gnu.org To: John Wiegley Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Jan 07 17:52:42 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 1eYEBa-0005lg-Ce for ged-emacs-devel@m.gmane.org; Sun, 07 Jan 2018 17:52:38 +0100 Original-Received: from localhost ([::1]:58923 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYEDZ-0006sX-UN for ged-emacs-devel@m.gmane.org; Sun, 07 Jan 2018 11:54:41 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:57960) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1eYEC4-0006L0-J1 for emacs-devel@gnu.org; Sun, 07 Jan 2018 11:53:09 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1eYEBw-0001fv-F2 for emacs-devel@gnu.org; Sun, 07 Jan 2018 11:53:08 -0500 Original-Received: from mail-pl0-x241.google.com ([2607:f8b0:400e:c01::241]:42201) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1eYEBw-0001fe-89; Sun, 07 Jan 2018 11:53:00 -0500 Original-Received: by mail-pl0-x241.google.com with SMTP id bd8so6252044plb.9; Sun, 07 Jan 2018 08:53:00 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=references:user-agent:from:to:cc:subject:in-reply-to:date :message-id:mime-version; bh=lGKxQq6x4yEKbgPVM/h/M2vtYSX7GsXyVJPaW0Z61hU=; b=HcS+R0/rSTPGB1FzwZaAm7LDx5X2DEhIVydm4XsgergCVIaCGURvKRsr8XEQz4DTZN 5qFM8NdUNh5bM4F4myyERVnQ84RV/oylimvr3DV5YpxJIWx6t/T+0n0JxiM9YzRiFUH+ un/s4RtXRWAP0L4kHfQ9pyBbvrlJTfwafseNK2pYGpG6MCpkJUmRtLHSH4xizREOhDQ7 r4kJ7UsUc2s/F8JuPgThJ11jw9z0oegaQ4rDBW5CzBAYs9bQD/xFoTXBTo73XPdXPkor L0YYM31QEkvOJuckFJbz6tHBQDxjRydFl43wsiVnbS53EqClTC6B54Ifz/5YnDtqxEWS iXbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:references:user-agent:from:to:cc:subject :in-reply-to:date:message-id:mime-version; bh=lGKxQq6x4yEKbgPVM/h/M2vtYSX7GsXyVJPaW0Z61hU=; b=eTevrsHtK4B68E6VNjYooEQWv88zW//1MWdeZLbryvkdjfbKVEVgRLSYtNPOPoFWPq oGnpYmIkl9FdJtEVyfPMT18+2Gncx7Uz0KOSyu+PfESE2RdEG5iu9Usoz0i6ZK2q+4I/ o51Am7hX/ny/pKxgX+J8gZFwbdX9n8fWtY0UO5zJ5FEsQPPJkBSW1Wl28cYtvSVEzV7B g2gWUvQmQ+3lA37joT44u9pDJYvrst2s8B0duRn2r8vFq31ZJvIpDJtsvb+pTsxC0vZd v8wt1GKv25WVjCo0NussQV1b5UDFoTfEnlUxLXsrLh2QuD/3eUqzEs9zrf8lduPJ+0gs hD+w== X-Gm-Message-State: AKGB3mJUAOyMgTNsSX5Cp9AUvULYK5C2S6c2DdtWzCL/Bzxaqvni15VR BgNkYDHwIcNMv0jwOfVfRIRrEFLS X-Google-Smtp-Source: ACJfBos8kRMP4KEonGZ1ul6nB04+KTjS0jPYIEnzUpscIGo0NiCcWLbJsmIYi2pOcGZtpQM+HrbP7A== X-Received: by 10.159.211.8 with SMTP id bc8mr9726580plb.142.1515343978657; Sun, 07 Jan 2018 08:52:58 -0800 (PST) Original-Received: from cesars-w520 (c-24-4-33-27.hsd1.ca.comcast.net. [24.4.33.27]) by smtp.gmail.com with ESMTPSA id l8sm19377858pgr.49.2018.01.07.08.52.57 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Sun, 07 Jan 2018 08:52:57 -0800 (PST) In-reply-to: X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 2607:f8b0:400e:c01::241 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:221676 Archived-At: --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable On Sun 07 Jan 2018 at 09:08, John Wiegley wrote: >>>>>> Cesar Crusius writes: > >> 1. All that needs to happen in smtpmail.el is for the >> 'smtpmail-try-auth-methods' to have the following patch: > > Could it be done using advice-add in an ELPA package, while also proposin= g a > general mechanism for hooking into this part of smtpmail? I guess so, although it feels a bit strange to advise a function in 'smtpmail.el' from an 'auth-source' package. A proper generalization of 'smtp-try-auth-method' is easy, of course. All you need is to split the test into functions, eg 'smtp-try-plain-auth-method', 'smtp-try-login-auth-method', etc, and then have 'smtp-try-auth-method' simply call 'smtp-try--auth-method.' Then anybody would be able to define their own and just add them to the 'smtpmail-auth-supported' list. Do you think it is work working on a patch like this first? =2D-=20 Cesar Crusius --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQGzBAEBCAAdFiEEsu/ErKn7yEV7E0FU/X9qSDfQj2EFAlpST/EACgkQ/X9qSDfQ j2EkAgwAp0w9ekvgH3PjhxmvftLhjNyzGrewBsMH6mXkGe5PcKOVWuVkx5DqqQa/ DceoaDoOuP2/eTri+NUubRnXUDvh/mcGZb1ZXDwKs/ZIA6ekI+9f1MwtupkfiQzV f/9b1iXFlQvrINL7G6my270rlmKfzh5wQgVYJNStk+/iU2n70jR0Izw15nnh8dac /tr2uWYJQPWhxT1wNill8O1dHEt+H8mKbn2jtWXSh6UnZ2bA0S/l7+/HQ6hLtzsT aTmrLq/kDKVkqy4oWTC8jbWAMc9N0vX8nRBWTsscJXriYq6i2j7q4inBOtLAtiTj pbj/MiSA//oSS3t7bwk9n9ATx5boPjeeSjZBI5aCamjFt+XwsoHgdtymPyyxN2y9 lS7OvoSnlJljccouWOx7hxGbX0r4WE4DBQ/RKumFFMrdsImlc9rNuylgdljZdiuk TZL+rrHtW2ZpmN7KhOHGFNW7EKfeizwfywHAVTVKBNMsThqJngQ2s4Pv9XVi2Ffs 192ODvnx =kJt1 -----END PGP SIGNATURE----- --=-=-=--