Does/will evolution allow the use of oauth2 for POP on hotmail/outlook accounts?

I’ve done a forums search and none of the questions quite fit my question so here it is:

I’m using a couple of bog standard “email[at]hotmail.com” evolution email accounts on my PC running debian testing.

I like POP and SMTP because I can work totally off line and it allows me to keep a permanent record of my emails going back many years. I rarely look at the old emails, but knowing they are there brings me a sense of joy… especially after I lost a huge trove of emails when one of the online account providers closed years ago and I’d been using (I think) IMAP to access it which also happened very close to the time I changed my internet provider and obviously lost access to their provided account. Since then its been POP and SMTP all the way.

Now running through the “add email” options on outlook shows that SMTP can be accessed using oauth2 but for some reason POP is not showing the oauth2 option.

Now, is it:

  1. A case that I need to do something with my hotmail.com account to tell it that oauth2 is allowed for pop?
  2. A case that for some reason evolution doesn’t yet handled ouath2 for hotmail accounts? (It does for gmail accounts.)
  3. Or is it a case that hotmail do not allow oauth2 for pop accounts? (Which seems odd as they allow it for the SMTP side of things!)

If its 2) the next question becomes "will evolution handle oauth2 for pop accounts before microsoft disables “password” authentication of outlook/hotmail accounts?

If evolution/microsoft will never allow oauth2 for pop accounts, is there a way to make IMAP work like POP where it deletes the “online” emails after a few days but retains the “offline” copy; or does the deletion of an email online always cause the offline deletion when syncing?

I guess I could, if it would work, set up some filter scripts to always move/copy the local copy to a different folder that doesn’t exist on the online system and then manually delete the online copy; but boy that seems like a lot of faffing about for the hotmail accounts I’ve got (more than 1!).

Anyways, thanks in advance for any help that might be offered in resolving this :slight_smile:

A case that for some reason evolution doesn’t yet handled ouath2 for
hotmail accounts?

Hi,

you are right, the evolution (or better evolution-data-server) is here
to be blamed. It allows OAuth2 for Sign in to Outlook servers
only for IMAP and SMTP, but not for POP3.

You can open DConf editor (dconf-editor) and navigate to the
/org/gnome/evolution-data-server/oauth2-services-hint
key and add there an entry with ‘Outlook:pop3.outlook.com’, or what the
server address (“pop3.outlook.com” in my example) is. It needs to match
what you have in the account Properties. It means the value in the
DConf editor will look like:

['Outlook:pop3.outlook.com']

Once you save the changes start Evolution again. I did not try it here,
thus I do not know whether the POP3 provider can handle OAuth2
authentication, though I do not think there’s any reason why it could
not. let me know whether it works, please.

is there a way to make IMAP work like POP where it deletes the
“online” emails after a few days but retains the “offline” copy;
or does the deletion of an email online always cause the offline
deletion when syncing?

What you see in Evolution is just a local “snapshot” of the content on
the server. When a message is deleted from the server (which can happen
for example by another client), it is deleted from the local “snapshot”
the next time a refresh of the folder content is initiated.

You mentioned it, the filters are the way to go. When you Move the
messages to an “On This Computer/xxxxx” folder from the IMAP account
you can just expunge the IMAP Trash from time to time, though that
could be done by the server itself too. I do not think there’s anything
special for you to do, the refresh interval will make it work
independently for you and you might not even notice it’s IMAP, when the
filters move all the mails to a folder you prefer in the On This
Computer. The account will just sit in the folder tree, but it can be
collapsed, thus using only one line (aka not much space).

Bye,
Milan

Thanks for the response and information.

There is some progress.

The account details for pop are “server: outlook.office365.com Port: 995”

Drilling down to /org/gnome/evolution-data-server/oauth2-services-hint in dconf-editor and adding [‘Outlook:outlook.office365.com’] causes the oauth2 prompt to be shown for adding new email accounts.

Adding a new account (after creating a new hotmail account) in evolution it initially asked for password, and then “allow the following to access your account” which I replied yes to.

