Hanno Hecker wrote:
> Ok, here we go.
> The Qpsmtpd::Command module provides a parse() which does 3 things:
> - by default returning the line split()ed by space, as before.
> - on MAIL FROM:/RCPT TO: it parses the line by RFC 1869 (SMTP Service
> Extensions) rules
> - a plugin can do the parsing on it's own (...read: for all other
> plugins/the core) by supplying a parsing routine when returning from
> a _parse hook, see EXAMPLE in perldoc lib/Qpsmtpd/Command.pm
I'm committing this with a few changes that I thought you should be aware of:
1) You provided tests: Good. The tests didn't work with the patch you
submitted: Bad. :( It was something simple, though. The test framework uses
the config.sample/plugins file and you had commented out the
dont_require_anglebrackets
line, so the tests that relied on that being in force failed. Note I also
renamed it to correspond to the primary language for the source being English
(though I must say that <> look a little like angel's wings)...
2) I took out the unrecognized_command_parse logic, because it was messing with
tls (which I'm guessing you didn't test with). My reasoning is that an
unrecognized command hook should be able to do what it wants with the line. In
this case STARTLS doesn't take any options and putting in the parse was causing
it to fail in various ways. That code was confused about $rc and $ok as well;
I'm not entirely happy with the $ok vs $rc in the other locations, but I didn't
mess with them.
For a change, I remembered to add all of the new files to the repository *and*
to MANIFEST, as well as update the Changes file.
Thanks for the patch!
John