← Workshop

How mofu finds your subscriptions.

164 / 167 mails sorted correctly

The sample mail we use to test mofu includes a membership at a gym called FitBox. €29.90 a month, four visits since June. Nobody typed those numbers in. mofu pieced them together from the mails: the welcome message, the payments and the check-in receipts from the front desk.

For this, the Mail drawer now has two new tabs, Subscriptions and Deadlines. At the top you see what is running and what it costs per month. Above that there is at most one card, and only when money is about to move. Say a free trial ends next week, or a contract can only be canceled for two more weeks.

Read first, and only guess when you have to

Every new mail goes through rules first. They look for amounts, billing cycles, trial ends, notice periods, contract numbers and the address for cancellations. That takes a few microseconds per mail, no model involved.

A welcome mail from a gym, highlighted passages connected by lines to the fields that were found
An English mail from our test set. The highlights are what the rules found. On the right are the fields as the test expects them.

The rules come with one strict condition: every value has to appear in the text, word for word. If an amount turns up that isn’t there, it gets thrown out. That sounds pedantic. With models, though, it is exactly where made-up numbers would otherwise slip through.

We only ask a model when the rules aren’t sure whether a mail belongs to a contract at all. Apple’s model on the iPhone goes first. If you have allowed it, Jev can have a say after that, a small model that does nothing but make decisions like this one. If it isn’t at least 60 percent sure, the rules’ no stands. When a real contract mail is still missing key facts, Apple’s model reads up on the gaps. Even then, every number is checked against the text, and the provider’s name always comes from the sender.

Three steps from the rules to the model, next to them the results in the test set
How a mail runs through the radar. The rules alone get the numbers on the right.

All of this happens in the background once the mail has loaded, with at most five model calls per round. Only what the list shows is stored. mofu doesn’t keep the text of your mails.

An ad is not a subscription

Leaving things out was harder than finding them. “Try it free for 30 days!” sounds a lot like a trial, but it’s an ad. A yoga class booking isn’t a contract, though it does count as using one.

So there is a fixed test set: 44 invented mails in German and English, plus the 120 mails we already use to test mail sorting. For each one it is settled whether it belongs to a subscription or has to be left alone. As of today, the kind is right in 164 of 167 cases and the key facts in 90 of 91. Not a single false alarm, and of the three numbers that was the one we cared about most. A radar that beeps at every ad gets switched off after two days.

The part we underestimated

Cancelling sounds easy. A letter, a date, done. Until someone asked which date, exactly.

FitBox’s contract says three months to the end of a month. But a cancellation only counts once it has arrived, and under the usual reading of the German civil code (§ 130 BGB), a mail that comes in after hours or at the weekend counts on the next working day. mofu uses 4 pm as the cutoff and would rather be a day late than a day early.

Timeline: a cancellation sent at 3:59 pm ends on Feb 28, at 4:01 pm only on Mar 31
Two minutes apart on November 30, a whole monthly fee apart in March.

That picture surprised us too. Send the cancellation today at 3:59 pm and the contract ends on February 28. At 4:01 pm it’s March 31. That’s why you see the end date before you send.

Sending works the way it does everywhere in mofu. You hold the letter, and then you have ten seconds to take it back. Only after that does it leave your own mailbox. If sending fails, the contract keeps running, and mofu tells you so.

Next, we want her to read PDF attachments. A lot of contracts live exactly there.

Read more: How mofu sorts your mail, Who does the thinking in mofu and Take care of it.