Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I have a dedicated server (Ubuntu 10.04 LTS) with a web application that has a module for sending emails that is slowing down the app.

The current structure is as follow:

Virtual Machine 1 (Application) Domain: app.domain.com IP: X.X.X.X

(I Have setup A records and MX records in /etc/bind/db.domain.com correctly)

But I need to escalate, so the structure should be:

Virtual Machine 1 (Application) Domain: app.domain.com IP: X.X.X.X

Virtual Machine 2 (Email1) Domain: email1.domain.com IP: Y.Y.Y.Y

Virtual Machine 3 (Email2) Domain: email2.domain.com IP: Z.Z.Z.Z

The question is: How to set up MX records on /etc/bind of each Virtual Machine so I can deliver emails with 'domain.com'.

VM 2 and 3 must have same domain as VM 1 but different subdomain and different IP. The problem is that I need to set up MX records on VM2 and VM3 to send emails with domain.com.

share|improve this question
1  
Please further describe what you want to do. I do not understand your question. –  MichelZ Jul 23 '12 at 13:30
    
VM 2 and 3 must have same domain as VM 1 but different subdomain and different IP. The problem is that I need to set up MX records on VM2 and VM3 to send emails with domain.com. That's what I don't know how to do because all bind config regarding domain.com is on VM1 in /etc/bind/db.domain.com. Can I have /etc/bind/db.domain.com in VM1, VM2 and VM3? –  modernclix Jul 23 '12 at 13:41
1  
I am still confused. You do not need MX records to send e-mails. –  MichelZ Jul 23 '12 at 13:49
1  
Please, modernclix, tell us what you're trying to do, rather than how you're trying to do it. –  MadHatter Jul 23 '12 at 14:13

1 Answer 1

From what you write, I guess you want to achieve something like this

                                 +---> mail1 <---+
example.com <---> domain.com <---|               |--- appserver
                                 +---> mail2 <---+

The domain on which you send your mails is configured on the mailserver and is not determined by the DNS records. You have to explicitly the Mailserver to send mails on "@domain.com"

For receiving mails you need the MX records like this

domain.com  IN  MX  10  mail1.domain.com
domain.com  IN  MX  10  mail2.domain.com

If you prefer one server you can set the priority on this server higher.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.