Change sender for all mail messages.
How to configure a fixed Sender Address for all E-Mails?
To workaround the error: "550 5.7.1 Client does not have permissions to send as this sender" needs the option in the Plesk panel to set header From.
In case using a user account for SMTP relaying via external Mail server.
At the moment this is only possible through the manual configuration of canonical maps in the Postfix.
Add to /etc/postfix/main.cf
sendercanonicalclasses = envelopesender, headersender
sendercanonicalmaps = regexp:/etc/postfix/sendercanonicalmaps
smtpheaderchecks = regexp:/etc/postfix/header_checkRewrite the envelope address from the email originating from the server itself:
vi /etc/postfix/sendercanonicalmaps
Rewrite from the address in SMTP relayed e-mail:
vi /etc/postfix/header_check
/From:.*/ REPLACE From: newsender@address.com
Generate map:
postmap /etc/postfix/sendercanonicalmaps
postmap /etc/postfix/header_check
Restart postfix
systemctl restart postfix