Exchange 365 single customer, anyone can send unauthenticated email from their accounts

Max 0 Reputation points
2025-07-22T16:34:47.5666667+00:00

Hi everyone,

I've got a customer account, and if you know any of their email addresses, you can send, from their server, anonymously over port 25.

They have no connectors setup that would cause this. Even though I can't do this anywhere else, I also disabled DirectSend and enabled SmtpClientAuthenticationDisabled, but these emails still can go through.

I've got through all settings in ogranizationconfig and transportconfig, nothing looks off.

Anyone have any ideas?

Durachdan,

Max

Microsoft 365 and Office | Subscription, account, billing | For business | Other
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. AlexDN 1,855 Reputation points Microsoft External Staff Moderator
    2025-07-23T07:44:01.3033333+00:00

    Hi @Max
    Thank you for posting your question in the Microsoft Q&A forum
    To better understand what’s happening, could you please check:

    • Are emails coming from inside or outside the company?
    • Is this happening with all addresses or just a few?
    • Any devices or apps still using port 25?
    • Have you checked SPF records for open IP ranges?
    • Any old connectors or rules that might allow relay?

    In the meantime, I recommend verifying that the tenant-level Reject Direct Send setting is enabled, as this explicitly blocks unauthenticated direct send traffic to Exchange Online. You can check this setting by running the following PowerShell commands:

    Connect-ExchangeOnlineGet-OrganizationConfig | Format-List RejectDirectSend

    If RejectDirectSend is set to False or not configured, enable it using:

    Set-OrganizationConfig -RejectDirectSend $true

    Besides, please review your SPF, DKIM, and DMARC DNS settings to ensure proper email authentication policies are in place, and audit any legacy devices or applications that might be using SMTP AUTH without proper authentication.

    Note: Please understand that our initial response does not always resolve the issue immediately. However, with your help and more detailed information, we can work together to find a solution.        

     Your detailed response will help us diagnose and investigate the issue more efficiently. If I misunderstood what you’re looking for, feel free to let me know or share a screenshot. I’d be happy to help further!

     Thank you for your cooperation. I'm looking forward for your reply.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".   

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 


  2. AlexDN 1,855 Reputation points Microsoft External Staff Moderator
    2025-07-29T05:34:12.5333333+00:00

    Hi @Max
    Thanks for the update.

    Could you check:

    • What public IP address is used when sending via the script? Is it listed in any Inbound Connector or allowlist?
    • Is the domain contoso.com listed as an accepted domain in the tenant?

    In the meantime, I recommend:

    1. Reviewing inbound connectors
      Run the following to check if any connector is allowing unauthenticated traffic:
      Get-InboundConnector | Format-List Name,ConnectorType,SenderIPAddresses,Enabled If the IP used in your test is listed, that could explain the relay behavior.
    2. Checking accepted domains
      If contoso.com is an accepted domain, Exchange Online may allow mail from it under certain conditions. You can verify with:
      Get-AcceptedDomain
    3. Auditing message trace logs
      Use message trace to confirm how these messages are processed and whether they’re being accepted due to connector or domain trust.
    4. Restricting Port 25 traffic at Network level
      If possible, block port 25 traffic from external sources at the firewall or perimeter level to prevent unauthenticated relay attempts.
    5. Enabling Enhanced filtering for connectors
      This helps ensure that mail from external sources is properly identified and filtered, especially if connectors are involved.

    Note: Please understand that our initial response does not always resolve the issue immediately. However, with your help and more detailed information, we can work together to find a solution.        

     Your detailed response will help us diagnose and investigate the issue more efficiently. If I misunderstood what you’re looking for, feel free to let me know or share a screenshot. I’d be happy to help further!

     Thank you for your cooperation. I'm looking forward for your reply.


    If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".   

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread. 


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.