1

We currently have an application that uses IMAP/POP3 to access mail in O365; however, Microsoft has determined that they will no longer be allowing basic authentication. By do this, the application does not have the inability to use modern auth to access the mail in O365. So I am forced to build a postfix/dovecot mail server, that I'd like to use fetchmail to pull the mail from O365 into the new mail server so the application can access the mail. So my question, does fetchmail have this ability to use modern auth to poll the mail in O365 using IMAP/POP3, and if not, can anyone guide me to one that can?

Thanks

Update

When running fetchmail the follwoing error I get,

fetchmail: IMAP< A0001 OK CAPABILITY completed fetchmail: IMAP> A0002 LOGIN "[email protected]" * fetchmail: IMAP< A0002 NO LOGIN failed fetchmail: Authorization failure on [email protected]@localhost fetchmail: For help, see http://www.fetchmail.info/fetchmail-FAQ.html#R15 fetchmail: IMAP> A0003 LOGOUT fetchmail: IMAP< * BYE Closing connection fetchmail: IMAP< A0003 OK LOGOUT completed 

Checking davmail log I'm getting the following,though not sure why I'm running into this issue.

2020-10-21 13:37:50,916 DEBUG [ImapConnection-42868] davmail - < LOGIN ******** 2020-10-21 13:37:50,917 WARN [ImapConnection-42868] davmail.exchange.ExchangeSession - All network interfaces down or host unreachable ! 2020-10-21 13:37:50,918 DEBUG [ImapConnection-42868] davmail.exchange.ExchangeSession - java.lang.ClassNotFoundException: davmail.exchange.auth.O365InteractiveAuthenticator java.lang.ClassNotFoundException: davmail.exchange.auth.O365InteractiveAuthenticator at java.base/jdk.internal.loader.BuiltinClassLoader.loadClass(BuiltinClassLoader.java:581) at java.base/jdk.internal.loader.ClassLoaders$AppClassLoader.loadClass(ClassLoaders.java:178) at java.base/java.lang.ClassLoader.loadClass(ClassLoader.java:522) at java.base/java.lang.Class.forName0(Native Method) at java.base/java.lang.Class.forName(Class.java:315) at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:180) at davmail.exchange.ExchangeSessionFactory.getInstance(ExchangeSessionFactory.java:95) at davmail.imap.ImapConnection.run(ImapConnection.java:113) 2020-10-21 13:37:50,920 INFO [ImapConnection-42868] davmail.connection - FAILED - 0:0:0:0:0:0:0:1:42868 [email protected] 
0

1 Answer 1

1

Davmail will give you an IMAP/POP3 → M365 Exchange Online interface with OAuth (Modern Authentication). It's a Java application, but you can use Amazon Corretto rather than Oracle Java to avoid licensing costs.

6
  • I'm not familiar with Davmail, but it seems to have a server setup option, which I got running. Though not sure how I can get fetchmail to use davmail, I keep getting authentication failure when I attempt to have fetchmail use Davmail Commented Oct 20, 2020 at 18:26
  • To alittle more info to my above statement, both davmail and fetchmail are on the same system, and I noticed that using fetchmail with davmail, i see my [email protected]@localhost as the login user, which is probably why it's failing though not sure how to correct that Commented Oct 20, 2020 at 18:33
  • I haven't used fetchmail in years, but the target username for feeding to davmail should be "user@domain"; use the verbose option in fetchmail and/or davmail to confirm that Commented Oct 20, 2020 at 18:52
  • So here's what I'm getting and hopefully you could shed some light on what I'm doing wrong, using fetchmail, I'm running the following command, "fetchmail localhost -p IMAP --port 1143 -u [email protected] -k -v" But this is the output,fetchmail: IMAP< A0001 OK CAPABILITY completed fetchmail: IMAP> A0002 LOGIN "[email protected]" * fetchmail: IMAP< A0002 NO LOGIN failed fetchmail: Authorization failure on [email protected]@localhost fetchmail: IMAP> A0003 LOGOUT Commented Oct 20, 2020 at 19:58
  • Can't read that as a comment. Please put it into your question, ideally along with the corresponding debug/trace output from davmail Commented Oct 20, 2020 at 21:07

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.