As nobody come with clarifications from the developers, I continued with some tests.
- Fresh CentOS 7 install + CyberPanel 2.0
2.0.1 failed to instal due to some MariaDB missing repository.
Now let’s do some tests:
- Created the new website (let’s name it - domain2.tld) but not checked Create Mail Domain at additional features because in this particular cases we want to use a remote mail server, and I want to try this clean website only vhost.
- Email Policy Server disabled
Works. Postfix honour external DNS management and deliver the emails right to the correct remoteMX.domain2.tld
All emails exchanged between other domains in the server and the remoteMX.domain2.tld delivered perfectly.
- I enabled the Email Policy Server - And the problems started.
! IMPORTANT - First just enabled policy without accessing the Email Limits page.
The emails were exchanged correctly between servers (the local and remote one)
In the email logs, I observed this line when an email from remoteMX.domain2.com server was received for an email address for another website in the local server.
connect from remoteMX.domain2.tld[xxx.xxx.xx.xx]
warning: connect to /var/log/policyServerSocket: No such file or directory
postfix/smtpd[8788]: warning: problem talking to server /var/log/policyServerSocket: No such file or directory
remoteMX.domain2.tld[xxx.xxx.xx.xx] not internal
When sending an email from email address for another website in local server to the email address on the remoteMX.domain2.com - emails are delivered but with a warning in logs regarding the policy:
warning: connect to /var/log/policyServerSocket: No such file or directory
postfix/submission/smtpd[9057]: warning: problem talking to server /var/log/policyServerSocket: No such file or directory
! IMPORTANT - Now on the CP interface I accessed the Mail Setting > Email Limits page
Just access the page, and do nothing there, leave DISABLED the limits for that particular domain with remote MX server.
From that moment, the warning regarding missing file for policy disappeared, probably the policy was updated and a file was created
Emails stopped to work.
We can receive emails from remoteMX.domain2.tld but we can not send emails back.
relay=dovecot, delay=1.2, delays=1.1/0/0/0.05, dsn=5.1.1, status=bounced (user unknown)
So there are some problems with the Email Policy Server.
@DEVELOPERS please register as a possible bug and investigate the situation.
For now, CyberPanel can’t be used with Email Policy Server Active and a remote exchange server.