[Gllug] Confusion about the "Sender" field in email headers.

Progga proggaprogga at gmail.com
Sun Nov 28 19:32:38 UTC 2010


Hi all,
I am wondering if anybody can clear my confusion about the "Sender" field in
email headers.  My understanding is that this field is required when an email
server is sending an email on someone's behalf.  For example, this mail will
carry my gmail address in the From field although it is coming from the gllug
server.  So the Sender field contains gllug's return address and the email
will go to the inbox instead of the spam box.

But this rule does not seem to hold for all mail servers.  I work on the
Drupal CMS for living and Drupal's contact form seem to operate on the above
assumption as some comments in the code[0] says the following:

    // To prevent e-mail from looking like spam, the addresses in the Sender and
    // Return-Path headers should have a domain authorized to use the originating
    // SMTP server. Errors-To is redundant, but shouldn't hurt.

Here is an example scenario.  Drupal is running on example.net.  Someone with
an email address of foo at gmail.com has a user account (and hence a contact form)
on the Drupal site.  Now bar at gmail.com comes to the site and sends a message
to foo at gmail.com using the contact form.  The resulting email then has header
fields like this:

...
From: bar at gmail.com
To: foo at gmail.com
Sender: bounce at example.net
Reply-to: bar at gmail.com
...

These type of emails sometimes end up in the inbox and sometimes in the spam
box in gmail.  So I am wondering what is wrong with these.

I have noticed that emails from Linkedin sometimes contain the sender's
actual email address (e.g. bar at gmail.com) in the From field.  Other times, the
>From field will be member at linkedin.com.  But in both cases, the Sender field
is messages-noreply at bounce.linkedin.com.  Linkedin's emails never go to the
spam box.  Linkedin does use SPF records though.  But I have not noticed any
difference after setting the SPF record on Drupal sites' domain.  So I am
wondering what Drupal is getting wrong that Linkedin is getting right.


TIA

[0] http://api.drupal.org/api/drupal/includes--mail.inc/function/drupal_mail/6


-- 
Gllug mailing list  -  Gllug at gllug.org.uk
http://lists.gllug.org.uk/mailman/listinfo/gllug




More information about the GLLUG mailing list