Dear all,
Can you add a feature that lets davmail import existing cookie files for complicated setups using cookies from a specified folder (as discussed in https://sourceforge.net/p/davmail/patches/37/ ). I think this would solve my problem.
One of the mail servers I use changed to 2FA using Google Authenticator before a VMWARE VPN (not O365) and since then I can not login through davmail anymore. This should be possible still because by using a browser I can still enter the Outlook webmail. I need to enter my credentials twice, however, and I think this is were the problems arise.
If I enter https://portal.xxx.xxx/owa as a URL in the browser I get referred to https://portal.xxx.xx/SAAS/auth/federation/sso. If I enter my credentials I am asked for my Google token. Then I get referred to https://portal.xxx.xx/catalog-portal/ui?isOnPremise=true&isMobile=false&userId=999#/apps where I can click on Webmail. Then I am referred to
https://portal.xxx.xx/owa/auth/logon.aspx?replaceCurrent=1&url=https%3a%2f%2fxxx.xx.x.xx%2fowa which is exactly the login screen as it used to be. Entering the credentials again will lead to https://portal.xxx.xx/owa/#path=/mail as it used to be.
Trying this in davmail, if I remove "domain/" from my username in the offlineimap setup and changing the davmail url from mail.xxx.xx/ews/exchange.asmx to portal.xxx.xx/owa a davmail window does open that asks for my "One time token"! However, if I enter that a "Authentication failed: invalid user or password, retry...." appears in the logs. I think because now this requires adding my domain to my username (as it did previously and the outlook web application still looks the same). As the username is provided by my mail program (offlineimap or Thunderbird) and I can not instruct it to "try" both or tell it how to do that sequentially, the authentication fails.
I presume it is to difficult to let davmail handle that. The cookie solution might work.
Davmail is brilliant and I hope you can help me. Hope you consider this an interesting riddle (and that I am not so stupid as to have missed something obvious). Would of course be very happy to send my WIRE debugs!
Caroline