nmh-workers
[Top] [All Lists]

Re: [nmh-workers] Thank You

2019-04-28 11:24:49
Ken wrote:

[Mark:]
$WORK migrated my email to Office365 this week.

You know ... you MIGHT be able to use nmh with Office 365 (they claim to
support POP servers, although when I tried poking at it a bit it didn't
quite work ... we might have bugs, which I would love to fix).

Maybe OAUTH2 is necessary.  I just registered nmh as an app with
Microsoft.  I'm not able to use it with my Office365 account
because that's been configured to not allow user consent for
applications.  If anyone has such consent, it might be worth a
quick try to see if nmh can access your mail.  To see if you have
consent, I think these steps will work:

1. Login for web access, for OWA maybe using something like
https://outlook.office.com/owa/?realm=<domainname>
2. Login to the same account at https://myapps.microsoft.com/
and see if there's a way to add nmh

If you can add nmh, then these steps might allow and test OAUTH2 access:

1. add to your profile:
oauth-office365-credential-file: oauth-office365
oauth-office365-client_id:       1ed76533-a0a8-4bc0-bbb6-ea822dbc1bc6
oauth-office365-client_secret:   n/a
oauth-office365-auth_endpoint:   
https://login.microsoftonline.com/common/oauth2/v2.0/authorize
oauth-office365-redirect_uri:    
https://login.microsoftonline.com/common/oauth2/nativeclient
oauth-office365-token_endpoint:  
https://login.microsoftonline.com/common/oauth2/v2.0/token
oauth-office365-scope:           
https://graph.windows.net/offline_access%20https://graph.windows.net/calendars.readwrite%20https://graph.windows.net/contacts.readwrite%20https://graph.windows.net/mail.readwrite%20https://graph.windows.net/mail.send%20https://graph.windows.net/mailboxsettings.readwrite%20https://graph.windows.net/people.read%20https://graph.windows.net/user.read

2. use mhlogin, with nmh 1.7.1 and later, to get authorization:
mhlogin -user <email address> -authservice office365

3. to retrieve, try:
inc -initialtls -sasl -saslmech xoauth2 -authservice office365 -host 
outlook.office365.com -port 995 -user <email address> -snoop

4. to send, try:
send -tls -sasl -saslmech xoauth2 -authservice office365 -server 
smtp.office365.com -user <email address>

If that works, we could generalize mhlogin to embed all those tokens
so the user wouldn't have to add them to their profile.

David

-- 
nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers

<Prev in Thread] Current Thread [Next in Thread>