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 firstname.lastname@example.org. Postfix (and Exim on my second server) automatically adds email addresses email@example.com or firstname.lastname@example.org 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 email@example.com and firstname.lastname@example.org instead of email@example.com and firstname.lastname@example.org? 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 email@example.com (host a.mail.server[xxx.xxx.xxx.xxx] said: 450 4.1.8 <firstname.lastname@example.org>: Sender address rejected: Domain not found (in reply to RCPT TO command)) email@address