Article ID: 315631 - Last Review: October 28, 2006 - Revision: 7.3 HOW TO: Forward Mail with Unresolved Recipients to a Single MailboxThis article was previously published under Q315631 On This PageSUMMARY This step-by-step article describes how to forward mail
with unresolved recipients to a single mailbox. 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. Creating and Configuring the Additional SMTP Virtual ServerTo create and configure the additional SMTP virtual server:
278529
(http://support.microsoft.com/kb/278529/EN-US/
)
XFOR: "Forward All Mail with Unresolved Recipients" Feature Does Not Work to All Hosts
For
additional information about general SMTP virtual server configuration options,
click the article number below to view the article in the Microsoft Knowledge
Base: 266686
(http://support.microsoft.com/kb/266686/EN-US/
)
XCON: How to Configure a SMTP Virtual Server Part 1
Using the New Project Wizard to Create the Microsoft Visual Basic ActiveX DLLTo use the New Project Wizard to create the Microsoft Visual Basic ActiveX DLL:
Registering the Event Sink on the New SMTP Virtual ServerTo register the sink, you need the file Smtpreg.vbs from the Exchange Software Developers Kit. Open a command prompt window, locate the \Exchsrvr\SDK\Support\CDO\Scripts folder, and then type (where X is the number of the virtual server where the sink will be registered):cscript smtpreg.vbs /add X OnArrival Q315631 Q315631.Rewrite "mail from=*" Make sure that you receive a message from the script that the
registration was successful.Testing the Event SinkTo test your sink, start a telnet session to the new SMTP virtual server instance, and then send a message to an arbitrary SMTP address. The mailbox that you specified in the program code should receive the test message. 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:153119
(http://support.microsoft.com/kb/153119/EN-US/
)
XFOR: Telnet to Port 25 of IMC to Test IMC Communication
Note that the event may not start for messages that
were sent by a Messaging Application Programming Interface (MAPI) client such
as Microsoft Outlook. Because of this, use telnet to test your sink.
For additional information, click the following article number to view the article in the Microsoft Knowledge Base:
273233
(http://support.microsoft.com/kb/273233/EN-US/
)
PRB: CDOEX: Cannot Change MAPI Message Contents in a CDO SMTP Event Sink
Unregistering the Event SinkTo unregister the event sink, run the following command at a command prompt (where X is the number of the virtual server where the sink is registered):cscript smtpreg.vbs /remove X OnArrival Q315631 For additional information about registering events with
Smtpreg.vbs, visit the following Microsoft Web site: http://msdn.microsoft.com/
(http://msdn.microsoft.com/)
Search for "smtpreg.vbs". If you run Smtpreg.vbs without
parameters, Help is displayed with all the parameters. | Article Translations
|

Back to the top
