Perhaps gmailGmail doesn't let you search the email headers from their web interface, but you should be able to access all email messages via popPOP/imapIMAP, and then you can use standard search tools (e.g. grep
) to search for anything you want.
However, see the comment above from Ramhound and myself - themyself—the email headers might lead you back to gmailGmail itself, which won't reveal much about the originator of the email. Also, all headers are easy to forge anyway. If the user is clever enough, they can generate whichever headers / source IPs they want.
If in your case the user you're trying to spy on / trace isn't malicious, then you might be able to get at least some information other than the message content from email headers.