Files
redmine/docs/rebot_legacy_spam_rules.md
T
Jason Thistlethwaite 9ee9eb3ec6 Organized
2026-10-17 20:50:35 -04:00

4.5 KiB

Rebot Legacy Known-Spam Rules

Source inspected:

  • /home/jason/projects/rebot/rebot/RebotSlick.php
  • /home/jason/projects/rebot/rebot/RebotSlick.php.save
  • /home/jason/projects/rebot/rebot/RebotSlick.php.save.1
  • /home/jason/projects/rebot/rebot/Classify/Receipts.php

Summary

The old Rebot spam cleanup used RebotSlick::CleanSpam() which iterated open customer-service issues and called KnownSpam($issue). When KnownSpam() returned true, Rebot updated the issue to Closed and set category Spam.

Current source behavior:

if ( $this->KnownSpam($issue)) {
    $this->client->issue->update($issue['id'], [
       "status_id" => $this->statusByName['Closed'],
       "category_id" => $this->categoriesByName['Spam']
    ]);
}

The saved older copies also used KnownSpam() and closed tickets, sometimes with note Rebot identified as spam.

Exact KnownSpam source logic

Direct sender equality

if ($from_address == 'noreply@rush-delivery.com') return true;

Amazon package special case

if ($from_address == 'no-reply@amazon.com') {
    if (strpos($subject, "Your Amazon package") !== false) return true;
}

Current badEmails regex list

"/^.*@indeedemail.com/i"
"/^no-reply@indeed.com/i"
"/^.*@.*roku.com/i"
"/^no.reply@masterclass.com/i"
"/^donotreply@walmart.com/i"
"/^.*@uber.com/i"
"/^no-reply@inhome.walmart.com/i"
"/^.*wingsandrings.com/i"
"/mailnull@amazon.com/i"
"/^.*@tryfinally.co/i"
"/^.*crackerbarrel.com/i"
"/^.*shop.tiktok.com/i"
"/^noreply_samsung@sea.samsung.com/i"
"/^noreply@email.crunchbase.com/i"
"/^reply@globalindustrial.com/i"
"/^.*webstaurantstore.com/i"
"/^info@emailbiz.dukeenergy.com/i"
"/^support@helium10.com/i"
"/^noreply@popmenu.com/i"
"/^info@go.cbts.com/i"

Older saved badEmails list

The .save and .save.1 variants had the earlier subset:

"/^.*@indeedemail.com/i"
"/^no-reply@indeed.com/i"
"/^.*@.*roku.com/i"
"/^no.reply@masterclass.com/i"
"/^donotreply@walmart.com/i"
"/^.*@uber.com/i"
"/^no-reply@inhome.walmart.com/i"
"/^.*@wingsandrings.com/i"
"/mailnull@amazon.com/i"
"/^.*@tryfinally.co/i"
"/^.*crackerbarrel.com/i"
"/^.*shop.tiktok.com/i"

The current source adds Samsung, Crunchbase, Global Industrial, Webstaurant Store, Duke Energy newsletters, Helium10, Popmenu, and CBTS.

badSubjects regex list

"/Your Amazon.com order.*has shipped/i"
"/^Your Duke energy statement is ready/i"
"/^Your Amazon.com order.*/i"
"/^UPS Billing: Payment Received.*/i"
"/^UPS Billing:.*new invoice.*/i"
"/^.applied on indeed.*/i"
"/^See results for the assessments you sent to*/i"
"/^Reminder: Leave feedback on your interview with.*/i"
"/^Pekin AutoPay Payment.*/i"
"/^Notification of Active Listings Report availability/i"

Important interpretation for modern tooling

The old Rebot called all of the above spam, but several of these are better understood today as operational clutter rather than promotional spam:

  • Amazon order/shipping/package notifications
  • UPS billing/payment/invoice notices
  • Duke Energy statements/newsletters
  • Pekin AutoPay payments
  • Indeed applicant/assessment/interview mail
  • notification/report availability emails

For the new fast path, preserve the rules but do not treat every legacy rule as spam-promotional. Recommended split:

  1. legacy-rebot-known-spam-promotional

    • promotional/vendor/newsletter/sales senders
    • safe for fast close if contact is not Customer / maybe-customer
  2. legacy-rebot-operational-clutter

    • Amazon order/shipping, UPS billing, Duke/Pekin billing, Indeed workflow mail
    • can be fast-closed only if Jason explicitly approves closing operational clutter as a separate lane
  3. legacy-rebot-receipts-routing

    • from Classify/Receipts.php; these were routed to Receipts / Accounting / IT, not generic spam close

Receipts classifier reference

rebot/Classify/Receipts.php used GenericMail to classify:

Email regexes

/culliganbillingoh@culliganwaterco.com/i
/accounting@amshippingsupplies.com/i
/bookkeeperasl@gmail.com/i
/bounces-noreply@mandrillapp.com/i

Subject regexes

/You have a new bill from altafiber/i

Actions

  • Default: status Resolved, category Receipts
  • AMShipping invoices: category Bill Needs Paid, assigned Accounting
  • JoeLevine/bookkeeper: category Bill Needs Paid, assigned Accounting
  • Mandrill bounces: status Resolved, category IT Issue, assigned Technical Services

These should not automatically enter the promotional spam fast-close registry, but they are useful future operational-clutter/routing profiles.