Forum Discussion
Junk E-mail Settings for Shared Mailboxes
PowerShell is easiest way to set junk mail configurations for shared mailbox.
To fetch the configuration:
Get-MailboxJunkEMailConfiguration -Identity "Shared Mailbox" | Format-List
To set it, use Set-MailboxEmailConfiguration. In this instance, I add "BadGirls.com" to the blocked list and set three domains up as trusted senders.
Set-MailboxJunkEMailConfiguration –Identity "Shared Mailbox"
–BlockedSendersAndDomains @{Add="Badgirls.com"} –ContactsTrusted $True
–TrustedSendersAndDomains "Microsoft.com", "Office365.com", "Outlook.com"
And of course, if you wanted to set the same configuration for all shared mailboxes in the tenant, you'd do:
Get-Mailbox -RecipientTypeDetails SharedMailbox | Set-MailboxJunkEMailConfiguration....
TonyRedmond If this is the easiest method, then there is something seriously wrong with the implementation. The average end user is not going to know, or even want to know PowerShell. This is fine for system Admins and developers, but the average user in accounting will not do this. As a system admin, my life should not be delegated for managing junk email. This is why Microsoft keeps falling flat on it's face, dumb down interfaces so it's impossible to use unless you are a developer and find a way to "hack it". That's exactly what PowerShell is to the end user, a hack.
- TonyRedmondMar 26, 2024MVPNo one is advocating that normal users run PowerShell commands to update junk email settings. Administrators should do this for them.
- fmccourryhollandcompuMar 26, 2024Copper ContributorThis is my point. In Microsoft's view, Administrators are for managing junk email. We have better things to do, like read license agreements.
- TonyRedmondMar 26, 2024MVPImplementing a common set of blocked sites is quick and easy for an administrator to do with PowerShell and is a better use of their time than mastering the archaic details of licensing. Or better again, don't allow end users to maintain safelists and depend on tenant-wide blocklists instead. https://practical365.com/junk-email-options/