19.3.4.The Virtuoso Mail Sink

The Virtuoso Sink is used to store messages received by Windows 2000 IIS SMTP Service into the MAIL_MESSAGES table in Virtuoso. It consists of an executable, run as a service, and a VBscript for registering a COM object with the IIS, interfacing it with the Virtuoso Sink

The User ID(s) in MAIL_MESSAGES to whom the message belongs to is determined by parsing the To: field in the mail message into a list of recipients. For each entry in the list, if an @-sign is found, the user ID will consist of the characters to the left of it, otherwise the whole entry is used.

Registry Entries for the Virtuoso Sink.

<<<<<<<< VirtuosoSink.reg
REGEDIT4

[HKEY_LOCAL_MACHINE\SOFTWARE\OpenLink Software\VirtuosoSink]
"User"="dba"
"Password"="dba"
"DSN"="Virtuoso"
"ConnectionCount"=dword:00000001
>>>>>>>> VirtuosoSink.reg

These are the registry entries used by the Sink service. ConnectionCount is the number of connections to Virtuoso to be pooled.

Installation

Use these commands to install the Virtuoso Sink:

VirtuosoSink /RegServer Registers the COM Object VirtuosoSink.SMTP into the registry
VirtuosoSink /Service Creates the Service in Manual start mode
cscript smtpreg.vbs /add 1 OnArrival Virtuoso_SMTP_Sink VirtuosoSink.SMTP "mail from=*" - Registers the COM Object as a mail sink with the IIS SMTP service.
[Tip] See Also:

The MSDN page for more information about registering sinks.

Sink Operation

When the service starts it opens a pool of connections to Virtuoso and waits for a COM event. When the COM callback gets called, the service invokes a stored procedure and passes the message text to it. The procedure then stores the message into the database. In event of lost connection to the database, the service would try once to re-establish it and re-execute the stored procedure call. Errors and successful message routings are entered into the Windows 2000 Application Log.