diff --git a/lib/Qpsmtpd/Transaction.pm b/lib/Qpsmtpd/Transaction.pm index a6dc3be..59f7453 100644 --- a/lib/Qpsmtpd/Transaction.pm +++ b/lib/Qpsmtpd/Transaction.pm @@ -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); diff --git a/plugins/tls b/plugins/tls index 7379350..df094f4 100644 --- a/plugins/tls +++ b/plugins/tls @@ -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);