On Fri, 8 Jul 2005, Matt Sergeant wrote:
Can you try the attached plugin, along with *just* your change to reset the
connection. I *think* that's the only thing we need to change to get this to
work as a plugin rather than changing the core (again). And I'd much rather
we could do this via the plugin API (same as I would for auth, but that's
another argument :-)
OK, I've taken the path of least resistence and switched to svn trunk for
testing.
I've found two small problems so far with using the unrecognised command
hook to implement ESMTP. First is that any params don't seem to get passed
to the callback. The "Syntax error (no parameters allowed)" check isn't
triggered:
220 mycompany.local ESMTP qpsmtpd 0.31-dev ready; send us your mail, but
not your spam.
ehlo foo
250-mycompany.local Hi localhost [127.0.0.1]
250-PIPELINING
250-8BITMIME
250-STARTTLS
250 AUTH PLAIN LOGIN CRAM-MD5
starttls foo
220 Go ahead with TLS
Second problem is that every extended verb will contribute to the
"unrocognized command" count, possibly causing a disconnect:
@4000000042d0387b334c31cc 3499 dispatching starttls foo
@4000000042d0387b334c58dc 3499 running plugin (unrecognized_command):
count_unrecognized_commands
@4000000042d0387b334c7434 3499 count_unrecognized_commands plugin:
Unrecognized command 'starttls'@4000000042d0387b334c8ba4 3499 Plugin
count_unrecognized_commands, hook unrecognized_command returned DECLINED,
@4000000042d0387b334ca314 3499 running plugin (unrecognized_command): tls
@4000000042d0387b342bc42c 3499 220 Go ahead with TLS