Postfix: How setting up hostname for every virtual server?

5 posts / 0 new
Last post
#1 Sat, 01/06/2018 - 12:21
ADDISON74

Postfix: How setting up hostname for every virtual server?

Here is my scenario: 1 server, 2 virtual servers with static dedicated IP's (eth0, eth0:0).

I managed setting dedicated IP's in Postfix for my virtual servers based on this documentation: https://www.virtualmin.com/documentation/email/dependent.

One more issue I have to solve. Postfix is using hostname record from the server for all sent emails, no matter what virtual server I am using for sending. I would like to set up my own hostnames for every virtual server. Now it is server.mydomain.com, I would like Postfix setting up hostnames to server.mydomain1.com and server.mydomain2.com for virtual servers.

Is this possible in Virtualmin?

Tue, 01/09/2018 - 15:33
tpnsolutions
tpnsolutions's picture

Hi,

Why do you need a separate hostnames?

Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Wed, 01/10/2018 - 10:47
ADDISON74

If I send an email server hostname will be attach to it. I don't want this approach, every domain which has its own IP should have its hostname too in email headers.

Wed, 01/10/2018 - 13:59
tpnsolutions
tpnsolutions's picture

Hi,

What benefit do you see with this idea?

You could setup "multiple postfix instances", though this would likely be a bit overkill, and isn't really supported by Virtualmin itself.

http://www.postfix.org/MULTI_INSTANCE_README.html

Best Regards,
Peter Knowles | TPN Solutions
Email: pknowles@tpnsolutions.com | Skype: tpnassist
Fri, 01/12/2018 - 10:17
ADDISON74

Let's not questioning too much and provide solutions. I am not a newbie in Virtualmin.

I have a hostname like this server.mydomain.com. There are many other virtual domains, but one of them is www.mydomain.com. It is fine to see the hostname server.mydomain.com when sending emails from mydomain.com, but when sending emails from mydomain-one.com hostname is server.mydomain.com. One solution is changing the hostname, the other one is setting up hostname for every domain in master.cf file. I managed a few solutions but I need to find which one is the best. You are welcomed to provide one.

Topic locked