SOLVED
Home

How to deny/allow some user can use smtp office365 ?

Tien Ngo Thanh
Regular Contributor

hi

    please suggest help me way to deny/allow some user can use smtp office365. 

Best Regards,

Thanks

10 Replies
Solution
Hi @Tien Ngo Thanh,

SMTP is usually used with POP3 configuration - so the easiest answer to this is to disable POP3 and IMAP4 protocols on the users mailboxes in the Exchange Online Admin Centre or via Powershell

https://docs.microsoft.com/en-gb/exchange/troubleshoot/configure-mailboxes/pop3-imap-owa-activesync-...

Hope that helps to answer your question!

Best, Chris

@Christopher Hoard  SO if I need allow one user can use smtp then only need allow POP3 and IMAP ?

Correct - it can be managed on a mailbox by mailbox basis so you can turn on or leave one on. To be exact it is only disabling POP3 protocol as SMTP is used alongsisde POP3 for the outbound, however we tend to manage IMAP alongside POP3 as both are considered legacy protocols.

Hope that clarifies!

Best, Chris

@Christopher Hoard  How long effect after disbale pop and imap . Because I just try disbaled one user but this command below as still sent email

Send-MailMessage –From test@test.com –To test1@test.com –Subject “Test Email” –Body “Test SMTP Relay Service” -SmtpServer smtp.office365.com -Credential $cred -UseSsl -Port 587

image.png

Best regards,

Thanks

Try this on the mailbox which is causing the issue.

https://www.michev.info/Blog/Post/2075/controlling-smtp-authentication-for-office-365-mailboxes

Set-CASMailbox mailboxname -SmtpClientAuthenticationDisabled $true

Let me know how it goes

Best, Chris

@Christopher Hoard We use hybrid office 365 , what happen if disable smtp ? current email we user web , outlook , mobile .

please suggest help me and if disbale this only effect these user use powershell then ok .

how to disbale smtp as default when add new mailbox office365 ?

Best Regards

Tien

 

 

The command in the article above

Set-CASMailbox mailboxname -SmtpClientAuthenticationDisabled $true

Will disable SMTP authentication only on the mailbox with the issue, not with all mailboxes in your environment. I would use this if the actions above do not resolve it. Going forward you would do these actions after creating the mailbox via a script.

Keep me updated

Best, Chris

hi

    I just try disbale smtp then user now can not send smtp 

    image.png

    Thanks your support

Best regards,

Tien

Hi Tien,

Thanks! - Just to confirm that is what you needed? Want to make sure that you are happy with the outcome!

Best, Chris

Hi

    I needed disable smtp and now i got it from your support . but please note is when disbale POP and IMAP then smtp still allow not disbale that need runnning your commnad guide to disable it if need

    thanks your support again 

    more information     

This parameter is available only in the cloud-based service.

The SmtpClientAuthenticationDisabled parameter specifies whether to disable authenticated SMTP (SMTP AUTH) for the mailbox. Examples of clients and services that require authenticated SMTP to send email messages include:

  • POP3 and IMAP4 clients.

  • Devices with scan to email capability.

  • Workflow applications that send email notifications.

  • Online services that send messages using internal email addresses in the organization.

Valid values for this parameter are:

  • $true: Authenticated SMTP is disabled for the mailbox.

  • $false: Authenticated SMTP is enaled for the mailbox.

  • blank ($null): This is the default value. The authenticated SMTP setting for the mailbox is controlled by the corresponding SmtpClientAuthenticationDisabled parameter on the Set-TransportConfig cmdlet for the whole organization. By default, authenticated SMTP is enabled for the organization ($false), which means authenticated SMTP is also enabled for the mailbox

Best Regards

Tien

Related Conversations
Tabs and Dark Mode
cjc2112 in Discussions on
38 Replies
Extentions Synchronization
Deleted in Discussions on
3 Replies
Stable version of Edge insider browser
HotCakeX in Discussions on
35 Replies
flashing a white screen while open new tab
Deleted in Discussions on
14 Replies
How to Prevent Teams from Auto-Launch
chenrylee in Microsoft Teams on
29 Replies
Security Community Webinars
Valon_Kolica in Security, Privacy & Compliance on
13 Replies