[svn:qpsmtpd] rev 518 - branches/0.31/lib/Qpsmtpd
[email protected] 19 Jul 2005 14:20:06 -0000
| Newsgroups | perl.cvs.qpsmtpd |
|---|---|
| Message-ID | <[email protected]> |
Author: jpeacock
Date: Tue Jul 19 07:20:05 2005
New Revision: 518
Modified:
branches/0.31/lib/Qpsmtpd/SMTP.pm
Log:
[merge from trunk] Use qmail/control/smtpdgreeting if it exists, otherwise
show the original qpsmtpd greeting (with version information).
Modified: branches/0.31/lib/Qpsmtpd/SMTP.pm
==============================================================================
--- branches/0.31/lib/Qpsmtpd/SMTP.pm (original)
+++ branches/0.31/lib/Qpsmtpd/SMTP.pm Tue Jul 19 07:20:05 2005
@@ -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 <[email protected]>.');
}