Add %DOMAIN% as pattern to the "Add new config" section in "Administration > Groupware > Mail app"
Feature Request
- In a Nextcloud instance install the Mail app
- Go to Settings, Administration, Groupware, Mail app
- Click on the "+ Add new config" button in order to create a new default Nextcloud-instace-wide setting
Summary
It would be nice to have the %DOMAIN% pattern, so, if you input "domain.com" in the "Provisioning domain" field, it can be used as follows in the rest of required fields for that config:
Email address template: %USERID%@%DOMAIN% (With the result [email protected]) IMAP/SMTP User: %EMAIL% (With the result [email protected]) IMAP Host: imap.%DOMAIN% (With the result imap.domain.com) SMTP Host: smtp.%DOMAIN% (With the result smtp.domain.com)
IMHO this pattern allows to have less repetition or input of the actual domain by the admin for the creation of the default config.
Did you ever get the provisioning working with the %EMAIL% pattern? It seems broken to me:

And when I go to the Mail tab it just stays loading for a very long time and ends up in this:

My Dovecot says Nextcloud is trying to login with the placeholder lol
dovecot[9155]: imap-login: Disconnected (auth failed, 4 attempts in 35 secs): **user=<%EMAIL%>**, method=PLAIN, rip=10.10.125.7, lip=10.10.125.4, TLS, session=<AlQT2gv7JOcKCn0H>
It says that “* %USERID% and %EMAIL% will be replaced with the user’s UID and email” but apparently it doesn’t replace the %EMAIL% placeholder with the login email as we can see on the log.
Note: my users will login with 2 different domains using their full e-mail address. The IMAP and SMTP require login with the full e-mail as well.