#804532 Support for default alias sets

Package:
vmm
Source:
vmm
Submitter:
martin f krafft
Date:
2015-11-09 10:33:06 UTC
Severity:
wishlist
#804532#5
Date:
2015-11-09 10:29:45 UTC
From:
To:
The idea of a default alias set is that each domain gets
bootstrapped to handle these aliases without any additional
configuration.

For instance, a site might want to ensure that all hosted domains
know how to handle mail to postmaster@ and abuse@ for
RFC-compliance.

Or a company might want to ensure that sales@ reaches the right
people no matter what domain name was used. Using alias domains for
this would mean that the domains would be treated strictly identical
and it would not be possible to add disjunct sets of users to
different domains.

Please find attached the SQL-side of things. I have not even thought
about the UI yet, as for now I just need the functionality.

The table alias_set establishes the m:n link between the domain_data
table (with a new asid field), and the common_alias table that
defines the common aliases for the different alias sets (identified
by asid).

In addition, the postfix_virtual_alias_maps function was completely
rewritten so as to now scan the different map sources in series. The
order of precedence is:

  alias > user/relocated > alias sets > catchall

Hence, an explicit alias or a user account overrides a default
alias.

Finally, I introduce yet another column to domain_data called
'owner', which should be a mandatory datum for each domain to hold
the e-mail address of its main owner. This address will be used when
a default alias sets its destination to 'OWNER'.

Initially, I conceived there to be another m:n table
domain_alias_set, to allow multiple alias sets to be associated with
each domain. However, this would increase complexity quite a lot
(especially of the UI that needs yet to be written), and I couldn't
really imagine a serious use case, so I opted for 1:n instead.