Skip to content

Commit

Permalink
Update test code for Sismai::Reason::BadReputation #469
Browse files Browse the repository at this point in the history
  • Loading branch information
azumakuniyuki committed Nov 6, 2022
1 parent fc8a0d5 commit 8d9a263
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 4 deletions.
1 change: 1 addition & 0 deletions t/200-reason.t
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,7 @@ my $Message = [
'smtp;550 5.2.2 <mikeneko@example.co.jp>... Mailbox Full',
'smtp;550 Requested action not taken: mailbox unavailable (-2019901852:4030:-2147467259)',
'smtp;550 5.1.1 <kijitora@example.or.jp>... User unknown',
'451 4.7.650 The mail server [192.0.2.2] has been temporarily rate limited due to IP reputation.',
'451 4.7.1 <smtp3.example.jp[192.0.2.1]>: Client host rejected: Please try again slower',
'550 5.1.1 <kijitora@example.jp>... User Unknown ',
'550 5.1.1 <this-local-part-does-not-exist-on-the-server@example.jp>... ',
Expand Down
1 change: 1 addition & 0 deletions t/201-reason-children.t
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use Sisimai;

my $reasonchildren = {
'AuthFailure' => ["550 5.1.0 192.0.2.222 is not allowed to send from <example.net> per it's SPF Record"],
'BadReputation' => ['451 4.7.650 The mail server [192.0.2.2] has been temporarily rate limited due to IP reputation.'],
'Blocked' => ['550 Access from ip address 192.0.2.1 blocked.'],
'ContentError' => ['550 5.6.0 the headers in this message contain improperly-formatted binary content'],
'ExceedLimit' => ['5.2.3 Message too large'],
Expand Down
2 changes: 1 addition & 1 deletion t/760-lhost-postfix.t
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ my $isexpected = {
'55' => [['5.0.0', '552', 'toomanyconn', 0]],
'56' => [['4.4.2', '', 'networkerror', 0]],
'57' => [['5.2.1', '550', 'userunknown', 1]],
'58' => [['5.7.1', '550', 'blocked', 0]],
'58' => [['5.7.1', '550', 'badreputation', 0]],
'59' => [['5.2.1', '550', 'speeding', 0]],
'60' => [['4.0.0', '', 'blocked', 0]],
'61' => [['5.0.0', '550', 'suspend', 0]],
Expand Down
1 change: 1 addition & 0 deletions t/900-modules.pl
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ sub list {
Order.pm
Reason.pm
Reason/AuthFailure.pm
Reason/BadReputation.pm
Reason/Blocked.pm
Reason/ContentError.pm
Reason/Delivered.pm
Expand Down
6 changes: 3 additions & 3 deletions xt/760-lhost-postfix.t
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ my $isexpected = {
'01150' => [['5.0.910', '', 'filtered', 0]],
'01151' => [['5.0.0', '550', 'spamdetected', 0]],
'01152' => [['5.3.0', '553', 'blocked', 0]],
'01153' => [['5.7.1', '550', 'blocked', 0]],
'01153' => [['5.7.1', '550', 'badreputation', 0]],
'01154' => [['4.7.0', '421', 'blocked', 0]],
'01155' => [['5.1.0', '550', 'userunknown', 1]],
'01156' => [['5.1.0', '550', 'userunknown', 1]],
Expand Down Expand Up @@ -251,14 +251,14 @@ my $isexpected = {
'01233' => [['5.0.0', '550', 'blocked', 0]],
'01234' => [['5.0.0', '553', 'blocked', 0]],
'01235' => [['5.0.0', '554', 'spamdetected', 0]],
'01236' => [['5.0.0', '550', 'blocked', 0]],
'01236' => [['5.0.0', '550', 'badreputation', 0]],
'01237' => [['5.0.0', '550', 'norelaying', 0]],
'01238' => [['5.0.0', '550', 'userunknown', 1]],
'01239' => [['5.0.0', '550', 'blocked', 0]],
'01240' => [['5.0.0', '550', 'rejected', 0]],
'01241' => [['5.0.0', '550', 'rejected', 0]],
'01242' => [['5.0.0', '550', 'spamdetected', 0]],
'01243' => [['5.0.0', '554', 'blocked', 0]],
'01243' => [['5.0.0', '554', 'badreputation', 0]],
'01244' => [['5.8.5', '550', 'policyviolation', 0]],
'01245' => [['5.0.0', '554', 'blocked', 0]],
'01246' => [['5.0.0', '550', 'userunknown', 1]],
Expand Down

0 comments on commit 8d9a263

Please sign in to comment.