<commit_before>package Sisimai::Reason::SpamDetected;
use feature ':5.10';
use strict;
use warnings;

sub text  { 'spamdetected' }
sub match {
    # Try to match that the given text and regular expressions
    # @param    [String] argv1  String to be matched with regular expressions
    # @return   [Integer]       0: Did not match
    #                           1: Matched
    # @since v4.1.19
    my $class = shift;
    my $argv1 = shift // return undef;
    my $regex = qr{(?>
         ["]The[ ]mail[ ]server[ ]detected[ ]your[ ]message[ ]as[ ]spam[ ]and[ ]
            has[ ]prevented[ ]delivery[.]["]    # CPanel/Exim with SA rejections on
        |(?:\d[.]\d[.]\d|\d{3})[ ]spam\z
        |appears[ ]to[ ]be[ ]unsolicited
        |Blacklisted[ ]URL[ ]in[ ]message
        |block[ ]for[ ]spam
        |blocked[ ]by[ ](?:
             policy:[ ]no[ ]spam[ ]please
            |spamAssassin                   # rejected by SpamAssassin
            )
        |blocked[ ]for[ ]abuse[.][ ]see[ ]http://att[.]net/blocks   # AT&T
        |bulk[ ]email
        |content[ ]filter[ ]rejection
        |cyberoam[ ]anti[ ]spam[ ]engine[ ]has[ ]identified[ ]this[ ]email[ ]as[ ]a[ ]bulk[ ]email
        |denied[ ]due[ ]to[ ]spam[ ]list
        |dt:spm[ ]mx.+[ ]http://mail[.]163[.]com/help/help_spam_16[.]htm
        |greylisted.?.[ ]please[ ]try[ ]again[ ]in
        |http://(?:
             www[.]spamhaus[.]org
            |dsbl[.]org
            |www[.]sorbs[.]net
            )
        |listed[ ]in[ ]work[.]drbl[.]imedia[.]ru
        |mail[ ](?:
             appears[ ]to[ ]be[ ]unsolicited    # rejected due to spam
            |content[ ]denied   # http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000726
            )
        |may[ ]consider[ ]spam
        |message[ ](?:
             content[ ]rejected
            |filtered
            |filtered[.][ ]please[ ]see[ ]the[ ]faqs[ ]section[ ]on[ ]spam
            |filtered[.][ ]Refer[ ]to[ ]the[ ]Troubleshooting[ ]page[ ]at[ ]
            |looks[ ]like[ ]spam
            |not[ ]accepted[ ]for[ ]policy[ ]reasons[.][ ]See[ ]http:   # Yahoo!
            |refused[ ]by[ ]mailmarshal[ ]spamprofiler
            |rejected[ ]as[ ]spam
            |rejected[ ]as[ ]spam[ ]by[ ]Content[ ]Filtering
            |rejected[ ]due[ ]to[ ]suspected[ ]spam[ ]content
            |rejected[ ]for[ ]policy[ ]reasons
            )
        |our[ ]email[ ]server[ ]thinks[ ]this[ ]email[ ]is[ ]spam
        |our[ ]filters[ ]rate[ ]at[ ]and[ ]above[ ].+[ ]percent[ ]probability[ ]of[ ]being[ ]spam
        |our[ ]system[ ]has[ ]detected[ ]that[ ]this[ ]message[ ]is
        |probable[ ]spam
        |rejected(?:
             :[ ]spamassassin[ ]score[ ]
            |[ ]by[ ].+[ ][(]spam[)]
            |[ ]due[ ]to[ ]spam[ ]content
            )
        |rejecting[ ]banned[ ]content 
        |related[ ]to[ ]content[ ]with[ ]spam[-]like[ ]characteristics
        |rule[ ]imposed[ ]as[ ].+is[ ]blacklisted[ ]on              # Mailmarshal RBLs
        |sending[ ]address[ ]not[ ]accepted[ ]due[ ]to[ ]spam[ ]filter
        |spam[ ](?:
             blocked
            |check
            |content[ ]matched
            |detected
            |email
            |email[ ]not[ ]accepted
            |message[ ]rejected[.]       # mail.ru
            |not[ ]accepted
            |refused
            |rejection<commit_msg>Update message pattern of Sisimai::Reason::SpamDetected<commit_after>package Sisimai::Reason::SpamDetected;
use feature ':5.10';
use strict;
use warnings;

sub text  { 'spamdetected' }
sub match {
    # Try to match that the given text and regular expressions
    # @param    [String] argv1  String to be matched with regular expressions
    # @return   [Integer]       0: Did not match
    #                           1: Matched
    # @since v4.1.19
    my $class = shift;
    my $argv1 = shift // return undef;
    my $regex = qr{(?>
         ["]The[ ]mail[ ]server[ ]detected[ ]your[ ]message[ ]as[ ]spam[ ]and[ ]
            has[ ]prevented[ ]delivery[.]["]    # CPanel/Exim with SA rejections on
        |(?:\d[.]\d[.]\d|\d{3})[ ]spam\z
        |appears[ ]to[ ]be[ ]unsolicited
        |Blacklisted[ ]URL[ ]in[ ]message
        |block[ ]for[ ]spam
        |blocked[ ]by[ ](?:
             policy:[ ]no[ ]spam[ ]please
            |spamAssassin                   # rejected by SpamAssassin
            )
        |blocked[ ]for[ ]abuse[.][ ]see[ ]http://att[.]net/blocks   # AT&T
        |bulk[ ]email
        |content[ ]filter[ ]rejection
        |cyberoam[ ]anti[ ]spam[ ]engine[ ]has[ ]identified[ ]this[ ]email[ ]as[ ]a[ ]bulk[ ]email
        |denied[ ]due[ ]to[ ]spam[ ]list
        |dt:spm[ ]mx.+[ ]http://mail[.]163[.]com/help/help_spam_16[.]htm
        |greylisted.?.[ ]please[ ]try[ ]again[ ]in
        |http://(?:
             www[.]spamhaus[.]org
            |dsbl[.]org
            |www[.]sorbs[.]net
            )
        |listed[ ]in[ ]work[.]drbl[.]imedia[.]ru
        |mail[ ](?:
             appears[ ]to[ ]be[ ]unsolicited    # rejected due to spam
            |content[ ]denied   # http://service.mail.qq.com/cgi-bin/help?subtype=1&&id=20022&&no=1000726
            )
        |may[ ]consider[ ]spam
        |message[ ](?:
             content[ ]rejected
            |filtered
            |filtered[.][ ]please[ ]see[ ]the[ ]faqs[ ]section[ ]on[ ]spam
            |filtered[.][ ]Refer[ ]to[ ]the[ ]Troubleshooting[ ]page[ ]at[ ]
            |looks[ ]like[ ]spam
            |not[ ]accepted[ ]for[ ]policy[ ]reasons[.][ ]See[ ]http:   # Yahoo!
            |refused[ ]by[ ]mailmarshal[ ]spamprofiler
            |rejected[ ]as[ ]spam
            |rejected[ ]as[ ]spam[ ]by[ ]Content[ ]Filtering
            |rejected[ ]due[ ]to[ ]suspected[ ]spam[ ]content
            |rejected[ ]for[ ]policy[ ]reasons
            )
        |our[ ]email[ ]server[ ]thinks[ ]this[ ]email[ ]is[ ]spam
        |our[ ]filters[ ]rate[ ]at[ ]and[ ]above[ ].+[ ]percent[ ]probability[ ]of[ ]being[ ]spam
        |our[ ]system[ ]has[ ]detected[ ]that[ ]this[ ]message[ ]is
        |probable[ ]spam
        |rejected(?:
             :[ ]spamassassin[ ]score[ ]
            |[ ]by[ ].+[ ][(]spam[)]
            |[ ]due[ ]to[ ]spam[ ]content
            )
        |rejecting[ ]banned[ ]content 
        |related[ ]to[ ]content[ ]with[ ]spam[-]like[ ]characteristics
        |rule[ ]imposed[ ]as[ ].+is[ ]blacklisted[ ]on              # Mailmarshal RBLs
        |sending[ ]address[ ]not[ ]accepted[ ]due[ ]to[ ]spam[ ]filter
        |spam[ ](?:
             .+[ ]exceeded
            |blocked
            |check
            |content[ ]matched
            |detected
            |email
            |email[ ]not[ ]accepted
            |message[ ]rejected[.]       # mail.ru
            |not[ ]accepted
            |refused
            |rejection
{'fraction_non_alphanumeric': 0.17723194587439328, 'fraction_numerical': 0.008824827180467716, 'mean_word_length': 1.869198312236287, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 4, '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': '4313254', 'n_tokens_mistral': 2439, 'n_tokens_neox': 2358, 'n_words': 576}