Buffer output of Qpsmtpd::TcpServer::respond() for broken clients who don't
follow RFC's for multiline responses. Patch from Brian Szymanski <ski-qpsmtpd@allafrica.com> git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@664 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
9c39c530b2
commit
6c3dc88f37
@ -72,11 +72,13 @@ sub read_input {
|
||||
|
||||
sub respond {
|
||||
my ($self, $code, @messages) = @_;
|
||||
my $buf = '';
|
||||
while (my $msg = shift @messages) {
|
||||
my $line = $code . (@messages?"-":" ").$msg;
|
||||
$self->log(LOGDEBUG, $line);
|
||||
print "$line\r\n" or ($self->log(LOGERROR, "Could not print [$line]: $!"), return 0);
|
||||
$buf .= "$line\r\n";
|
||||
}
|
||||
print $buf or ($self->log(LOGERROR, "Could not print [$buf]: $!"), return 0);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user