I have the following problem. I use Gmail mail services for my domain name mydomain.com. My server with hostname server.my-datacenter.net sends messages to the users of my website with "from" and "reply-to" address email@example.com. Postfix (and Exim on my second server) automatically adds email addresses firstname.lastname@example.org or email@example.com to all outgoing emails.
Some mail servers are not accepting emails from my server because server.my-datacenter.net itself does not accept mail. I can not create MX records for server.my-datacenter.net to make my server accept external emails because this domain/subdomain belongs to my data center and was assigned automatically as a hostname. I can not change hostname from server.my-datacenter.net to mydomain.com because in this case I can not have PTR record (my datacenter wants 5 EUR/month for a custom PTR record).
Server's IP address has a reverse PTR record to server.my-datacenter.net. Domain name mydomain.com has a SPF record (included Gmail + my server's IP address).
What can I do in this situation? Is it possible to force Exim and Postfix to use firstname.lastname@example.org and email@example.com instead of firstname.lastname@example.org and email@example.com? If yes, how can I do it in Postfix and Ensim.
If I do it, is it OK that outgoing email will contain email addresses with a different domain (not a server's hostname)?
2DBF7646459 1219 Wed Feb 20 11:46:01 firstname.lastname@example.org (host a.mail.server[xxx.xxx.xxx.xxx] said: 450 4.1.8 <email@example.com>: Sender address rejected: Domain not found (in reply to RCPT TO command)) email@address