Re: Is it possible to integrate getmail with an Office 365 mail server using third-party 2FA authentication
Ranjan Maitra <[email protected]>
| Newsgroups | gmane.mail.getmail.user |
|---|---|
| Message-ID | <[email protected]> |
Hi Charles, Thanks very much for your response. On Sun, 26 May 2019 20:22:09 -0600 Charles Cazabon <[email protected]> wrote: > Ranjan Maitra <[email protected]> wrote: > > > > We have been able to write a python script using MS Graph or REST API to get > > the e-mail from there (which involves authentication using OKTA's one time > > password (OTP) on google-authenticator). > > Ok. > > > I wonder if it is possible to use this in conjunction with getmail so that > > we can read them using our own MTA. > > Yes, you can do this with getmail; you're looking for the password_command > retriever parameter; see the docs under common retriever parameters. > > Specify it instead of a password parameter; getmail will invoke the > program/script and read its output. Have your script output just the OTP that > it needs to log in with, and that should work. > > Provide more details if you're not sure what to do next. I will try and do what you are suggesting. MS Office 365 needs to connect using a REST or GRAPH API. Something similar to what I need has been attempted with python-o365 at https://github.com/O365/python-o365 but I am not sure I understand what one is supposed to do there after running the python commands. Besides, I would be happy to work this with something like getmail. Unless you have more suggestions, I will look into your suggestion and get back to you with more questions. Many thanks again and best wishes, Ranjan -- Ranjan Maitra <[email protected]>