imapfilter icon indicating copy to clipboard operation
imapfilter copied to clipboard

oauth2 O365 troubles

Open epichub opened this issue 2 years ago • 1 comments

I am trying to get imapfilter to work with O365, but struggling. I have read #186 and am encoding the session according to #252 My account config is like this

ACCOUNT = IMAP {
  server = "outlook.office365.com",
  username = ACCOUNTuser,
  password = ACCOUNTpass,
  oauth2 = oauth2string,
  port = 993,
  ssl = 'auto'
}

However, when I try:

ACCOUNT.INBOX:check_status()

imapfilter outputs:

imapfilter: IMAP (3): 1001 NO LOGIN failed.
imapfilter: IMAP (3): 1003 BAD Command received in Invalid state.
imapfilter: authentication of <ACCOUNTuser>[email protected] failed.

I think the ouathstring is ok - but I need to configure imapfilter to use the correct commands to login to the server?

epichub avatar Nov 22 '23 08:11 epichub

Hm, that invalid state is weird, can you share the previous debug output until this error?

Make sure to remove any sensitive details...

lefcha avatar Dec 26 '23 19:12 lefcha