(as a side note I have another speedup coming for you shortly - I have re-written the DNS resolver in XS, which should provide a significant speedup).

Sweet, I haven't looked too closely at whats going on, but %INC suggests that PollServer still uses Net::DNS for something. Will this dependency be going away?


I found the workaround for optional brackets by adding them in
hook_rcpt_pre when missing, but I can't find a workaround for what to do
for senders that put a space between the : and the envelope address, ie:

MAIL FROM: <[EMAIL PROTECTED]>

The above line doesn't even get sent to the hook_rcpt_pre hook.

Bug. Try this patch:

Thanks, that seems to work. Overall it seems really bizarre (to me at least) to be "fixing up" the raw protocol such that a non-overridable, default protocol handler will do what you want. Did anyone ever propose a hook_rcpt_raw() that would be called with the unverified line (supporting the same return codes as hook_rcpt)? This would give plugin authors a choice of working with rfc-compliant data, or the raw data if they wanted to do their own checking, or perhaps other uses like trying to fingerprint the sender.

Thanks for the patch!

ds


Index: lib/Qpsmtpd/PollServer.pm
===================================================================
--- lib/Qpsmtpd/PollServer.pm   (revision 714)
+++ lib/Qpsmtpd/PollServer.pm   (working copy)
@@ -141,7 +141,7 @@
sub process_cmd {
     my Qpsmtpd::PollServer $self = shift;
     my $line = shift;
-    my ($cmd, @params) = split(/ +/, $line);
+    my ($cmd, @params) = split(/ +/, $line, 2);
     my $meth = lc($cmd);
     if (my $lookup = $self->{_commands}->{$meth} && $self->can($meth)) {
         my $resp = eval {

Reply via email to