dmarc-visualizer icon indicating copy to clipboard operation
dmarc-visualizer copied to clipboard

IMAP doesn't work any more

Open jochenwezel opened this issue 1 year ago • 3 comments

In past, everything worked fine. After redeploying on another server, we recognized that the IMAP email account connection doesn't work any more.

docker logs dmarc-visualizer_parsedmarc_1 lists lot of logs of following error

ModuleNotFoundError: No module named 'msgraph'
Traceback (most recent call last):
  File "/usr/local/bin/parsedmarc", line 5, in <module>
    from parsedmarc.cli import _main
  File "/usr/local/lib/python3.9/site-packages/parsedmarc/__init__.py", line 31, in <module>
    from parsedmarc.mail import MailboxConnection
  File "/usr/local/lib/python3.9/site-packages/parsedmarc/mail/__init__.py", line 2, in <module>
    from parsedmarc.mail.graph import MSGraphConnection
  File "/usr/local/lib/python3.9/site-packages/parsedmarc/mail/graph.py", line 10, in <module>
    from msgraph.core import GraphClient

jochenwezel avatar Jan 26 '24 15:01 jochenwezel

After some further research on internet, I found this ticket regarding msgraph: https://github.com/domainaware/parsedmarc/issues/464

It seems that there is a new official version 1.0.0 for a few days. And it's not fully compatible with version 0.2.2 which has been bundled with dmarc visualizer.

The solution (WORKAROUND!) for me was to edit file parsedmarc/Dockerfile and replace

RUN apk add --update --no-cache --virtual .build_deps build-base libffi-dev \
    && pip install parsedmarc \
    && apk del .build_deps

by

RUN apk add --update --no-cache --virtual .build_deps build-base libffi-dev \
    && pip install parsedmarc msgraph-core==0.2.2 \
    && apk del .build_deps

After this, I immediately stepped into another trap that module kafka.vendor.six.moves was not found. This seems to be an issue of python 3.12; in version 3.11 it's still working.

jochenwezel avatar Jan 26 '24 16:01 jochenwezel

Okay, I found a solution and got IMAP email checks running again :-)

Therefore, I reverted back to python 3.8 by editing parsedmarc/Dockerfile and replaced

FROM python:alpine

by

#FROM python:alpine
FROM python:3.8.13-alpine3.16 as python

Don't forget to revert all these changes as soon as the upstream containers/components are fixed in a few weeks ;-)

jochenwezel avatar Jan 26 '24 17:01 jochenwezel

I'm still having issues with IMAP specifically with Office 365 and getting it to read an inbox.

SassBlanket98 avatar Feb 16 '24 06:02 SassBlanket98