Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

I've noticed that sometimes when I use Gmail's web interface to send an email, it includes the X-Originating-IP: header, and sometimes it doesn't.

When does Gmail decide to include the X-Originating-IP header in outgoing email and when does it not?

share|improve this question
add comment

2 Answers

According to the documentation, they may include the sender IP.

IP addresses can be considered sensitive information. As such, Gmail may hide sender IP address information from outgoing mail headers in some circumstances.

I've experimented with it a bit, and I think it works like this:

  • For generic gmail addresses (@gmail.com, @googlemail.com), gmail does not include the X-Originating-IP header.
  • For messages sent using a Google Apps domain (@customdomain.tld), gmail always includes the X-Originating-IP header.

There are a few situations I couldn't test, though. Its possible that gmail adds the X-Originating-IP header when an e-mail is sent using an IP address that never accessed your account before.

share|improve this answer
add comment

I'll assume you're talking about received emails - and not Gmail randomly appending the header when you send emails through the web interface.

The X-Originating-IP header is a "custom" header, in that it's not identified as a required field that all emails contain (compared to To, From, etc.).

Many email programs and web-based mail services such as Hotmail (Windows Live), Gmail, and Yahoo! Mail, append it and various other headers depending on how they were programmed. In the case of emails being sent from Hotmail or Gmail, it tracks the IP address of the computer the sender sent the email from.

It's been reported - but not confirmed - that those headers are used by the web-based email services to blacklist the IP address of computers that send an overwhelming amount of spam. You may also notice the X-Originating-Email: header as well, which can also be appended by those services at times. This also helps to track down email spoofing, etc., on such services.

In the case of why you don't always see it - check to see what client the sender was using. Chances are it won't be a Gmail or Hotmail address - but another client that doesn't append the optional header, since it doesn't need to be used to deliver the actual message.

If you're looking to use the X-Originating-IP header for filtering, you may have better luck with the Received header, which may also contain the IP address.

One thing to note, is just like any other header, the X-Originating-IP header can be easily faked.

share|improve this answer
1  
I'm talking about outgoing email. I'll rephrase the question to clarify... –  Senseful Sep 23 '10 at 3:54
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.