sendmail access.db by example

The sendmail access database file can be created to accept or reject mail from selected domains.

Since "/etc/mail/access" is a database, after creating the text file, use makemap to create the database map.

# makemap hash /etc/mail/access.db < /etc/mail/access

Below is what my access file currently looks like and can be used as a starting point. All internal addresses have been changed except for spammers!!

# by default we allow relaying from localhost...
localhost.localdomain           RELAY
localhost                       RELAY                       RELAY

# Allow Connect from local server IPs
Connect:   OK

# Accept Mail
# accept mail from PayPal      OK

# Reject Mail     REJECT REJECT                 REJECT                     REJECT REJECT                   REJECT

# Discard Mail  DISCARD
# forum admin mails:         DISCARD

# Reject full mailbox ERROR:4.2.2:450 mailbox full REJECT

# Blacklist recipients ERROR:550 That host does not accept mail

# Spam friend domains: exempt domains from dnsbl list checking      FRIEND

# Spam friend users: exempt email users from dnsbl list checking
# example:
# Spam:user@domain.tld         FRIEND
# clients  FRIEND

# Auto REJECT via hourly cron added below

Syndicate content