I have a dedicated server with multiple Ruby on Rails apps on it. Each of these apps run on their own domain. When configuring Postfix there are parameters called "myhostname" and "mydomain". As far as I can see they accept one domain only and when sending mails from my apps, the domain in this field indeed states this as the sending server (in the raw gmail email for example) no matter what the "From" tag in the email says. Ideally I want domain2.com to be the sending server if I send mail from firstname.lastname@example.org, even if domain1.com is the "mydomain". My questions are:
- Can I change the sending server according to the email actually used when sending?
- Is this a big deal, and how do others solve this issue?
I only use Postfix on this server for sending e-mails, not receiving. Grateful for any suggestions.