Rename extraVirtualAliases to aliases and update description

The extra and virtual parts are redundant and Postfix specific and not
at all required. Compare forwards for example.
This commit is contained in:
Martin Weinelt
2026-03-23 00:03:41 +01:00
parent 23364b04e8
commit 31c7607ef4
5 changed files with 18 additions and 19 deletions
+11 -12
View File
@@ -649,7 +649,7 @@ in
'';
};
extraVirtualAliases = mkOption {
aliases = mkOption {
type =
let
loginAccount = mkOptionType {
@@ -660,7 +660,6 @@ in
with types;
attrsOf (either loginAccount (nonEmptyListOf loginAccount));
example = {
"info@example.com" = "user1@example.com";
"postmaster@example.com" = "user1@example.com";
"abuse@example.com" = "user1@example.com";
"multi@example.com" = [
@@ -669,15 +668,14 @@ in
];
};
description = ''
Virtual Aliases. A virtual alias `"info@example.com" = "user1@example.com"` means that
all mail to `info@example.com` is forwarded to `user1@example.com`. Note
that it is expected that `postmaster@example.com` and `abuse@example.com` is
forwarded to some valid email address. (Alternatively you can create login
accounts for `postmaster` and (or) `abuse`). Furthermore, it also allows
the user `user1@example.com` to send emails as `info@example.com`.
It's also possible to create an alias for multiple accounts. In this
example all mails for `multi@example.com` will be forwarded to both
`user1@example.com` and `user2@example.com`.
Aliases are additional mail addresses routed to one or more existing local accounts.
The target accounts are allowed to use the alias as the sender address.
:::{note}
This feature is limited to local accounts and does not support LDAP or
other external accounts.
:::
'';
default = { };
};
@@ -692,7 +690,7 @@ in
the value `{ "user@example.com" = "user@elsewhere.com"; }`
means that mails to `user@example.com` are forwarded to
`user@elsewhere.com`. The difference with the
{option}`mailserver.extraVirtualAliases` option is that `user@elsewhere.com`
{option}`mailserver.aliases` option is that `user@elsewhere.com`
can't send mail as `user@example.com`. Also, this option
allows to forward mails to external addresses.
'';
@@ -1681,5 +1679,6 @@ in
[ "mailserver" "ldap" "postfix" "mailAttribute" ]
[ "mailserver" "ldap" "attributes" "mail" ]
)
(mkRenamedOptionModule [ "mailserver" "extraVirtualAliases" ] [ "mailserver" "aliases" ])
];
}