Problem
Currently, Stalwart Mail Server requires a domain to be fully configured as a local or alias domain before any email address can be assigned to it. While this works for standard setups, it prevents Stalwart from acting as a centralized “mailbox aggregator” for self-hosters and homelab users who manage multiple external email accounts (eg gmail.com, outlook.com, web.de, …) with typical postfix + dovecot setup.
Proposed Solution
Allow (as an option) the aliases directory mapping to accept fully qualified email addresses belonging to non-local domains. If an exact string match is found during the RCPT TO or local delivery stage (eg [email protected]), Stalwart should route it to the designated local mailbox. If the domain matches but no specific alias is found, Stalwart should treat the domain as external and use normal MX/Relay routing.
More informations
To centralize mails from all external accounts, tools like Fetchmail or Getmail are used to fetch incoming emails from the external provider and drop them into their local Stalwart mailbox.
When replying, a sender-dependent SMTP relay to send through that external provider’s server is used.
Advantages
This setup is very usefull to consolidate all mails from mail accounts into one self-owned and -controlled mail server with all features (eg. Sieve filtering).
Also, any mail client need only one configuration. At least desktop and mobile versions of Thunderbird and Apple Mail, but also webmailers like Roundcube and SOGo support this setup. And of course other ones like Em-Mail, Fairmail.
More advantages:
- More parity with Postfix, Exim, Sendmail, Dovecot and Cyrus Imap
- Enables sovereign data consolidation
- Avoids many sieve-like configurations on every external mailbox. If a feature is possible at all on some providers like it’s possible with Sieve.
- Avoids cluttered mail clients with multiple account setups. One account configuration is enough.
Old postings
See my older post with a drawing here:
… and the old feature request with some Stalwart-specific suggestions:
Thank you.