Host was not connected to because it violates local access rules

connection to the mail server.
I installed UCS 5.2 and created a domain. I then installed the mail server on this installation, created users, and successfully set up access via external mail clients.
On another VM running UCS 5.2 as a DC Replicator, I then installed Nextcloud. After that, I wanted to integrate the mail server there. That failed.
Nextcloud reports:
Host was not connected to because it violates local access rules
I added the “Allow_local_servers…” entry to the Nextcloud config.php file. No success.
Then I added the domain controller’s server certificate.
No change.
An external mail server connects without any issues. So it must be the certificate.
Who do I need to provide the mail server’s certificate to in order for this to work?
The entire setup is intended to run exclusively on-premises behind a firewall.
Thank you very much in…

I then added the following to the config.php file:
“mail_smtpstreamoptions” => array(
‘ssl’ => array(
‘allow_self_signed’ => true,
‘verify_peer’ => false,
‘verify_peer_name’ => false
),
),
As an administrator, I entered the mail server details under Administrator Settings > Basic Settings.
Test emails are sent without any errors.
But when I try to set up the email account as a regular user, I get the message: IMAP server is not reachable.
As an administrator, I entered the mail server details under Administrator Settings > Basic Settings.
Test emails are sent without any errors.
But when I try to set up the email account as a regular user, I get the message: IMAP server is not accessible.
When I set up an external mail server for the user, everything works perfectly.