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 218 forks source link

IMAP Error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate #260

Open MrHappy opened 3 years ago

MrHappy commented 3 years ago

After elasticsearch is started I get the following message parsedmarc_1 | ERROR:cli.py:696:IMAP Error: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: self signed certificate (_ssl.c:1131) dmarc-visualizer_parsedmarc_1 exited with code 1 That is weird because my mailserver has no self-signed-certificate, but a genuine one which expires somewhere late october. My parsedmarc.ini settings are:

[general]
save_aggregate = true
save_forensic = true
output = /output/

[imap]
host = mailserver.domain.tld
WRONG_VERSION_NUMBER]
port = 993
user = user@domain.tld
password = password
watch = true
reports_folder = INBOX

[elasticsearch]
hosts = elasticsearch:9200
ssl = false

Setting ssl = False and skip_certificate_verification = True makes no difference. Any reason why parsedmarc does not start and gives this error?

leonardo0014 commented 2 years ago

I don't have that much experience with the script, but I'm currently learning. Since no one has replied so far, I'll try my hand at your problem. First a question about your .ini. Is that a typo?

... [imap] host = mailserver.domain.tld WRONG_VERSION_NUMBER] ...

I assume. Back to your question. Based on version 7.1.1, the specified line contains the detachment of the attachment and also the reference to the GeoIP database. Is there an https link as an attachment in this e-mail or does the GeoIP variable point to a URL? You will probably only find out the cause correctly with a tcpdump or the debug mode, which outputs the certificate.

As far as my tips, I hope it helps.