[SMTP TLS] some minor bug fixes (#477)

* fix minor bugs during smtp-tls parsing, add docker-compose for local elasticsearch, add smtp-tls tests

* fix wrong log message parameter

* fix wrong log message

* add contact-info to smtp tls report, fix wrong fieldnames

* fix wrong fieldnames

* fix wrong index name for search

* at least for some reporting organizations the field sending-mta-ip is optional...

* add missing fields to elasticsearch for smtp tls

* failure_details is a list, add more test cases

* fix wrong name in ci.ini
This commit is contained in:
cgoIT authored and GitHub committed 2024-03-04 10:06:47 -05:00
1 parent 995bdbcd97
commit f3206dcdab
7 files changed
+177 -36

No files matched your search

+13
View File
@@ -59,6 +59,19 @@ class Test(unittest.TestCase):
parsedmarc.parsed_forensic_reports_to_csv(parsed_report)
print("Passed!")
def testSmtpTlsSamples(self):
"""Test sample SMTP TLS reports"""
print()
sample_paths = glob("samples/smtp_tls/*")
for sample_path in sample_paths:
if os.path.isdir(sample_path):
continue
print("Testing {0}: " .format(sample_path), end="")
parsed_report = parsedmarc.parse_report_file(
sample_path)["report"]
parsedmarc.parsed_smtp_tls_reports_to_csv(parsed_report)
print("Passed!")
if __name__ == "__main__":
unittest.main(verbosity=2)