FEATURE(require_rdns)—V8.14 and Later

When a client machine connects to your sendmail server, sendmail records the IP address of the connecting client in the ${client_addr} macro (${client_addr} on page 810). Next, sendmail looks up that IP address (performs a reverse DNS lookup of that address) to find the client’s hostname. The status of that lookup is stored in the ${client_resolve} macro (${client_resolve} on page 814). This FEATURE(require_rdns) rejects connections from clients for whom the reverse lookup fails.

You declare this FEATURE(require_rdns) like this:

FEATURE(`require_rdns')

If you declare this feature, the following logic will be performed as the last step under basic relay checks:

  • If the value in ${client_addr} is also in the RELAY_DOMAIN (The RELAY_DOMAIN mc macro on page 269) or the RELAY_DOMAIN_FILE (The RELAY_DOMAIN_FILE mc macro on page 269) list of domains and hosts for which to relay, the connection is allowed to relay, and no further checking is done by this feature.

  • If the result of the lookup (the value in the ${client_resolve} macro) is the literal OK, the address is accepted and any additional relay checks are performed.

  • If the result of the lookup (the value in the ${client_resolve} macro) is the literal FAIL, the following error is returned in the SMTP transaction and the connection is disallowed:

    550 5.7.1 Fix reverse DNS for failed IP address here
  • If the result of the lookup (the value in the ${client_resolve} macro) is the literal TEMP, the following error ...

Get sendmail, 4th Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.