domainaware / parsedmarc

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

ERROR:cli.py:722:Connection unexpectedly closed #266

Open MatthK opened 3 years ago

MatthK commented 3 years ago

I have installed the dockerized version. It initially worked, but any subsequent reports that came in didn't get processed anymore.

And now I just keep seeing this error in the log file:

0it [00:00, ?it/s]
0it [00:00, ?it/s]

   ERROR:cli.py:722:Connection unexpectedly closed

I was assuming that it might be a connection issue to get the email, but they do get transferred from the inbox to the aggregate folder.

Any idea what that could be?

MatthK commented 3 years ago

I did a bit more digging. I looked at 258 and suspected this could be my issue as well. Especially since I did have some strange error messages in the SMTP log file.

09/02/21 15:19:51   [1380] SSL recv failed: 10060.
09/02/21 15:19:51   [1380] SSL_Handshake negotiation failed
09/02/21 15:19:51   ME-E0xxx: [1380] SSL Handshake failed. Closing connection.

So I changed the parsedmarc.ini file to not use SSL and restarted that container. Now the SMTP log does not show those SSL_Handshake errors anymore, while the log of parsedmarc now shows a Connection timed out error instead of a Connection unexpectedly closed error. Progress, but not a solution.

Unfortunately I could try the proposed solution from 258, as I can't get into the docker container and adjust the code.

2021-09-02T07:29:35.827260752Z 0it [00:00, ?it/s] 0it [00:00, ?it/s]
2021-09-02T07:31:49.878324317Z    ERROR:cli.py:722:Connection timed out
2021-09-02T07:31:54.444369343Z 0it [00:00, ?it/s] 0it [00:00, ?it/s]
2021-09-02T07:34:09.141142776Z    ERROR:cli.py:722:Connection timed out
MatthK commented 3 years ago

Yet another update. I did find a way to get into the docker container, and amended cli.py with the suggested changes from 258. After a restart of the container, the Connection timed out error is gone. And shortly after the restart, I did receive an email with a ParseDMARC Report.