On Wed Apr 15, 2009 at 22:35:09 +0100, Leo wrote:
> I've got a domain registered (call it, mydomain.org.uk) with an email
> address set up on it (say, email@???). I recently received
> an email addressed to aname@???. However, in the
> header of the email it said:
> Received: from mail.somecompany.cn
>     by ...
>     for email@???
> Can someone explain how it got to me. I understand you can put what you
> like in the "from" field, by I thought the "to" field had to be valid.
  There are two values involved in setting the recipient:
    1.  The envelope address.
    2.  The address visible in the "To:" field of the mail header.
  As you say the From: field doesn't have to be valid (by which we
 mostly mean the envelope-sender address doesn't match the contents
 of the "From:" header).
  In the same way the contents of the "To:" field don't have to match
 the envelope address - and have no real bearing on anything.
  If you're not familiar with SMTP then this is an understandable source
 of confusion.   In the mail-sending process the remote host connects to 
 your mailserver and sends commands like:
 HELO my.hostname.com
 MAIL FROM: <foo@???>
 RCPT TO:<email@???>
 DATA
 To:email@???
 From:foo@???
 Subject: hello!
 ..
 .
 QUIT
 The envelope sender and envelope recipient are the only thing your mail-server
 cares about, (barring spam-filtering and suchlike), and those are set 
 by the "MAIL FROM" and "RECEIPT TO" commands, respectively.
 Hope that helps..
Steve
-- 
Managed Anti-Spam Service
http://mail-scanning.com/