I am trying to setup a mail server in my PC for my LAN network and I opted for Postfix but the configuration ask me to configure the MX Record, something about DNS configuration but I have no idea of how to proceed...Can you help me please? Is necessary to create a DNS account in some DNS server or something like? Thanks in advance!

PS: OS: GNU/Linux Debian squeeze

  • Theoretically you can put an IP address or a host name after the @ symbol in an email address, but this is so rarely used. You will need to actually own a domain name and setup an MX record for it so you can actually send/receive email on the Internet.
    – billc.cn
    Nov 26, 2011 at 13:00
  • Do you think a free DNS account can be useful? I have no money... :(
    – rendon
    Nov 26, 2011 at 13:10
  • Not SU question Nov 26, 2011 at 13:20
  • What are you trying to do with your mail server? MX server is needed whenever you have a domain name and want to inform the world where the emails for that domain should be sent to. If you have your email delivered somewhere else (eg gmail), then you don't need an mx record.
    – sgmoore
    Nov 26, 2011 at 13:25
  • @billc.cn: @[ip.addr] is more or less obsolete, and often rejected for security reasons; however, @host is still standard -- when no MX records are found, the A/AAAA records are required to be used. Nov 26, 2011 at 13:25

1 Answer 1


Yes, an MX record is part of your organization's DNS setup. It's not part of your computer's setup: DNS records are what tell other computers how to reach your computer, and the MX record is used when they want to send you email.

When a computer sends an email to [email protected], it looks up the MX record for somewhere.example.com. You can look up the MX records for a host name with commands like dig -t MX somewhere.example.com or host -t MX somewhere.example.com (and the host command with no option also lists MX records, with the wording “somewhere.example.com mail is handled by …”).

If you only want to be able to send email inside your LAN, you need to set up an MX record on the DNS server from your LAN. That's probably the same machine that you've configured as a DNS server in /etc/resolv.conf. These are technically two different functions, one is a DNS server returning information from its own database and the other is really a DNS proxy that forwards queries to the appropriate destination, but they are usually provided together. Contact your DNS server's administrator, or if that's you and you don't know what to do, tell us what you're using for a DNS server.

If you want to send email from elsewhere, you need a public-facing MX record. Most DNS providers, even cheap ones, let you set up MX records in addition to A records (machine names).

  • A local DNS hee... It can be in the same machine where the mail server is installed?
    – rendon
    Nov 26, 2011 at 13:59
  • 1
    @D.D.C It can be, yes. It's common, in fact, in small organizations, to have a single machine that handles all internal server functions (DNS, file sharing, mail, …). What you need to keep in mind is that all computers that send mail to somewhere.example.com must be able to find this information. Nov 26, 2011 at 14:13
  • Ok, right now I am looking for how to configure a Local DNS, I hope succeed. I get back later. Thanks!
    – rendon
    Nov 26, 2011 at 14:17
  • @Giles: "...a single machine that handles all internal server functions..." So true. I saw one office that had two. The physical machine's host OS also hosted a guest VM running DNS.
    – surfasb
    Nov 28, 2011 at 1:33
  • I have been trying configure a DNS Server without success. I have installed bind9 but every tutorial say me something different. Can you help me? Some good tutorial? Please! If it's not too much to ask.
    – rendon
    Nov 28, 2011 at 13:26

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .