Detection rules › Sublime MQL

Sublime MQL rules: scam

Scam soliciting employer review/rating

#
Severity
low
Type
rule
Source
github.com/sublime-security/sublime-rules

Detects scam content that impersonates employer review/rating platforms (e.g., Glassdoor, Indeed, Comparably, Great Place to Work) and solicits the recipient to review or rate their employer, while excluding legitimate review/rating platform senders.

Threat Classification

Sublime's own taxonomy (not MITRE ATT&CK).

CategoryValues
Attack typesBEC/Fraud, Credential Phishing
Tactics and techniquesSocial engineering, Impersonation: Brand

Telemetry Coverage

PlatformRecord / event type
SublimeInbound email message

Message Attributes

  • body
  • body.current_thread
  • headers
  • headers.auth_summary
  • sender.email
  • subject
  • type

Rule Body

type.inbound
// credential theft or scam intent
and any(ml.nlu_classifier(body.current_thread.text).intents,
        .name in ("cred_theft", "job_scam") and .confidence != "low"
)
// employer/workplace review solicitation phrasing
and regex.icontains(body.current_thread.text,
                    '\brate\s+(?:your\s+)?(?:employer|workplace|job)\b',
                    '\breview\s+(?:your\s+)?(?:experience\s+(?:at|with)\s+(?:your|the)\s)',
                    '\b(?:employer|workplace|job)\s+(?:review|rating|feedback)\b',
                    '\bleave\s+(?:a\s+)?(?:review|rating).{0,40}(?:employer|workplace|job)',
                    '(?:glassdoor|comparably|great\s+place\s+to\s+work|kununu|jobcase).{0,40}(?:review|rate|rating|feedback)'
)
and (
  // credential harvesting
  regex.icontains(body.current_thread.text,
                  '(?:enter|provide|confirm|verify).{0,40}(?:password|credentials|login|email\s+and\s+password)',
                  'verify\s+your\s+(?:identity|eligibility|account|profile)',
                  '(?:password|credential|login).{0,30}(?:enter|provide|confirm|verify|required)'
  )
  // or monetary incentive
  or regex.icontains(body.current_thread.text,
                     'gift.?card',
                     '(?:receive|earn|get|claim).{0,30}[\$€£]\d+',
                     '[\$€£]\d+.{0,30}(?:gift|reward|credit|incentive|voucher|bonus|prize)',
                     'token\s+of\s+(?:our\s+)?(?:appreciation|thanks|gratitude)'
  )
)
// negating legitimate/trusted employer review/rating senders
and not (
  (
    sender.email.domain.root_domain in (
      'comparably.com',
      'greatplacetowork.com',
      'builtin.com',
      'lensa.com',
      'ziprecruiter.com',
      'kununu.com',
      'jobcase.com',
      'trustpilot.com'
    )
    or sender.email.domain.root_domain in $high_trust_sender_root_domains
  )
  and coalesce(headers.auth_summary.dmarc.pass, false)
)
// subject cites employer review / rating / feedback context
and regex.icontains(subject.subject,
                    '\breview\b',
                    '\brating\b',
                    '\brate\b',
                    '\bfeedback\b',
                    '\btestimonial\b',
                    '\b(?:employer|workplace|company|employee|job)\b',
                    '\b(?:glassdoor|indeed|linkedin|comparably|great\s+place\s+to\s+work|built\s?in|lensa|ziprecruiter|kununu|jobcase|trustpilot)\b',
                    '\bexperience\b',
                    '\bsurvey\b',
                    '\bopinion\b'
)

Detection Logic

Scope: inbound message.

Detects scam content that impersonates employer review/rating platforms (e.g., Glassdoor, Indeed, Comparably, Great Place to Work) and solicits the recipient to review or rate their employer, while excluding legitimate review/rating platform senders.

  1. inbound message
  2. any(ml.nlu_classifier(body.current_thread.text).intents, .name in ("cred_theft", "job_scam") and .confidence != "low" )
  3. body.current_thread.text matches any of 5 patterns
    • \brate\s+(?:your\s+)?(?:employer|workplace|job)\b
    • \breview\s+(?:your\s+)?(?:experience\s+(?:at|with)\s+(?:your|the)\s)
    • \b(?:employer|workplace|job)\s+(?:review|rating|feedback)\b
    • \bleave\s+(?:a\s+)?(?:review|rating).{0,40}(?:employer|workplace|job)
    • (?:glassdoor|comparably|great\s+place\s+to\s+work|kununu|jobcase).{0,40}(?:review|rate|rating|feedback)
  4. any of:
    • body.current_thread.text matches any of 3 patterns
      • (?:enter|provide|confirm|verify).{0,40}(?:password|credentials|login|email\s+and\s+password)
      • verify\s+your\s+(?:identity|eligibility|account|profile)
      • (?:password|credential|login).{0,30}(?:enter|provide|confirm|verify|required)
    • body.current_thread.text matches any of 4 patterns
      • gift.?card
      • (?:receive|earn|get|claim).{0,30}[\$€£]\d+
      • [\$€£]\d+.{0,30}(?:gift|reward|credit|incentive|voucher|bonus|prize)
      • token\s+of\s+(?:our\s+)?(?:appreciation|thanks|gratitude)
  5. not:
    • all of:
      • any of:
        • sender.email.domain.root_domain in ('comparably.com', 'greatplacetowork.com', 'builtin.com', 'lensa.com', 'ziprecruiter.com', 'kununu.com', 'jobcase.com', 'trustpilot.com')
        • sender.email.domain.root_domain in $high_trust_sender_root_domains
      • coalesce(headers.auth_summary.dmarc.pass, false)
  6. subject.subject matches any of 10 patterns
    • \breview\b
    • \brating\b
    • \brate\b
    • \bfeedback\b
    • \btestimonial\b
    • \b(?:employer|workplace|company|employee|job)\b
    • \b(?:glassdoor|indeed|linkedin|comparably|great\s+place\s+to\s+work|built\s?in|lensa|ziprecruiter|kununu|jobcase|trustpilot)\b
    • \bexperience\b
    • \bsurvey\b
    • \bopinion\b

Inspects: body.current_thread.text, headers.auth_summary.dmarc.pass, sender.email.domain.root_domain, subject.subject, type.inbound. Sensors: ml.nlu_classifier, regex.icontains. Reference lists: $high_trust_sender_root_domains.

Indicators Matched (24)

FieldMatchValue
ml.nlu_classifier(body.current_thread.text).intents[].namemembercred_theft
ml.nlu_classifier(body.current_thread.text).intents[].namememberjob_scam
regex.icontainsregex\brate\s+(?:your\s+)?(?:employer|workplace|job)\b
regex.icontainsregex\breview\s+(?:your\s+)?(?:experience\s+(?:at|with)\s+(?:your|the)\s)
regex.icontainsregex\b(?:employer|workplace|job)\s+(?:review|rating|feedback)\b
regex.icontainsregex\bleave\s+(?:a\s+)?(?:review|rating).{0,40}(?:employer|workplace|job)
regex.icontainsregex(?:glassdoor|comparably|great\s+place\s+to\s+work|kununu|jobcase).{0,40}(?:review|rate|rating|feedback)
regex.icontainsregex(?:enter|provide|confirm|verify).{0,40}(?:password|credentials|login|email\s+and\s+password)
regex.icontainsregexverify\s+your\s+(?:identity|eligibility|account|profile)
regex.icontainsregex(?:password|credential|login).{0,30}(?:enter|provide|confirm|verify|required)
regex.icontainsregexgift.?card
regex.icontainsregex(?:receive|earn|get|claim).{0,30}[\$€£]\d+
12 more
regex.icontainsregex[\$€£]\d+.{0,30}(?:gift|reward|credit|incentive|voucher|bonus|prize)
regex.icontainsregextoken\s+of\s+(?:our\s+)?(?:appreciation|thanks|gratitude)
regex.icontainsregex\breview\b
regex.icontainsregex\brating\b
regex.icontainsregex\brate\b
regex.icontainsregex\bfeedback\b
regex.icontainsregex\btestimonial\b
regex.icontainsregex\b(?:employer|workplace|company|employee|job)\b
regex.icontainsregex\b(?:glassdoor|indeed|linkedin|comparably|great\s+place\s+to\s+work|built\s?in|lensa|ziprecruiter|kununu|jobcase|trustpilot)\b
regex.icontainsregex\bexperience\b
regex.icontainsregex\bsurvey\b
regex.icontainsregex\bopinion\b

Stages and Predicates

Stage 1: mql_rule

and
  not
    and
      or
        sender.email.domain.root_domain in ["builtin.com", "comparably.com", "greatplacetowork.com", "jobcase.com", "kununu.com", "lensa.com", "trustpilot.com", "ziprecruiter.com"]
        sender.email.domain.root_domain macro "sender.email.domain.root_domain in high_trust_sender_root_domains"
      headers.auth_summary.dmarc.pass eq "true"
      headers.auth_summary.dmarc.pass is_not_null
  or
    body.current_thread.text regex_match "(?:enter|provide|confirm|verify).{0,40}(?:password|credentials|login|email\\s+and\\s+password)"
    body.current_thread.text regex_match "(?:password|credential|login).{0,30}(?:enter|provide|confirm|verify|required)"
    body.current_thread.text regex_match "(?:receive|earn|get|claim).{0,30}[\\$€£]\\d+"
    body.current_thread.text regex_match "[\\$€£]\\d+.{0,30}(?:gift|reward|credit|incentive|voucher|bonus|prize)"
    body.current_thread.text regex_match "gift.?card"
    body.current_thread.text regex_match "token\\s+of\\s+(?:our\\s+)?(?:appreciation|thanks|gratitude)"
    body.current_thread.text regex_match "verify\\s+your\\s+(?:identity|eligibility|account|profile)"
  or
    body.current_thread.text regex_match "(?:glassdoor|comparably|great\\s+place\\s+to\\s+work|kununu|jobcase).{0,40}(?:review|rate|rating|feedback)"
    body.current_thread.text regex_match "\\b(?:employer|workplace|job)\\s+(?:review|rating|feedback)\\b"
    body.current_thread.text regex_match "\\bleave\\s+(?:a\\s+)?(?:review|rating).{0,40}(?:employer|workplace|job)"
    body.current_thread.text regex_match "\\brate\\s+(?:your\\s+)?(?:employer|workplace|job)\\b"
    body.current_thread.text regex_match "\\breview\\s+(?:your\\s+)?(?:experience\\s+(?:at|with)\\s+(?:your|the)\\s)"
  or
    subject.subject regex_match "\\b(?:employer|workplace|company|employee|job)\\b"
    subject.subject regex_match "\\b(?:glassdoor|indeed|linkedin|comparably|great\\s+place\\s+to\\s+work|built\\s?in|lensa|ziprecruiter|kununu|jobcase|trustpilot)\\b"
    subject.subject regex_match "\\bexperience\\b"
    subject.subject regex_match "\\bfeedback\\b"
    subject.subject regex_match "\\bopinion\\b"
    subject.subject regex_match "\\brate\\b"
    subject.subject regex_match "\\brating\\b"
    subject.subject regex_match "\\breview\\b"
    subject.subject regex_match "\\bsurvey\\b"
    subject.subject regex_match "\\btestimonial\\b"
  type.inbound eq "true"
   macro "any(ml.nlu_classifier(body.current_thread.text).intents,\n        .name in (\"cred_theft\", \"job_scam\") and .confidence != \"low\"\n)"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
body.current_thread.textregex_match
  • (?:enter|provide|confirm|verify).{0,40}(?:password|credentials|login|email\s+and\s+password)
  • (?:glassdoor|comparably|great\s+place\s+to\s+work|kununu|jobcase).{0,40}(?:review|rate|rating|feedback)
  • (?:password|credential|login).{0,30}(?:enter|provide|confirm|verify|required)
  • (?:receive|earn|get|claim).{0,30}[$€£]\d+
  • [$€£]\d+.{0,30}(?:gift|reward|credit|incentive|voucher|bonus|prize)
  • \b(?:employer|workplace|job)\s+(?:review|rating|feedback)\b
  • \bleave\s+(?:a\s+)?(?:review|rating).{0,40}(?:employer|workplace|job)
  • \brate\s+(?:your\s+)?(?:employer|workplace|job)\b
  • \breview\s+(?:your\s+)?(?:experience\s+(?:at|with)\s+(?:your|the)\s)
  • gift.?card
  • token\s+of\s+(?:our\s+)?(?:appreciation|thanks|gratitude)
  • verify\s+your\s+(?:identity|eligibility|account|profile)
field:"body.current_thread.text" kind:regex_match
subject.subjectregex_match
  • \b(?:employer|workplace|company|employee|job)\b
  • \b(?:glassdoor|indeed|linkedin|comparably|great\s+place\s+to\s+work|built\s?in|lensa|ziprecruiter|kununu|jobcase|trustpilot)\b
  • \bexperience\b
  • \bfeedback\b
  • \bopinion\b
  • \brate\b
  • \brating\b
  • \breview\b
  • \bsurvey\b
  • \btestimonial\b
field:"subject.subject" kind:regex_match
type.inboundeq
  • true transforms: boolean corpus 1212 (mql 1212)
field:"type.inbound" kind:eq value:"true"

Exclusions

The rule actively suppresses these predicates.

FieldKindExcluded valuesSearch
sender.email.domain.root_domaininbuiltin.com, comparably.com, greatplacetowork.com, jobcase.com, kununu.com, lensa.com, trustpilot.com, ziprecruiter.comexcludes:sender.email.domain.root_domain
headers.auth_summary.dmarc.passeqtrueexcludes:headers.auth_summary.dmarc.pass field:"headers.auth_summary.dmarc.pass" value:"true"
headers.auth_summary.dmarc.passis_not_null(no value, null check)excludes:headers.auth_summary.dmarc.pass

Scam: Fake estate sale offering welding equipment and tools

#
Severity
high
Type
rule
Source
github.com/sublime-security/sublime-rules

Detects fraudulent messages impersonating someone selling inherited or estate items, specifically targeting welding equipment, power tools, and machinery. These messages typically claim items are from a deceased relative's estate or due to relocation, require shipping arrangements, and use emotional manipulation to appear legitimate while requesting contact through alternative channels.

Threat Classification

Sublime's own taxonomy (not MITRE ATT&CK).

CategoryValues
Attack typesBEC/Fraud
Tactics and techniquesSocial engineering, Free email provider, Out of band pivot

Telemetry Coverage

PlatformRecord / event type
SublimeInbound email message

Message Attributes

  • body
  • body.current_thread
  • headers
  • headers.reply_to
  • recipients
  • sender.email

Rule Body

length(body.current_thread.links) < 10
and length(body.current_thread.text) < 3000
and (
  regex.icontains(body.current_thread.text,
                  '(?:Miller|Lincoln\s*Electric|Hobart|ESAB|Fronius|Everlast|Hypertherm|Thermal\s*Dynamics)\s*[^\r\n]{0,50}(?:\bwelder\b|\bwelding\b|\bTIG\b|\bMIG\b|plasma\s*cutter)',
                  '(?:\bwelder\b|\bwelding\b|\bTIG\b|\bMIG\b|plasma\s*cutter)\s*[^\r\n]{0,50}(?:Miller|Lincoln\s*Electric|Hobart|ESAB|Fronius|Everlast|Hypertherm|Thermal\s*Dynamics)'
  )
  or regex.icontains(body.current_thread.text,
                     '(?:Caterpillar|\bCAT\b|John\s*Deere|Kubota|Bobcat|Honda|Generac|Stihl|Husqvarna|\bToro\b)\s*[^\r\n]{0,50}(?:\bgenerator\b|\bchainsaw\b|\bexcavator\b|\bskid\s*steer\b|\btractor\b|\bmower\b|\bloader\b|\bbackhoe\b)'
  )
  or regex.icontains(body.current_thread.text,
                     '(?:welding\s*tools|power\s*tools|tool\s+(?:box|chest|set|kit|collection)|toolbox|toolchest)\s*[^\r\n]{0,50}(?:available|sale|rehome|gift|giving\s*away|free)',
                     '(?:available|sale|rehome|gift|giving\s*away|free)\s*[^\r\n]{0,50}(?:welding\s*tools|power\s*tools|tool\s+(?:box|chest|set|kit|collection)|toolbox|toolchest)'
  )
  or strings.ilike(body.current_thread.text,
                   '*welding tools*',
                   '*tools and accessories*'
  )
  or (
    length(regex.extract(body.current_thread.text,
                         '(?i)(?:generator|refrigerator|trailer|tractor|lawnmower|mower|washer|dryer|freezer|treadmill|peloton|vanity|dresser|couch|sectional|kennel|mattress|bed\s*frame|hot\s*tub|golf\s*cart|tv|gazebo|loveseat|dishwasher|microwave|kitchenaid|rolex|watch|honda|toyota|ford|chevy|jeep|kubota|bobcat|polaris|kawasaki|macbook|iphone|playstation|ps5|xbox|canon|sony|dji|piano|keyboard|guitar|violin)\b[^\r\n]{0,30}(?:\(\s*\d{2,5}\s*\)|\$\s*\d{2,5}|\bfor\s+\$?\d{2,5})'
           )
    ) >= 5
    and regex.icontains(body.current_thread.text,
                        'late (?:husband|father|dad|wife|mother|mom)',
                        '(?:husband|father|dad|wife|mother|mom)[^\r\n]{0,50}estate'
    )
  )
)
and (
  regex.icontains(body.current_thread.text,
                  'late (?:husband|father|dad|wife|mother|mom)',
                  '(?:husband|father|dad|wife|mother|mom)[^\r\n]{0,50}estate',
                  'inherited instruments',
                  'just lost (?:her|his|their) (?:husband|father|dad|wife|mother|mom)'
  )
  or strings.ilike(body.current_thread.text,
                   '* downsizing *',
                   '* relocating soon *',
                   '* to relocate *',
                   '*prepares to relocate*',
                   '*relocate with*family*'
  )
  or strings.ilike(body.current_thread.text,
                   '*sponsored*giveaway*',
                   '*giveaway*sponsored*',
                   '* generously offering *',
                   '* generous offer *',
                   '*a loving home*',
                   '*a good home*',
                   '*find a new home *',
                   '*rehome these instruments *',
                   '* free donation*'
  )
  or regex.icontains(body.current_thread.text,
                     'giv\w+\s+away\s+(?:her|his|their|my|our)\s+(?:late|deceased|dad|father|mother|husband|wife)',
                     'giv\w+\s+away\s+(?:her|his|their|my|our)[^\r\n]{0,40}(?:tool|welder|welding|equipment|instrument|machine)'
  )
  or strings.ilike(body.current_thread.text,
                   '*generous opportunity*',
                   '*who needs a reliable*',
                   '*comprehensive set of tools*',
                   '*top-of-the-line machine*'
  )
)
and (
  regex.icontains(body.current_thread.text,
                  'shipping (?:fee|cost|arrangement)',
                  '(?:responsible|pay) for shipping',
                  'no (?:local\s)?pick.?up',
                  '(?:local\s)?pick.?up.{0,50}not available',
                  'delivery only',
                  'moving company'
  )
  or strings.ilike(body.current_thread.text,
                   '* if you will take it *',
                   '* or have someone *',
                   '* indicate your interest *',
                   '* to someone you know *',
                   '* know someone who *',
                   '* someone you know would *',
                   '* someone who will *',
                   '* someone who truly *',
                   '* anyone you know *'
  )
  or regex.icontains(body.current_thread.text,
                     'if you[^\r\n]{0,20}(?:(?:might|will|would) be|are)[^\r\n]{0,20}interested',
                     '(?:any|some)one[^\r\n]{0,20}(is|will|would|might be)[^\r\n]{0,20}interested',
                     'who (?:will|would|might) appreciate'
  )
  or (
    any(regex.extract(body.current_thread.text,
                      "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}"
        ),
        strings.parse_email(.full_match).domain.domain in $free_email_providers
        or strings.parse_email(.full_match).domain.root_domain in $free_email_providers
    )
    or (
      length(headers.reply_to) > 0
      and sender.email.email not in map(headers.reply_to, .email.email)
    )
    or length(recipients.to) == 0
    or regex.icontains(body.current_thread.text,
                       '(?:call|contact|text)[^\r\n]{0,50} at'
    )
    or regex.icontains(body.current_thread.text,
                       '(?:private|personal|primary) (?:e-?)?mail'
    )
    or strings.icontains(body.current_thread.text,
                         'happy to answer any questions you may have'
    )
    or strings.icontains(body.current_thread.text, ' kindly ')
    or strings.icontains(body.current_thread.text, ' (kindly ')
  )
)

Detection Logic

