<commit_before>package Sisimai::MSP;
use feature ':5.10';
use strict;
use warnings;
use Sisimai::MTA;

sub version     { return '4.0.10' }
sub description { return '' }
sub headerlist  { return [] }

sub SMTPCOMMAND    { return Sisimai::MTA->SMTPCOMMAND    }
sub EOM            { return Sisimai::MTA->EOM            }
sub DELIVERYSTATUS { return Sisimai::MTA->DELIVERYSTATUS }
sub RFC822HEADERS  { 
    my $class = shift;
    my $argvs = shift;
    return Sisimai::MTA->RFC822HEADERS( $argvs );
}

sub smtpagent {
    my $class = shift; 
    return shift // 'null';
}

sub index {
    # @Description  MSP list
    # @Param        None
    # @Return       (Ref->Array) MSP list with order
    my $class = shift;
    my $index = [
        'US::Google', 'US::Yahoo', 'US::Aol', 'US::Outlook',
        'US::AmazonSES', 'US::SendGrid',
        'JP::EZweb', 'JP::KDDI', 'JP::Biglobe',
        'US::Verizon', 'RU::MailRu', 'RU::Yandex', 'DE::GMX', 'DE::EinsUndEins',
        'US::Zoho', 'US::Facebook', 'UK::MessageLabs',
    ];

    return $index;
}

sub scan {
    # @Description  Detect an error
    # @Param <ref>  (Ref->Hash) Message header
    # @Param <ref>  (Ref->String) Message body
    # @Return       (Ref->Hash) Bounce data list and message/rfc822 part
    return '';
#     my $RxMSP = {};
# 
#     my $class = shift;
#     my $mhead = shift // return undef;
#     my $mbody = shift // return undef;
# 
#     # return undef unless $mhead->{'subject'} =~ $RxMSP->{'subject'};
#     # return undef unless $mhead->{'from'}    =~ $RxMSP->{'from'};
# 
#     my $dscontents = [];    # (Ref->Array) SMTP session errors: message/delivery-status
#     my $rfc822head = undef; # (Ref->Array) Required header list in message/rfc822 part
#     my $rfc822part = '';    # (String) message/rfc822-headers part
#     my $previousfn = '';    # (String) Previous field name
# 
#     my $stripedtxt = [ split( "\n", $$mbody ) ];
#     my $recipients = 0;     # (Integer) The number of 'Final-Recipient' header
#     my $rcptintext = '';    # (String) Recipient address in the message body<commit_msg>Call Sisimai::MSP::US::Bigfoot<commit_after>package Sisimai::MSP;
use feature ':5.10';
use strict;
use warnings;
use Sisimai::MTA;

sub version     { return '4.0.11' }
sub description { return '' }
sub headerlist  { return [] }

sub SMTPCOMMAND    { return Sisimai::MTA->SMTPCOMMAND    }
sub EOM            { return Sisimai::MTA->EOM            }
sub DELIVERYSTATUS { return Sisimai::MTA->DELIVERYSTATUS }
sub RFC822HEADERS  { 
    my $class = shift;
    my $argvs = shift;
    return Sisimai::MTA->RFC822HEADERS( $argvs );
}

sub smtpagent {
    my $class = shift; 
    return shift // 'null';
}

sub index {
    # @Description  MSP list
    # @Param        None
    # @Return       (Ref->Array) MSP list with order
    my $class = shift;
    my $index = [
        'US::Google', 'US::Yahoo', 'US::Aol', 'US::Outlook',
        'US::AmazonSES', 'US::SendGrid',
        'JP::EZweb', 'JP::KDDI', 'JP::Biglobe',
        'US::Verizon', 'RU::MailRu', 'RU::Yandex', 'DE::GMX', 'DE::EinsUndEins',
        'US::Zoho', 'US::Bigfoot', 'US::Facebook', 'UK::MessageLabs',
    ];

    return $index;
}

sub scan {
    # @Description  Detect an error
    # @Param <ref>  (Ref->Hash) Message header
    # @Param <ref>  (Ref->String) Message body
    # @Return       (Ref->Hash) Bounce data list and message/rfc822 part
    return '';
#     my $RxMSP = {};
# 
#     my $class = shift;
#     my $mhead = shift // return undef;
#     my $mbody = shift // return undef;
# 
#     # return undef unless $mhead->{'subject'} =~ $RxMSP->{'subject'};
#     # return undef unless $mhead->{'from'}    =~ $RxMSP->{'from'};
# 
#     my $dscontents = [];    # (Ref->Array) SMTP session errors: message/delivery-status
#     my $rfc822head = undef; # (Ref->Array) Required header list in message/rfc822 part
#     my $rfc822part = '';    # (String) message/rfc822-headers part
#     my $previousfn = '';    # (String) Previous field name
# 
#     my $stripedtxt = [ split( "\n", $$mbody ) ];
#     my $recipients = 0;     # (Integer) The number of 'Final-Recipient' header
#     my $rcptintext = '';    # (String) Recipient address in the message body
{'fraction_non_alphanumeric': 0.16951973371374227, 'fraction_numerical': 0.01378982406086543, 'mean_word_length': 2.7866786678667865, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3697075', 'n_tokens_mistral': 1571, 'n_tokens_neox': 1510, 'n_words': 381}