spamhaus / spamassassin-dqs

Spamhaus code for the Spamassassin plugin. See https://docs.spamhaustech.com/40-real-world-usage/SpamAssassin/000-intro.html
Apache License 2.0
56 stars 17 forks source link

code needs to strip ending dots of dns values #6

Closed jhaar closed 5 years ago

jhaar commented 5 years ago

I just installed spamassassin-dqs and the very first spam email I pushed through generated an error.

Jul 6 15:02:11.851 [29954] warn: dns: new_dns_packet (domain=ec2-54-249-116-194.ap-northeast-1.compute.amazonaws.com..XXXXXXXX.zrd.dq.spamhaus.net. type=A class=IN) failed: a domain name contains a null label

The reason is this line from the email: you will see the dns name ends in a dot (which is valid BTW)

Received: from mvc.ajdmsdrab.com (ec2-54-249-116-194.ap-northeast-1.compute.amazonaws.com. [54.249.116.194])

I'd guess your parser needs changing to strip off ending dots?

Thanks

Jason

ricalfieri commented 5 years ago

Thanks for spotting that, out of curiosity, what MTA are you using?

Anyway, I believe this comes from the function check_sh_reverse. I now added a check for eventual trailing dots.

Let me know if it solves the problem for you

jhaar commented 5 years ago

yup - that fixed it

...and I'm old school - qmail-scanner in front of qmail :-)

ricalfieri commented 5 years ago

good, I'm tagging a new relese :)