From 58f7129adadddc908c999367b7ec7cd9e9eb8b59 Mon Sep 17 00:00:00 2001 From: John Peacock Date: Tue, 19 Jul 2005 14:20:05 +0000 Subject: [PATCH] [merge from trunk] Use qmail/control/smtpdgreeting if it exists, otherwise show the original qpsmtpd greeting (with version information). git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.31@518 958fd67b-6ff1-0310-b445-bb7760255be9 --- lib/Qpsmtpd/SMTP.pm | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/lib/Qpsmtpd/SMTP.pm b/lib/Qpsmtpd/SMTP.pm index 6af0251..7400b66 100644 --- a/lib/Qpsmtpd/SMTP.pm +++ b/lib/Qpsmtpd/SMTP.pm @@ -104,8 +104,18 @@ sub start_conversation { return $rc; } elsif ($rc != DONE) { - $self->respond(220, $self->config('me') ." ESMTP qpsmtpd " - . $self->version ." ready; send us your mail, but not your spam."); + my $greets = $self->config('smtpgreeting'); + if ( $greets ) { + $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; } } @@ -347,7 +357,8 @@ sub rcpt { sub help { my $self = shift; $self->respond(214, - "This is qpsmtpd " . $self->version, + "This is qpsmtpd " . + $self->config('smtpgreeting') ? '' : $self->version, "See http://smtpd.develooper.com/", 'To report bugs or send comments, mail to .'); }