SMTP ENVELOPE INFO SCRIPT
=======================================

Copyright  2003. Vamsoft Ltd. All rights reserved.

THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
ANY KIND, EITHER EXPRESSED OR IMPLIED,  INCLUDING BUT NOT LIMITED
TO THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
PARTICULAR PURPOSE.

This code is free for both personal and commercial use,  but you
are expressly forbidden from selling.

The file "smtpreg.vbs" is provided by Microsoft. For its
licensing, please view the file source.

Programmed by:
Peter Karsai, Vamsoft Ltd. (peter.karsai@vamsoft.com)


WHAT IS THIS?
=============
This is an SMTP transport event sink script that inserts the actual
(SMTP) envelope sender, recipient and client IP address to the
mail header.

You may find this script useful when you want to blacklist a sender
or IP address of a message with Open Relay Filter Enterprise Edition.


MAIL HEADER FIELDS
==================
* SMTP envelope sender address : X-Envelope-From
* SMTP envelope recipient list : X-Envelope-To
* SMTP client IP address       : X-Received-From-Address


INSTALLATION
============
Unzip the package to a directory on the server you run the Microsoft IIS
SMTP Service or Exchange 2000.
Go to command prompt and enter to that directory.

To register the event sink, type:

  cscript smtpreg.vbs /add 1 onarrival SmtpEnvlIns
    CDO.SS_SMTPOnArrivalSink "rcpt to=*@somewhere.com;rcpt to=*@somewhere.net"

where somewhere.com and somewhere.net are your domains. You can just
apply the rule "rcpt to=*", but this may result in running the script
also for your outgoing mails.

Then run the following command:

  cscript smtpreg.vbs /setprop 1 onarrival SmtpEnvlIns Sink ScriptName 
    "<path_to_scriptfile>"

where <path_to_scriptfile>" is the full path and name of the script file, e.g.
  "c:\eventsinks\smtpenvl.js".


UNINSTALLATION
==============
If you to remove the script registration, go to command prompt and enter
to the directory you have extracted the archive to and type:

  cscript smtpreg.vbs /remove 1 onarrival SmtpEnvlIns