Protocol event sink sounds good, but I don't have the skillset to
develop it, nor does anyone on my staff at the current time.  Perhaps in
the future I Can go to that, but I'm in a pinch to get something in
place within the next day or so.

Since I don't really know what I'm looking for, I had a hard time
finding resources with the variables related to the sub routine used for
an smtp event sink.  Do you have any links I could check out for that
information, and one for an SMTP protocol event sink?


-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of
Chris Scharff
Sent: Tuesday, November 22, 2005 9:19 PM
To: Exchange Discussions
Subject: RE: SMTP Event Sink help


If $sender is always external this could be completed with an SMTP
protocol event sink. That allows you to return a custom response (i.e.
550 you do not have permission to send to this recipient) without having
to take delivery of the mail. If the users in question are members of a
DL you'll either need to do an additional LDAP query to make sure they
are not members of the DL. If they are members of a DL and you do need
this validation, but don't want to make the query yourself[0] you would
need to use a post categorizer event sink as it's not until that point
that the full list of recipients is available.[1]

A protocol event sink would be the cleanest way to implement this[2],
but probably not the easiest. 

Not sure that helps but hopefully it gives you some ideas. 

[0] Or if $sender is not always external. 
[1] Well, technically that's not true it's available at the categorizer
level, but in general I think post-cat event sinks are probably easier
to write than cat event sinks. 
[2] Always prefer to stop a message before it's transferred if possible.


Chris Scharff
Messaging Services Architect
MessageOne

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Evan
Mann Posted At: Tuesday, November 22, 2005 5:55 PM Posted To: swynk
Conversation: SMTP Event Sink help
Subject: SMTP Event Sink help

Anyone good with SMTP Event Sinks?  Here's what I'm trying to
accomplish:

If e-mail is sent TO [EMAIL PROTECTED] OR [EMAIL PROTECTED] and it's
NOT from [EMAIL PROTECTED] then dump the mail.

Ideally, dump the mail means reject it and send the user an
undeliverable response of some kind.  But in reality, it could be as
simple as send the mail to badmail.

I came up with this script, but am looking for some validation on if I'm
using the correct msg variables and if it's the proper way to do this.
This dumps to badmail, because I really don't know how to do anything
else. I hacked up a sample script off MS's site as it is

<SCRIPT LANGUAGE="VBScript">

Sub IEventIsCacheable_IsCacheable()
        'To implement the interface, and return S_OK implicitly
End Sub

Sub ISMTPOnArrival_OnArrival(ByVal Msg, EventStatus)
        Dim envFlds
        Set envFlds = Msg.EnvelopeFields

        'Check to see if the e-mail send to the mailbox has efax.com in
the senders domain
      If ((Msg.To = "[EMAIL PROTECTED]") or (Msg.To =
"[EMAIL PROTECTED]")) 
        and InStr(1, Msg.From, "sender.com") = 0 Then
                'Do not deliver, place message in the Badmail directory.
                envFlds
("http://schemas.microsoft.com/cdo/smtpenvelope/messagestatus";) = 3
                envFlds.Update  'Commit the changes of the message
status 'Skip remain event sinks
                EventStatus = 1
        End If
End Sub

</SCRIPT>

_________________________________________________________________
List posting FAQ:       http://www.swinc.com/resource/exch_faq.htm
Web Interface: http://intm-dl.sparklist.com/read/?forum=exchange
To subscribe: http://e-newsletters.internet.com/discussionlists.html/
To unsubscribe send a blank email to
[EMAIL PROTECTED]
Exchange List admin:    [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at: Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.




_________________________________________________________________
List posting FAQ:       http://www.swinc.com/resource/exch_faq.htm
Web Interface: http://intm-dl.sparklist.com/read/?forum=exchange
To subscribe: http://e-newsletters.internet.com/discussionlists.html/
To unsubscribe send a blank email to
[EMAIL PROTECTED]
Exchange List admin:    [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at: Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.


_________________________________________________________________
List posting FAQ:       http://www.swinc.com/resource/exch_faq.htm
Web Interface: http://intm-dl.sparklist.com/read/?forum=exchange
To subscribe: http://e-newsletters.internet.com/discussionlists.html/
To unsubscribe send a blank email to [EMAIL PROTECTED]
Exchange List admin:    [EMAIL PROTECTED]
To unsubscribe via postal mail, please contact us at:
Jupitermedia Corp.
Attn: Discussion List Management
475 Park Avenue South
New York, NY 10016

Please include the email address which you have been contacted with.

Reply via email to