RFC3848 support for ESMTP.
Heavily based on: From: Nick Leverton <nj@leverton.org> To: qpsmtpd@perl.org Subject: SMTPA Date: Thu, 4 Jan 2007 12:08:16 +0000 Message-Id: <200701041208.17018@leverton.icritical.com> git-svn-id: https://svn.perl.org/qpsmtpd/branches/0.3x@703 958fd67b-6ff1-0310-b445-bb7760255be9
This commit is contained in:
parent
e7d64268e0
commit
a30506e9b6
@ -658,10 +658,19 @@ sub data_respond {
|
||||
$self->transaction->header($header);
|
||||
|
||||
my $smtp = $self->connection->hello eq "ehlo" ? "ESMTP" : "SMTP";
|
||||
my $sslheader = (defined $self->connection->notes('tls_enabled') and $self->connection->notes('tls_enabled')) ?
|
||||
"(".$self->connection->notes('tls_socket')->get_cipher()." encrypted) " : "";
|
||||
my $authheader = (defined $self->{_auth} and $self->{_auth} == OK) ?
|
||||
"(smtp-auth username $self->{_auth_user}, mechanism $self->{_auth_mechanism})\n" : "";
|
||||
my $authheader;
|
||||
my $sslheader;
|
||||
|
||||
if (defined $self->connection->notes('tls_enabled')
|
||||
and $self->connection->notes('tls_enabled')) {
|
||||
$smtp eq "ESMTP" and $smtp .= "S"; # RFC3848
|
||||
$sslheader = "(".$self->connection->notes('tls_socket')->get_cipher()." encrypted) ";
|
||||
}
|
||||
|
||||
if (defined $self->{_auth} and $self->{_auth} == OK) {
|
||||
$smtp eq "ESMTP" and $smtp .= "A"; # RFC3848
|
||||
$authheader = "(smtp-auth username $self->{_auth_user}, mechanism $self->{_auth_mechanism})\n";
|
||||
}
|
||||
|
||||
$header->add("Received", "from ".$self->connection->remote_info
|
||||
." (HELO ".$self->connection->hello_host . ") (".$self->connection->remote_ip
|
||||
|
Loading…
Reference in New Issue
Block a user