You are here:   Blog
Register  |  Login
 Sponsored Links
 View_Blog

[04/03/2009] This article was written long time ago (as you see in the date) to my original web site http://www.gomori.hu. Because I will use this site further for family purposes only I'm migrating the IT related articles out.

I tried to deploy Microsoft Windows Server 2003 POP3 Service, but I've realized lack of two important (at least it important to me) features. These are the Autoforward and the mail Alias (the ability to add more than one e-mail address to a single mailbox). Because I needed these functions for the deployment I wrote a script witch add them to the POP3/SMTP service.
I implemented the functions as SMTP Event Sink in JScript.
It uses an Access database (Microsoft Jet engine) to store the data required for the implementation. The database has two tables:
Alias Table:

Column Data
ID An autoincrement id field. Not used in this implementation.
Alias The alias address.
Mail The original mail address.
Forward Table:
Column Data
ID An autoincrement id field. Not used in this implementation.
Mail The original mail address.
Forward Forward address(es). Multiple addresses allowed
KeepOriginal Determine if the mail have to delivered to the original mailbox or not.
All e-mail fields need to be in SMTP:name@domain format. Where multiple addresses allowed, it must be separated with semicolon.
In the script code you must change the the DBfile variable's value to the full path name to the location of the database file used.
Registration: The registration procedure involve the same procedure as any other SMTP OnArrival Event Sink. The exact commands looks like the following:

cscript smtpreg.vbs /add 1 OnArrival
	Pop3Helper CDO.SS_SMTPOnArrivalSink "mail from=*"
cscript smtpreg.vbs /setprop 1 OnArrival
	Pop3Helper Sink ScriptName "c:\Scripts\SMTP\pop3.js"

Fortunately with this solution you don't need to create a second SMTP Virtual Server and route all messages thru it because the message is always in MIME format witch means no MAPI/MIME conversion involved.
Finally here is the script code can be downloaded here.

 Search_Blog
 PayPal