Listing 1. Example Rule Set
# Allow from 10.0.0.0/8 only if they are from
# *foo.bar.com to send to all...
allow:10.0.0.0/8:*foo.bar.com:ALL
# alternatively, can be written as
# allow:10.0.0.0/8:ALL@*foo.bar.com:ALL
# Allow relays from the mail hub (10.0.0.9) to
# domains that we host mail for
allow:10.0.0.9:ALL:*barf.bar.com
allow:10.0.0.9:ALL:*bonk.bar.com
# Prevent from 10.0.0.0/8 if they use other than
# *foo.bar.com to prevent cases when internal users
# used forged domain name to send out.
deny:10.0.0.0/8:ALL:ALL:551 Forging of e-mail\
Denied - %F from %H(%I) to %T
# Prevent these sites from sending to us
deny:ALL:*@spam.r.us *@spammer.com:ALL
# Allow incoming mail to our domains
allow:ALL:ALL:*foo.bar.com
# Prevent relaying through our server ...
noto:ALL:ALL:ALL:551 Relaying Denied - %F from\
%H(%I) to %T
# Just to add some delays to the relayers...
#noto_delay:ALL:ALL:ALL:551 Relaying Denied - %F\
from %H(%I) to %T
Copyright © 1994 - 2018 Linux Journal. All rights reserved.