Gmail – When does Gmail include the X-Originating-IP header

gmailip address

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?

Best Answer

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.