Re: [Hampshire] [OT] Email query

Top Page

Reply to this message
Author: Rik
Date:  
To: Hampshire LUG Discussion List
Subject: Re: [Hampshire] [OT] Email query

On Thu, 2009-04-16 at 02:26 +0100, Steve Kemp wrote:
> 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"


Most don't care about that either.


> and "RECEIPT TO" commands, respectively.
>

And if you are running a non-catch all mail server with recipient
verification any invalid attempts should be kicked with a 550 error
after the RECIPIENT TO command. This would take us back to the Leo
raising the issue regarding the 'to' needing to be valid. It can only be
valid if the server knows what is and is not valid. This can be done in
a variety of ways from simple accounts and maps to back end catalogues
like LDAP/AD and the like.

> Hope that helps..
>
> Steve
> --

Not being a pedant but I would suggest checking the mail server set up
here for what you actually have going on -v- what you think you have
going on. SMTPUtils is useful (if a little buggy):
http://smtputils.sourceforge.net/

Richard
Spam & Intent specialist.