Skip to content

Commit c74e553

Browse files
committed
Sisimai::Lhost::Exim now can decode a bounce mail generated by mail.ru #557
1 parent dcc9ed5 commit c74e553

File tree

7 files changed

+12
-266
lines changed

7 files changed

+12
-266
lines changed

Diff for: lib/Sisimai/Lhost.pm

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ sub index {
4242
return [qw|
4343
Activehunter AmazonSES AmazonWorkMail ApacheJames Biglobe Courier Domino DragonFly EZweb
4444
EinsUndEins Exchange2003 Exchange2007 Exim FML GMX GoogleGroups GoogleWorkspace Gmail
45-
IMailServer InterScanMSS KDDI MXLogic MailFoundry MailMarshalSMTP MailRu McAfee MessagingServer
45+
IMailServer InterScanMSS KDDI MXLogic MailFoundry MailMarshalSMTP McAfee MessagingServer
4646
Notes Office365 OpenSMTPD Postfix Sendmail V5sendmail Verizon X1 X2 X3 X4 X6 Yahoo Zoho mFILTER qmail
4747
|];
4848
}

Diff for: lib/Sisimai/Lhost/Exim.pm

-1
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,6 @@ sub inquire {
1515
my $class = shift;
1616
my $mhead = shift // return undef;
1717
my $mbody = shift // return undef;
18-
return undef if index($mhead->{'from'}, '.mail.ru') > 0;
1918

2019
# Message-Id: <[email protected]>
2120
# X-Failed-Recipients: [email protected]

Diff for: lib/Sisimai/Lhost/MailRu.pm

-254
This file was deleted.

Diff for: lib/Sisimai/Order.pm

-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ sub make {
5050
'mail-delivery' => [
5151
'Sisimai::Lhost::Exim',
5252
'Sisimai::Lhost::DragonFly',
53-
'Sisimai::Lhost::MailRu',
5453
'Sisimai::Lhost::GMX',
5554
'Sisimai::Lhost::EinsUndEins',
5655
'Sisimai::Lhost::Zoho',
@@ -112,7 +111,6 @@ sub another {
112111
# There are another patterns in the value of "Subject:" header of a bounce mail generated by the
113112
# following MTA modules
114113
state $orderE0 = [
115-
'Sisimai::Lhost::MailRu',
116114
'Sisimai::Lhost::Exim',
117115
'Sisimai::Lhost::Sendmail',
118116
'Sisimai::Lhost::Office365',

Diff for: t/600-lhost-code

+10-6
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ my $moduletest = sub {
2626
my $lhostindex = Sisimai::Lhost->index; push @$lhostindex, 'ARF', 'RFC3464', 'RFC3834';
2727
my $isnotlhost = qr/\A(?:ARF|RFC3464|RFC3834)\z/;
2828
my $methodlist = ['DELIVERYSTATUS', 'INDICATORS', 'description', 'index', 'path'];
29-
my $rfc3464use = [qw|
30-
Aol Amavis Barracuda Bigfoot Facebook GSuite MessageLabs Outlook PowerMTA ReceivingSES
31-
SendGrid SurfControl Yandex X5
32-
|];
29+
my $alternates = {
30+
'RFC3464' => [qw|Aol Amavis Barracuda Bigfoot Facebook GSuite MessageLabs Outlook PowerMTA ReceivingSES SendGrid SurfControl Yandex X5|],
31+
'Exim' => [qw|MailRu|],
32+
};
3333
my $skiptonext = {
3434
'public' => ['lhost-postfix-49', 'lhost-postfix-50'],
3535
'private' => [
@@ -49,7 +49,7 @@ my $moduletest = sub {
4949
# ARF, RFC3464, ARF3834
5050
$M = sprintf("Sisimai::%s", $E);
5151

52-
} elsif( grep { $E eq $_ } @$rfc3464use ) {
52+
} elsif( grep { $E eq $_ } $alternates->{'RFC3464'}->@* ) {
5353
# Removed Lhost moudles (Sisimai::RFC3464 can decode)
5454
$M = "Sisimai::RFC3464";
5555
my $c = [caller()]->[1];
@@ -413,10 +413,14 @@ my $moduletest = sub {
413413
ok $cv =~ $cr, sprintf("%s %s", $ct, $cr);
414414
is scalar @{ [grep { $cv eq $_ } @$lhostindex] }, 0, sprintf("%s %s", $ct, $cv);
415415

416-
} elsif( grep { $E eq $_ } @$rfc3464use ) {
416+
} elsif( grep { $E eq $_ } $alternates->{'RFC3464'}->@* ) {
417417
# Decoded by Sisimai::RFC3464 since v5.2.0
418418
is $cv, 'RFC3464', sprintf("%s %s", $ct, $cr);
419419

420+
} elsif( grep { $E eq $_ } $alternates->{'Exim'}->@* ) {
421+
# Decoded by Sisimai::Lhost::Exim since v5.2.0
422+
is $cv, 'Exim', sprintf("%s %s", $ct, $cr);
423+
420424
} elsif( $E eq 'ARF' ) {
421425
# Parsed by Sisimai::ARF
422426
is $cv, 'Feedback-Loop', sprintf("%s %s", $ct, $cr);

Diff for: t/732-lhost-mailru.t

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ my $isexpected = {
1818
'07' => [['5.0.910', '550', 'filtered', 0]],
1919
'08' => [['5.0.911', '550', 'userunknown', 1]],
2020
'09' => [['5.1.8', '501', 'rejected', 0]],
21-
'10' => [['5.0.947', '', 'expired', 0]],
21+
'10' => [['4.0.947', '', 'expired', 0]],
2222
};
2323

2424
$enginetest->($enginename, $isexpected);

Diff for: t/900-modules.pl

-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,6 @@ sub list {
3232
Lhost/KDDI.pm
3333
Lhost/MailFoundry.pm
3434
Lhost/MailMarshalSMTP.pm
35-
Lhost/MailRu.pm
3635
Lhost/McAfee.pm
3736
Lhost/MessagingServer.pm
3837
Lhost/mFILTER.pm

0 commit comments

Comments
 (0)