?
Solved

can I put a mx entry in my /etc/hosts ?

Posted on 2010-01-12
3
Medium Priority
?
263 Views
Last Modified: 2013-12-17
I want to set up 2 postfix servers for giggles.

I want 2 "email clients" per server and want to be able to email from / to any of the four clients.  

I know I need a mx record to send mail, I just so not want to set up a dns server just for that.

0
Comment
Question by:TIMFOX123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 16

Expert Comment

by:Enphyniti
ID: 26295364
Hrmm... The only thing I can think of will only work because you are only using two mail servers:

Configure each server to allow relays from the other.  Then configure postfix on each server to relay mail through the other.  The other server should recognize messages destined for local delivery.  Since this is a closed environment, that should do the trick.

0
 
LVL 1

Accepted Solution

by:
yonatanz earned 2000 total points
ID: 26295511
Overriding DNS for the email clients is not needed, as they can be configured per-case to use the correct postfix server.

Overriding DNS for the postfix servers is not necessary either, as you can work around the problem by using the transport table, as per postfix's transport man page: http://www.postfix.org/transport.5.html

So all in all
1. Set up the two servers to listen locally on ports 2501 and 2502 (or choose your own), and handle mail for giggle1.com and giggle2.com respectively.

2. Edit /etc/postfix/transport and add lines like:

# Route giggle1.com through postfix via SMTP at port 2501
giggle1.com      smtp:localhost:2501
# Route giggle2.com through postfix via SMTP at port 2502
giggle2.com      smtp:localhost:2502

3. Create the DB file by running the command
postmap /etc/postfix/transport

The above solution is flexible enough to perform other interesting things. See the man page that I mentioned for more info.

0
 

Author Closing Comment

by:TIMFOX123
ID: 31676222

Wow, that made me giggle :)

Thanks so much.

0

Featured Post

Back Up Your Microsoft Windows Server®

Back up all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Import PST to Exchange using Power Shell new-mailboximportrequest command, you can simply import the PST file into Exchange mailbox or archived. To know How to import PST into Exchange  2013 read the complete article.
Resolve DNS query failed errors for Exchange
In this video we show how to create a Distribution Group in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.: First we need to log into the Exchange Admin Center. Navigate to the Recipients >>…
To show how to generate a certificate request in Exchange 2013. We show this process by using the Exchange Admin Center. Log into Exchange Admin Center.:  First we need to log into the Exchange Admin Center. Navigate to the Servers >> Certificates…
Suggested Courses

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question