mailinabox icon indicating copy to clipboard operation
mailinabox copied to clipboard

Aliases and users with the same address are not checked for

Open ddavness opened this issue 2 years ago • 1 comments

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() and add_mail_alias() whether the target address exists on the aliases and users table, respectively.

ddavness avatar Mar 17 '22 16:03 ddavness

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.

A3K avatar Mar 23 '22 01:03 A3K