Detects fraudulent messages impersonating someone selling inherited or estate items, specifically targeting welding equipment, power tools, and machinery. These messages typically claim items are from a deceased relative's estate or due to relocation, require shipping arrangements, and use emotional manipulation to appear legitimate while requesting contact through alternative channels.

  1. length(body.current_thread.links) < 10
  2. length(body.current_thread.text) < 3000
  3. any of:
    • body.current_thread.text matches any of 2 patterns
      • (?:Miller|Lincoln\s*Electric|Hobart|ESAB|Fronius|Everlast|Hypertherm|Thermal\s*Dynamics)\s*[^\r\n]{0,50}(?:\bwelder\b|\bwelding\b|\bTIG\b|\bMIG\b|plasma\s*cutter)
      • (?:\bwelder\b|\bwelding\b|\bTIG\b|\bMIG\b|plasma\s*cutter)\s*[^\r\n]{0,50}(?:Miller|Lincoln\s*Electric|Hobart|ESAB|Fronius|Everlast|Hypertherm|Thermal\s*Dynamics)
    • body.current_thread.text matches '(?:Caterpillar|\\bCAT\\b|John\\s*Deere|Kubota|Bobcat|Honda|Generac|Stihl|Husqvarna|\\bToro\\b)\\s*[^\\r\\n]{0,50}(?:\\bgenerator\\b|\\bchainsaw\\b|\\bexcavator\\b|\\bskid\\s*steer\\b|\\btractor\\b|\\bmower\\b|\\bloader\\b|\\bbackhoe\\b)'
    • body.current_thread.text matches any of 2 patterns
      • (?:welding\s*tools|power\s*tools|tool\s+(?:box|chest|set|kit|collection)|toolbox|toolchest)\s*[^\r\n]{0,50}(?:available|sale|rehome|gift|giving\s*away|free)
      • (?:available|sale|rehome|gift|giving\s*away|free)\s*[^\r\n]{0,50}(?:welding\s*tools|power\s*tools|tool\s+(?:box|chest|set|kit|collection)|toolbox|toolchest)
    • body.current_thread.text matches any of 2 patterns
      • *welding tools*
      • *tools and accessories*
    • all of:
      • length(regex.extract(body.current_thread.text, '(?i)(?:generator|refrigerator|trailer|tractor|lawnmower|mower|washer|dryer|freezer|treadmill|peloton|vanity|dresser|couch|sectional|kennel|mattress|bed\s*frame|hot\s*tub|golf\s*cart|tv|gazebo|loveseat|dishwasher|microwave|kitchenaid|rolex|watch|honda|toyota|ford|chevy|jeep|kubota|bobcat|polaris|kawasaki|macbook|iphone|playstation|ps5|xbox|canon|sony|dji|piano|keyboard|guitar|violin)\b[^\r\n]{0,30}(?:\(\s*\d{2,5}\s*\)|\$\s*\d{2,5}|\bfor\s+\$?\d{2,5})' ) ) >= 5
      • body.current_thread.text matches any of 2 patterns
        • late (?:husband|father|dad|wife|mother|mom)
        • (?:husband|father|dad|wife|mother|mom)[^\r\n]{0,50}estate
  4. body.current_thread.text matches any of 24 patterns
    • late (?:husband|father|dad|wife|mother|mom)
    • (?:husband|father|dad|wife|mother|mom)[^\r\n]{0,50}estate
    • inherited instruments
    • just lost (?:her|his|their) (?:husband|father|dad|wife|mother|mom)
    • * downsizing *
    • * relocating soon *
    • * to relocate *
    • *prepares to relocate*
    • *relocate with*family*
    • *sponsored*giveaway*
    • *giveaway*sponsored*
    • * generously offering *
    • * generous offer *
    • *a loving home*
    • *a good home*
    • *find a new home *
    • *rehome these instruments *
    • * free donation*
    • giv\w+\s+away\s+(?:her|his|their|my|our)\s+(?:late|deceased|dad|father|mother|husband|wife)
    • giv\w+\s+away\s+(?:her|his|their|my|our)[^\r\n]{0,40}(?:tool|welder|welding|equipment|instrument|machine)
    • *generous opportunity*
    • *who needs a reliable*
    • *comprehensive set of tools*
    • *top-of-the-line machine*
  5. any of:
    • body.current_thread.text matches any of 6 patterns
      • shipping (?:fee|cost|arrangement)
      • (?:responsible|pay) for shipping
      • no (?:local\s)?pick.?up
      • (?:local\s)?pick.?up.{0,50}not available
      • delivery only
      • moving company
    • body.current_thread.text matches any of 9 patterns
      • * if you will take it *
      • * or have someone *
      • * indicate your interest *
      • * to someone you know *
      • * know someone who *
      • * someone you know would *
      • * someone who will *
      • * someone who truly *
      • * anyone you know *
    • body.current_thread.text matches any of 3 patterns
      • if you[^\r\n]{0,20}(?:(?:might|will|would) be|are)[^\r\n]{0,20}interested
      • (?:any|some)one[^\r\n]{0,20}(is|will|would|might be)[^\r\n]{0,20}interested
      • who (?:will|would|might) appreciate
    • any of:
      • any(regex.extract(body.current_thread.text, "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}" ), strings.parse_email(.full_match).domain.domain in $free_email_providers or strings.parse_email(.full_match).domain.root_domain in $free_email_providers )
      • all of:
        • length(headers.reply_to) > 0
        • sender.email.email not in map(headers.reply_to, .email.email)
      • length(recipients.to) == 0
      • body.current_thread.text matches '(?:call|contact|text)[^\\r\\n]{0,50} at'
      • body.current_thread.text matches '(?:private|personal|primary) (?:e-?)?mail'
      • body.current_thread.text contains 'happy to answer any questions you may have'
      • body.current_thread.text contains ' kindly '
      • body.current_thread.text contains ' (kindly '

Inspects: body.current_thread.links, body.current_thread.text, headers.reply_to, headers.reply_to[].email.email, recipients.to, sender.email.email. Sensors: regex.extract, regex.icontains, strings.icontains, strings.ilike, strings.parse_email. Reference lists: $free_email_providers.

Indicators Matched (56)

