scanner / as_email_service

A Django app and smtp relay service for working with 3rd party email services and asimap
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Add support for the 'aliases' reverse many-to-many relation on the EmailAccount's rest endpoint #50

Closed scanner closed 12 months ago

scanner commented 1 year ago

The email account has an "alias_for" m2m relationship that tells you for which other email accounts this email account is an alias.. ie: email sent to this email account will instead be delivered to the email accounts listed in the alias_for field.

In terms of how the object mode is designed this makes sense.

However, the model also defines an "aliases" backwards relationship. This tells you "what aliases this email account" has (which is, IMO, more how people think about this.)

So we should expose these aliases AND we should let people remove/add entries to this field. NOTE: They can remove any alias listed, but they can only add aliases that are email accounts for which the user is the owner of.