Monday, 11 January 2016

Spoofed email display name | Exchange 2016

We had an interesting issue with one of our customers the other day: users reported that they were receiving spoofed email from the CEO. I’ve replicated the issue so in this scenario, email was received from Rick Mehew (fictional CEO for

  • Sender: Rick Mehew <>
  • Recipient: 
  • Subject: Afternoon meeting

The from address is clearly not a email and so the problem is that the sender’s display name is correct and this is catching users out as they don’t always see the email address, for example in Outlook or on mobile devices. So, we now need a way to block or perform some other action on these emails.

Message headers

To find out more information about the email, the first thing I did was to use Search-Mailbox to retreve the email from the user’s mailbox and view the message headers which are below:

Received: from ( by ( with Microsoft SMTP Server (TLS) id
15.0.913.22 via Mailbox Transport; Fri, 8 Jan 2016 09:51:28 +0000
Received: from ( by ( with Microsoft SMTP Server (TLS) id
15.0.913.22; Fri, 8 Jan 2016 09:51:22 +0000
Received: from ( by ( with Microsoft SMTP Server (TLS) id
15.0.913.22 via Frontend Transport; Fri, 8 Jan 2016 09:51:20 +0000
Received: from 1aHThX-0000QK-5p by with hostsite:113836 (Exim 4.85)
    (envelope-from <>)
    id 1aHThY-0000f7-4u
    for; Fri, 08 Jan 2016 01:51:20 -0800
Received: by emcmailer; Fri, 08 Jan 2016 01:51:20 -0800
Received: from ([])
    by with esmtps (TLSv1.2:AES128-GCM-SHA256:128)
    (Exim 4.85)
    (envelope-from <>)
    id 1aHThX-0000QK-5p
    for; Fri, 08 Jan 2016 01:51:19 -0800
Received: by with SMTP id tr5so23393497obc.2
        for <>; Fri, 08 Jan 2016 01:51:19 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;; s=20120113;
MIME-Version: 1.0
X-Received: by with SMTP id dk3mr83764828oeb.78.1452246673512;
Fri, 08 Jan 2016 01:51:13 -0800 (PST)
Received: by with HTTP; Fri, 8 Jan 2016 01:51:13 -0800 (PST)
Date: Fri, 8 Jan 2016 10:51:13 +0100
Message-ID: <>
Subject: Afternoon meeting
From: Rick Mehew <>
To: <>
Content-Type: multipart/alternative; boundary="089e0122867c19f5720528cf8707"
Received-SPF: SoftFail ( domain of transitioning discourages use of as permitted sender)
Received-SPF: pass ( domain of designates as permitted sender) client-ip=;;;
X-FM-OS: Linux 2.2.x-3.x
X-PolicySMART: 4760852
X-SPAM-Status: NO, 0.0 / 4.0
X-Virus-Status: Scanned by VirusSMART (c)
X-Virus-Status: Scanned by VirusSMART (s)
X-MS-Exchange-Organization-SenderIdResult: Pass
X-MS-Exchange-Organization-Network-Message-Id: 29da57e2-9e05-4bab-52ff-08d318114787
X-EXCLAIMER-MD-CONFIG: 61102a45-deb9-493a-9a01-082f19bb638a
X-MS-Exchange-Organization-AVStamp-Enterprise: 1.0
X-MS-Exchange-Organization-AuthAs: Anonymous

For more information about the Search-Mailbox cmdlet, see here.

In OWA, here we can see the email address clearly is not from someone within the organization,


How to block spoofed email

Now, let’s look at how we can prevent these type of email. Let’s look at whether we can block it using normal methods:

Sender ID Filtering

We cannot use Sender ID filtering because the email is sent from Gmail using ( and this address is listed as a permitted sender.

Reverse DNS checks

There is a valid PTR record for which resolves to and there’s also a valid A record which resolves to Reverse DNS checks out. For more information about reverse DNS, see here.


The email has a valid DKIM signature. 

IP blacklist

The IP is not on any blacklist.

Content filtering

Content filtering cannot be used as there are no specific words that we can look for to identify this email.

As this email has in fact come from a valid gmail SMTP server which makes it hard to block.

Transport rule

The way to get Exchange to recognize this email is to set up a custom transport rule which we can use to identify the email and perform any action on it. To identify the display name in the email, we need to set up our transport rule conditions to include emails which have "Rick Mehew” in the email’s “From” header and only email from senders outside the organization so it doesn’t affect the internal email delivery for Rick Mehew. 

Note that if Rick Mehew has an external account (i.e. a personal email account which is not part of the Exchange organization) then you'll need to add this email address as an exception to the rule so it is not marked as spam.

In this example we are prepending the subject line of the email with SPAM to notify users:


Now when we get emails from, they will appear as below with “SPAM” prepended to the subject to inform users:


This should help you out with this type of issue. All the best!


  1. provides support for most of the email issues. Our technicians are well trained to identify the issue/s and provide support accordingly. Some of the issues may require remote access of the computer. So give us a call on +1-888-511-0014 and let us take care of all your email related problems.

  2. What if you use 3rd party for some emails like, MailChimp, would those emails be marked SPAM because it's from "Outside" the organization?

    1. You can add an exception to look at the "sender" header and put in whatever MailChimp uses there to have it bypass the rule.

  3. So this Transport rule has to be configured for each mailbox? Is this only available in Exchange 2016 or was it in earlier releases?

    1. Hey Marla, this is months later, but I just implemented in O365 as a "mail flow" rule, so it affects all mailboxes.

    2. @Kyler, I'm not sure how this was implemented for all users in Mail Flow, can you explain? Is there a wildcard that I can use to replace Rick specifically?

  4. Just had to implement this, thanks so much for posting the details!

  5. Mark,

    Any idea how to make this for all internal users and not just Rick so we don't have to add a rule for each person in the company?