Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm exchanging emails with a number of different users - is it possible to look at the mail headers and figure out if those users are using Google Apps as the mail server?

share|improve this question
up vote 11 down vote accepted

Dig their MX records:

$> dig mx

If they're with Google, you'll know it.            2198    IN      MX      10            2198    IN      MX      20            2198    IN      MX      20            2198    IN      MX      30            2198    IN      MX      30            2198    IN      MX      30            2198    IN      MX      30
share|improve this answer
For windows see – harrymc Nov 5 '10 at 15:30
Thanks, @harrymc. – user3463 Nov 5 '10 at 15:30
Also you could use – CarlF Nov 5 '10 at 15:33
striking out a bit from Piskor's comment, with the correct domain will show you a login page and explain how to login IF is a valid google apps domain. (I just tested it) – PsychoData Aug 11 '14 at 18:29

If you are using .NET, and make the assumption that their domain is, you can do this:


Google Apps accounts that I've seen all end with, such as


share|improve this answer
Writing a program to perform a DNS query with tons of existing tools seems like an overkill... – Matteo Apr 15 '12 at 15:26
@Matteo this could be used in PowerShell, which comes with Windows Vista and newer... – Bob Apr 15 '12 at 15:50
That might appear to work, kind of - except when it won't. Many domains have a 3rd-level wildcard for A records - would point to the same host as and It is better to check the actual MX record (see the accepted answer) than to guess. On half the domains I've set up with Google Apps, your method would mistakenly return "false", as the web access was not on For example, this is a valid way to login: – Piskvor Apr 15 '12 at 16:04
or, for that matter, you can log in at as long as you provide your entire organizations email address eg ''. Just to be fair to piskvor, I don't think this method was valid in 2012. – PsychoData Aug 11 '14 at 18:25

You must log in to answer this question.

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