question

NWAdmin-3334 avatar image
0 Votes"
NWAdmin-3334 asked ·

365 Shared Mailbox - no storage

Hello,
I am setting up automated email functionality for an application. We are on 365.

I need to setup a mailbox so that the server / software can authentication with 365 when sending the email. However, I don't want it to save anything. I don't want the sent messages to accumulate in the shared mailbox's. Sent Items or anywhere else. This is because there could be some confidential information, and I think it is best to not save it anywhere unnecessarily.

How do I do that? How do I setup a mailbox that can authenticate and send mail, but not actually store the mail that it sends?

I looked in the transport rules, but didn't see any options that looked like what I wanted. I also looked at the Retention policy. It looks like there is a 1 day policy for sent items. I could use that, but I was hoping to not store at all.

Thanks,

office-exchange-server-administrationoffice-exchange-online-itpro
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

KaelYao-MSFT avatar image
0 Votes"
KaelYao-MSFT answered ·

Hi, @NWAdmin-3334

You may also have the application authenticated with Office 365 and use SMTP AUTH client submission to send emails.
The detailed steps are introduced in this document: How to set up a multifunction device or application to send email using Microsoft 365 or Office 365
Please refer to the Option 1 part.

While, by default it will leave a copy of the message in the "sent items" folder.
You may need to run this command to change the setting of the mailbox via Powershell:

 Set-Mailbox -Identity <the specific mailbox> -MessageCopyForSMTPClientSubmissionEnabled $false

If the response is helpful, please click "Accept Answer" and upvote it.
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.

· 6 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

But why? :)
Its also a security risk to use basic auth to authenticate with 365.
Its better to disable to SMTP auth in the entire tenant.

https://docs.microsoft.com/en-us/exchange/clients-and-mobile-in-exchange-online/authenticated-client-smtp-submission

1 Vote 1 ·

David,
This is a great article. Thanks for sharing. However, it specifically says that my situation is one where smtp auth makes sense.

0 Votes 0 ·

Ok, well, up to you :)
But I would highly recommend you do not enable it for any mailbox unless your app uses Modern Auth.

0 Votes 0 ·

This is great. Thank you. I am currently working through getting powershell to connect to exchange. Looks like I need to install the Exchange Online Powershell V2 module. I am getting a warning about an untrusted repository. Anyway, I can work that out.

Is the -MessageCopyForSMTPClientSubmissionEnabled a new option? I can't find it in the Set-Mailbox documentation here: https://docs.microsoft.com/en-us/powershell/module/exchange/set-mailbox?view=exchange-ps

Do you have any links to its description?

It seems to be exactly what I am looking for.

0 Votes 0 ·

I dont see that documented online in the help either, but the command is avail in Exo:

All I could find:
https://tgallagher12.medium.com/disabling-saving-of-sent-items-in-an-outlook-mailbox-5780af0d602a


I guess it something you will need to test. You may need to use port 587 to trigger it.

0 Votes 0 ·

Hi, @NWAdmin-3334
This parameter seems to not have been documented in the set-mailbox documentation.
While it is introduced in this uservoice link:
https://office365.uservoice.com/forums/273493-office-365-admin/suggestions/35683693-add-an-option-to-turn-off-keeping-a-copy-of-smtp-r
(Please note that currently this site is not available)



0 Votes 0 ·
AndyDavid avatar image
0 Votes"
AndyDavid answered ·

Why do you need to authenticate to 365? Just send the email anonymously from the application as that mailbox. The messages wont exist anywhere except in the recipients mailbox ( wherever you are sending the, to) and within the application itself.

· 2 ·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

That's a good question. I wasn't sure that 365 would accept the unauthenticated SMTP connection. Plus, I need to email inside and outside our organization.

0 Votes 0 ·

It will work. SMTP connections are typically anonymous after all :)

As long as you send from an authenticated IP for the domain you are sending as, ( SPF/DKIM/DMARC), then it should be delivered.

1 Vote 1 ·
NWAdmin-3334 avatar image
0 Votes"
NWAdmin-3334 answered ·

Thanks to both of you for your help. The -MessageCopyForSMTPClientSubmissionEnabled seems to have provided the intended functionality.

·
10 |1000 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.