LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 10-31-2006, 03:02 PM   #1
MrSako
Member
 
Registered: May 2006
Distribution: CentOS 4.4
Posts: 185

Rep: Reputation: 30
using postfix for 2 domain names


i want to be able to have email for both of my domain names i own (running my own postfix server). right now it's configured to run for one domain name. how would i make it so the other one would work also? going through the configuration of postfix it looks like when it was designed the designers only had in mind that the user would be using one domain name with postfix
 
Old 10-31-2006, 03:37 PM   #2
farslayer
LQ Guru
 
Registered: Oct 2005
Location: Northeast Ohio
Distribution: linuxdebian
Posts: 7,249
Blog Entries: 5

Rep: Reputation: 191Reputation: 191
virtual domains..

a quick search should yield lots of info and ways to do this..

http://www.akadia.com/services/postf...mailboxes.html
 
Old 10-31-2006, 03:45 PM   #3
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
For a quick tutorial since you most likely have your main.cf file configured for one domain is to edit these two files, virtual and transport.

virtual example (you don't need to add your main domain in main.cf here)
Code:
domain.com VIRTUAL
user@domain.com     user
user1@domain.com  user2
transport example (this one does need all domains for email configured)
Code:
domain1.com           :
.domain1.com          :

domain2.com           :
.domain2.com          :
Then simply run postmap <filename> to create the binary database for each.

postmap virtual
postmap transport

Restart postfix.
 
Old 10-31-2006, 07:11 PM   #4
WindowBreaker
Member
 
Registered: Oct 2005
Distribution: Slackware
Posts: 228

Rep: Reputation: 40
Quote:
Originally Posted by MrSako
i want to be able to have email for both of my domain names i own (running my own postfix server).
I will take that to mean that you would like Postfix to receive emails addressed to 2 domains, and that the user part of the address is then delivered to the same user's mailbox, regardless of the domain part of the address.

I will also assume that all outgoing emails are going to appear to be coming from either one domain, or the other - but not both.

The reason I am assuming these things is that it's the simplest way to implement a multiple domain configuration. Taking into account your lack of detail as far as what you want to accomplish, this is the configuration I'll describe.

Quote:
Originally Posted by MrSako
going through the configuration of postfix it looks like when it was designed the designers only had in mind that the user would be using one domain name with postfix
You couldn't be more mistaken. Postfix is very flexible and has built in mechanisms for hosting multiple domains, as evidenced by the following README file right from Postfix's web site:
http://www.postfix.org/VIRTUAL_README.html

Now down to the nitty gritty.

Let's say your 2 domains were named "abbott.com" and "costello.com". And let's assume that the domain you would like shown on outgoing emails is "abbott.com". Then you would simply execute the following commands, and you're all done.

Code:
postconf -e "myorigin = abbott.com"
postconf -e "mydestination = abbott.com costello.com localhost localhost.$mydomain $myhostname"
postconf -e "transport_maps = "
postfix reload
Any other questions?

Last edited by WindowBreaker; 10-31-2006 at 07:13 PM.
 
Old 11-01-2006, 05:41 AM   #5
saini_mw
Member
 
Registered: Jun 2005
Location: On the top of the World
Posts: 114

Rep: Reputation: 15
Dont know much about Posfix as i use QMAIL for mailing,which is a good mail server,Configuring Virtual Domains will be a good option if Postfix allows you to do, or if you are going to setup a big mail server then i think you should use VPOPMAIL for virtual Domains.

Regards,

Harinder Singh.
 
Old 11-01-2006, 03:16 PM   #6
MrSako
Member
 
Registered: May 2006
Distribution: CentOS 4.4
Posts: 185

Original Poster
Rep: Reputation: 30
oh i wanted to have seperate users for both, sorry i wasn't very detailed.

i want it to be as if i had 2 postfix servers on 2 physical machines and 2 different sets of users.

ie i want webmaster@domain1.com to be different than webmaster@domain2.com

does trickys kid example do that?

like havent a seperate unix user for each mailbox even though the user would type in something different
Quote:
domain.com VIRTUAL
webmaster@seconddomain.com webmaster-seconddomain
admin@seconddomain.com admin-seconddomain
and webmaster-seconddomain and admin-seconddomain are the unix users, and webmaster@seconddomain.com would be what the person emails to email these users.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Domain names and hosting eva General 6 04-16-2006 11:52 AM
domain names xaos5 Linux - Networking 2 06-09-2005 02:03 AM
Domain Names...? cparker15 Linux - Networking 8 08-27-2003 07:13 AM
Domain Names Timbo General 7 02-14-2003 03:10 PM
domain names cic Linux - Networking 3 06-11-2002 03:47 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 05:56 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration