From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id WDurL1xs0WNbGAAAbAwnHQ (envelope-from ) for ; Wed, 25 Jan 2023 18:52:28 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id kILqL1xs0WP9ewAAauVa8A (envelope-from ) for ; Wed, 25 Jan 2023 18:52:28 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 1DBCE275F3 for ; Wed, 25 Jan 2023 18:52:28 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKjwG-0002li-0N; Wed, 25 Jan 2023 12:52:00 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKjw7-0002l6-Eu for help-guix@gnu.org; Wed, 25 Jan 2023 12:51:52 -0500 Received: from mx1.mythic-beasts.com ([2a00:1098:0:86:1000:0:2:1]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pKjw4-0000JA-3u for help-guix@gnu.org; Wed, 25 Jan 2023 12:51:50 -0500 Received: from [2a01:e0a:acc:b9b0:13f:c961:cb0d:71c3] (port=33770 helo=lap.twilken.net) by mailhub-cam-d.mythic-beasts.com with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.94.2) (envelope-from ) id 1pKjw1-00BBqF-NF; Wed, 25 Jan 2023 17:51:45 +0000 Date: Wed, 25 Jan 2023 18:51:36 +0100 From: Timo Wilken To: Peter Polidoro , Giovanni Biscuolo Cc: help-guix@gnu.org Subject: Re: mbsync with XOAUTH2 SASL mechanism Message-ID: <20230125175136.gaoonjhvuuifbnqs@lap.twilken.net> References: <87h6ziae15.fsf@polidoro.io> <87edrkgsdx.fsf@xelera.eu> <86wn5bq5pq.fsf@polidoro.io> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <86wn5bq5pq.fsf@polidoro.io> X-BlackCat-Spam-Score: 0 Received-SPF: pass client-ip=2a00:1098:0:86:1000:0:2:1; envelope-from=guix@twilken.net; helo=mx1.mythic-beasts.com X-Spam_score_int: -21 X-Spam_score: -2.2 X-Spam_bar: -- X-Spam_report: (-2.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, URI_DOTEDU=1.999 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674669148; a=rsa-sha256; cv=none; b=PIduEdGOyejE66/vTXRjli37IBaJZsQ1mviC3GgDwWCr4B1/eKquEmJ+E32GeI/ANZKhts ZllS9wxL2YEB8Lj9eKCiovq6PUJOahCRncQASXMyWQ6jCDjDBYZ4V9+0My7QkAaUOWY0ZC lr864MJZNDchvrgpU5/q3ay3n+1XkakEETY6w9lyT0IywA2PQQHYkLLutbTDDRl2NGZE5O kPjwDK24B0y/4Nn7GgLJNDCRizjKMHW7eQGDPK7K0pn9JW6G7iAqAq2IVctvJQk8cJwyXX bAGl8ae57E7PlaRY5ng5fkkgCUzyb/gw1JquVqYwyrNK5N6nGHIm5nBRI+p9og== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674669148; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=vkDZAtmI5afAl4p7jwL2tm81eEfAktwNdPBPldFsSNw=; b=JLav1IUrr+18WneomIBLTf6RrzSXmwEIpubVRqg+HUOcsuGu3QaPAQhOeIsNfc4AHrZdSI OCROa89IxR/9M90sZmsA4XVYnEhKCnsrisbCgwBxoY/bkljOnGh6FbGohaqUoVcjorl/Zg ZBKpzCdfj3VbqCSA/zkwy/NWPD36BckQxK7ryji8SSw/EYOKIxm2g5AwQXY8A8iwsg7y8p t264vY446/Yv1lQxZne50WFaJsvzYzlmcgn6+0y/iJqyFQUvLyoCZfEuJ1gihLK8vuJVvl 3CpWgk37Fi1GWSGPl0VqaaEA4CJdM0do4z3b7Y8Ql2kW1rWxSFu4qw7DMIZv1A== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -4.18 X-Spam-Score: -4.18 X-Migadu-Queue-Id: 1DBCE275F3 Authentication-Results: aspmx1.migadu.com; dkim=none; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-TUID: hgwn0/eM+tGE Hi Peter, hi Giovanni, I had the same problem with having to register an "app" to access my emails (but with neomutt, not Emacs). Instead, I ended up "borrowing" Thunderbird's client key and secret, which has worked fine so far. Maybe I'm being a bit paranoid, but I don't want to post the literal key here. You can copy it from mailnews/base/src/OAuth2Providers.jsm in Thunderbird's source tree (look for "login.microsoftonline.com" in the kIssuers variable near line 140). Send me an email privately if you can't find it. I hope that helps, Timo On Tue, Jan 24, 2023 at 07:41:51AM -0500, Peter Polidoro wrote: > > Giovanni Biscuolo writes: > > > have you solved your problem? > > No, I hate to admit that I have given up in frustration. > > My work email unfortunately uses office365. I work for a large nonprofit > science foundation. I wish they only used free software, but some of the > enterprise software is proprietary. I used to be able to read and write my > work email with Emacs, but after Microsoft changed their policies, that no > longer works. > > I found several sets of instructions online for getting outlook365 OAuth2 > working with Emacs, such as this one: > > https://sites.uw.edu/bxf4/2022/09/01/getting-uw-outlook-365-oauth2-to-work-with-emacs-mu4e-mbsync-and-msmtp/ > > I submitted a cyrus-sasl-xoauth2 guix package, but the guix side is not the > frustrating part. > > The frustrating part is that all of the instructions online say you need to > create an "Azure Active Directory App". I created one and it seemed to work > fine, but after a couple of weeks it expired and then I kept getting emails > from Microsoft saying I needed to pay them money to keep the Azure app > running. I really do not want to subscribe to anything Microsoft related, > even if my work pays for it. That link references another authentication app > from Thunderbird, perhaps there is a way to get something like that working > with Emacs, but I could not find any detailed instructions to do so. > > Right now I am able to read and write personal emails in Emacs, but for all > of my work emails I am forced to use Outlook in a web browser. > > > Last but not least, please consider that if you can (and if your company > > server/postmaster allows it) it's much better to use an "app password" > > method instead of Oauth2 > > https://pypi.org/project/getmail/#oauth2-privacy-policy > > I wish. That is the problem. App passwords used to be allowed by office365, > but they changed that policy. >