1

Let's say there is an email alice@example.com. A send-as has been set up for bob@example.com.

When I send an email to someone from alice@ account using bob@ as the sender, the headers usually have a key-value pair with Sender as the key. This Sender is used to identify that alice@ had sent the email. The From header will be bob@.

But for one Gmail account, there is no Sender in the headers. Is there any other way to reliably identify the sender?

Here is the gmail headers without the Sender

{
  'internalDate': '1519112776000',
  'historyId': '11018249',
  'payload': {
    'mimeType': 'multipart/alternative',
    'headers': [
      {
        'name': 'MIME-Version',
        'value': '1.0'
      },
      {
        'name': 'Received',
        'value': 'by 13.133.13.13 with HTTP; Mon, 19 Feb 2018 23:46:16 -0800 (PST)'
      },
      {
        'name': 'Date',
        'value': 'Tue, 20 Feb 2018 15:46:16 +0800'
      },
      {
        'name': 'Delivered-To',
        'value': 'alice@example.com'
      },
      {
        'name': 'Message-ID',
        'value': '<090-SomeRAnDOMMESsageIDGivenByGoogle@mail.gmail.com>'
      },
      {
        'name': 'Subject',
        'value': 'This is some random subject'
      },
      {
        'name': 'From',
        'value': 'Alice as Bob <bob@example.com>'
      },
      {
        'name': 'To',
        'value': 'Troce <troce@random.com>'
      },
      {
        'name': 'Content-Type',
        'value': 'multipart/alternative; boundary="000somerandomboundary"'
      }
    ]
  },
  'snippet': 'This is some random snippet',
  'sizeEstimate': 3368,
  'threadId': '161b22d6b3213213',
  'labelIds': [
    'Label_1',
    'Label_2',
    'Label_3',
    'SENT'
  ],
  'id': '161b22d6b3213213'
}
Dilip
  • 1,122
  • 11
  • 31
  • Relying on `Sender:` for anything is misdirected. *Usually* it means that the `From:` is what the system expected it to be; the recommendation from back when email forgery was uncommon was to add a `Sender` header when the `From:` header didn't look like it belonged to the person whose account was used to send the message. But now you have spammers and PHP programmers abusing or misunderstanding the system in every direction so none of that really matters anymore. – tripleee Feb 20 '18 at 10:25
  • @tripleee I totally agree. I need to understand why Gmail is not adding `Sender: ` when I send using a different email. I use a lot of third-party apps that rely on this. It's not getting only for a few accounts. Is there a setting in Gmail to get that back? – Dilip Feb 21 '18 at 05:08
  • Can you then confirm that it's not specifically missing exactly for those accounts where the `From:` agrees with the default sender address for that account? Because that's what I'm hypothesizing based on the above. – tripleee Feb 21 '18 at 05:10
  • Yes, it's missing for some accounts even if the default sender address is different from `From: ` – Dilip Feb 21 '18 at 05:18

0 Answers0