slimta.util.ptrlookup

New in version 0.3.21.

When a client connects to the server, it is useful to know who they claim to be. One such method is looking up the PTR records for the client’s IP address in DNS. If it exists, a PTR record will map an IP address to an arbitrary hostname.

However, it is not usually desired to slow down a client’s request just because their PTR record lookup has not yet finished. This module implements a Greenlet thread that will look up a client’s PTR record will its request is being processed. If the request finishes before the PTR record lookup, the lookup is stopped.