Repository navigation
Optional visual warnings for unexpected sender domains on aliases #2718
Replies: 1 comment
|
Update: implemented and running in production (on my fork) I built it and have been running it in production on my self-hosted instance for a while. What it does: it is a per-alias soft allow-list of trusted sender domains. Mail from a domain that isn't on an alias's list is still delivered, but the forwarded message gets a small escalating marker ( How it differs from #2694 (sender-blacklists) and #2384 (block domains): they block; mine warns. I think warn-don't-block is a much safer model for email:
I implemented it in a single dedicated and tested module (not in the settings/view code), and placed it behind an off by default user flag, and I added with unit + API + validation tests. Default behavior is identical to upstream when disabled. I'd be happy to open a PR if there's appetite for this direction. @acasajus — since you reviewed #2694 and #2384, I'd be interested in your thoughts on whether a warn-based (rather than block-based) approach is one you'd consider. Happy to share the branch or a draft PR. |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Proposal: Optional per-alias unexpected sender domains visual warnings
Summary
Unexpected sender warnings: an opt-in, per-alias feature that marks emails from previously unseen sender domains, with one-click trust management and no effect on delivery.
This would be warning-only: no blocking, rejection, quarantine, or delivery change. It should also have zero effect on the existing customer base unless explicitly enabled. If the feature is not enabled for an alias/account, SimpleLogin should behave exactly as it does today.
I have implemented this in my private SimpleLogin clone and have found it very useful. It makes it easy to detect possible alias leaks or unusual sender/alias combinations without continuously reading the full
Fromfield and mentally matching it against the alias used.User value
Many users create one alias per service or context. In those cases, an alias often has a small set of expected sender domains.
If an alias created for one service suddenly receives mail from an unrelated domain, the message may still be legitimate, but it is useful for the user to notice it immediately.
This feature would provide a softer middle ground between:
It would help users notice possible alias leaks, unexpected reuse of an alias, or suspicious sender/alias combinations while preserving normal forwarding behaviour.
Proposed behaviour
Each alias could have one or more expected sender domains.
If the feature is not enabled, or if no expected sender domain is configured, nothing changes.
If expected sender domains are configured:
The domain should be matched at the registered-domain level. For example,
mail.example.com,notifications.example.com, andbounce.example.comshould all be treated asexample.com. Requiring users to mark individual subdomains would add friction and likely provide little practical value.Suggested user-facing wording:
I would avoid describing this as a “whitelist”, since the feature is not meant to enforce delivery restrictions.
Warning markers and decay
The feature should use a decaying marker system:
Proposed schedule:
⚠️⚠️during the first 24 hours or for the first 2 emails;⚠️during the first week or for the first 5 emails;〰️afterwards.The reason for the decay is to avoid warning fatigue. A new unexpected sender should attract attention. But if the user has already seen several emails from the same domain and has not acted, the marker should become less intrusive while still acting as a reminder that the sender domain has not been explicitly marked as expected.
In practice:
Marker placement
Users should be able to choose where the marker is inserted.
Option 1: Display From
Insert the marker into the display name of the forwarded
Fromfield, replacing the first space.Example:
This is visible in the inbox and associates the warning directly with the sender. It also avoids modifying the subject. Since SimpleLogin already rewrites the display
Fromfor forwarded messages, this seems like a natural placement option.Option 2: Subject
Insert the marker into the subject by replacing a space, rather than always prefixing the subject.
Suggested strategy:
Example:
This should be less disruptive than prefixing:
because it mostly preserves the beginning of the subject, which may help with sorting, threading, mobile previews, and visual recognition of recurring emails.
If markers are inserted into the subject, they should be automatically removed from user replies, so that the marker does not leak back to the original sender and does not permanently pollute conversation threads.
Possible UI wording
Alias-level setting:
Action label:
Marker explanation:
Open questions
From, the envelope sender, or both?Suggested initial implementation scope
For an initial version, I would suggest keeping the feature conservative:
NOTE: There are some feature requests for whitelisting domains but mine is materially different from them.
All reactions