Using HACK(relaycontrol) in your .mc file This is a brief summary of the customization options used with HACK(relaycontrol). For more general information on what this does and how it works see: http://hexadecimal.uoregon.edu/antirelay/ Default values are shown for optional items in the examples below. define(`confRELAYS', `') Optional. Define the initial contents of class R in sendmail.cf. Class R lists hosts or domain names (see HACK(r_domains) below) that you will relay mail to, and maybe also hosts or domains you will permit unlimited relaying from (see HACK(r_clients) below). define(`confCR_FILE', `-o /usr/local/etc/sendmail.cR') Optional. Specify the location of the file that defines/extends class R. define(`RELAY_TO_DOMAIN', `hash -o /usr/local/etc/relay_to_domain') define(`RELAY_TO_IP', `hash -o /usr/local/etc/relay_to_ip') define(`RELAY_FROM_DOMAIN', `hash -o /usr/local/etc/relay_from_domain') define(`RELAY_FROM_IP', `hash -o /usr/local/etc/relay_from_ip') Optional. Specify types and locations of the relay permission databases. define(`RELAY_ERROR', `5.5.1') define(`RELAY_MESSAGE', `"551 Relaying denied"') Optional. Use to specify the SMTP error code and error message output when relaying is denied. HACK(use_cr_file) Optional. Read a file to define/extend class R. HACK(r_domains) Optional. If included, items in class R will match any host in a domain rather than strictly matching host names (i.e. if "domain.com" is in class R and HACK(rdomains) is used, then "domain.com" will match "domain.com", "host.domain.com", etc.). HACK(r_clients) Optional. If included, client host or domain names will be checked against class R and allowed to relay if they match. Otherwise class R specifies only who you will relay TO, not who you permit relaying FROM. HACK(class_a_relay) Optional. If included, single-octet class A IP addresses will be matched on the left when checking relay permissions (i.e. 24 will match 24.*.*.*). Otherwise IP addresses must be specified and matched with at least two octets on the left (i.e. 128.223.*.*). HACK(relaycontrol) Defines check_rcpt ruleset and its dependent local configuration options, customized using the above defines/HACKs.