Skip to content

Commit 3837c8f

Browse files
committed
Correct "connect" parameters
It only provides rdns and src, neither of the other two parameters. Reported on tech@ by patrick keshishian <sidster () boxsoft ! com>
1 parent 9a334a9 commit 3837c8f

File tree

2 files changed

+8
-6
lines changed

2 files changed

+8
-6
lines changed

lib/OpenSMTPd/Filter.pm

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ my @filter_fields
5050
= qw< version timestamp subsystem phase session opaque-token suffix >;
5151
my %filter_events = (
5252
'smtp-in' => {
53-
'connect' => [qw< rdns fcrdns src dest >],
53+
'connect' => [qw< rdns src >],
5454
'helo' => [qw< identity >],
5555
'ehlo' => [qw< identity >],
5656
'starttls' => [qw< tls-string >],
@@ -889,12 +889,8 @@ fields.
889889
890890
=item rdns
891891
892-
=item fcrdns
893-
894892
=item src
895893
896-
=item dest
897-
898894
=back
899895
900896
=item helo

t/filter.t

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,13 @@ is CLASS->new(
2828
on => {
2929
filter => {
3030
'smtp-in' => {
31-
connect => sub {'proceed'}
31+
connect => sub {
32+
my ( $event, $session ) = @_;
33+
my $e = $session->{events}->[0];
34+
is $e->{rdns}, 'localhost', "Parsed expected rdns";
35+
is $e->{src}, '[::1]', "Parsed expected src";
36+
return "proceed";
37+
},
3238
}
3339
}
3440
})->_handle_filter('0.6|123|smtp-in|connect|abc|def|localhost|[::1]'), {

0 commit comments

Comments
 (0)