Re: How to modify getmail to use output from python-O365 format

Ranjan Maitra <[email protected]>
Newsgroups gmane.mail.getmail.user
Message-ID <[email protected]>
On Fri, 23 Aug 2019 13:22:06 -0600 Charles Cazabon <[email protected]> wrote:

> Ranjan Maitra <[email protected]> wrote:
> >
> > I need to (and am able to) access my accounts using python-o365 at:
> > https://github.com/O365/python-o365
> >
> > I would like to process this output using getmail.
>
> I'm not sure what you mean by "process this output"; that sounds like you have
> a process which is retrieving the mail already?  If so, and you just need to
> deliver into a Maildir or Mboxrd file, you can use the included
> getmail_maildir/getmail_mbox to do that.

Thanks, yes, we have a process to retrieve the mail. I will look into getmail_maildir as you suggest.

>
> However, if you mean "make getmail retrieve mail using the Office 365 protocol
> instead of IMAP or POP", then that's a major undertaking.  If you're already a
> competent Python programmer and are comfortable with that "O365" library, you
> should be able to implement a new retriever base class, or possibly just an
> init mixin class.  Look in _retrieverbases.py.

Ideally, I would like to have something created that would simply be integrated with (that is, that getmail would take as an option in a specified manner and the processing would be done by getmail).

> It would definitely be easier to just use IMAP to access the mail, if that's
> possible.

Yes, we can use IMAP, but because of the much-ballyhooed two-factor authentication requirements, we need to somehow use something similar to the O365 library. We can use this with IMAP and that is not an issue at all.

Many thanks again and best wishes,
Ranjan
--
Ranjan Maitra <[email protected]>
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.