LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 08-06-2010, 02:10 PM   #1
tristopherr
LQ Newbie
 
Registered: Sep 2007
Posts: 8

Rep: Reputation: 0
Configure Postfix to relay mail to multiple internal mail servers w/different domains


Scenario

Two exchange servers internally. One is setup for example.com (192.168.1.10) and the other is setup for example2.com (192.168.1.20)

Both are behind a single public IP.

I want to use postfix to sit in front of the two exchange servers. Postfix will accept mail for both domains and relay to the appropriate server.

I have postfix installed with only defaults at this point.

Thanks so much!
 
Old 08-07-2010, 03:28 PM   #2
tva
Member
 
Registered: Jul 2010
Location: Finland
Distribution: Open SUSE 13.1
Posts: 83

Rep: Reputation: 8
In main.cf

relay_domains = $mydestination, hash:/etc/postfix/relay
transport_maps = hash:/etc/postfix/transport

In /etc/postfix/relay

example.com OK
example2.com OK

remember to postmap /etc/postfix/relay

In /etc/postfix/transport
example.com relay:192.168.1.10
example2.com relay:192.168.1.20

remember to postmap that also, then reload postfix.

Not sure about exact syntax but that should do, I have my conf in MySQL

Hope that helps / works
 
Old 05-08-2011, 07:23 AM   #3
slovarik
LQ Newbie
 
Registered: Jan 2010
Distribution: Ubuntu Latest
Posts: 1

Rep: Reputation: Disabled
How to relay several domains using postfix to one domain?

As far as I understand if I have a postfix relay between Internet and my organization's Exchange server while my organization have to receive mail for several other domains (illustration bellow)

Code:
 _____________________________________   ___________________
/              Internet               \ /My organization LAN\
foo.org  \
bar.com ------ [ Postfix Relay MTA ] ----- my.org
quux.net /
I have to list my wanted domains (foo, bar, quux) in /etc/postfix/relay and specify transport (destination?) to them in /etc/postfix/transport ?

So my configuration will be like this:

/etc/postfix/relay:
Code:
foo.org OK
bar.com OK
quux.net OK
/etc/postfix/transport:
Code:
foo.org:my.org
bar.com:my.org
quux.net:my.org
Is it right?
Postfix manual had quite confused me about relaying and transporting topics.
 
  


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
Setting up Postfix as outgoign mail relay for several domains/hosts koriban Linux - Server 1 10-06-2009 08:01 AM
Postfix: sending mail from multiple domains scgtrp Linux - Server 6 07-21-2009 12:49 PM
LXer: Postfix Mail Server With Multiple Domains LXer Syndicated Linux News 0 09-22-2008 03:11 AM
How to configure procmail on postfix mail server using virtual domains? omar1984 Linux - Server 0 01-05-2007 06:55 AM
How to make postfix accept mail from multiple domains Farthom Linux - Newbie 4 09-14-2006 12:13 PM

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

All times are GMT -5. The time now is 10:59 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