Thanks for the answer!
Configured PMG to receive mail and send it to the mail server. Outgoing emails are sent through the mail server. Everything is working.
The following question arose:
DNS records (MX, A, PTR, DKIM, SPF records) are configured for the current mail server (mail.test.com)
FQDN name of PMG (pmg.test.com), how to correctly configure DNS settings now so that there are no problems with getting into black lists of other servers?
Can the PMG be configured to use the parameters of the current mail server? So that the name in requests does not appear on pmg.test.com but on mail.test.com?