Maybe what I'm looking for is out-of-spec and that's why it doesn't work
by default, I'm sure you folks can tell me.
As I've stated in other posts, I tend to be a BOFH and am overly
protective of my server. As a result I edited the clamdscan plugin to
return DENY_DISCONNECT instead of DENY. (In my opinion, if you're sending
one virus, you're sending many. And any legit server will retry the ones
that didn't get accepted) But my DENY_DISCONNECT response is silently
ignored and the mail gets queued.
The offending code is here (in lib/Qpsmtpd/SMTP.pm:sub data):
($rc, $msg) = $self->run_hooks("data_post");
if ($rc == DONE) {
return 1;
}
elsif ($rc == DENY) {
$self->respond(552, $msg || "Message denied");
}
elsif ($rc == DENYSOFT) {
$self->respond(452, $msg || "Message denied temporarily");
}
else {
$self->queue($self->transaction);
}
I added this to my copy to make it work.
elsif ($rc == DENY_DISCONNECT) {
$self->respond(552, $msg || "Message denied");
$self->disconnect();
}
The only reason I can think that this case would be excluded is due to
some adhearance to the RFC, but I'm too lazy to re-read it at the moment
to see if that's true. For any sticklers out there, you don't like how
my server works, don't send me mail. ;)
My stuff works the way I want it to now so I don't need anyone to jump on
the problem (if it is one), just kinda bringing it up in case anyone else
is trying to do the same thing and failing.
-f