• If you are still using CentOS 7.9, it's time to convert to Alma 8 with the free centos2alma tool by Plesk or Plesk Migrator. Please let us know your experiences or concerns in this thread:
    CentOS2Alma discussion

Issue Change domain used with External SMTP Server (MSMTP)

Scott.B

Basic Pleskian
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 [email protected] 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 [email protected] 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 am having the same issue. Did you ever get anywhere with this before I start to experiment? I did a quick search on the etc directory and have noticed that the maildomain as used in the msmtp config is the same as that used in the the etc/hosts.

In my instance I want the maildomain parameter to used the domain from where the sending message originated. I noticed in our external smtp service that it already uses the user name of the account associated with the domain sending the message.

How can the parameters be updated to used username for account@domain.

Any advice appreciated

Rob
 
Back
Top