On Aug 9, 2006, at 7:31, John Peacock wrote:

Just thinking out loud here, but how about this for an interface to generically provide hooks to new SMTP extensions (as pseudocode):

sub register_extension {
    my ($COMMAND, &capability, &command, $pre, $post) = @_;
    ....
}

I'd prefer the register_extension sub to take named parameters, but other than that: +1! I don't have a use case for it, but it seems like it'd be useful to let &capability be a string too, for simpler cases.

It'll be nice to get the AUTH stuff out of the core.

[...]
An alternative implementation would be to split all of the existing SMTP commands out into independent Qpsmtpd::SMTP::{cmd} namespaces and use one of the autoload class modules (Module::Pluggable???) to insert the commands automatically. Qpsmtpd::Auth would then be renamed to Qpsmtpd::SMTP::Auth.

I don't like that sort of magic much.

With the recent changes, the auth code could still be Qpsmtpd::SMTP::Auth (as a plugin) calling register_extension.


 - ask


Reply via email to