Aliases and users with the same address are not checked for
ddavness opened this issue · comments
David Duque commented
Right now you can create an user, let's say user@example.com
and also create an alias user@example.com
(and vice-versa).
Reproduction:
- Create an user via the Users control panel. Let's call it
user@example.com
. - Create an alias
user@example.com
. It shares the same address as the user. -
- Expected behavior: The alias is not created (and the endpoint returns an error), because it's address already exists as an user.
-
- Actual behavior: The alias is created like nothing happened.
Proposed Resolution: Check in
add_mail_user()
andadd_mail_alias()
whether the target address exists on thealiases
andusers
table, respectively.
Dimitri commented
This is desirable and working behaviour IMO allows the person in charge of the address to receive and manage emails while also forwarding to anyone else who needs a copy.