jertel / dmarc2logstash

Injects POP3-polled DMARC feedback reports into Elasticsearch via Logstash and Filebeat.
MIT License
16 stars 4 forks source link

Fix unknown host #14

Closed restena-pyg closed 2 months ago

restena-pyg commented 2 months ago

socket.gethostbyaddr function triggers an "[Errno 1] Unknown host" exception if the provided IP address cannot be resolved.

In example:

python3 -c 'import socket; socket.gethostbyaddr("10.1.1.1")'
Traceback (most recent call last):
  File "<string>", line 1, in <module>
socket.herror: [Errno 1] Unknown host

The proposed fix allows the execution to continue.