Link to home
Start Free TrialLog in
Avatar of Fraser_Admin
Fraser_AdminFlag for Canada

asked on

Adding Disclaimer to Exchange 2003 problem

Okay in the MS KB article 317327 it claims  if you install the Exchange SDK tools then at \Exchange SDK\SDK\Support\CDO\Scripts folder contains the smtpreg.vbs file. It doesn't. In fact I have only "\exchange sdk\tools" no more directory like in the article.

I all ready have the .dll created but how to register I'm stuck

cscript smtpreg.vbs /add 1 OnArrival SMTPDisclaimer SMTPEventSink.Disclaimer "mail from=*@your-domain-here.com"

Open in new window

Avatar of Mitch1981
Mitch1981
Flag of Italy image

Hi,
I would recommend a 3rd party product called exclaimer

 http://www.exclaimer.com/products/exchange-email-disclaimers/gclid/clgy0lsxvpocfqogegodfhy4rg.aspx

it works seemlessly and allows you to change disclaimer very easily.
Or GFI Mail Essential that have this function without purchase the license.
Avatar of Fraser_Admin

ASKER

Mitch1981 I have the script all ready it's registering I am having the problem with.
StevenWells99 - third party software is too pricy . As mentioned to Mitch our programmer made the .dll up all ready with our disclaimer attached. The problem is with the sdk tools. I cannot seem to locate the cscript smtpreg.vbs
Is there another version or am I not understanding something here.
Mitch1981 are you certain of the licensing? Which version?
the smtpreg.vb script is actually in the link
http://msdn.microsoft.com/en-us/library/ms528023(EXCHG.10).aspx

you need to copy and paste into notepad and rename as smtpreg.vbs
to load your dll write script as per snipped
put your vbs file you created in the c drive c:\
type cmd to open command prompt and type as follows:
cscript x:\smtpreg.vbs /add 1 OnArrival SMTPDisclaimer SMTPEventSink.Disclaimer "mail from=*@your-domain-here.com"
 

Open in new window

last post should be c:\ drive, not x:\ sorry, too late here. You will also need to check doc how to point to your DLL file too.
Steve, If I put both files at the root or in the same folder and execute this code you sent then it should pick it up providing I have it looking for the same file as named in the code?
yes. From memory, it's best to create a script folder so the dll and script remain there and don't get deleted  (especially if you have to change it in 2 years !)
I think you have to reference the dll in the script command some where too.
Ok Steve, I saved the code as .vbs and put it in the same folder as the .dll
At a command prompt I typed the command to register and it gave me this error

smtpreg.vbs(1, 11) Microsoft VB Script compilation error: Expected Statement
might pay to double check you copied the complete code statement from the website. ie no missing lines. Click the copy code button perhaps
Yahh verifying now...Is the command case sensative?
So far I have done the following:
1.verified the code you sent and added my domain to the end. Saved it as .vbs on the root of C of the exchange server
2. redsvr32 EventSink.dll at the root. It said it was successful
3. Verified at command prompt This is exactly how I typed it
c:\cscript smtpreg.vbs /add 1 OnArrival SMTPDisclaimer SMTPEventSink.Disclaimer "mail from=*@mydomain.com"

I know this is stupid but I have created a .vbs using the code you sent and at the command prompt I enter the code again to try executing what?
this code

c:\cscript smtpreg.vbs /add 1 OnArrival SMTPDisclaimer SMTPEventSink.Disclaimer "mail from=*@mydomain.com"


let me do some research and get back to you.
I have done some research for this question and found the following.
this article talks about creating the dll and registering it.

http://support.microsoft.com/kb/317327

with the above option you must ensure the dll is named disclaimer. I dont' think you need to regsvr the dll as that part is not mentioned.

this command
cscript smtpreg.vbs /enum
will list what you have already bound.

from memory, this is the one that I used, which is using a vb file with the disclaimer already built in and is used on the smtp on arrival part. You will need to write out your disclaimer in html in the script.
You actually still need the smtpreg.vbs script and then you register the eventsinkscipt too.
this may be another option
http://support.microsoft.com/?kbid=317680

You may just have to experiment with what works best. Remember some only work when you email externally out of your exchange environment.  The script also needs to be loaded on your exchange server that faces the internet (bridgehead)

good luck. If you get stuck it may be work looking at other options as per above, especially if you are processing large amounts of email.
You may also look to read through this post for some background reading:

https://www.experts-exchange.com/questions/21762208/Corporate-Wide-Email-disclosure.html
Thid is my original problem "To register the event sink, use the Smtpreg.vbs file that is installed with the Exchange software development kit (SDK)." I cannot locate this file in the ExchangeSDK tools.
Therefore I cannot do this "At a command prompt, locate the \Exchange SDK\SDK\Support\CDO\Scripts folder, and then type the following: cscript smtpreg.vbs /add 1 OnArrival SMTPDisclaimer SMTPEventSink.Disclaimer "mail from=*@your-domain-here.com"
Do you know of a particular MS link that has the SDK tools containing this file smtpreg.vbs?
ASKER CERTIFIED SOLUTION
Avatar of Steven Wells
Steven Wells
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I installed this version of the sdk tools. It has the right stuff this time. I then copied the smtpeventsink.dll to the same location as the  smtpreg.vbs. In a command window I ran this command cscript smtpreg.vbs /add 1 OnArrival SMTPDisclaimer SMTPEventSink.Disclaimer "mail from=*@mydomainhere.com" (of course I used my own domain name) This time I got these results assigning priority (28010 of 32767)
registered smtpdisclaimer

however, If I send a test mail to my gmail account no disclaimer appears. Does an Exchange service need to be restarted?
Hi,
this is where it gets interesting. The store probabaly doesn't need restarting, however, you may need to check your dll to ensure the correct information has been entered. As mentioned above the dll may need to be named "disclaimer.dll".