XFOR: Preventing the IMS from Relaying UCE messages

ID: Q193922


The information in this article applies to:

IMPORTANT: This article contains information about editing the registry. Before you edit the registry, make sure you understand how to restore it if a problem occurs. For information about how to do this, view the "Restoring the Registry" Help topic in Regedit.exe or the "Restoring a Registry Key" Help topic in Regedt32.exe.

SUMMARY

Administrators of Microsoft Exchange Server version 5.5 have the ability to prevent their server from acting as a relay host for Unsolicited Commercial E-mail (UCE) messages.


MORE INFORMATION

WARNING: Using Registry Editor incorrectly can cause serious problems that may require you to reinstall your operating system. Microsoft cannot guarantee that problems resulting from the incorrect use of Registry Editor can be solved. Use Registry Editor at your own risk.

For information about how to edit the registry, view the "Changing Keys And Values" Help topic in Registry Editor (Regedit.exe) or the "Add and Delete Information in the Registry" and "Edit Registry Data" Help topics in Regedt32.exe. Note that you should back up the registry before you edit it. If you are running Windows NT, you should also update your Emergency Repair Disk (ERD).

When the Internet Mail Service is installed, it is configured by default to allow rerouting for POP3 and IMAP4 clients. This rerouting is found on the Routing tab of the Internet Mail Service object. The Internet Mail Service accepts and relays mail to non-local recipients. Message relaying occurs when a client or remote SMTP server connects to the Internet Mail Service and submits messages for non-local recipients. If the Internet Mail Service does not restrict relay messaging, it can be used to relay UCE messages.

If your configuration prevents the client from relaying mail, SMTP RCPT (receipt) commands specifying a non-local recipient are refused with a "550 relaying prohibited" response.

Relay restrictions are configured within the registry using values in the following registry key:


   HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Service\ 
    MSExchangeIMC\Parameters. 

The following examples outline the value, the data type, and the function it performs. After the changes have been made, the Internet Mail Service should be stopped and restarted.

   RelayFlags, REG_DWORD 
Defines which relay control rules are in effect.

   RelayDenyList, REG_MULTI_SZ 
Specifies hosts that cannot relay messages through your server.

   RelayAllowList, REG_MULTI_SZ 
Specifies hosts that can relay messages through your server.

   RelayLocalIPList, REG_MULTI_SZ 
Specifies the local IP addresses of the server to which an SMTP client can connect and relay mail. This is useful for multi-homed servers that have internal and external interfaces. Enabling IP- forwarding disables this feature.
NOTE: RelayDenyList, RelayAllowList, and RelayLocalIPList consist of a net address and optional mask per line. Order is not important in these lists. Each line consists of two parts, the net address and the mask, separated by a semicolon. For example:
Net[;mask]
If the mask is omitted, the default used is 255.255.255.255.

A net address matches a rule if the bitwise-AND of the IP address and the mask equals the net. That is:
(IP Address AND mask) = net
Examples:

What follows is the logic used to determine if the client can relay mail. If none of these apply, the client will not be allowed to relay.

Examples:

The Internet Mail Service must be stopped and restarted in Control Panel, Services for these registry settings to take effect after they are created or modified.

When a message is denied for relay through the Internet Mail Service, an event is logged to the Application Event Log if the SMTP Interface Events diagnostics logging category is set to minimum or a higher logging level using the Internet Mail Service Diagnostic Logging property page. The event will indicate the sender's IP address, sender's host name (if available), the sender's authentication account (if authentication was used), and the recipient address for the message.

Exchange Server version 5.5 Service Pack 1 (SP1) gives the administrator the ability to configure these options through the Routing tab on the properties of the Internet Mail Service (IMS) object.

Additional query words: XADM anti spam anti-spam


Keywords          : 
Version           : winnt:5.5
Platform          : winnt 
Issue type        : kbinfo 

Last Reviewed: April 20, 1999