domainaware / parsedmarc

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

MSGraph: RuntimeError: Folder Inbox or INBOX not found #371

Closed davidande closed 1 year ago

davidande commented 1 year ago

hello, i face a problem with MSGraph that connot fing my acces my Inbox. all rights are good in Azure, I have added reports_folder ans tested Inbox or INBOX but ...

david@david-virtual-machine:~$ sudo parsedmarc --debug -c /etc/parsedmarc.ini 
    INFO:cli.py:777:Starting parsedmarc
/usr/local/lib/python3.10/dist-packages/elasticsearch/connection/base.py:208: ElasticsearchWarning: Elasticsearch built-in security features are not enabled. Without authentication, your cluster could be accessible to anyone. See https://www.elastic.co/guide/en/elasticsearch/reference/7.17/security-minimal-setup.html to enable security.
  warnings.warn(message, category=ElasticsearchWarning)
0it [00:00, ?it/s]
   DEBUG:graph.py:126:Folder Archive already exists, skipping creation
   DEBUG:graph.py:126:Folder Aggregate already exists, skipping creation
   DEBUG:graph.py:126:Folder Forensic already exists, skipping creation
   DEBUG:graph.py:126:Folder Invalid already exists, skipping creation
   ERROR:cli.py:969:Mailbox Error
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/dist-packages/parsedmarc/cli.py", line 952, in _main
    reports = get_dmarc_reports_from_mailbox(
  File "/usr/local/lib/python3.10/dist-packages/parsedmarc/__init__.py", line 1085, in get_dmarc_reports_from_mailbox
    messages = connection.fetch_messages(reports_folder, batch_size=batch_size)
  File "/usr/local/lib/python3.10/dist-packages/parsedmarc/mail/graph.py", line 136, in fetch_messages
    folder_id = self._find_folder_id_from_folder_path(folder_name)
  File "/usr/local/lib/python3.10/dist-packages/parsedmarc/mail/graph.py", line 208, in _find_folder_id_from_folder_path
    return self._find_folder_id_with_parent(folder_name, None)
  File "/usr/local/lib/python3.10/dist-packages/parsedmarc/mail/graph.py", line 225, in _find_folder_id_with_parent
    raise RuntimeError(f"folder {folder_name} not found")
RuntimeError: folder Inbox not found

any advice? thanks

davidande commented 1 year ago

It seems have have solved it. My mailbox is in french language so reports_folder = Boîte de réception I'as seems to be sensitive to local language of the mailbox