If an astronaut sent you an email or loaded your website, could you tell from the IP or anything?

@futurebird Astronauts would be using the Near Space Network. AFAICT, it's basically a private Internet with its own routing, and AFAICT a bridge to the public Internet.

The Network uses NASA ASN 297 blocks and the DSN block 192.243.16.0/22

So... it would probably be from there, being in that range doesn't guarantee the signal came from space.