Repository navigation
Email forwarding: keep only mail about job applications - #196
Merged
Merged
Conversation
People forward their whole inbox, so every newsletter, receipt and delivery notice was stored and shown in the Inbox, and a parcel notice from amazon.se was matched to an Amazon application by its sender domain. - relevance.py decides whether an email is about a job application: a confident rejection/interview/offer, job wording, a match to a tracked application, or a recruiting-system sender. Shop and delivery subjects and bulk mail not tied to an application are dropped. - Dropped mail is not stored at all. - Migration 0036 deletes stored noise that nobody acted on. Gmail's forwarding confirmation and anything with a detected decision are kept. - Privacy policy says what is not kept.
Contributor
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
This branch was successfully deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What was wrong
People forward their whole inbox, and every email that arrived was stored and shown in the Inbox tab: newsletters, receipts, delivery notices. One of them, a parcel notice from
shipment-tracking@amazon.se, was matched to an Amazon application because the sender domain is the company's.What changes
services/inbound_email/relevance.py(pure, no database) decides whether an email is about a job application. It is kept when it has a confident rejection, interview or offer wording; uses job-application wording (English or Swedish); matches a tracked application; or comes through a recruiting system. It is dropped when the subject is about an order, delivery or payment, or when it is bulk mail not tied to an application the user tracks.List-Unsubscribe,List-Id,Precedence: bulkand similar), the sender address and unsubscribe wording in the text. The flag is computed there because headers do not cross the queue.ignoredand logs the reason and sender domain, no content.0036deletes stored emails that fail the same test. It only touches rows nobody acted on (no detected decision, suggestion statenone) and keeps Gmail's forwarding confirmation, which Settings reads. Deleted rows cannot be restored.Checks
tests/test_inbound_email_relevance.py: the nine emails that filled a real inbox (newsletters, a housing-swap notice, the Amazon parcel notice, a job-alert digest, a private message) are all dropped; eight job emails (application confirmations in English and Swedish, a recruiter's personal message, a rejection, an interview invitation, mail through an ATS) are all kept.ruffandmypyclean. Frontend: lint, type-check and 391 tests pass.Not solved here
Production logs show only about ten deliveries to the webhook in four days, all accepted. Mail the user expects but never sees is not reaching ApplyLuma at all, so the cause is upstream (the forwarding rule in the mail account, or Mailgun), not in this code.