Re: ISmtpInCommandSink Rules? - Custom Authentication problem



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

.



Relevant Pages

  • Re: [RFC/PATCH 0/22] W1: sysfs, lifetime and other fixes
    ... >> which is managed by bus master dirver, but also some logic over it, ... Why do you think caller is in process context? ... Control thread was created to process that work, ... Using connector for exaple you may send command REMOVE_*, ...
    (Linux-Kernel)
  • Re: And So The Question Is......
    ... that accessing a given command from a ... context menu is harder to hit accurately. ... certainly factors other than pure efficiency that drive most peoples' ... person to finally acquire contradictory data. ...
    (comp.sys.mac.system)
  • Re: there are too many context menues
    ... I am refering to the shy toolbar. ... 'clickless' command. ... put an arrow pointing up on the right click context menue that ... out the shy menue. ...
    (microsoft.public.word.docmanagement)
  • Re: Why doesnt foreach return a value
    ... Every Tcl command is implemented as a C level function. ... What we want at the script level is the ... What changes occur is very specific to the context. ...
    (comp.lang.tcl)
  • Re: there are too many context menues
    ... I am refering to the shy toolbar. ... 'clickless' command. ... put an arrow pointing up on the right click context menue that ... out the shy menue. ...
    (microsoft.public.word.docmanagement)