MX patch
2014-10-03 by Rudy Eschauzier
Attached patch fixes a minor issue in the MX functionality of milter-greylist.
The MX function compares the sending IP address to the IPs of the mail servers that are listed for the sender domain. In other words, if an email comes from nobody@nowhere.com, the feature looks up the MX servers for the nowhere.com domain and compares the IP addresses of those MX servers to the IP address of the host that contacts our MTA for delivering the message. Since the IPs are compared based on a customizable CIDR subnet mask, the comparison is an effective way to identify legitimate mail servers for (small) domains, that have their incoming and outgoing machines run on the same subnet.
The bug that the patch fixed shows up when an MX servers' IP address comes up empty. In those cases milter-greylist stops looking for other hosts and IP addresses. Instead, it should continue to look for all available MX servers and corresponding IP addresses. With the patch, milter-greylist is not troubled by empty A records anymore.
Regards,
Rudy Eschauzier