Disabling sendmail relay access for certain IPs

From Brandonhutchinson.com

Revision as of 18:50, 4 October 2007 by Hutch (Talk | contribs)
(diff) ←Older revision | Current revision (diff) | Newer revision→ (diff)
Jump to: navigation, search

Situation: We allow relaying for a class C network in sendmail's access database, but want to prevent a few IP's (e.g., and in the class C from relaying mail.

e.g., /etc/mail/access:

192.168.1 RELAY

There are two solutions:

  • Explicitly list all IP's from the class C in access with a right-hand side value of RELAY.
  • List the IP's that are not allowed relay access in access with a right-hand side value of OK.

e.g., /etc/mail/access:

192.168.1. RELAY OK OK

From cf/README:

OK	Accept mail even if other rules in the running ruleset would reject it, for example, if the domain name is unresolvable.
       "Accept" does not mean "relay", but at most acceptance for local recipients. That is, OK allows less than RELAY.
Personal tools