diff --git a/lib/Sisimai/Lhost/Domino.pm b/lib/Sisimai/Lhost/Domino.pm index 23f9f6c63..fbcceaf6a 100644 --- a/lib/Sisimai/Lhost/Domino.pm +++ b/lib/Sisimai/Lhost/Domino.pm @@ -27,6 +27,7 @@ sub inquire { 'userunknown' => [ 'not listed in Domino Directory', 'not listed in public Name & Address Book', + 'no se encuentra en el Directorio de Domino', "non répertorié dans l'annuaire Domino", 'Domino ディレクトリには見つかりません', ], diff --git a/lib/Sisimai/Lhost/Office365.pm b/lib/Sisimai/Lhost/Office365.pm index f99f03d1a..c00202c2d 100644 --- a/lib/Sisimai/Lhost/Office365.pm +++ b/lib/Sisimai/Lhost/Office365.pm @@ -26,6 +26,8 @@ sub inquire { # X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted # X-MS-Exchange-Transport-CrossTenantHeadersStamped: ... $match++ if index($mhead->{'subject'}, 'Undeliverable:') > -1; + $match++ if index($mhead->{'subject'}, 'Onbestelbaar:') > -1; + $match++ if index($mhead->{'subject'}, 'Não_entregue:') > -1; $match++ if $mhead->{'x-ms-exchange-message-is-ndr'}; $match++ if $mhead->{'x-microsoft-antispam-prvs'}; $match++ if $mhead->{'x-exchange-antispam-report-test'}; @@ -43,13 +45,33 @@ sub inquire { state $indicators = __PACKAGE__->INDICATORS; state $rebackbone = qr|^Content-Type:[ ]message/rfc822|m; state $markingsof = { - 'eoe' => qr/\A(?:Original[ ][Mm]essage[ ][Hh]eaders:?|Message[ ]Hops)/, + 'eoe' => qr{\A(?: + Original[ ][Mm]essage[ ][Hh]eaders:? + |Message[ ]Hops + |Cabe.+alhos[ ]originais[ ]da[ ]mensagem: + |Oorspronkelijke[ ]berichtkoppen: + ) + }x, 'rfc3464' => qr|\AContent-Type:[ ]message/delivery-status|, - 'error' => qr/\A(?:Diagnostic[ ]information[ ]for[ ]administrators:|Error[ ]Details)/, + 'lhost' => qr{\A(?: + Generating[ ]server + |Bronserver + |Servidor[ ]de[ ]origem + ):[ ](.+)\z + }x, + 'error' => qr{\A(?: + Diagnostic[ ]information[ ]for[ ]administrators: + |Error[ ]Details + |Diagnostische[ ]gegevens[ ]voor[ ]beheerders: + |Informa.+es[ ]de[ ]diagn.+stico[ ]para[ ]administradores: + ) + }x, 'message' => qr{\A(?: Delivery[ ]has[ ]failed[ ]to[ ]these[ ]recipients[ ]or[ ]groups: |Original[ ]Message[ ]Details |.+[ ]rejected[ ]your[ ]message[ ]to[ ]the[ ]following[ ]e[-]?mail[ ]addresses: + |Falha[ ]na[ ]entrega[ ]a[ ]estes[ ]destinat.+rios[ ]ou[ ]grupos: + |Uw[ ]bericht[ ]kan[ ]niet[ ]worden[ ]bezorgd[ ]bij[ ]de[ ]volgende[ ]geadresseerden[ ]of[ ]groepen: ) }x, }; @@ -134,7 +156,7 @@ sub inquire { $v->{'recipient'} = $1; $recipients++; - } elsif( $e =~ /\AGenerating server: (.+)\z/ ) { + } elsif( $e =~ $markingsof->{'lhost'} ) { # Generating server: FFFFFFFFFFFF.e0.prod.outlook.com $permessage->{'lhost'} = lc $1; diff --git a/lib/Sisimai/Order.pm b/lib/Sisimai/Order.pm index e59271ba7..d82bb90dd 100644 --- a/lib/Sisimai/Order.pm +++ b/lib/Sisimai/Order.pm @@ -64,9 +64,11 @@ sub make { 'message-delivery' => ['Sisimai::Lhost::MailFoundry'], 'message-frozen' => ['Sisimai::Lhost::Exim'], 'message-you' => ['Sisimai::Lhost::Barracuda'], + 'não-entregue' => ['Sisimai::Lhost::Office365'], 'non-recapitabile' => ['Sisimai::Lhost::Exchange2007'], 'non-remis' => ['Sisimai::Lhost::Exchange2007'], 'notice' => ['Sisimai::Lhost::Courier'], + 'onbestelbaar' => ['Sisimai::Lhost::Office365'], 'permanent-delivery' => ['Sisimai::Lhost::X4'], 'postmaster-notify' => ['Sisimai::Lhost::Sendmail'], 'returned-mail' => [ diff --git a/lib/Sisimai/Reason/NotAccept.pm b/lib/Sisimai/Reason/NotAccept.pm index 4c57a07cc..326203db1 100644 --- a/lib/Sisimai/Reason/NotAccept.pm +++ b/lib/Sisimai/Reason/NotAccept.pm @@ -18,6 +18,7 @@ sub match { state $index = [ 'host/domain does not accept mail', # iCloud 'host does not accept mail', # Sendmail + 'mail receiving disabled', 'name server: .: host not found', # Sendmail 'no mx record found for domain=', # Oath(Yahoo!) 'no route for current request', diff --git a/lib/Sisimai/Reason/Suspend.pm b/lib/Sisimai/Reason/Suspend.pm index 3f36d82ae..6f2f3caf3 100644 --- a/lib/Sisimai/Reason/Suspend.pm +++ b/lib/Sisimai/Reason/Suspend.pm @@ -22,6 +22,7 @@ sub match { 'has been suspended', 'invalid/inactive user', 'is a deactivated mailbox', # http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000742 + 'is unavailable: user is terminated', 'mailbox currently suspended', 'mailbox is frozen', 'mailbox unavailable or access denied', diff --git a/lib/Sisimai/Reason/SystemError.pm b/lib/Sisimai/Reason/SystemError.pm index 83ec83b52..004748597 100644 --- a/lib/Sisimai/Reason/SystemError.pm +++ b/lib/Sisimai/Reason/SystemError.pm @@ -28,6 +28,7 @@ sub match { 'loop was found in the mail exchanger', 'loops back to myself', 'mail system configuration error', + 'recipient deferred because there is no mdb', 'remote server is misconfigured', 'server configuration error', 'service currently unavailable', diff --git a/lib/Sisimai/Reason/VirusDetected.pm b/lib/Sisimai/Reason/VirusDetected.pm index ede4b4bb5..1846cb66b 100644 --- a/lib/Sisimai/Reason/VirusDetected.pm +++ b/lib/Sisimai/Reason/VirusDetected.pm @@ -19,6 +19,7 @@ sub match { 'the message was rejected because it contains prohibited virus or spam content', 'this form of attachment has been used by recent viruses or other malware', 'virus detected', + 'virus phishing/malicious_url detected', 'your message was infected with a virus', ]; return 1 if grep { rindex($argv1, $_) > -1 } @$index; diff --git a/xt/612-lhost-amazonses.t b/xt/612-lhost-amazonses.t index 31301634c..10971ba7e 100644 --- a/xt/612-lhost-amazonses.t +++ b/xt/612-lhost-amazonses.t @@ -38,6 +38,8 @@ my $isexpected = { '01027' => [['5.2.2', '552', 'mailboxfull', 0]], '01028' => [['5.4.7', '', 'expired', 0]], '01029' => [['5.3.0', '550', 'filtered', 0]], + '01030' => [['2.6.0', '250', 'delivered', 0]], + '01031' => [['2.6.0', '250', 'delivered', 0]], }; plan 'skip_all', sprintf("%s not found", $samplepath) unless -d $samplepath; diff --git a/xt/640-lhost-domino.t b/xt/640-lhost-domino.t index 3bdd5a6a4..6c913243a 100644 --- a/xt/640-lhost-domino.t +++ b/xt/640-lhost-domino.t @@ -26,6 +26,8 @@ my $isexpected = { '01015' => [['5.0.0', '', 'networkerror', 0]], '01016' => [['5.0.0', '', 'systemerror', 0]], '01017' => [['5.0.0', '', 'userunknown', 1]], + '01018' => [['5.1.1', '', 'userunknown', 1]], + '01019' => [['5.0.0', '', 'userunknown', 1]], }; plan 'skip_all', sprintf("%s not found", $samplepath) unless -d $samplepath; diff --git a/xt/652-lhost-exchange2007.t b/xt/652-lhost-exchange2007.t index bbb98f783..591219e9c 100644 --- a/xt/652-lhost-exchange2007.t +++ b/xt/652-lhost-exchange2007.t @@ -22,6 +22,7 @@ my $isexpected = { '01011' => [['5.2.3', '550', 'exceedlimit', 0]], '01012' => [['5.1.1', '550', 'userunknown', 1]], '01013' => [['5.0.910', '550', 'filtered', 0]], + '01014' => [['4.2.0', '420', 'systemerror', 0]], }; plan 'skip_all', sprintf("%s not found", $samplepath) unless -d $samplepath; diff --git a/xt/750-lhost-office365.t b/xt/750-lhost-office365.t index 9fd21f8ac..8311b4420 100644 --- a/xt/750-lhost-office365.t +++ b/xt/750-lhost-office365.t @@ -36,6 +36,10 @@ my $isexpected = { '01025' => [['5.1.10', '550', 'userunknown', 1]], '01026' => [['5.1.10', '550', 'userunknown', 1]], '01027' => [['5.1.1', '550', 'userunknown', 1]], + '01028' => [['5.1.1', '550', 'userunknown', 1]], + '01029' => [['5.1.1', '550', 'userunknown', 1]], + '01030' => [['5.2.3', '550', 'exceedlimit', 0]], + '01031' => [['5.1.10', '550', 'userunknown', 1]], }; plan 'skip_all', sprintf("%s not found", $samplepath) unless -d $samplepath; diff --git a/xt/760-lhost-postfix.t b/xt/760-lhost-postfix.t index 78e920f6f..b7fc7bbcf 100644 --- a/xt/760-lhost-postfix.t +++ b/xt/760-lhost-postfix.t @@ -283,6 +283,8 @@ my $isexpected = { '01265' => [['5.0.0', '554', 'rejected', 0]], '01266' => [['5.0.0', '550', 'suspend', 0]], '01267' => [['5.0.0', '550', 'onhold', 0]], # spamdetected + '01268' => [['5.0.0', '550', 'suspend', 0]], + '01269' => [['5.0.0', '550', 'virusdetected', 0]], }; plan 'skip_all', sprintf("%s not found", $samplepath) unless -d $samplepath; diff --git a/xt/791-lhost-sendmail.t b/xt/791-lhost-sendmail.t index 079d600f5..02ca00e37 100644 --- a/xt/791-lhost-sendmail.t +++ b/xt/791-lhost-sendmail.t @@ -239,6 +239,7 @@ my $isexpected = { '01226' => [['5.7.1', '550', 'rejected', 0]], '01227' => [['5.7.1', '550', 'rejected', 0]], '01228' => [['5.1.1', '550', 'userunknown', 1]], + '01229' => [['5.4.1', '550', 'rejected', 0]], }; plan 'skip_all', sprintf("%s not found", $samplepath) unless -d $samplepath; diff --git a/xt/890-rfc3464.t b/xt/890-rfc3464.t index c9c53b6e2..b30dd7417 100644 --- a/xt/890-rfc3464.t +++ b/xt/890-rfc3464.t @@ -278,6 +278,7 @@ my $isexpected = { '01286' => [['5.5.0', '550', 'rejected', 0]], '01287' => [['5.0.0', '550', 'filtered', 0]], '01288' => [['5.0.0', '552', 'exceedlimit', 0]], + '01289' => [['4.0.0', '', 'notaccept', 0]], }; plan 'skip_all', sprintf("%s not found", $samplepath) unless -d $samplepath;