Re: ISmtpInCommandSink Rules? - Custom Authentication problem
- From: "Jason S. Clary" <jason@xxxxxxxxx>
- Date: Sun, 21 May 2006 18:42:21 -0700
Nevermind. I found the answer. Here's what I figured out in case anyone else is looking for how to do this:
If you set the context command status to EXPE_BLOB_READY, use SetCallback on the context to set your implementation of ISmtpInCallbackSink and return EXPE_S_CONSUMED then the next line triggers your OnSmtpInCallback implementation so you can handle it.
Very handy... Too bad there's absolutely no documentation on it.
Jason S. Clary wrote:
I'm trying to write a custom authentication scheme for the Windows 2003 SMTP Service (with or without Exchange attached) and although I have my Sink working for the most part, I can't figure out how to deal with a challenge response since it isn't prefixed with a command that I can specify in a rule..
Right now I've bound to the rule "AUTH" which gets me the initial command and I can send back a custom challenge and consume the event but the next line from the client will just be a base64 encoded string which gets a 500 Unrecognized Command error.
Is there a way to implement an ISmtpCommandSink so that it receives the next command entered no matter what it is? This would be ideal since I wouldn't want the sink to be called for EVERY command.
Is there a Rule for catching all unrecognized commands?
Failing that, is there a way to catch all commands? "*" doesn't work and "" or a non-existant rule causes connections to be dropped as soon as a command is entered.
The documentation is so thin it gives me no clue how to proceed. I've tried playing around with some of the statuses and return values but nothing seems to help.
There's a SetCallback on the command context which looks intriguing (I can't think what it might be used for except possibly handling command continuations) but I'm at a loss how to signal that I'm expecting more from the client.
I've also looked at ISmtpServerResponseSink but I can't get it to fire no matter what so I'm assuming there's a Rule that needs to be added but nothing I've tried works.
Any insight would be greatly appreciated.
Jason S. Clary
- References:
- ISmtpInCommandSink Rules? - Custom Authentication problem
- From: Jason S. Clary
- ISmtpInCommandSink Rules? - Custom Authentication problem
- Prev by Date: ISmtpInCommandSink Rules? - Custom Authentication problem
- Next by Date: weird E_ACCESSDENIED on GetMailboxTable()
- Previous by thread: ISmtpInCommandSink Rules? - Custom Authentication problem
- Next by thread: weird E_ACCESSDENIED on GetMailboxTable()
- Index(es):
Relevant Pages
|