< Previous Page Return to Title Page Next Page >

Sendmail access_db Examples

# Access control database. This database overrides the policies set by
# FEATURE(`relay_entire_domain'), FEATURE('relay_based_on_MX'), and
# blacklists. Records match connecting host, envelope MAIL FROM:,
# and/or envelope RCPT TO: (if FEATURE(`blacklist_recipients') is on). 
#
# Domain names in this file refer to hosts if FEATURE('relay_hosts_only')
# is activated and entire domains or subdomains otherwise.
#
# Block most traffic to/from spamhaven.net but exempt innocent customer.
# The "OK" overrides any DNS blacklists that might be in use.
spamhaven.net                     REJECT
innocent.bystander.spamhaven.net  OK
#
# Customized rejection messages for specific situations
cyberpromo.com                    550 Nice try, Spamford
#
# Block messages from this user name in any domain. With
# FEATURE(`blacklist_recipients') enabled, block mail to it as well.
FREE.STEALTH.MAILER@              550 Stealth mailer detected by radar
#
# Relay mail from internal workstations using reserved IPs. (Do not
# relay to them, however.) "Connect:" tag, not "From:" tag, is used
# to control relaying of mail coming from a host or domain. To: tag 
# controls relaying to a host or domain.
Connect:192.168.0                 RELAY
#
# Silently discard mail from an annoying user. "From:" tag
# filters on "envelope From:" (RFC 821 MAIL FROM:). This tag
# should be used only to reject or discard mail, since the
# RFC 821 MAIL FROM: can be spoofed.
From:kvetch@aol.com               DISCARD
#
# Discard mail to local user joe who is no longer with the company. If
# there are other local recipients, they still get the mail! "To:" tag
# requires FEATURE(`blacklist_recipients') to work.
To:joe@ourdomain.com              DISCARD