HOW TO: Examine Relay Restrictions for Anonymous SMTP Connections and Filter Unsolicited E-mail Messages in Exchange Server 2003 (823157)



The information in this article applies to:

  • Microsoft Exchange Server 2003 Enterprise Edition
  • Microsoft Exchange Server 2003 Standard Edition

SUMMARY

This step-by-step article describes how to examine the default relay behavior of Exchange Server 2003 and how to configure a Simple Mail Transfer Protocol (SMTP) virtual server to filter unsolicited commercial e-mail.back to the top

Examine Relay Restrictions for Anonymous SMTP Connections

To see the default relay behavior of Exchange 2003, follow these steps:
  1. Click Start, click Run, type telnet, and then click OK.
  2. At the Microsoft Telnet command prompt, type set LOCAL_ECHO, and then press ENTER.
  3. Type open server_name 25, and then press ENTER.
  4. To verify that you are successfully connected to the ESMTP Mail Service, type helo domain.com, and then press ENTER.
  5. Type mail from: advertiser123@domain.com, and then press ENTER.
  6. Type rcpt to: recipient@another-domain.com, and then press ENTER.
    You receive the following error message:
    Unable to relay for Recipient@Another-Domain.com
  7. Type quit, and then press ENTER two times to close the connection to the server and leave the Telnet session running.
You can see that the default behavior for Exchange 2003 is to restrict the relay of messages to a recipient in another domain.back to the top

Filter Unsolicited E-mail Messages

You may want to filter unsolicited e-mail messages and prevent them from being sent to recipients in your domain. In these steps, the address *@domain.com is used as an example, and can be replaced by the address that you want to filter. Use the asterisk (*) wildcard character to filter e-mail messages from all senders in the specified domain.

To filter unsolicited e-mail messages, follow these steps:
  1. Click Start, point to Programs, point to Microsoft Exchange, and then click System Manager.
  2. Expand Global Settings, right-click Message Delivery, and then click Properties.
  3. Click the Sender Filter tab, and then click Add.
  4. In the Sender box, type *@domain.com, and then click OK.
  5. Click to select the Archive filtered messages check box.
  6. Click to select the Filter messages with blank sender check box, and then click Apply.
  7. In the Exchange System Manager dialog box, click OK, and then click OK.
  8. If the Display administrative groups option is turned on, expand Administrative Groups, and then expand First Administrative Group (where First Administrative Group is the name of your administrative group).

  9. Note To display administrative groups, right-click Your_Organization, click Properties, click to select the Display administrative groups check box, click OK two times, and then restart Exchange System Manager.
  10. Expand Servers, expand Your_Server, and then expand Protocols.
  11. Click SMTP, right-click Default SMTP Virtual Server, and then click Properties.
  12. On the General tab, click Advanced, click the address in the Address box, and then click Edit.
  13. In the Identification dialog box, click to select the Apply Sender Filter check box.
  14. Click OK three times, and then give the Metabase Update service some time to transfer the configuration changes to the Microsoft Internet Information Services (IIS) metabase.
  15. Open the Telnet session, type open Your_Server_Name 25, and then press ENTER.
  16. Type helo domain.com, and then press ENTER.
  17. Type mail from: sender@unfiltered-domain.com, and then press ENTER.
  18. Type rcpt to: administrator@Your_Server_Name.com, and then press ENTER.
  19. Type data, and then press ENTER.
  20. Type From: sender@unfiltered-domain.com, and then press ENTER.
  21. Type To: administrator@ Your_Server_Name.com, and then press ENTER.
  22. Type Subject: This is an unfiltered message, and then press ENTER.
  23. Press ENTER, type We are testing message filtering, and then press ENTER.
  24. Press ENTER, type a single period ( .), and then press ENTER to signal the end of message transfer. Note the response from the server that the message is queued for delivery.
  25. Type mail from: advertiser123@domain.com, and then press ENTER. The server returns a "Sender Denied" error message and immediately terminates the connection.
  26. Press ENTER, type Open server_name 25, and then press ENTER.
  27. Type helo domain.com, and then press ENTER.
  28. Type mail from: sender@unfiltered-domain.com, and then press ENTER.
  29. Type rcpt to: administrator@Your_Server_Name.com, and then press ENTER.
  30. Type data, and then press ENTER.
  31. Type From: advertiser123@domain.com, and then press ENTER.
  32. Type To: administrator@ Your_Server_Name.com, and then press ENTER.
  33. Type Subject: This is a filtered message, and then press ENTER.
  34. Press ENTER, type We are testing message filtering, and then press ENTER.
  35. Press ENTER, type a single period ( .), and then press ENTER to signal the end of message transfer. Note the response from the server that the sender is denied. You can find this filtered message as a .tmp file in the Exchsrvr\Mailroot\Vsi 1\Filter folder.
  36. Close the Telnet client program.
back to the top

Modification Type:MinorLast Reviewed:11/7/2005
Keywords:kbHOWTOmaster KB823157 kbAudITPRO