The ALIAS_URL0 check is for a conventional user or a user in a hosted domain. If this fails a vanity domain check is also made. This is done with the following alias URL:
ALIAS_URL1=ldap:///$B?*?sub?(&(msgVanityDomain=$D)$R)