FEATURE(dnsbl)
The FEATURE(dnsbl)
is used to enable the blocking of email from open
relay sites, dial-up sites, or known spamming sites.
It does so by invoking the rbl
technique discussed in the previous
section. The feature is included in your
mc configuration file like
this:
FEATURE(dnsbl) ← simple form FEATURE(dnsbl, `optional arguments') ← declared with arguments
In its simplest form, when mail arrives from a site, that site’s IP address is reversed and prefixed to the default host blackholes.mail-abuse.org.[125] If the lookup succeeds, the host is considered bad and the following error is sent in reply to the initial connection:
550 5.7.1 Rejected: IP listed at blackholes.mail-abuse.org
If the address is not found, the connection is allowed and the mail is accepted depending on subsequent SMTP and header checks. By default, temporary failures are ignored and the connection is treated as good. If you wish temporary failures to cause the sending site to defer the message, you can supply a third argument such as this:
FEATURE(dnsbl, , ,`t')
If the third argument is a literal t
character, instead of
ignoring temporary errors, the following will be
returned:
451 Temporary lookup failure of IP at blackholes.mail-abuse.org
An argument can be supplied to this feature if you
wish to use a lookup host other than, or in addition
to, blackholes.mail-abuse.org.
The canonical name of the lookup host is simply
inserted following a comma after the literal
dnsbl
:
FEATURE(dnsbl,`dialups.mail-abuse.org') ...
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.