Skip to content

Commit

Permalink
Bug fix in Sisimai::Lhost::Exim->inquire, $mhead->{received} is an array
Browse files Browse the repository at this point in the history
  • Loading branch information
azumakuniyuki committed May 16, 2023
1 parent 001fd1d commit 9eb4336
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/Sisimai/Lhost/Exim.pm
Original file line number Diff line number Diff line change
Expand Up @@ -341,9 +341,9 @@ sub inquire {
if( scalar $mhead->{'received'}->@* ) {
# Get the name of local MTA
# Received: from marutamachi.example.org (c192128.example.net [192.0.2.128])
$p1 = index($mhead->{'received'}, 'from ');
$p2 = index($mhead->{'received'}, ' ', $p1 + 5);
$localhost0 = substr($mhead->{'received'}, $p1 + 5, $p2 - $1 - 5) if $p1 > -1 && $p2 > $p1;
$p1 = index($mhead->{'received'}->[-1], 'from ');
$p2 = index($mhead->{'received'}->[-1], ' ', $p1 + 5);
$localhost0 = substr($mhead->{'received'}->[-1], $p1 + 5, $p2 - $p1 - 5) if $p1 > -1 && $p2 > $p1;
}

for my $e ( @$dscontents ) {
Expand Down

0 comments on commit 9eb4336

Please sign in to comment.