Correctly handle the case where smtpgreeting exists (append ESMTP) as well as

the case where it doesn't (display original Qpsmtpd greeting). 

git-svn-id: https://svn.perl.org/qpsmtpd/trunk@511 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
John Peacock 2005-07-18 00:36:49 +00:00
parent e8a9828e4e
commit 43aef48532

View File

@ -114,9 +114,18 @@ sub connect_respond {
return $rc; return $rc;
} }
elsif ($rc != DONE) { elsif ($rc != DONE) {
$self->respond(220, $self->config('smtpgreeting') ." ESMTP" || my $greets = $self->config('smtpgreeting');
($self->config('me') ." ESMTP qpsmtpd " . $self->version . if ( $greets ) {
" ready; send us your mail, but not your spam.")); $greets .= " ESMTP";
}
else {
$greets = $self->config('me')
. " ESMTP qpsmtpd "
. $self->version
. " ready; send us your mail, but not your spam.";
}
$self->respond(220, $greets);
return DONE; return DONE;
} }
} }