Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!


host command not giving MX records
New on LowEndTalk? Please Register and read our Community Rules.

All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.

host command not giving MX records

twaintwain Member
edited March 2013 in General

Strange issue here.. this is on an older CentOS 4.9 box.

Host command is not giving back MX records, even when directly querying 8.8.8.8.

-bash-3.00# host gmail.com
gmail.com has address 74.125.139.19
gmail.com has address 74.125.139.83
gmail.com has address 74.125.139.18
gmail.com has address 74.125.139.17

-bash-3.00# host gmail.com 8.8.8.8
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:

gmail.com has address 74.125.139.19
gmail.com has address 74.125.139.83
gmail.com has address 74.125.139.18
gmail.com has address 74.125.139.17

It should give:

jbrown@jbrown-ubuntu:~$ host gmail.com 8.8.8.8
Using domain server:
Name: 8.8.8.8
Address: 8.8.8.8#53
Aliases:

gmail.com has address 74.125.229.182
gmail.com has address 74.125.229.181
gmail.com has IPv6 address 2607:f8b0:4008:800::1016
gmail.com mail is handled by 20 alt2.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 5 gmail-smtp-in.l.google.com.
gmail.com mail is handled by 30 alt3.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 40 alt4.gmail-smtp-in.l.google.com.
gmail.com mail is handled by 10 alt1.gmail-smtp-in.l.google.com.

=====================================

Any ideas? I have a /var/log/all.log where I have ALL syslog/logs get written to, and tailing that, nothing comes up when running the host command as to what the issue could be.

Comments

  • @twain said: this is on an older CentOS 4.9 box.

    Maybe one of the features of newer 'host' on newer Centos is to return MX addresses?

    You could yum install dig and use that instead, like:

    dig 8.8.8.8 mx

  • You can use -a to show everything

  • CentOS is always outdated try dig -a or dig mx

  • twaintwain Member
    edited March 2013

    @Damian, Interesting, OK you are probably right about that (that older host command does not show MX without specifying -a etc)...

    dig mx and host -a do return MX...

    Anyone know what command or mechanism Exim (4.80) uses to resolve MX for a domain? Host? Dig? Something on a lower level than these commands maybe?

  • @twain said: Something on a lower level than these commands maybe?

    It doesn't use another program, but probably functions of the resolv library, such as res_pquery:

    http://linux.about.com/library/cmd/blcmdl3_res_query.htm

  • twaintwain Member

    @Damian - OK great thanks. Consider this solved, there is no problem with any of the resolving command nor the resolv library.

Sign In or Register to comment.