It seems you have a wrong idea how attribute mapping works. “mail” as you have put in for the template attribute would mean that you must have for each user a template generated with the name of his email address.
Attribute Field: Specifies an LDAP attribute that holds a specific value which can be mapped to a mailbox template using the Attribute Mapping section.
So you must use a different attribute (or create a new one in AD schema) to put in the template name to be used for that user.
Please try again to understand what attributes are (they are basically fields in the AD “database”) and how mailcow uses them. The example does explain it…