I have Plesk Onyx 17.8.11 and it was upgraded from 12.5.
I have removed mail services from the server and use the External SMTP Server (MSMTP) option. Everything is configured correctly there to connect to my office365 subscription server.
However any notifications emails sent from the server or emails from the File Sharing tool are not sent through. In the /var/log/maillog file I have the following errors.
May 1 03:10:15 u16271698 msmtp: host=smtp.office365.com tls=on auth=on user=<username>@roncosafety.com from=root@u16271698.onlinehome-server.com recipients=<username>@roncosafety.com smtpstatus=550 smtpmsg='550 5.7.60 SMTP; Client does not have permissions to send as this sender [YQXPR0101MB2181.CANPRD01.PROD.OUTLOOK.COM]' errormsg='the server did not accept the mail' exitcode=EX_UNAVAILABLE
May 1 11:32:56 u16271698 msmtp: host=smtp.office365.com tls=on auth=on user=<username>@roncosafety.com from=psaadm@u16271698.onlinehome-server.com recipients=<username>@roncosafety.com smtpstatus=550 smtpmsg='550 5.7.60 SMTP; Client does not have permissions to send as this sender [YTOPR0101MB2186.CANPRD01.PROD.OUTLOOK.COM]' errormsg='the server did not accept the mail' exitcode=EX_UNAVAILABLE
Now I know this is because the <username>@u16271698.onlinehome-server.com is not permitted to send, and this is because that domain is not configured on my Office365.
I tried changing the hostname of the server from u16272698.onlinehome-server.com to match that of my domain roncosafety.com. But that did not fix the issue.
The information in the My Profile is also setup properly.
If I edit the file /etc/msmtprc and change the maildomain value to roncosafety.com emails sent using Email links from the File Sharing work, but I know this file will get overwritten the next time the system is updated so this is not a solution.
So my question is how can I change the domain name used the system when is sends emails from root and psaadmin so that the emails will successfully be sent through my External SMTP Server that is configured.
I have removed mail services from the server and use the External SMTP Server (MSMTP) option. Everything is configured correctly there to connect to my office365 subscription server.
However any notifications emails sent from the server or emails from the File Sharing tool are not sent through. In the /var/log/maillog file I have the following errors.
May 1 03:10:15 u16271698 msmtp: host=smtp.office365.com tls=on auth=on user=<username>@roncosafety.com from=root@u16271698.onlinehome-server.com recipients=<username>@roncosafety.com smtpstatus=550 smtpmsg='550 5.7.60 SMTP; Client does not have permissions to send as this sender [YQXPR0101MB2181.CANPRD01.PROD.OUTLOOK.COM]' errormsg='the server did not accept the mail' exitcode=EX_UNAVAILABLE
May 1 11:32:56 u16271698 msmtp: host=smtp.office365.com tls=on auth=on user=<username>@roncosafety.com from=psaadm@u16271698.onlinehome-server.com recipients=<username>@roncosafety.com smtpstatus=550 smtpmsg='550 5.7.60 SMTP; Client does not have permissions to send as this sender [YTOPR0101MB2186.CANPRD01.PROD.OUTLOOK.COM]' errormsg='the server did not accept the mail' exitcode=EX_UNAVAILABLE
Now I know this is because the <username>@u16271698.onlinehome-server.com is not permitted to send, and this is because that domain is not configured on my Office365.
I tried changing the hostname of the server from u16272698.onlinehome-server.com to match that of my domain roncosafety.com. But that did not fix the issue.
The information in the My Profile is also setup properly.
If I edit the file /etc/msmtprc and change the maildomain value to roncosafety.com emails sent using Email links from the File Sharing work, but I know this file will get overwritten the next time the system is updated so this is not a solution.
So my question is how can I change the domain name used the system when is sends emails from root and psaadmin so that the emails will successfully be sent through my External SMTP Server that is configured.