LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 01-30-2008, 02:57 PM   #1
Phaethar
Member
 
Registered: Oct 2003
Location: MN
Distribution: CentOS, Fedora
Posts: 182

Rep: Reputation: 30
Postfix with multiple domains and interfaces


Hey all,

I'm looking for some advice on how best to get a Postfix server set up for sending mail out for a couple of domains.

First, this system is used only as an outgoing mail server. It's not a final destination for anything, and no mail is ever received by it. All replies are received on a different server.

The system is already functioning for 1 domain. Reverse records are set, and mail is being delivered normally.

What I'd like to do is set up a second entirely separate domain within Postfix if possible to send mail through. Using a 2nd NIC, I'd need to force email for this second domain to go through the 2nd NIC so I could properly set up the DNS records for the IP.

I've been going through the Postfix documentation, but thus far have been unable to find anything about having a second domain's email be sent through a specific interface.

I'm also not sure how to go about setting up the mydomain setting in the Postfix config for multiple domains. Again, the reading I've done so far has concentrated more on the server being a final destination for multiple domains, not a simple transit server to send mail out from multiple domains.

The server in question is running CentOS 5 and is fully upadated. If more info is needed, please let me know. Once I know where to look I should be able to figure things out from there.

Thanks.
 
Old 01-30-2008, 09:46 PM   #2
dkm999
Member
 
Registered: Nov 2006
Location: Seattle, WA
Distribution: Fedora
Posts: 407

Rep: Reputation: 35
I think you want to set up virtual domains on your Postfix server. There is a VIRTUAL_README file that comes with the distribution that more or less says how to do that, and what options you have. This will not automatically force mail for domain2 to leave via the second NIC, but it will leave (by whatever path the routing table says to use for a particular destination), so it will get delivered.

I think that Postfix is at the wrong level of the TCP/IP stack to try to force an override of the normal IP routing. You should do that by setting routes properly. Unfortunately, you can only specify one default route on a given machine, without doing some fairly bizarre things. Probably the cleanest way I can think of to make this happen (if you *really* want it to happen) is to run two virtual machines, and set up Postfix for one domain on one, and for the other domain on the other. Then you could have two different default routes.

HTH
 
Old 01-31-2008, 04:05 AM   #3
billymayday
LQ Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Maybe multiple instances of postfix will do what you want. Have a look at

http://advosys.ca/papers/postfix-instance.html
 
  


Reply



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
Postfix Multiple Domains gr0undz3r0 Linux - Server 2 02-18-2007 06:48 AM
Multiple domains for Postfix sbabcock23 Linux - Server 5 12-12-2006 09:37 AM
postfix hostname parameter for multiple domains? paddyjoy Linux - Server 3 09-21-2006 04:58 PM
Postfix multiple domains & mailboxes fatum112 Linux - Software 0 11-21-2005 01:13 PM
Postfix and multiple domains MasterC Linux - Networking 4 07-16-2003 01:19 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 11:49 PM.

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