Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion GroupsWindows Server 2003Windows 2000Windows NTSmall Business ServerVirtual ServerExchange ServerIISHost Integration ServerISA ServerSMSWSUSMOMWindows Media ServerSecurityCertification
Related Topics
SQL ServerMS WindowsMS OfficePC HardwareMore Topics ...

Windows Server Forum / Exchange Server / Development / July 2008

Tip: Looking for answers? Try searching our database.

smtp Sink problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
MeJean - 23 Jun 2008 15:38 GMT
Hello,

I created a small test sink but I can't get it to work:

The script :

<SCRIPT LANGUAGE="VBScript">
Sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus)
on error resume next
 Dim fs
 Set fs = CreateObject("Scripting.FileSystemObject")
 Dim file
 Set file = fs.OpenTextFile("C:\sink\sinktest.txt", 8, True )
 file.Write "From: " & Msg.From & VbCrLf
 file.Write "To: " & Msg.To & VbCrLf
 file.Close

EventStatus = 1
End Sub
</SCRIPT

the commands I've used to implement it:

@Echo Off

REM *********** The following 2 lines install the Event Sink to log SMTP
Messages ***********

Cscript smtpreg.vbs /add 1 onarrival testandsafe CDO.SS_SMTPOnArrivalSink
"mail from=*"
Cscript smtpreg.vbs /setprop 1 onarrival testandsafe Sink ScriptName
"C:\sink\smtpsink.vbs"

REM ***** Remove the 'REM' tag from the following line *****
REM ***** If you want to deinstall the Event Sink again *****
REM cscript smtpreg.vbs /remove 3 onarrival SMTPMessageCheck
                   

I'm using Blat to send a mail but de sink does not fire up and I don't see
the file created....

is there someone that can help?

Thanks,
Jan
Glen Scales [MVP] - 24 Jun 2008 08:11 GMT
Make sure the System process has access the folder where you trying to write
the log file to.

You might want to do an enum of the sinks registered on this Server maybe
someone has registered a sink that is running before it that is not allowing
further
sinks to run

cscript smtpreg.vbs /enum

Do you have any file level Antivirus software running on the server maybe
this could be preventing it running the vbs check any assoicated logs.

Although it shouldn't make a difference you could trying registering you
sink with the rule Rcpt To=* instead of mail from

CheersGlen

> Hello,
>
[quoted text clipped - 40 lines]
> Thanks,
> Jan
MeJean - 02 Jul 2008 11:07 GMT
I do see: an extra entry:
---------
                      | Binding |
                       ---------
                                  Event: SMTP Transport OnSubmission
                                     ID:
{92DE29D2-A8AA-4A82-B8AA-657CF32A67C8}
                                   Name: Exchange Transport AntiVirus API
                              SinkClass: Exchange.TransportAVAPI
                                Enabled: True
                       SourceProperties: {
                                          priority = 28000
                                         }
                       ---------
                      | Binding |
                       ---------
                                  Event: SMTP Transport OnSubmission
                                     ID:
{B1CA5665-3E8A-4A4C-AACA-78F727D6D237}
                                   Name: testandsafe
                              SinkClass: CDO.SS_SMTPOnArrivalSink
                                Enabled: True
                       SourceProperties: {
                                          Rule = mail from=*
                                          Priority = 24575
                                         }
                       SinkProperties    {
                                          ScriptName = C:\sink\smtpsink.vbs

but not sure that this will be a problem
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.