Re: Is it possible to integrate getmail with an Office 365 mail server using third-party 2FA authentication

Charles Cazabon <[email protected]>
Newsgroups gmane.mail.getmail.user
Message-ID <[email protected]>
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.

Charles
-- 
-----------------------------------------------------------------------
Charles Cazabon
GPL'ed software available at:               http://pyropus.ca/software/
-----------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.