top of page

How to Blacklist Domain or Email Address in Office 365 (Microsoft 365)?

In Microsoft 365 (Office 365) organizations, you can use Exchange Online Protection (EOP) to block email from unwanted emails or domain names. In Exchange Online, you can configure multiple levels of spam blocking:


  • List of Outlook Blocked Senders (an individual list is stored in each user mailbox);

  • Exchange Online Protection antispam policies;

  • Exchange Mail flow (transport) rules;

  • Connecting filters.

Users can block specific email domains or senders in Outlook manually:

  1. If you are using Outlook Web, sign in to your Microsoft 365 mailbox;

  2. Open its Settings;

  3. Got to Mail > Junk email;

  4. Add email addresses and/or external domains from which you do not want to receive emails to the Blocked senders and domains list;

  5. Save changes;

  6. All emails from the specified senders will be automatically moved to the Junk Email Folder.

Image Courtesy of (theitbros)

You can also display or change the list of blocked emails and domains in the user’s mailbox using PowerShell. Connect to your Exchange Online tenant using the ExO PowerShell module:


Connect-ExchangeOnline -UserPrincipalName admin@theitbros.com

To display a blacklist in a specific user’s mailbox, run the command:

Get-MailboxJunkEmailConfiguration -Identity jsmith | Format-List BlockedSendersAndDomains

Image Courtesy of (theitbros)


Use the following command to add a new sender address to a user’s blacklist:

Set-MailboxJunkEmailConfiguration jsmith -BlockedSendersAndDomains @{Add="info@spam.org"}

You can add a specific email to the blocked sender list to all mailboxes in your organization at once:

$All = Get-Mailbox -RecipientTypeDetails UserMailbox -ResultSize Unlimited $All | foreach {Set-MailboxJunkEmailConfiguration $_.Name -BlockedSendersAndDomains @{Add="info@spam.org"} }

To block specific email addresses or domains globally at the organization level, you can create a custom anti-spam policy in the Microsoft 365 Defender:


Image Courtesy of (theitbros)

  1. Sign in to Microsoft 365 Defender portal at https://security.microsoft.com;

  2. Go to Email & Collaboration > Policies & Rules > Threat policies > Anti-spam;

  3. Create a new Inbound policy;

Image Courtesy of (theitbros)

  1. Set a unique policy name and description (optional);

  2. Select the users, groups, and domains to which this anti-spam policy should apply. You can specify a list of accepted domains for your organization;

  3. Next, you need to configure the Bulk email threshold & spam properties (you can skip this step if you only want to configure a blacklist);

  4. On the Actions tab, you need to select the action that you want to apply to the inbound email in this rule. You can move the message to the Junk Email folder, delete the email, or send it to quarantine;

  5. Next, you can add sender addresses to the Blocked sender or domain list. Emails from these senders will always be marked as Spam;

  6. Click Next > Create;

  7. Your new anti-spam rule will now apply to all senders on your blacklist.

Please note that the maximum limit for these blocked lists is around 1000 entries.a

Featured Posts
Recent Posts
Archive
Search By Tags
Follow Us
  • Facebook Basic Square
  • Twitter Basic Square
  • Google+ Basic Square
bottom of page