Registering Bindings

Registering Bindings

You can use the smtpreg.vbs and nntpreg.vbs scripts to bind transport event sink bindings. The syntax for using the script is as follows:

Syntax

cscript [smtpreg | nntpreg].vbs
                   /add
                   instance 
                   event
                   display name 
                   progid
                   rule
  • instance
    The number of the NNTP or SMTP virtual server instance; for example, 1.
  • event
    The event for which you are registering the sink. For the SMTP event service, the value must be OnArrival. For the NNTP event service, the values are OnPost, OnPostFinal, and OnPostEarly. These values are case-insensitive. Quotes around the name are optional.
  • display name
    The display name of the sink. When using the scripts, each binding should have a unique display name for each virtual server instance and event. The display names are case-sensitive. Use quotes around the name if it contains spaces.
  • progid
    The programmatic identifier or class identifier (CLSID) (in string-registry format) for the sink to register. This identifier is used to create an instance of the sink COM class. The sink implementers must properly register the COM class on the local computer. Quotes around the value are optional.
  • rule
    The protocol rule that must be satisfied for the sink to be invoked. The most common values are "mail from=*" or "newsgroups=*". See Using Protocol Rules in Bindings. Use quotes when setting the protocol rule.

Example

cscript smtpreg.vbs /add 1 onarrival MyGeneralSink MyStuff.MySink  "mail from=*"
cscript nntpreg.vbs /add 1 onpost    MyPostSink   MyStuff.MySink2 "newsgroups=*"