domainaware / parsedmarc

A Python package and CLI for parsing aggregate and forensic DMARC reports
https://domainaware.github.io/parsedmarc/
Apache License 2.0
981 stars 212 forks source link

Using MS Graph can't find INBOX #351

Closed calmicoder closed 1 year ago

calmicoder commented 1 year ago

I'm trying to switch from using IMAP to MSGraph since Microsoft will be turning off Basic Auth to Exchange Online starting next month.

I've created a new app in azure and assigned it application mail.readwrite

my parsedmarc.ini has the following: [msgraph] auth_method = ClientSecret mailbox = mailbox@domain client_id = appid client_secret = appsecret tenant_id = tenantid

I'm getting the following error when running parsedmarc: INFO:cli.py:777:Starting parsedmarc DEBUG:graph.py:121:Folder Archive already exists, skipping creation DEBUG:graph.py:121:Folder Aggregate already exists, skipping creation DEBUG:graph.py:121:Folder Forensic already exists, skipping creation DEBUG:graph.py:121:Folder Invalid already exists, skipping creation ERROR:cli.py:969:Mailbox Error: folder INBOX not found

nathanthorpe commented 1 year ago

It is case sensitive, so try using:

[mailbox]
reports_folder = Inbox
calmicoder commented 1 year ago

I added those lines to parsedmarc.ini and now I get this error instead: ERROR:cli.py:969:Mailbox Error: 'value'

nathanthorpe commented 1 year ago

Maybe #352 will help troubleshoot

calmicoder commented 1 year ago

All that seemed to do was change the error message without any additional information. ERROR:cli.py:969:MailBox Error

calmicoder commented 1 year ago

Any other ideas on getting this working?

nathanthorpe commented 1 year ago

I was able to reproduce it. I've added my changes in the #352 PR. In the meantime, try to add the batch_size parameter in your config.

calmicoder commented 1 year ago

adding this section fixed my issue. Thanks for your help.

[mailbox] reports_folder = Inbox batch-size = 0