IIS and SMTP - OnInboundCommand EventSink doesn't work as expected

This is Interesting: Free IT Magazines  
Home > Archive > IIS and SMTP > February 2005 > OnInboundCommand EventSink doesn't work as expected





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author OnInboundCommand EventSink doesn't work as expected
piotr

2005-02-10, 7:51 am

Hi
I have created (C#) and registered (RCPT rule) OnInboundProtocol Sink which
is supposed to be a sort of recipient filter. I can't force it to not add a
recipient to the recipients list when the recipient email address matches a
specific value (so it's not possible to execute DATA command until there is
some valid recipient).
It seems to work because when I test it using telnet and there is a match,
there is always a "550 5.1.1 Mailbox does not exist" response.
But when I check smtp logs it sometimes shows RCPT TO: recipient 250
instead of RCPT TO: recipient 550 Consequently it is possible to run DATA
command without an error then.
This happens when recipient is entered without a domain or if recipient's
domain is one of local or remote virtual domains configured for that smtp
server.
Looks like smtp server has some logic you can't change with EventSink
There is one drastic way - to drop the connection - but that's not what I
want (plus the server crushes after a while with that kind of sink)

Question : is something wrong with the sink or has ms smtp server
implementation some limitations.

Thanks

Best regards
Piotr




Lutz Elßner

2005-02-11, 6:00 pm

Hi Piotr,
I'm developing the same with VB.NET. As sample code I only have this:

"Writing Managed Sinks for SMTP and Transport Events"
http://www.microsoft.com/downloads/...&DisplayLang=en

Do you have other examples, also in other programming languages? We need to
know how to create and send a good 550 Error Response. There are many status
codes in the parameter objects of the event handler. The Code in the White
Paper Throws a COMException and kills the connection. That is not like the
RFC2821. I do read this today..

I you have more information please tell me.

Lutz


"piotr" <ksswd@poczta.fm> schrieb im Newsbeitrag
news:e1RuTG1DFHA.3452@TK2MSFTNGP09.phx.gbl...
> Hi
> I have created (C#) and registered (RCPT rule) OnInboundProtocol Sink

which
> is supposed to be a sort of recipient filter. I can't force it to not add

a
> recipient to the recipients list when the recipient email address matches

a
> specific value (so it's not possible to execute DATA command until there

is
> some valid recipient).
> It seems to work because when I test it using telnet and there is a match,
> there is always a "550 5.1.1 Mailbox does not exist" response.
> But when I check smtp logs it sometimes shows RCPT TO: recipient 250
> instead of RCPT TO: recipient 550 Consequently it is possible to run

DATA
> command without an error then.
> This happens when recipient is entered without a domain or if recipient's
> domain is one of local or remote virtual domains configured for that smtp
> server.
> Looks like smtp server has some logic you can't change with EventSink
> There is one drastic way - to drop the connection - but that's not what I
> want (plus the server crushes after a while with that kind of sink)
>
> Question : is something wrong with the sink or has ms smtp server
> implementation some limitations.
>
> Thanks
>
> Best regards
> Piotr
>
>
>
>



Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com