Closed robertomoutinho closed 2 years ago
Just finished setting this up and I have the exact same issue.
WARNING:__init__.py:1147:bad escape \d at position 7
WARNING:__init__.py:1147:bad escape \d at position 7
WARNING:__init__.py:1147:bad escape \d at position 7
WARNING:__init__.py:1147:bad escape \d at position 7
WARNING:__init__.py:1147:bad escape \d at position 7
WARNING:__init__.py:1147:bad escape \d at position 7
WARNING:__init__.py:1147:bad escape \d at position 7
WARNING:__init__.py:1147:bad escape \d at position 7
WARNING:__init__.py:1147:bad escape \d at position 7
WARNING:__init__.py:1147:bad escape \d at position 7
WARNING:__init__.py:1147:bad escape \d at position 7
WARNING:__init__.py:1147:bad escape \d at position 7
WARNING:__init__.py:1147:bad escape \d at position 7
WARNING:__init__.py:1147:bad escape \d at position 7
WARNING:__init__.py:1147:bad escape \d at position 7
WARNING:__init__.py:1147:bad escape \d at position 7
WARNING:__init__.py:1147:bad escape \d at position 7
parsedmarc
then marks all emails as "Archive/Invalid" in my IMAP inbox (Gmail) and nothing is sent to elasticsearch.
The emails are from several different providers.
The problem comes from regex
that have been updated to 2022.3.15 which seems buggy.
pip install regex==2022.3.2
before running parsedmarc
fixes the issue for now.
Thank you @quentinhayot.
My Dockerfile ended up like this:
FROM python:alpine
RUN apk add build-base libxml2-dev libxslt-dev \
&& pip install elasticsearch==7.13.4 \
&& pip install elasticsearch-dsl==7.4.0 \
&& pip install regex==2022.3.2 \
&& pip install parsedmarc
COPY parsedmarc/parsedmarc.ini /etc/parsedmarc.ini
regex
pip install to fix the bug from this issue
elasticsearch
and elasticsearch-dsl
pip install to make it work with AWS OpenSearch (Elasticsearch)
I've configured parsedmarc to connect to my inbox (IMAP) and send data to elasticsearch... all using AWS ECS components.
But whenever parsedmarc finds the message at the inbox it throws the error bellow and deletes the message (the deletion part is configured in the ini config file and it's expected). The same report works just fine locally using the input file mechanism.
I can't seem to find any more information about what's going on with the message. All I know is that it's trying to log something: https://github.com/domainaware/parsedmarc/blob/315d400677752542fec473c337540a9543237dd4/parsedmarc/__init__.py#L1147