I'm looking to setup our server with two domains, and have two autoprovision sets per domain.
What I am trying to figure out is the automatic creation of an alias when a new account is provisioned, and then set as the default from address.
For example, I have domain1.local and domain2.local
let's say I used zmprov to setup autoprovision for each domain, which pulls the new users from LDAP (in this case against Active Directory).
Naturally, creates a new account for the relevant domain, email@example.com or firstname.lastname@example.org
What I would like to figure out is how to make it so it creates an alias for the relevant domain for the relevant user, and then sets it as the default from.
So, email@example.com as an alias, then somehow triggers:
zmprov ma firstname.lastname@example.org zimbraPrefFromAddress email@example.com
Of course pulling first name and last name from LDAP for the alias creation, and syntax adjustment of the from adjustment command. I would only really want this to happen at time of provision, as I'm sure there will be requests to change the default from address in future, and it would be a pain to have such a configuration reversed.