FieldMatchValue
regex.icontainsregex(?:Miller|Lincoln\s*Electric|Hobart|ESAB|Fronius|Everlast|Hypertherm|Thermal\s*Dynamics)\s*[^\r\n]{0,50}(?:\bwelder\b|\bwelding\b|\bTIG\b|\bMIG\b|plasma\s*cutter)
regex.icontainsregex(?:\bwelder\b|\bwelding\b|\bTIG\b|\bMIG\b|plasma\s*cutter)\s*[^\r\n]{0,50}(?:Miller|Lincoln\s*Electric|Hobart|ESAB|Fronius|Everlast|Hypertherm|Thermal\s*Dynamics)
regex.icontainsregex(?:Caterpillar|\bCAT\b|John\s*Deere|Kubota|Bobcat|Honda|Generac|Stihl|Husqvarna|\bToro\b)\s*[^\r\n]{0,50}(?:\bgenerator\b|\bchainsaw\b|\bexcavator\b|\bskid\s*steer\b|\btractor\b|\bmower\b|\bloader\b|\bbackhoe\b)
regex.icontainsregex(?:welding\s*tools|power\s*tools|tool\s+(?:box|chest|set|kit|collection)|toolbox|toolchest)\s*[^\r\n]{0,50}(?:available|sale|rehome|gift|giving\s*away|free)
regex.icontainsregex(?:available|sale|rehome|gift|giving\s*away|free)\s*[^\r\n]{0,50}(?:welding\s*tools|power\s*tools|tool\s+(?:box|chest|set|kit|collection)|toolbox|toolchest)
strings.ilikesubstring*welding tools*
strings.ilikesubstring*tools and accessories*
regex.extractregex(?i)(?:generator|refrigerator|trailer|tractor|lawnmower|mower|washer|dryer|freezer|treadmill|peloton|vanity|dresser|couch|sectional|kennel|mattress|bed\s*frame|hot\s*tub|golf\s*cart|tv|gazebo|loveseat|dishwasher|microwave|kitchenaid|rolex|watch|honda|toyota|ford|chevy|jeep|kubota|bobcat|polaris|kawasaki|macbook|iphone|playstation|ps5|xbox|canon|sony|dji|piano|keyboard|guitar|violin)\b[^\r\n]{0,30}(?:\(\s*\d{2,5}\s*\)|\$\s*\d{2,5}|\bfor\s+\$?\d{2,5})
regex.icontainsregexlate (?:husband|father|dad|wife|mother|mom)
regex.icontainsregex(?:husband|father|dad|wife|mother|mom)[^\r\n]{0,50}estate
regex.icontainsregexinherited instruments
regex.icontainsregexjust lost (?:her|his|their) (?:husband|father|dad|wife|mother|mom)
44 more
strings.ilikesubstring* downsizing *
strings.ilikesubstring* relocating soon *
strings.ilikesubstring* to relocate *
strings.ilikesubstring*prepares to relocate*
strings.ilikesubstring*relocate with*family*
strings.ilikesubstring*sponsored*giveaway*
strings.ilikesubstring*giveaway*sponsored*
strings.ilikesubstring* generously offering *
strings.ilikesubstring* generous offer *
strings.ilikesubstring*a loving home*
strings.ilikesubstring*a good home*
strings.ilikesubstring*find a new home *
strings.ilikesubstring*rehome these instruments *
strings.ilikesubstring* free donation*
regex.icontainsregexgiv\w+\s+away\s+(?:her|his|their|my|our)\s+(?:late|deceased|dad|father|mother|husband|wife)
regex.icontainsregexgiv\w+\s+away\s+(?:her|his|their|my|our)[^\r\n]{0,40}(?:tool|welder|welding|equipment|instrument|machine)
strings.ilikesubstring*generous opportunity*
strings.ilikesubstring*who needs a reliable*
strings.ilikesubstring*comprehensive set of tools*
strings.ilikesubstring*top-of-the-line machine*
regex.icontainsregexshipping (?:fee|cost|arrangement)
regex.icontainsregex(?:responsible|pay) for shipping
regex.icontainsregexno (?:local\s)?pick.?up
regex.icontainsregex(?:local\s)?pick.?up.{0,50}not available
regex.icontainsregexdelivery only
regex.icontainsregexmoving company
strings.ilikesubstring* if you will take it *
strings.ilikesubstring* or have someone *
strings.ilikesubstring* indicate your interest *
strings.ilikesubstring* to someone you know *
strings.ilikesubstring* know someone who *
strings.ilikesubstring* someone you know would *
strings.ilikesubstring* someone who will *
strings.ilikesubstring* someone who truly *
strings.ilikesubstring* anyone you know *
regex.icontainsregexif you[^\r\n]{0,20}(?:(?:might|will|would) be|are)[^\r\n]{0,20}interested
regex.icontainsregex(?:any|some)one[^\r\n]{0,20}(is|will|would|might be)[^\r\n]{0,20}interested
regex.icontainsregexwho (?:will|would|might) appreciate
regex.extractregex[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}
regex.icontainsregex(?:call|contact|text)[^\r\n]{0,50} at
regex.icontainsregex(?:private|personal|primary) (?:e-?)?mail
strings.icontainssubstringhappy to answer any questions you may have
strings.icontainssubstring kindly
strings.icontainssubstring (kindly

Stages and Predicates

Stage 1: mql_rule

and
  or
    and
      or
        body.current_thread.text regex_match "(?:husband|father|dad|wife|mother|mom)[^\\r\\n]{0,50}estate"
        body.current_thread.text regex_match "late (?:husband|father|dad|wife|mother|mom)"
      length func_call "length(regex.extract(body.current_thread.text,\n                         '(?i)(?:generator|refrigerator|trailer|tractor|lawnmower|mower|washer|dryer|freezer|treadmill|peloton|vanity|dresser|couch|sectional|kennel|mattress|bed\\s*frame|hot\\s*tub|golf\\s*cart|tv|gazebo|loveseat|dishwasher|microwave|kitchenaid|rolex|watch|honda|toyota|ford|chevy|jeep|kubota|bobcat|polaris|kawasaki|macbook|iphone|playstation|ps5|xbox|canon|sony|dji|piano|keyboard|guitar|violin)\\b[^\\r\\n]{0,30}(?:\\(\\s*\\d{2,5}\\s*\\)|\\$\\s*\\d{2,5}|\\bfor\\s+\\$?\\d{2,5})'\n           )\n    ) >= 5"
    body.current_thread.text match "tools and accessories"
    body.current_thread.text match "welding tools"
    body.current_thread.text regex_match "(?:Caterpillar|\\bCAT\\b|John\\s*Deere|Kubota|Bobcat|Honda|Generac|Stihl|Husqvarna|\\bToro\\b)\\s*[^\\r\\n]{0,50}(?:\\bgenerator\\b|\\bchainsaw\\b|\\bexcavator\\b|\\bskid\\s*steer\\b|\\btractor\\b|\\bmower\\b|\\bloader\\b|\\bbackhoe\\b)"
    body.current_thread.text regex_match "(?:Miller|Lincoln\\s*Electric|Hobart|ESAB|Fronius|Everlast|Hypertherm|Thermal\\s*Dynamics)\\s*[^\\r\\n]{0,50}(?:\\bwelder\\b|\\bwelding\\b|\\bTIG\\b|\\bMIG\\b|plasma\\s*cutter)"
    body.current_thread.text regex_match "(?:\\bwelder\\b|\\bwelding\\b|\\bTIG\\b|\\bMIG\\b|plasma\\s*cutter)\\s*[^\\r\\n]{0,50}(?:Miller|Lincoln\\s*Electric|Hobart|ESAB|Fronius|Everlast|Hypertherm|Thermal\\s*Dynamics)"
    body.current_thread.text regex_match "(?:available|sale|rehome|gift|giving\\s*away|free)\\s*[^\\r\\n]{0,50}(?:welding\\s*tools|power\\s*tools|tool\\s+(?:box|chest|set|kit|collection)|toolbox|toolchest)"
    body.current_thread.text regex_match "(?:welding\\s*tools|power\\s*tools|tool\\s+(?:box|chest|set|kit|collection)|toolbox|toolchest)\\s*[^\\r\\n]{0,50}(?:available|sale|rehome|gift|giving\\s*away|free)"
  or
    and
      headers.reply_to length_compare "0"
      sender.email.email macro "sender.email.email not in map(headers.reply_to, .email.email)"
    body.current_thread.text contains " (kindly "
    body.current_thread.text contains " kindly "
    body.current_thread.text contains "happy to answer any questions you may have"
    body.current_thread.text match " anyone you know "
    body.current_thread.text match " if you will take it "
    body.current_thread.text match " indicate your interest "
    body.current_thread.text match " know someone who "
    body.current_thread.text match " or have someone "
    body.current_thread.text match " someone who truly "
    body.current_thread.text match " someone who will "
    body.current_thread.text match " someone you know would "
    body.current_thread.text match " to someone you know "
    body.current_thread.text regex_match "(?:any|some)one[^\\r\\n]{0,20}(is|will|would|might be)[^\\r\\n]{0,20}interested"
    body.current_thread.text regex_match "(?:call|contact|text)[^\\r\\n]{0,50} at"
    body.current_thread.text regex_match "(?:local\\s)?pick.?up.{0,50}not available"
    body.current_thread.text regex_match "(?:private|personal|primary) (?:e-?)?mail"
    body.current_thread.text regex_match "(?:responsible|pay) for shipping"
    body.current_thread.text regex_match "delivery only"
    body.current_thread.text regex_match "if you[^\\r\\n]{0,20}(?:(?:might|will|would) be|are)[^\\r\\n]{0,20}interested"
    body.current_thread.text regex_match "moving company"
    body.current_thread.text regex_match "no (?:local\\s)?pick.?up"
    body.current_thread.text regex_match "shipping (?:fee|cost|arrangement)"
    body.current_thread.text regex_match "who (?:will|would|might) appreciate"
    recipients.to length_compare "0"
     macro "any(regex.extract(body.current_thread.text,\n                      \"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\\\.[A-Za-z]{2,}\"\n        ),\n        strings.parse_email(.full_match).domain.domain in $free_email_providers\n        or strings.parse_email(.full_match).domain.root_domain in $free_email_providers\n    )"
  or
    body.current_thread.text match " downsizing "
    body.current_thread.text match " free donation"
    body.current_thread.text match " generous offer "
    body.current_thread.text match " generously offering "
    body.current_thread.text match " relocating soon "
    body.current_thread.text match " to relocate "
    body.current_thread.text match "a good home"
    body.current_thread.text match "a loving home"
    body.current_thread.text match "comprehensive set of tools"
    body.current_thread.text match "find a new home "
    body.current_thread.text match "generous opportunity"
    body.current_thread.text match "prepares to relocate"
    body.current_thread.text match "rehome these instruments "
    body.current_thread.text match "top-of-the-line machine"
    body.current_thread.text match "who needs a reliable"
    body.current_thread.text regex_match "(?:husband|father|dad|wife|mother|mom)[^\\r\\n]{0,50}estate"
    body.current_thread.text regex_match "giv\\w+\\s+away\\s+(?:her|his|their|my|our)[^\\r\\n]{0,40}(?:tool|welder|welding|equipment|instrument|machine)"
    body.current_thread.text regex_match "giv\\w+\\s+away\\s+(?:her|his|their|my|our)\\s+(?:late|deceased|dad|father|mother|husband|wife)"
    body.current_thread.text regex_match "inherited instruments"
    body.current_thread.text regex_match "just lost (?:her|his|their) (?:husband|father|dad|wife|mother|mom)"
    body.current_thread.text regex_match "late (?:husband|father|dad|wife|mother|mom)"
    body.current_thread.text wildcard "*giveaway*sponsored*"
    body.current_thread.text wildcard "*relocate with*family*"
    body.current_thread.text wildcard "*sponsored*giveaway*"
  body.current_thread.links length_compare "10"
  body.current_thread.text length_compare "3000"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
body.current_thread.textcontains
  • (kindly corpus 2 (mql 2)
  • kindly corpus 2 (mql 2)
  • happy to answer any questions you may have
field:"body.current_thread.text" kind:contains
body.current_thread.textregex_match
  • (?:Caterpillar|\bCAT\b|John\s*Deere|Kubota|Bobcat|Honda|Generac|Stihl|Husqvarna|\bToro\b)\s*[^\r\n]{0,50}(?:\bgenerator\b|\bchainsaw\b|\bexcavator\b|\bskid\s*steer\b|\btractor\b|\bmower\b|\bloader\b|\bbackhoe\b)
  • (?:Miller|Lincoln\s*Electric|Hobart|ESAB|Fronius|Everlast|Hypertherm|Thermal\s*Dynamics)\s*[^\r\n]{0,50}(?:\bwelder\b|\bwelding\b|\bTIG\b|\bMIG\b|plasma\s*cutter)
  • (?:\bwelder\b|\bwelding\b|\bTIG\b|\bMIG\b|plasma\s*cutter)\s*[^\r\n]{0,50}(?:Miller|Lincoln\s*Electric|Hobart|ESAB|Fronius|Everlast|Hypertherm|Thermal\s*Dynamics)
  • (?:any|some)one[^\r\n]{0,20}(is|will|would|might be)[^\r\n]{0,20}interested corpus 2 (mql 2)
  • (?:available|sale|rehome|gift|giving\s*away|free)\s*[^\r\n]{0,50}(?:welding\s*tools|power\s*tools|tool\s+(?:box|chest|set|kit|collection)|toolbox|toolchest)
  • (?:call|contact|text)[^\r\n]{0,50} at corpus 2 (mql 2)
  • (?:husband|father|dad|wife|mother|mom)[^\r\n]{0,50}estate corpus 2 (mql 2)
  • (?:local\s)?pick.?up.{0,50}not available corpus 2 (mql 2)
  • (?:private|personal|primary) (?:e-?)?mail
  • (?:responsible|pay) for shipping corpus 2 (mql 2)
  • (?:welding\s*tools|power\s*tools|tool\s+(?:box|chest|set|kit|collection)|toolbox|toolchest)\s*[^\r\n]{0,50}(?:available|sale|rehome|gift|giving\s*away|free)
  • delivery only corpus 2 (mql 2)
  • giv\w+\s+away\s+(?:her|his|their|my|our)[^\r\n]{0,40}(?:tool|welder|welding|equipment|instrument|machine)
  • giv\w+\s+away\s+(?:her|his|their|my|our)\s+(?:late|deceased|dad|father|mother|husband|wife)
  • if you[^\r\n]{0,20}(?:(?:might|will|would) be|are)[^\r\n]{0,20}interested corpus 2 (mql 2)
  • inherited instruments corpus 2 (mql 2)
  • just lost (?:her|his|their) (?:husband|father|dad|wife|mother|mom)
  • late (?:husband|father|dad|wife|mother|mom) corpus 2 (mql 2)
  • moving company corpus 2 (mql 2)
  • no (?:local\s)?pick.?up corpus 2 (mql 2)
  • shipping (?:fee|cost|arrangement) corpus 2 (mql 2)
  • who (?:will|would|might) appreciate corpus 2 (mql 2)
field:"body.current_thread.text" kind:regex_match
body.current_thread.textwildcard
  • * anyone you know * corpus 2 (mql 2)
  • * downsizing * corpus 2 (mql 2)
  • * free donation* corpus 2 (mql 2)
  • * generous offer *
  • * generously offering * corpus 2 (mql 2)
  • * if you will take it * corpus 2 (mql 2)
  • * indicate your interest * corpus 2 (mql 2)
  • * know someone who * corpus 2 (mql 2)
  • * or have someone * corpus 2 (mql 2)
  • * relocating soon *
  • * someone who truly * corpus 2 (mql 2)
  • * someone who will * corpus 2 (mql 2)
  • * someone you know would * corpus 2 (mql 2)
  • * to relocate * corpus 2 (mql 2)
  • * to someone you know * corpus 2 (mql 2)
  • *a good home* corpus 2 (mql 2)
  • *a loving home* corpus 2 (mql 2)
  • *comprehensive set of tools*
  • *find a new home * corpus 2 (mql 2)
  • *generous opportunity*
  • *giveaway*sponsored*
  • *prepares to relocate*
  • *rehome these instruments * corpus 2 (mql 2)
  • *relocate with*family*
  • *sponsored*giveaway*
  • *tools and accessories*
  • *top-of-the-line machine*
  • *welding tools*
  • *who needs a reliable*
field:"body.current_thread.text" kind:wildcard

Scam: Piano giveaway

#
Severity
medium
Type
rule
Source
github.com/sublime-security/sublime-rules

This rule is designed to identify and mitigate a specific type of fraudulent activity commonly targeted at educational institutions. This rule operates by analyzing incoming email content for certain characteristics indicative of a scam involving the offer of a free piano, often framed within the context of downsizing or a giveaway.

Threat Classification

Sublime's own taxonomy (not MITRE ATT&CK).

CategoryValues
Attack typesBEC/Fraud
Tactics and techniquesFree email provider

Telemetry Coverage

PlatformRecord / event type
SublimeInbound email message

Message Attributes

  • attachments
  • body
  • body.current_thread
  • headers
  • headers.auth_summary
  • headers.reply_to
  • recipients
  • sender.email

Rule Body

length(body.links) < 10
and length(body.current_thread.text) < 2000
and (
  // body detection
  // be sure to update the attachment detection regexes too!
  (
    (
      // items and brands
      // Guitars
      regex.icontains(body.current_thread.text,
                      '(?:Gibson|Fender|Lowden|Martin|Taylor|Ibanez|Knaggs)\s*[^\r\n]{0,50}\s*guitar',
                      'guitar\s*[^\r\n]{0,50}\s*(?:Gibson|Fender|Lowden|Martin|Taylor|Ibanez|Knaggs)',
      )
      // Piano/Keyboards
      or regex.icontains(body.current_thread.text,
                         '(?:Yamaha|Kawai|Baldwin|Roland|Stei?nway(?: (?:&|and) Sons?)?|\d{4})\s*[^\r\n]{0,50}(?:baby.grand|piano|baby.grand.piano|keyboard)',
                         '(?:baby.grand|piano|baby.grand.piano|keyboard)\s*[^\r\n]{0,50}(?:Yamaha|Kawai|Baldwin|Roland|Stei?nway(?: (?:&|and) Sons?)?|\d{4})',
                         // strong indicators for generalized instrument
                         '(?:piano|keyboard)\s*[^\r\n]{0,50}(?:available|sale|rehome|gift)'
      )
      // Violins & Orchestral 
      or regex.icontains(body.current_thread.text,
                         '(?:Stradivarius|Guarneri|Yamaha|Stentor|Eastman|Cremona|Cecilio|Mendini)\s*[^\r\n]{0,50}(violin|viola|cello|celli)',
      )
      // brass/wind/woodwinds
      or regex.icontains(body.current_thread.text,
                         '(?:Bach|Yamaha|Selmer|Conn|King|Jupiter|Buffet Crampon |Pearl)\s*[^\r\n]{0,50}(trombone|trumpet|saxophone|clarinet|flute)'
      )

      // generic
      or strings.ilike(body.current_thread.text,
                       '* musical instruments *',
                       '* instrument as a gift*'
      )
    )
    and (
      // often a person is moving
      strings.ilike(body.current_thread.text,
                    '* downsizing *',
                    '* relocating *',
                    '* to relocate *',
                    '* relocation *',
                    '* moving *'
      )
      or strings.ilike(body.current_thread.text,
                       '* give away*',
                       '* generously offering *',
                       '*a loving home*',
                       '*a good home*',
                       '*find a new home *',
                       '*rehome these instruments *',
                       '* free donation*',
                       '*free*member of the music community*'
      )
      // generally someone died
      or regex.icontains(body.current_thread.text,
                         'inherited instruments',
                         'late (?:husband|father|dad|wife|mother|mom)',
                         '(?:husband|father|dad|wife|mother|mom)[^\r\n]{0,50}estate'
      )
      // passion/love for the item
      or strings.ilike(body.current_thread.text,
                       '* genuinely cherish*',
                       '* cherished possessions*',
                       '* passionate instrument*',
                       '* music lover*',
                       '* had a passion for music*',
                       '* appreciates music*',
                       "* special piece*",
                       "* a lot of meaning*",
                       "* profound sentimental*",
                       '* will cherish*',
                       '* passion for music*',
                       '* treasured items *'
      )
    )
    and (
      // it talks about a shipping fee upfront
      regex.icontains(body.current_thread.text,
                      'shipping (?:fee|cost|arrangement)',
                      '(?:responsible|pay) for shipping',
                      'no (?:local\s)?pick.?up',
                      '(?:local\s)?pick.?up.{0,50}not available',
                      'delivery only',
                      'moving company'
      )
      // recipient or someone they know might have an interest
      or strings.ilike(body.current_thread.text,
                       '* if you will take it *',
                       '* or have someone *',
                       '* indicate your interest *',
                       '* to someone you know *',
                       '* know someone who *',
                       '* someone you know would *',
                       '* someone who will *',
                       '* someone who truly *',
                       '* anyone you know *',
      )
      or regex.icontains(body.current_thread.text,
                         'if you[^\r\n]{0,20}(?:(?:might|will|would) be|are)[^\r\n]{0,20}interested',
                         '(?:any|some)one[^\r\n]{0,20}(is|will|would|might be)[^\r\n]{0,20}interested',
                         'who (?:will|would|might) appreciate',
      )
      or (
        // there's an email in the body 
        any(regex.extract(body.current_thread.text,
                          "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}"
            ),
            strings.parse_email(.full_match).domain.domain in $free_email_providers
            or strings.parse_email(.full_match).domain.root_domain in $free_email_providers
        )
        // reply-to doesn't match sender
        or (
          length(headers.reply_to) > 0
          and sender.email.email not in map(headers.reply_to, .email.email)
        )
        // there are no recipients
        or length(recipients.to) == 0
        // redirects to a phone number
        or regex.icontains(body.current_thread.text,
                           '(?:call|contact|text)[^\r\n]{0,50} at'
        )
        or regex.icontains(body.current_thread.text,
                           '(?:private|personal) (?:e-?)?mail'
        )
        or strings.icontains(body.current_thread.text, ' kindly ')
        or strings.icontains(body.current_thread.text, ' (kindly ')
      )
    )
  )
  or (
    any(filter(attachments, .size < 10000),
        (
          // items and brands
          // Guitars
          regex.icontains(file.parse_text(.).text,
                          '(?:Gibson|Fender|Lowden|Martin|Taylor|Ibanez|Knaggs)\s*[^\r\n]{0,50}\s*guitar',
                          'guitar\s*[^\r\n]{0,50}\s*(?:Gibson|Fender|Lowden|Martin|Taylor|Ibanez|Knaggs)',
          )
          // Piano/Keyboards
          or regex.icontains(file.parse_text(.).text,
                             '(?:Yamaha|Kawai|Baldwin|Roland|Stei?nway(?: (?:&|and) Sons?)?)\s*[^\r\n]{0,50}(?:baby.grand|piano|baby.grand.piano|keyboard)',
                             '(?:baby.grand|piano|baby.grand.piano|keyboard)\s*[^\r\n]{0,50}(?:Yamaha|Kawai|Baldwin|Roland|Stei?nway(?: (?:&|and) Sons?)?|\d{4})',
                             // strong indicators for generalized instrument
                             '(?:piano|keyboard)\s*[^\r\n]{0,50}(?:available|sale|rehome|gift)'
          )
          // Violins & Orchestral 
          or regex.icontains(file.parse_text(.).text,
                             '(?:Stradivarius|Guarneri|Yamaha|Stentor|Eastman|Cremona|Cecilio|Mendini)\s*[^\r\n]{0,50}(violin|viola|cello|celli)',
          )
          // brass/wind/woodwinds
          or regex.icontains(file.parse_text(.).text,
                             '(?:Bach|Yamaha|Selmer|Conn|King|Jupiter|Buffet Crampon |Pearl)\s*[^\r\n]{0,50}(trombone|trumpet|saxophone|clarinet|flute)'
          )

          // generic
          or strings.ilike(file.parse_text(.).text,
                           '* musical instruments *',
                           '* instrument as a gift*'
          )
        )
        and (
          // often a person is moving
          strings.ilike(file.parse_text(.).text,
                        '* downsizing *',
                        '* relocating *',
                        '* to relocate *',
                        '* relocation *',
          )
          or strings.ilike(file.parse_text(.).text,
                           '* give away*',
                           '* generously offering *',
                           '*a loving home*',
                           '*a good home*',
                           '*find a new home *',
                           '*rehome these instruments *',
                           '* free donation*',
                           '*free*member of the music community*'
          )
          // generally someone died
          or regex.icontains(file.parse_text(.).text,
                             'inherited instruments',
                             'late (?:husband|father|dad|wife|mother|mom)',
                             '(?:husband|father|dad|wife|mother|mom)[^\r\n]{0,50}estate'
          )
          // passion/love for the item/music
          or strings.ilike(file.parse_text(.).text,
                           '* genuinely cherish*',
                           '* cherished possessions*',
                           '* passionate instrument*',
                           '* music lover*',
                           '* had a passion for music*',
                           '* appreciates music*',
                           "* special piece*",
                           "* a lot of meaning*",
                           "* profound sentimental*",
                           '* will cherish*',
                           '* passion for music*',
                           '* treasured items *'
          )
        )
        and (
          // it talks about a shipping fee upfront
          regex.icontains(file.parse_text(.).text,
                          'shipping (?:fee|cost|arrangement)',
                          '(?:responsible|pay) for shipping',
                          'no (?:local\s)?pick.?up',
                          '(?:local\s)?pick.?up.{0,50}not available',
                          'delivery only',
                          'moving company'
          )
          or strings.ilike(file.parse_text(.).text,
                           '* if you will take it *',
                           '* or have someone *',
                           '* indicate your interest *',
                           '* to someone you know *',
                           '* know someone who *',
                           '* someone you know would *',
                           '* someone who will *',
                           '* anyone you know *',
          )
          or regex.icontains(file.parse_text(.).text,
                             'if you[^\r\n]{0,20}(?:(?:might|will|would) be|are)[^\r\n]{0,20}interested',
                             '(?:any|some)one[^\r\n]{0,20}(is|will|would|might be)[^\r\n]{0,20}interested',
                             'who (?:will|would|might) appreciate',
          )
          // there's an email in the body 
          or any(regex.extract(file.parse_text(.).text,
                               "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}"
                 ),
                 strings.parse_email(.full_match).domain.domain in $free_email_providers
                 or strings.parse_email(.full_match).domain.root_domain in $free_email_providers
          )

          // reply-to doesn't match sender
          or (
            length(headers.reply_to) > 0
            and sender.email.email not in map(headers.reply_to, .email.email)
          )
          // there are no recipients
          or length(recipients.to) == 0
          // redirects to a phone number
          or regex.icontains(file.parse_text(.).text,
                             '(?:call|contact|text)[^\r\n]{0,50} at'
          )
          or regex.icontains(file.parse_text(.).text,
                             '(?:private|personal) (?:e-?)?mail'
          )
          or strings.icontains(file.parse_text(.).text, ' kindly ')
          or strings.icontains(file.parse_text(.).text, ' (kindly ')
        )
    )
  )
)

// not high trust sender domains
and not (
  sender.email.domain.root_domain in $high_trust_sender_root_domains
  and headers.auth_summary.dmarc.pass
)
and not sender.email.domain.root_domain in (
  'ridleyacademy.com', // person provides piano lessons and offers to give a Roland baby-grand away
  'mountainpiano.com' // legitimate piano moving company in Denver 
)

Detection Logic

This rule is designed to identify and mitigate a specific type of fraudulent activity commonly targeted at educational institutions. This rule operates by analyzing incoming email content for certain characteristics indicative of a scam involving the offer of a free piano, often framed within the context of downsizing or a giveaway.

  1. length(body.links) < 10
  2. length(body.current_thread.text) < 2000
  3. any of:
    • all of:
      • body.current_thread.text matches any of 9 patterns
        • (?:Gibson|Fender|Lowden|Martin|Taylor|Ibanez|Knaggs)\s*[^\r\n]{0,50}\s*guitar
        • guitar\s*[^\r\n]{0,50}\s*(?:Gibson|Fender|Lowden|Martin|Taylor|Ibanez|Knaggs)
        • (?:Yamaha|Kawai|Baldwin|Roland|Stei?nway(?: (?:&|and) Sons?)?|\d{4})\s*[^\r\n]{0,50}(?:baby.grand|piano|baby.grand.piano|keyboard)
        • (?:baby.grand|piano|baby.grand.piano|keyboard)\s*[^\r\n]{0,50}(?:Yamaha|Kawai|Baldwin|Roland|Stei?nway(?: (?:&|and) Sons?)?|\d{4})
        • (?:piano|keyboard)\s*[^\r\n]{0,50}(?:available|sale|rehome|gift)
        • (?:Stradivarius|Guarneri|Yamaha|Stentor|Eastman|Cremona|Cecilio|Mendini)\s*[^\r\n]{0,50}(violin|viola|cello|celli)
        • (?:Bach|Yamaha|Selmer|Conn|King|Jupiter|Buffet Crampon |Pearl)\s*[^\r\n]{0,50}(trombone|trumpet|saxophone|clarinet|flute)
        • * musical instruments *
        • * instrument as a gift*
      • body.current_thread.text matches any of 28 patterns
        • * downsizing *
        • * relocating *
        • * to relocate *
        • * relocation *
        • * moving *
        • * give away*
        • * generously offering *
        • *a loving home*
        • *a good home*
        • *find a new home *
        • *rehome these instruments *
        • * free donation*
        • *free*member of the music community*
        • inherited instruments
        • late (?:husband|father|dad|wife|mother|mom)
        • (?:husband|father|dad|wife|mother|mom)[^\r\n]{0,50}estate
        • * genuinely cherish*
        • * cherished possessions*
        • * passionate instrument*
        • * music lover*
        • * had a passion for music*
        • * appreciates music*
        • * special piece*
        • * a lot of meaning*
        • * profound sentimental*
        • * will cherish*
        • * passion for music*
        • * treasured items *
      • any of:
        • body.current_thread.text matches any of 6 patterns
          • shipping (?:fee|cost|arrangement)
          • (?:responsible|pay) for shipping
          • no (?:local\s)?pick.?up
          • (?:local\s)?pick.?up.{0,50}not available
          • delivery only
          • moving company
        • body.current_thread.text matches any of 9 patterns
          • * if you will take it *
          • * or have someone *
          • * indicate your interest *
          • * to someone you know *
          • * know someone who *
          • * someone you know would *
          • * someone who will *
          • * someone who truly *
          • * anyone you know *
        • body.current_thread.text matches any of 3 patterns
          • if you[^\r\n]{0,20}(?:(?:might|will|would) be|are)[^\r\n]{0,20}interested
          • (?:any|some)one[^\r\n]{0,20}(is|will|would|might be)[^\r\n]{0,20}interested
          • who (?:will|would|might) appreciate
        • any of:
          • any(regex.extract(body.current_thread.text, "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}" ), strings.parse_email(.full_match).domain.domain in $free_email_providers or strings.parse_email(.full_match).domain.root_domain in $free_email_providers )
          • all of:
            • length(headers.reply_to) > 0
            • sender.email.email not in map(headers.reply_to, .email.email)
          • length(recipients.to) == 0
          • body.current_thread.text matches '(?:call|contact|text)[^\\r\\n]{0,50} at'
          • body.current_thread.text matches '(?:private|personal) (?:e-?)?mail'
          • body.current_thread.text contains ' kindly '
          • body.current_thread.text contains ' (kindly '
    • ( any(filter(attachments, .size < 10000), ( // items and brands // Guitars regex.icontains(file.parse_text(.).text, '(?:Gibson|Fender|Lowden|Martin|Taylor|Ibanez|Knaggs)\s*[^\r\n]{0,50}\s*guitar', 'guitar\s*[^\r\n]{0,50}\s*(?:Gibson|Fender|Lowden|Martin|Taylor|Ibanez|Knaggs)', ) // Piano/Keyboards or regex.icontains(file.parse_text(.).text, '(?:Yamaha|Kawai|Baldwin|Roland|Stei?nway(?: (?:&|and) Sons?)?)\s*[^\r\n]{0,50}(?:baby.grand|piano|baby.grand.piano|keyboard)', '(?:baby.grand|piano|baby.grand.piano|keyboard)\s*[^\r\n]{0,50}(?:Yamaha|Kawai|Baldwin|Roland|Stei?nway(?: (?:&|and) Sons?)?|\d{4})', // strong indicators for generalized instrument '(?:piano|keyboard)\s*[^\r\n]{0,50}(?:available|sale|rehome|gift)' ) // Violins & Orchestral or regex.icontains(file.parse_text(.).text, '(?:Stradivarius|Guarneri|Yamaha|Stentor|Eastman|Cremona|Cecilio|Mendini)\s*[^\r\n]{0,50}(violin|viola|cello|celli)', ) // brass/wind/woodwinds or regex.icontains(file.parse_text(.).text, '(?:Bach|Yamaha|Selmer|Conn|King|Jupiter|Buffet Crampon |Pearl)\s*[^\r\n]{0,50}(trombone|trumpet|saxophone|clarinet|flute)' ) // generic or strings.ilike(file.parse_text(.).text, '* musical instruments *', '* instrument as a gift*' ) ) and ( // often a person is moving strings.ilike(file.parse_text(.).text, '* downsizing *', '* relocating *', '* to relocate *', '* relocation *', ) or strings.ilike(file.parse_text(.).text, '* give away*', '* generously offering *', '*a loving home*', '*a good home*', '*find a new home *', '*rehome these instruments *', '* free donation*', '*free*member of the music community*' ) // generally someone died or regex.icontains(file.parse_text(.).text, 'inherited instruments', 'late (?:husband|father|dad|wife|mother|mom)', '(?:husband|father|dad|wife|mother|mom)[^\r\n]{0,50}estate' ) // passion/love for the item/music or strings.ilike(file.parse_text(.).text, '* genuinely cherish*', '* cherished possessions*', '* passionate instrument*', '* music lover*', '* had a passion for music*', '* appreciates music*', "* special piece*", "* a lot of meaning*", "* profound sentimental*", '* will cherish*', '* passion for music*', '* treasured items *' ) ) and ( // it talks about a shipping fee upfront regex.icontains(file.parse_text(.).text, 'shipping (?:fee|cost|arrangement)', '(?:responsible|pay) for shipping', 'no (?:local\s)?pick.?up', '(?:local\s)?pick.?up.{0,50}not available', 'delivery only', 'moving company' ) or strings.ilike(file.parse_text(.).text, '* if you will take it *', '* or have someone *', '* indicate your interest *', '* to someone you know *', '* know someone who *', '* someone you know would *', '* someone who will *', '* anyone you know *', ) or regex.icontains(file.parse_text(.).text, 'if you[^\r\n]{0,20}(?:(?:might|will|would) be|are)[^\r\n]{0,20}interested', '(?:any|some)one[^\r\n]{0,20}(is|will|would|might be)[^\r\n]{0,20}interested', 'who (?:will|would|might) appreciate', ) // there's an email in the body or any(regex.extract(file.parse_text(.).text, "[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}" ), strings.parse_email(.full_match).domain.domain in $free_email_providers or strings.parse_email(.full_match).domain.root_domain in $free_email_providers ) // reply-to doesn't match sender or ( length(headers.reply_to) > 0 and sender.email.email not in map(headers.reply_to, .email.email) ) // there are no recipients or length(recipients.to) == 0 // redirects to a phone number or regex.icontains(file.parse_text(.).text, '(?:call|contact|text)[^\r\n]{0,50} at' ) or regex.icontains(file.parse_text(.).text, '(?:private|personal) (?:e-?)?mail' ) or strings.icontains(file.parse_text(.).text, ' kindly ') or strings.icontains(file.parse_text(.).text, ' (kindly ') ) ) )
  4. not:
    • all of:
      • sender.email.domain.root_domain in $high_trust_sender_root_domains
      • headers.auth_summary.dmarc.pass
  5. not:
    • sender.email.domain.root_domain in ('ridleyacademy.com', 'mountainpiano.com')

Inspects: attachments[].size, body.current_thread.text, body.links, headers.auth_summary.dmarc.pass, headers.reply_to, headers.reply_to[].email.email, recipients.to, sender.email.domain.root_domain, sender.email.email. Sensors: file.parse_text, regex.extract, regex.icontains, strings.icontains, strings.ilike, strings.parse_email. Reference lists: $free_email_providers, $high_trust_sender_root_domains.

Indicators Matched (61)

FieldMatchValue
regex.icontainsregex(?:Gibson|Fender|Lowden|Martin|Taylor|Ibanez|Knaggs)\s*[^\r\n]{0,50}\s*guitar
regex.icontainsregexguitar\s*[^\r\n]{0,50}\s*(?:Gibson|Fender|Lowden|Martin|Taylor|Ibanez|Knaggs)
regex.icontainsregex(?:Yamaha|Kawai|Baldwin|Roland|Stei?nway(?: (?:&|and) Sons?)?|\d{4})\s*[^\r\n]{0,50}(?:baby.grand|piano|baby.grand.piano|keyboard)
regex.icontainsregex(?:baby.grand|piano|baby.grand.piano|keyboard)\s*[^\r\n]{0,50}(?:Yamaha|Kawai|Baldwin|Roland|Stei?nway(?: (?:&|and) Sons?)?|\d{4})
regex.icontainsregex(?:piano|keyboard)\s*[^\r\n]{0,50}(?:available|sale|rehome|gift)
regex.icontainsregex(?:Stradivarius|Guarneri|Yamaha|Stentor|Eastman|Cremona|Cecilio|Mendini)\s*[^\r\n]{0,50}(violin|viola|cello|celli)
regex.icontainsregex(?:Bach|Yamaha|Selmer|Conn|King|Jupiter|Buffet Crampon |Pearl)\s*[^\r\n]{0,50}(trombone|trumpet|saxophone|clarinet|flute)
strings.ilikesubstring* musical instruments *
strings.ilikesubstring* instrument as a gift*
strings.ilikesubstring* downsizing *
strings.ilikesubstring* relocating *
strings.ilikesubstring* to relocate *
49 more
strings.ilikesubstring* relocation *
strings.ilikesubstring* moving *
strings.ilikesubstring* give away*
strings.ilikesubstring* generously offering *
strings.ilikesubstring*a loving home*
strings.ilikesubstring*a good home*
strings.ilikesubstring*find a new home *
strings.ilikesubstring*rehome these instruments *
strings.ilikesubstring* free donation*
strings.ilikesubstring*free*member of the music community*
regex.icontainsregexinherited instruments
regex.icontainsregexlate (?:husband|father|dad|wife|mother|mom)
regex.icontainsregex(?:husband|father|dad|wife|mother|mom)[^\r\n]{0,50}estate
strings.ilikesubstring* genuinely cherish*
strings.ilikesubstring* cherished possessions*
strings.ilikesubstring* passionate instrument*
strings.ilikesubstring* music lover*
strings.ilikesubstring* had a passion for music*
strings.ilikesubstring* appreciates music*
strings.ilikesubstring* special piece*
strings.ilikesubstring* a lot of meaning*
strings.ilikesubstring* profound sentimental*
strings.ilikesubstring* will cherish*
strings.ilikesubstring* passion for music*
strings.ilikesubstring* treasured items *
regex.icontainsregexshipping (?:fee|cost|arrangement)
regex.icontainsregex(?:responsible|pay) for shipping
regex.icontainsregexno (?:local\s)?pick.?up
regex.icontainsregex(?:local\s)?pick.?up.{0,50}not available
regex.icontainsregexdelivery only
regex.icontainsregexmoving company
strings.ilikesubstring* if you will take it *
strings.ilikesubstring* or have someone *
strings.ilikesubstring* indicate your interest *
strings.ilikesubstring* to someone you know *
strings.ilikesubstring* know someone who *
strings.ilikesubstring* someone you know would *
strings.ilikesubstring* someone who will *
strings.ilikesubstring* someone who truly *
strings.ilikesubstring* anyone you know *
regex.icontainsregexif you[^\r\n]{0,20}(?:(?:might|will|would) be|are)[^\r\n]{0,20}interested
regex.icontainsregex(?:any|some)one[^\r\n]{0,20}(is|will|would|might be)[^\r\n]{0,20}interested
regex.icontainsregexwho (?:will|would|might) appreciate
regex.extractregex[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\.[A-Za-z]{2,}
regex.icontainsregex(?:call|contact|text)[^\r\n]{0,50} at
regex.icontainsregex(?:private|personal) (?:e-?)?mail
strings.icontainssubstring kindly
strings.icontainssubstring (kindly
regex.icontainsregex(?:Yamaha|Kawai|Baldwin|Roland|Stei?nway(?: (?:&|and) Sons?)?)\s*[^\r\n]{0,50}(?:baby.grand|piano|baby.grand.piano|keyboard)

Stages and Predicates

Stage 1: mql_rule

and
  or
    and
      or
        and
          headers.reply_to length_compare "0"
          sender.email.email macro "sender.email.email not in map(headers.reply_to, .email.email)"
        body.current_thread.text contains " (kindly "
        body.current_thread.text contains " kindly "
        body.current_thread.text match " anyone you know "
        body.current_thread.text match " if you will take it "
        body.current_thread.text match " indicate your interest "
        body.current_thread.text match " know someone who "
        body.current_thread.text match " or have someone "
        body.current_thread.text match " someone who truly "
        body.current_thread.text match " someone who will "
        body.current_thread.text match " someone you know would "
        body.current_thread.text match " to someone you know "
        body.current_thread.text regex_match "(?:any|some)one[^\\r\\n]{0,20}(is|will|would|might be)[^\\r\\n]{0,20}interested"
        body.current_thread.text regex_match "(?:call|contact|text)[^\\r\\n]{0,50} at"
        body.current_thread.text regex_match "(?:local\\s)?pick.?up.{0,50}not available"
        body.current_thread.text regex_match "(?:private|personal) (?:e-?)?mail"
        body.current_thread.text regex_match "(?:responsible|pay) for shipping"
        body.current_thread.text regex_match "delivery only"
        body.current_thread.text regex_match "if you[^\\r\\n]{0,20}(?:(?:might|will|would) be|are)[^\\r\\n]{0,20}interested"
        body.current_thread.text regex_match "moving company"
        body.current_thread.text regex_match "no (?:local\\s)?pick.?up"
        body.current_thread.text regex_match "shipping (?:fee|cost|arrangement)"
        body.current_thread.text regex_match "who (?:will|would|might) appreciate"
        recipients.to length_compare "0"
         macro "any(regex.extract(body.current_thread.text,\n                          \"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\\\.[A-Za-z]{2,}\"\n            ),\n            strings.parse_email(.full_match).domain.domain in $free_email_providers\n            or strings.parse_email(.full_match).domain.root_domain in $free_email_providers\n        )"
      or
        body.current_thread.text match " a lot of meaning"
        body.current_thread.text match " appreciates music"
        body.current_thread.text match " cherished possessions"
        body.current_thread.text match " downsizing "
        body.current_thread.text match " free donation"
        body.current_thread.text match " generously offering "
        body.current_thread.text match " genuinely cherish"
        body.current_thread.text match " give away"
        body.current_thread.text match " had a passion for music"
        body.current_thread.text match " moving "
        body.current_thread.text match " music lover"
        body.current_thread.text match " passion for music"
        body.current_thread.text match " passionate instrument"
        body.current_thread.text match " profound sentimental"
        body.current_thread.text match " relocating "
        body.current_thread.text match " relocation "
        body.current_thread.text match " special piece"
        body.current_thread.text match " to relocate "
        body.current_thread.text match " treasured items "
        body.current_thread.text match " will cherish"
        body.current_thread.text match "a good home"
        body.current_thread.text match "a loving home"
        body.current_thread.text match "find a new home "
        body.current_thread.text match "rehome these instruments "
        body.current_thread.text regex_match "(?:husband|father|dad|wife|mother|mom)[^\\r\\n]{0,50}estate"
        body.current_thread.text regex_match "inherited instruments"
        body.current_thread.text regex_match "late (?:husband|father|dad|wife|mother|mom)"
        body.current_thread.text wildcard "*free*member of the music community*"
      or
        body.current_thread.text match " instrument as a gift"
        body.current_thread.text match " musical instruments "
        body.current_thread.text regex_match "(?:Bach|Yamaha|Selmer|Conn|King|Jupiter|Buffet Crampon |Pearl)\\s*[^\\r\\n]{0,50}(trombone|trumpet|saxophone|clarinet|flute)"
        body.current_thread.text regex_match "(?:Gibson|Fender|Lowden|Martin|Taylor|Ibanez|Knaggs)\\s*[^\\r\\n]{0,50}\\s*guitar"
        body.current_thread.text regex_match "(?:Stradivarius|Guarneri|Yamaha|Stentor|Eastman|Cremona|Cecilio|Mendini)\\s*[^\\r\\n]{0,50}(violin|viola|cello|celli)"
        body.current_thread.text regex_match "(?:Yamaha|Kawai|Baldwin|Roland|Stei?nway(?: (?:&|and) Sons?)?|\\d{4})\\s*[^\\r\\n]{0,50}(?:baby.grand|piano|baby.grand.piano|keyboard)"
        body.current_thread.text regex_match "(?:baby.grand|piano|baby.grand.piano|keyboard)\\s*[^\\r\\n]{0,50}(?:Yamaha|Kawai|Baldwin|Roland|Stei?nway(?: (?:&|and) Sons?)?|\\d{4})"
        body.current_thread.text regex_match "(?:piano|keyboard)\\s*[^\\r\\n]{0,50}(?:available|sale|rehome|gift)"
        body.current_thread.text regex_match "guitar\\s*[^\\r\\n]{0,50}\\s*(?:Gibson|Fender|Lowden|Martin|Taylor|Ibanez|Knaggs)"
     macro "(\n    any(filter(attachments, .size < 10000),\n        (\n          // items and brands\n          // Guitars\n          regex.icontains(file.parse_text(.).text,\n                          '(?:Gibson|Fender|Lowden|Martin|Taylor|Ibanez|Knaggs)\\s*[^\\r\\n]{0,50}\\s*guitar',\n                          'guitar\\s*[^\\r\\n]{0,50}\\s*(?:Gibson|Fender|Lowden|Martin|Taylor|Ibanez|Knaggs)',\n          )\n          // Piano/Keyboards\n          or regex.icontains(file.parse_text(.).text,\n                             '(?:Yamaha|Kawai|Baldwin|Roland|Stei?nway(?: (?:&|and) Sons?)?)\\s*[^\\r\\n]{0,50}(?:baby.grand|piano|baby.grand.piano|keyboard)',\n                             '(?:baby.grand|piano|baby.grand.piano|keyboard)\\s*[^\\r\\n]{0,50}(?:Yamaha|Kawai|Baldwin|Roland|Stei?nway(?: (?:&|and) Sons?)?|\\d{4})',\n                             // strong indicators for generalized instrument\n                             '(?:piano|keyboard)\\s*[^\\r\\n]{0,50}(?:available|sale|rehome|gift)'\n          )\n          // Violins & Orchestral \n          or regex.icontains(file.parse_text(.).text,\n                             '(?:Stradivarius|Guarneri|Yamaha|Stentor|Eastman|Cremona|Cecilio|Mendini)\\s*[^\\r\\n]{0,50}(violin|viola|cello|celli)',\n          )\n          // brass/wind/woodwinds\n          or regex.icontains(file.parse_text(.).text,\n                             '(?:Bach|Yamaha|Selmer|Conn|King|Jupiter|Buffet Crampon |Pearl)\\s*[^\\r\\n]{0,50}(trombone|trumpet|saxophone|clarinet|flute)'\n          )\n\n          // generic\n          or strings.ilike(file.parse_text(.).text,\n                           '* musical instruments *',\n                           '* instrument as a gift*'\n          )\n        )\n        and (\n          // often a person is moving\n          strings.ilike(file.parse_text(.).text,\n                        '* downsizing *',\n                        '* relocating *',\n                        '* to relocate *',\n                        '* relocation *',\n          )\n          or strings.ilike(file.parse_text(.).text,\n                           '* give away*',\n                           '* generously offering *',\n                           '*a loving home*',\n                           '*a good home*',\n                           '*find a new home *',\n                           '*rehome these instruments *',\n                           '* free donation*',\n                           '*free*member of the music community*'\n          )\n          // generally someone died\n          or regex.icontains(file.parse_text(.).text,\n                             'inherited instruments',\n                             'late (?:husband|father|dad|wife|mother|mom)',\n                             '(?:husband|father|dad|wife|mother|mom)[^\\r\\n]{0,50}estate'\n          )\n          // passion/love for the item/music\n          or strings.ilike(file.parse_text(.).text,\n                           '* genuinely cherish*',\n                           '* cherished possessions*',\n                           '* passionate instrument*',\n                           '* music lover*',\n                           '* had a passion for music*',\n                           '* appreciates music*',\n                           \"* special piece*\",\n                           \"* a lot of meaning*\",\n                           \"* profound sentimental*\",\n                           '* will cherish*',\n                           '* passion for music*',\n                           '* treasured items *'\n          )\n        )\n        and (\n          // it talks about a shipping fee upfront\n          regex.icontains(file.parse_text(.).text,\n                          'shipping (?:fee|cost|arrangement)',\n                          '(?:responsible|pay) for shipping',\n                          'no (?:local\\s)?pick.?up',\n                          '(?:local\\s)?pick.?up.{0,50}not available',\n                          'delivery only',\n                          'moving company'\n          )\n          or strings.ilike(file.parse_text(.).text,\n                           '* if you will take it *',\n                           '* or have someone *',\n                           '* indicate your interest *',\n                           '* to someone you know *',\n                           '* know someone who *',\n                           '* someone you know would *',\n                           '* someone who will *',\n                           '* anyone you know *',\n          )\n          or regex.icontains(file.parse_text(.).text,\n                             'if you[^\\r\\n]{0,20}(?:(?:might|will|would) be|are)[^\\r\\n]{0,20}interested',\n                             '(?:any|some)one[^\\r\\n]{0,20}(is|will|would|might be)[^\\r\\n]{0,20}interested',\n                             'who (?:will|would|might) appreciate',\n          )\n          // there's an email in the body \n          or any(regex.extract(file.parse_text(.).text,\n                               \"[A-Za-z0-9._%+-]+@[A-Za-z0-9.-]+\\\\.[A-Za-z]{2,}\"\n                 ),\n                 strings.parse_email(.full_match).domain.domain in $free_email_providers\n                 or strings.parse_email(.full_match).domain.root_domain in $free_email_providers\n          )\n\n          // reply-to doesn't match sender\n          or (\n            length(headers.reply_to) > 0\n            and sender.email.email not in map(headers.reply_to, .email.email)\n          )\n          // there are no recipients\n          or length(recipients.to) == 0\n          // redirects to a phone number\n          or regex.icontains(file.parse_text(.).text,\n                             '(?:call|contact|text)[^\\r\\n]{0,50} at'\n          )\n          or regex.icontains(file.parse_text(.).text,\n                             '(?:private|personal) (?:e-?)?mail'\n          )\n          or strings.icontains(file.parse_text(.).text, ' kindly ')\n          or strings.icontains(file.parse_text(.).text, ' (kindly ')\n        )\n    )\n  )"
  not
    and
      headers.auth_summary.dmarc.pass eq "true"
      sender.email.domain.root_domain macro "sender.email.domain.root_domain in high_trust_sender_root_domains"
  not
    sender.email.domain.root_domain in ["mountainpiano.com", "ridleyacademy.com"]
  body.current_thread.text length_compare "2000"
  body.links length_compare "10"

Indicators

These rows show field, operator, and value matches.

FieldKindValuesSearch
body.current_thread.textcontains
  • (kindly corpus 2 (mql 2)
  • kindly corpus 2 (mql 2)
field:"body.current_thread.text" kind:contains
body.current_thread.textregex_match
  • (?:Bach|Yamaha|Selmer|Conn|King|Jupiter|Buffet Crampon |Pearl)\s*[^\r\n]{0,50}(trombone|trumpet|saxophone|clarinet|flute)
  • (?:Gibson|Fender|Lowden|Martin|Taylor|Ibanez|Knaggs)\s*[^\r\n]{0,50}\s*guitar
  • (?:Stradivarius|Guarneri|Yamaha|Stentor|Eastman|Cremona|Cecilio|Mendini)\s*[^\r\n]{0,50}(violin|viola|cello|celli)
  • (?:Yamaha|Kawai|Baldwin|Roland|Stei?nway(?: (?:&|and) Sons?)?|\d{4})\s*[^\r\n]{0,50}(?:baby.grand|piano|baby.grand.piano|keyboard)
  • (?:any|some)one[^\r\n]{0,20}(is|will|would|might be)[^\r\n]{0,20}interested corpus 2 (mql 2)
  • (?:baby.grand|piano|baby.grand.piano|keyboard)\s*[^\r\n]{0,50}(?:Yamaha|Kawai|Baldwin|Roland|Stei?nway(?: (?:&|and) Sons?)?|\d{4})
  • (?:call|contact|text)[^\r\n]{0,50} at corpus 2 (mql 2)
  • (?:husband|father|dad|wife|mother|mom)[^\r\n]{0,50}estate corpus 2 (mql 2)
  • (?:local\s)?pick.?up.{0,50}not available corpus 2 (mql 2)
  • (?:piano|keyboard)\s*[^\r\n]{0,50}(?:available|sale|rehome|gift)
  • (?:private|personal) (?:e-?)?mail
  • (?:responsible|pay) for shipping corpus 2 (mql 2)
  • delivery only corpus 2 (mql 2)
  • guitar\s*[^\r\n]{0,50}\s*(?:Gibson|Fender|Lowden|Martin|Taylor|Ibanez|Knaggs)
  • if you[^\r\n]{0,20}(?:(?:might|will|would) be|are)[^\r\n]{0,20}interested corpus 2 (mql 2)
  • inherited instruments corpus 2 (mql 2)
  • late (?:husband|father|dad|wife|mother|mom) corpus 2 (mql 2)
  • moving company corpus 2 (mql 2)
  • no (?:local\s)?pick.?up corpus 2 (mql 2)
  • shipping (?:fee|cost|arrangement) corpus 2 (mql 2)
  • who (?:will|would|might) appreciate corpus 2 (mql 2)
field:"body.current_thread.text" kind:regex_match
body.current_thread.textwildcard
  • * a lot of meaning*
  • * anyone you know * corpus 2 (mql 2)
  • * appreciates music*
  • * cherished possessions*
  • * downsizing * corpus 2 (mql 2)
  • * free donation* corpus 2 (mql 2)
  • * generously offering * corpus 2 (mql 2)
  • * genuinely cherish*
  • * give away*
  • * had a passion for music*
  • * if you will take it * corpus 2 (mql 2)
  • * indicate your interest * corpus 2 (mql 2)
  • * instrument as a gift*
  • * know someone who * corpus 2 (mql 2)
  • * moving *
  • * music lover*
  • * musical instruments *
  • * or have someone * corpus 2 (mql 2)
  • * passion for music*
  • * passionate instrument*
  • * profound sentimental*
  • * relocating *
  • * relocation *
  • * someone who truly * corpus 2 (mql 2)
  • * someone who will * corpus 2 (mql 2)
  • * someone you know would * corpus 2 (mql 2)
  • * special piece*
  • * to relocate * corpus 2 (mql 2)
  • * to someone you know * corpus 2 (mql 2)
  • * treasured items *
  • * will cherish*
  • *a good home* corpus 2 (mql 2)
  • *a loving home* corpus 2 (mql 2)
  • *find a new home * corpus 2 (mql 2)
  • *free*member of the music community*
  • *rehome these instruments * corpus 2 (mql 2)
field:"body.current_thread.text" kind:wildcard

Exclusions

The rule actively suppresses these predicates.

Back to all Sublime MQL rules