Virtual Hosting with Postfix

Discuss general troubleshooting concerns.

Moderators: scrumpy, Dave, leihog

Virtual Hosting with Postfix

Postby internetworks on Mon Mar 31, 2008 2:30 pm

Hello,

I am trying to configure an Engarde system that will run DNS, web and email services.

OK.

I set up server's hostname as follows:

server.example.com
with ip1

After that I want to host :

example.com on ip1
example2.com on ip1
example3.com on ip4

I will configure:
ns1.example.com on ip2
ns2.example.com on ip3

Everything goes well until here.

Now I want to run postfix on ip2 however it runs on ip1. I think I should learn how to configure Postfix. Ok! My questions will come up very soon.

Ok. Postfix runs on ip1. No problem with that.

I create a local group for example.com and a local user for example.com. Let's name it user1.
I create MX entries in the DNS as follows : mail.example.com -> ip1 ( ip where postfix runs )
OK. I create the virtual mail domains. Email works.

I create a local group for example2.com and a local user for example2.com : user2
I create MX entries in the DNS as follows : mail.example2.com -> ip1 ( ip where postfix runs )
Ok. I create the virtual mail domains

I will do the same with example3.com and add the MX for mail.example3.com to point to ip1 where postfix is running although example3.com web files should be served only from ip4.

My big problem!

Everything works fine until I will try to send an email.
If I will try to send and email from user3@example3.com the email goes through, however the recipient sees in the advanced header that the email seems to be coming from mail.example2.com

How can I fix this, so that each virtual hosting will use as the host from where the email is sent mail.virtualhost.tld ? Is there anything wrong in the way I am seeing things regarding this situation?

Did I configure the system the wrong way after install? Or this is not possible through the web tool and I have to manually configure Postfix and the rest of the services?

Thank you,
George
internetworks
 
Posts: 41
Joined: Mon Mar 31, 2008 2:13 pm

Return to General Troubleshooting

Who is online

Users browsing this forum: No registered users and 1 guest

cron