mailinabox
mailinabox copied to clipboard
Aliases and users with the same address are not checked for
Right now you can create an user, let's say [email protected]
and also create an alias [email protected]
(and vice-versa).
Reproduction:
- Create an user via the Users control panel. Let's call it
[email protected]
. - Create an alias
[email protected]
. 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.
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.