If an app registers the sender address _app@doma.in_ **and** a yunohost account configured an alias for the same address the app will not be able to send emails anymore.
postfix asks the first map defined in smtpd_sender_login_maps and finds that the address _app@doma.in_ can be used as a sender address by the yunohost account having configured the alias and **then stops and doesn't look up the second list** for registered apps.
The unionmap instructs postfix to join a list from both sources and then return the match from that joined list which would then contain _yunohost_account_having_registered_alias, appname_ for the lookup of _app@doma.in_.
This allows the yunohost account having registered the alias and the app being registered to use the sender address to send email using that sender **and makes it possible to receive replies to the emails going out from the app**.
Reference: https://serverfault.com/questions/948362/postfix-multiple-smtpd-sender-login-maps
* Add missing account registration for apps in postfix
* Also set email on dovecot DB
* fix undefined var
* Fix missing username format config in dovecot