title: How to verify mail origin?
body: <p>I wish to code a little service where I will be able to send an e-mail to a specific address used by my server to send specific commands to my server.</p>
  
  <p>I'll check against a list of permitted e-mail addresses to make sure no one unauthorized will send a command to the server, but how do I make sure that, say, an e-mail sent by "mrzombie@thezombie.net" really comes from "thezombie.net"?</p>
  
  <p>I thought about checking the header for the original e-mail server's IP and pinging the domain to make sure it is the same, but would that be reliable?</p>
  
  <p>Example:</p>
  
  <p>Server receives a command from mrzombie@thezombie.net
  mrzombie@thezombie.net is authorized, proceed with checks
  Server checks "thezombie.net"'s IP from the header: W.X.Y.Z
  Server pings "thezombie.net" for it's IP: A.B.C.D
  The IPs do not correspond, do not process command</p>
  
  <p>Is there any better way to do that?</p>