[svn:qpsmtpd] rev 532 - in trunk: lib/Qpsmtpd plugins
[email protected] 29 Jul 2005 18:02:08 -0000
| Newsgroups | perl.cvs.qpsmtpd |
|---|---|
| Message-ID | <[email protected]> |
Author: msergeant
Date: Fri Jul 29 11:02:07 2005
New Revision: 532
Modified:
trunk/lib/Qpsmtpd/Transaction.pm
trunk/plugins/tls
Log:
Default capabilities to an empty arrayref
Copy relay_client setting when cloning connection in tls
Modified: trunk/lib/Qpsmtpd/Transaction.pm
==============================================================================
--- trunk/lib/Qpsmtpd/Transaction.pm (original)
+++ trunk/lib/Qpsmtpd/Transaction.pm Fri Jul 29 11:02:07 2005
@@ -13,7 +13,7 @@ sub start {
my $proto = shift;
my $class = ref($proto) || $proto;
my %args = @_;
- my $self = { _rcpt => [], started => time };
+ my $self = { _notes => { capabilities => [] }, _rcpt => [], started => time };
bless ($self, $class);
my $sz = $self->config('memory_threshold');
$sz = 10_000 unless defined($sz);
Modified: trunk/plugins/tls
==============================================================================
--- trunk/plugins/tls (original)
+++ trunk/plugins/tls Fri Jul 29 11:02:07 2005
@@ -48,10 +48,8 @@ sub hook_ehlo {
return DECLINED if $self->connection->notes('tls_enabled');
return DENY, "Command refused due to lack of security" if $transaction->notes('ssl_failed');
my $cap = $transaction->notes('capabilities');
- $cap ||= [];
push @$cap, 'STARTTLS';
$transaction->notes('tls_enabled', 1);
- $transaction->notes('capabilities', $cap);
return DECLINED;
}
@@ -92,7 +90,7 @@ sub hook_unrecognized_command {
my $conn = $self->connection;
# Create a new connection object with subset of information collected thus far
my $newconn = Qpsmtpd::Connection->new();
- for (qw(local_ip local_port remote_ip remote_port remote_host remote_info)) {
+ for (qw(local_ip local_port remote_ip remote_port remote_host remote_info relay_client)) {
$newconn->$_($conn->$_());
}
$self->qp->connection($newconn);