Rocksolid Light

Welcome to Rocksolid Light

mail  files  register  newsreader  groups  login

Message-ID:  

Computers are not intelligent. They only think they are.


computers / comp.mail.pine / Re: Alpine and O365 Gateway

SubjectAuthor
o Alpine and O365 GatewayBrandon Jewett-Hall

1
Re: Alpine and O365 Gateway

<23af36e1-5fd9-456a-8290-259871228838n@googlegroups.com>

  copy mid

https://news.novabbs.org/computers/article-flat.php?id=1321&group=comp.mail.pine#1321

  copy link   Newsgroups: comp.mail.pine
X-Received: by 2002:a05:6214:b03:b0:65b:7a2:eebd with SMTP id u3-20020a0562140b0300b0065b07a2eebdmr165085qvj.9.1696263100733;
Mon, 02 Oct 2023 09:11:40 -0700 (PDT)
X-Received: by 2002:a05:6808:198e:b0:3ae:1f9:eb47 with SMTP id
bj14-20020a056808198e00b003ae01f9eb47mr6166444oib.10.1696263100131; Mon, 02
Oct 2023 09:11:40 -0700 (PDT)
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!peer02.iad!feed-me.highwinds-media.com!news.highwinds-media.com!news-out.google.com!nntp.google.com!postnews.google.com!google-groups.googlegroups.com!not-for-mail
Newsgroups: comp.mail.pine
Date: Mon, 2 Oct 2023 09:11:39 -0700 (PDT)
In-Reply-To: <bccc78f6-76d4-4343-ac93-8a966559b697n@googlegroups.com>
Injection-Info: google-groups.googlegroups.com; posting-host=185.172.53.16; posting-account=hV9BCwoAAAD6nZpOFiYTHpQZWLDAYR8U
NNTP-Posting-Host: 185.172.53.16
References: <625324af-776e-4333-86c7-b6db557f5b5en@googlegroups.com>
<4a6af2c5-c0ee-02ef-1cf4-c87a14cf2ea6@washington.edu> <bccc78f6-76d4-4343-ac93-8a966559b697n@googlegroups.com>
User-Agent: G2/1.0
MIME-Version: 1.0
Message-ID: <23af36e1-5fd9-456a-8290-259871228838n@googlegroups.com>
Subject: Re: Alpine and O365 Gateway
From: brandonh@google.com (Brandon Jewett-Hall)
Injection-Date: Mon, 02 Oct 2023 16:11:40 +0000
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable
X-Received-Bytes: 3887
 by: Brandon Jewett-Hall - Mon, 2 Oct 2023 16:11 UTC

Hi Pascal,

I was able to get DavMail + Alpine working for a similar situation (university Office365 account that disallows most email applications). In my case, the IT department allows use of Mac Mail (Mail.app), so I set up my account with Mail.app on my Mac, and then I was able to spoof Mac Mail by copying the Exchange refresh token out of the Keychain and setting .davmail.properties like so (replace the email string in the refresh token property name accordingly):

davmail.mode=O365Manual
davmail.oauth.clientId=f8d98a96-0999-43f5-8af3-69971c7bb423
davmail.oauth.redirectUri=com.apple.Preferences://oauth-redirect/
davmail.oauth.youremail@example.edu.refreshToken=<REFRESH TOKEN>

On the Alpine side, I use plain auth for IMAP+SMTP and enter a fake password when prompted (any non-empty value will do), which appears to be needed to trigger the correct OAuth flow inside DavMail. After successful auth, in my case, DavMail rewrote the refresh token property in my properties file with an AES-encrypted version (presumably for the questionable rationale of avoiding plaintext).

The obvious downside of this approach is that you have to manually update the refresh token from Keychain whenever O365 forces re-auth, but these events are typically infrequent (on the order of months or years).

On Friday, November 26, 2021 at 12:57:38 AM UTC-8, Pascal W wrote:
> Thanks! From reading the documentation of DavMail my understanding is that Alpine will still be required to be approved by Azure AD administrators. At my company they have flipped the switch from default setting and do not allow developer self-service consent for apps. DavMail will not solve that problem for me.
>
> /Pascal
> On Thursday, November 18, 2021 at 3:31:31 AM UTC+1, Eduardo Chappa wrote:
> > On Wed, 17 Nov 2021, Pascal W wrote:
> >
> > > Hi! Does anyone have experience proxying Alpine via this "O365 gateway"?
> > >
> > > https://github.com/mguessan/davmail
> > Yes, Davmail is a tool that allows you access an exchange server (using
> > the exchange protocol) through an imap gateway. My experience is that it
> > is slow, but if that is what you will be allowed to use it is better than
> > nothing. The default concept of "deleted" in davmail is "deleted and
> > expunged" so configure it to not to expunge upon deletion.
> >
> > Good luck!
> >
> > --
> > Eduardo
> > https://tinyurl.com/yc377wlh (web)
> > http://repo.or.cz/alpine.git (Git)

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor