nextcloud / mail

đź’Ś Mail app for Nextcloud
https://apps.nextcloud.com/apps/mail
GNU Affero General Public License v3.0
851 stars 263 forks source link

Add %DOMAIN% as pattern to the "Add new config" section in "Administration > Groupware > Mail app" #5467

Open dienteperro opened 3 years ago

dienteperro commented 3 years ago

Feature Request

  1. In a Nextcloud instance install the Mail app
  2. Go to Settings, Administration, Groupware, Mail app
  3. 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 user123@domain.com) IMAP/SMTP User: %EMAIL% (With the result user123@domain.com) 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.

TCB13 commented 1 year ago

Did you ever get the provisioning working with the %EMAIL% pattern? It seems broken to me:

settings

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

webmail

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.