You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@tomcat.apache.org by Peter Crowther <Pe...@melandra.com> on 2005/11/04 16:38:52 UTC

[OT] RE: Google Map of active users on this list

> From: Luis Torres [mailto:A00162960@itesm.mx] 
> Very nice work. Any plans to release details on how you did 
> it?

One could do something similar by:

- Subscribe to the list.

- Archive the messages in (say) mbox format.

- Write yourself a little script that pulls out message headers, in
particular the From: and Received: headers for each message (don't
forget to recombine multi-line headers before you do this).

- In each of the Received: headers, look for IP addresses or hostnames
(a couple of regular expressions should do 99% of cases).  Discard any
lines where this fails.

- Where you have hostnames, try to resolve to IP addresses.  Discard any
you can't resolve.

- Using one of the location services, for each message, in order of
first Received header to last, pass in the IP address and see if you get
a match back.  If you do, that's the location.  If not, keep trying
until you run out of header lines or find a match.  If you want to be
flash about this, maintain a 'stop list' of IP addresses of known mail
gateways that are just too general to be useful.

- Extract the sender's mail address and name (if present) from the From:
line and add a record to your database with name, email address, and
location.

There are refinements, but I suspect that would work.

		- Peter

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@tomcat.apache.org
For additional commands, e-mail: users-help@tomcat.apache.org