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.

What is correct file for /etc/hosts when running postfix mail server

my /etc/hosts

127.0.0.1      localhost
127.0.1.1      ubuntu-server.agadomarketing.com        ubuntu-server

my /etc/hostname is mail.agadomarketing.com

how must /etc/hosts look like that mail server will work correctly

now I changed to, is this correct?

127.0.0.1       localhost.localdomain                   localhost
84.255.253.186  mail.agadomarketing.com                 mail
share|improve this question
add comment

2 Answers

up vote 1 down vote accepted

This looks fine. You can have more than one alias on the same line though, if you want to keep the name ubuntu-server as well:

127.0.0.1       localhost  localhost.agadomarketing.com
84.255.253.186  mail.agadomarketing.com mail ubuntu-server.agadomarketing.com ubuntu-server
share|improve this answer
add comment

It's not clear what you mean but there is no rule how the hosts file must look for a postfix to work properly.

Instead you need an MX entry in your DNS server for the domain agadomarketing.com if you would like to start receiving email from this domain.

share|improve this answer
    
I have MX record, I just want to know if is /etc/hosts file correct. I am reading that is important for server how is /etc/hosts configuried –  senzacionale Jul 15 '12 at 10:40
add comment

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.