Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IMAP doesn't work any more #54

Open
jochenwezel opened this issue Jan 26, 2024 · 3 comments
Open

IMAP doesn't work any more #54

jochenwezel opened this issue Jan 26, 2024 · 3 comments

Comments

@jochenwezel
Copy link

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
Copy link
Author

After some further research on internet, I found this ticket regarding msgraph:
domainaware/parsedmarc#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
Copy link
Author

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 ;-)

@SassBlanket98
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants