In Exchange 2000, you can configure any Simple Mail Transfer Protocol (SMTP) virtual server to forward all the mail with unresolved recipients to a single host, but you cannot have all such mail sent to a single mailbox.
However, to work around this limitation, you can create an additional SMTP virtual server, forward all the mail with unresolved recipients to the additional SMTP server, and then use an event sink on the server that rewrites the recipient address.
- Create an additional SMTP virtual server.For additional information about how to create an additional SMTP virtual server, click the article number below to view the article in the Microsoft Knowledge Base: 303707 HOW TO: Create Additional SMTP Virtual Servers in Windows 2000
- Configure the default SMTP virtual server to forward all the mail with unresolved recipients to the new virtual server:
- In Exchange System Manager, click the default SMTP virtual server.
- On the Action menu, click Properties.
- Click the Messages tab, and then type the IP address (in square brackets ) in the
Forward all mail with unresolved recipients to host box.
- Click OK or Apply to save the setting.
For additional information about this issue, click the article number below to view the article in the Microsoft Knowledge Base:
- Start Microsoft Visual Basic version 6.0.
- On the File menu, click New Project, click ActiveX DLL, and then click OK.
- On the Project menu, click Project1 Properties. Change the Project Name to Q315631, change the name of the Class module to Rewrite, and then click OK.
- Paste the following code in the module:
Private Sub IEventIsCacheable_IsCacheable()
' Only returns S_OK.
Public Sub ISMTPOnArrival_OnArrival(ByVal iMsg As CDO.Message, EventStatus As CdoEventStatus)
Dim Flds As ADODB.Fields
Dim RecipListFld As ADODB.Field
Dim strRecipList As String
' Get Current Recipient List.
' Because this has come to this second virtual server, this should only be "unresolved" recipients.
Set Flds = iMsg.EnvelopeFields
Set RecipListFld = Flds("http://schemas.microsoft.com/cdo/smtpenvelope/recipientlist")
' Update the recipient list to be the user who you want.
' The recommendation here is to create a mailbox that is called "firstname.lastname@example.org", and then give the appropriate
' user permissions on the mailbox.
RecipListFld.Value = "SMTP:email@example.com;"
' Note that the content of the message does not change. Doing so would require that a determination
' be made about the type of message (plain text, HTML, or TNEF), and then the appropriate action would have to be taken.
' This can be difficult, and potentially problematic if certain fields do not exist.
- Replace the value of the "RecipListFld.Value" string with the address of the mailbox that you want to forward the e-mail messages to.
- On the Project menu, click References. Make sure that the following references are checked:
- Microsoft CDO for Exchange 2000 Library
- Microsoft ActiveX Data Objects 2.5 Library
- Server Extension Objects COM Library
- Save the project.
- On the File menu, click Make Q315631.dll, and then click OK.
- Copy the file Q315631.dll to the Exchange 2000 server.
- Register the file by typing regsvr32 q315631.dll at a command prompt.
X is the number of the virtual server where the sink will be registered):
For additional information about how to use telnet on port 25, click the article number below to view the article in the Microsoft Knowledge Base:
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
ID articol: 315631 - Ultima examinare: 27 oct. 2006 - Revizie: 1