Looking at the “Sign in to your Microsoft account********************” it shows that “access your info”, “sync and send email”, and “access your email address” can all be accessed by evolution.

However, when trying to pull the “welcome to …” email from the account (the only email in there) it keeps asking for my password (using the pop up oauth web based prompt) and fails to get any further.

That it allowed me to change the evolution authorisation on hotmail from within evolution shows that its almost working; the password can be entered and is accepted and updates happened. But for whatever reason it can’t do the actual pull. The error shown in evolution is “Cannot login to POP server outlook.office365.com: SASL Protocol error”.

I ran CAMEL_DEBUG=pop3 evolution >& afile.txt but am not sure how likely that is to leak credentials etc if I just attach it. Its 1.2Mb in size. Also I pull from 9 different emails and looking through the file its not obvious which, if any, of the log is related to my new just created email address (for testing).

Let me know if there is any information you specifically need.

Further information.

I tried adding the account as an IMAP account and it adds ok and uses OAUTH2 and then pulls the emails from the server. Its just the actual POP part that is failing. I’ve set the “allow POP” and also “allow IMAP” options on the hotmail/outlook.live email pages so that bit is all ok.

Regarding the POP3 logging. Searching through the file it seems it doesn’t relate to the new pop3 account set up for testing. It only seems to be logging two other hotmail accounts. It also doesn’t seem to be logging the couple of gmail accounts that also use POP so there is something odd with the logging and at this point I’m out of ideas.

Any more help would be much appreciated.

Thanks in advance.

Hi,
that might mean the POP3 provider doesn’t know how to deal with the
OAuth2 authentication and it can be the reason why the “Outlook” OAuth2
service enables itself only for IMAP and SMTP. In other words, I guess
there are needed changes on the POP3 provider to make it work.

With respect of the debug output, the easiest is to start Evolution
with the debugging on, wait until it stops adding new lines into the
log, mark that place, and then select only the test account to refresh,
like with File->Send/Receive->. Or simply disable all
the other POP accounts in the Edit->Preferences->Mail Accounts
temporarily and then restart the Evolution with the debugging on.
Bye,
Milan

I disabled all the accounts except the newly created one; cleared the file; ended all the evolution processes and then restarted.

The log seems to contain the single failed log on.

However unlike when I do the same activating a different pop account this log does not contain the account name so the log is showing “unknown user name or bad password” but does not name the user so I’m wondering if the issue is that evolution doesn’t know how to pass the user name for pop hotmail.

The little pop up sign in screen does have “<- new_account@hotmail dot com” at the top so it seems that at least that part is getting the pop account correctly its just that its not being passed to the actual data server which is why the log doesn’t mention any hotmail dot com account.

I’m quite shocked that no one else has raised this issue as I surely can’t be the only one who uses outlook and evolution and pop and those “we’re removing your ability to pop using older methods” emails keep arriving!

Hi,
I’m sorry I wasn’t more clear.

The IMAP provider used in the Evolution knows what to do when an OAuth2
authentication is used, but the POP3 provider does not know it, thus it
fails to provide the credentials in a proper way to the server. This
POP3 provider is part of a libcamel library, which is part of the
evolution-data-server code base. That’s the place where the change
should be done. There’s nothing you can do about it without touching
the code.

With respect of the other users, the automatic lookup of the accounts
picks IMAP as the default and I believe most of the users use just
that. The office365.com is used more with the evolution-ews, which
brings everything it can from the server, providing the best
experience. Unfortunately, the free Microsoft mail accounts have some
issues, which started recently. It’s a known problem confirmed by the
Microsoft itself. For that I’m pretty sure you might be one of
not-so-many users using POP3 with the office365.com.

Feel free to open a bug against the evolution-data-server [1] to teach
POP3 how to use OAuth2. It’ll help to not forget of it.

Thanks and bye,
Milan

[1] Issues · GNOME / evolution-data-server · GitLab

1 Like

This topic was automatically closed 45 days after the last reply. New replies are no longer allowed.