I've received reports by some users that messages are being duplicated. After a fair amount of head scratching it seems that a Microsoft Exchange serer is connecting to qpsmtpd and sending:
1. HELO blah. 2. MAIL FROM: <b...@example.com> 3. RCPT TO: <u...@example.org> 4. DATA 5 . 6. RSET 7. MAIL FROM:<b...@example.com> 8. RCPT TO:<u...@example.org> 9 ... This sequence can repeat multiple times though I cannot seem to find why the RSET is being issued by the client side. At each step my plugins are returning the correct responses (e.g. "250 QUEUED" after the DATA phase). Of course the MS-Exchange admin believes their server is working correctly and nobody else is reporting problems. Temporarily I've disabled the "RSET" command in SMTP.pm. I wonder if there is any interest in supporting hooks for this protocol command? Perhaps soemthing like this: diff --git a/lib/Qpsmtpd/SMTP.pm b/lib/Qpsmtpd/SMTP.pm index f669055..5940b4f 100644 --- a/lib/Qpsmtpd/SMTP.pm +++ b/lib/Qpsmtpd/SMTP.pm @@ -555,8 +555,15 @@ sub vrfy_respond { sub rset { my $self = shift; - $self->reset_transaction; - $self->respond(250, "OK"); + $self->run_hooks("rset"); +} + +sub rset_respond { + my ($self, $rc, $msg, $args) = @_; + if ($rc == OK) { + $self->reset_transaction; + } + $self->respond($rc, @$msg); } That's a quick hack, but I guess it shows the process .. not that the hook behaviour would need to be too different to others.. Steve -- Debian GNU/Linux System Administration http://www.debian-administration.org/