You can use event sinks to extend and modify the behavior of the Microsoft Windows 2000 Server and Windows Server™ 2003 SMTP service. Exchange 2003 requires the Windows 2000 or Windows Server 2003 SMTP service to function because most of the transport functionality in Exchange 2003 is accomplished with this architecture. Therefore, after you reinstall Internet Information Services (IIS) or the Windows 2000 or Windows Server 2003 SMTP service, you must also reinstall Exchange.
An SMTP service event is the occurrence of some activity within the SMTP service, such as the transmission or arrival of an SMTP command or the submission of a message into the SMTP service transport component. When a particular event occurs, the SMTP service uses an event dispatcher to notify registered event sinks of the event. When notifying event sinks, the SMTP service passes information to the sink in the form of Component Object Model (COM) object references.
The two general categories of SMTP service events are:
-
Protocol Events
Protocol events occur when SMTP commands are either received or transmitted over the network. These events occur when:
-
A client SMTP service or mail user agent uses SMTP to transmit messages for delivery to the local service.
-
The SMTP service relays messages to other SMTP services.
-
Transport Events
Transport events occur when the SMTP service receives a message, and that message passes through the SMTP core transport. During the passage through the transport, the message is categorized (examined and placed into categories), and then either delivered to a local storage location or, if it is not local, relayed to another destination.
The default Windows 2000 and Windows Server 2003 protocol and transport events are only accessible by writing Component Object Model (COM) objects in Microsoft Visual C++®. These events are fast, require no extra processing, and offer access to the lowest-level message properties; however, these events are more complex to write. For smaller jobs that do not require high performance, you can use the CDO_OnArrival event, which you can write using Microsoft Visual Basic® Scripting Edition (VBScript).
For more information about writing one of these event sinks, download the Platform SDK, or see the MSDN® developer program article Microsoft Windows 2000 SMTP Service Events.