opsira

Keeping machine mail out of your support desk

In short

Our desk opened tickets on its own Trustpilot notifications and generated AI replies to a no-reply address. The filter was there. It just did not match.

What went wrong

The guard looked reasonable:

/^(no-?reply|mailer-daemon|postmaster|bounces?)@/

It requires the local part to be exactly one of those words, immediately followed by the at sign. Plenty of real automated senders are not shaped like that. A sender of noreply.notifications@example.com sails straight through, because of the dot and the word after it.

The result was three tickets opened on notification emails, and three AI generated replies sent to an address that cannot receive them. They only failed to arrive because that address had already been suppressed after previous bounces. That is luck, not design.

A filter that works

Three layers, because no single one is sufficient.

Local part with suffixes

/^(no-?reply|do-?not-?reply|mailer-daemon|postmaster|bounces?|notifications?|invitations?)([._+-][^@]*)?@/

The optional group after the alternation is the whole point. It matches the dotted and suffixed variants that the naive version misses.

Known machine domains

Many notification senders use ordinary local parts on a dedicated subdomain, something like credit@notice.example.com. No local part rule will catch those. Maintain a small list of subdomains and match on those.

Explicit addresses

For senders that fit neither pattern, list the exact address. Short, obvious, easy to extend when a new one appears.

Be careful what you exclude

Do not blanket block a whole company domain. Real people email from the same domains as the robots. An account manager writing to you personally should absolutely open a ticket. Exclude the machine addresses, not the organisation.

Always exclude yourself

Your own sending address, and any ticketing subdomain you use, must be excluded or your outbound replies will open new tickets in a loop.

Fail visibly

Route filtered mail to a skip path that records why it was skipped. Silently dropping mail is how a real customer message disappears and nobody ever finds out. A one line reason attached to a skipped record is enough to debug it later.

Need help with any of this?

These notes are free and always will be. If you would rather someone just set it up, or you are stuck on something similar, get in touch at hello@opsira.io.