| SYSTEM INFORMATION | |
|---|---|
| OS type and version | Ubuntu Linux 24.04.4 LTS |
| Webmin version | 2.630 |
| Virtualmin version | 8.1.0 GPL |
| Webserver version | Apache/2.4.58 (Ubuntu) |
| Related packages | Postfix |
Feature request: alias-aware sender restrictions in Postfix
Category: Feature Requests · Virtualmin Forums
Overview
I’d like to propose a feature that brings simple, self-service email alias management to Virtualmin users. Similar in spirit to Apple’s Hide My Email or SimpleLogin, but lightweight and built into the existing Virtualmin/Usermin interface. The core goal is to let each user create and manage their own aliases, send and receive from those aliases, while the server enforces that users can only send from addresses they own.
Motivation
Currently, Virtualmin supports “Additional email addresses” per user, but there is no mechanism that prevents a user from spoofing another user’s address when sending. Postfix supports smtpd_sender_login_maps with reject_sender_login_mismatch to enforce this - but it requires manual configuration outside of Virtualmin’s GUI and has no automatic sync with the alias database. Each manual configuration takes a risk of technical debt and inconsistency after future Virtualmin upgrades.
This creates a gap: admins who want to offer flexible alias management to their users either have to leave the server wide open to spoofing, or maintain custom scripts outside Virtualmin.
Use case summary
Admin runs a shared mail server for multiple users. Each user wants to use purpose-specific addresses (e.g. one alias for online shopping, one for newsletters) without exposing their primary address and without the ability to impersonate other users on the same server. Today this requires significant manual Postfix configuration. This feature would make it a first-class, admin-controlled option in Virtualmin. Let’s start from the mapping, where at the beginning only Admins will be able to create aliases for user like it is right now. Each admin can configure “Additional email addresses” in “Edit user” > “Email Settings”.
Proposed functionality
Phase 1. Enforced sender policy (anti-spoofing) - [Must Have]
- admins can assign aliases from which users may use (via Additional email addresses)
- Virtualmin automatically maintains
sender_login_mapsin sync with alias assignments - Each alias is mapped only to its owner — no user can send as another user’s alias
- Admin can toggle enforcement on/off at the virtual server level
- Configuration of
reject_sender_login_mismatchmanaged via Virtualmin UI, not manually
Phase 2. Self-service alias management in Usermin - [Should Have]
- Each user can create aliases within their own domain (e.g.
shopping@domain.com,newsletters@domain.com) - All mail sent to aliases is delivered to the user’s main mailbox
- Users can enable/disable individual aliases
- Optionally: set a label or note per alias (for personal organisation)
- there should be a limit of the aliases for the user (ex. 100 aliases)
Phase 3. Seamless sending in Usermin / Roundcube - [Nice to have]
- User’s aliases are automatically available as selectable “From” identities when composing mail
- No manual identity setup required by the user
What this is NOT
This is intentionally a lightweight feature. It does not need to include:
- Per-alias delivery statistics or forwarding counters (like SimpleLogin)
- Cross-domain aliases
- Catch-all alias generation
- External forwarding to third-party addresses
The scope is deliberately minimal: own-domain aliases, safe sending, self-service management.
Technical notes for implementors
- Postfix side:
smtpd_sender_login_maps = hash:/etc/postfix/sender_login_maps+reject_sender_login_mismatchinsmtpd_sender_restrictions - The
sender_login_mapsfile needs to be regenerated on every alias change — a Virtualmin post-save hook would handle this - Works with both file-based and MySQL virtual alias backends
- No third-party dependencies required