question

Shaiderhi-1776 avatar image
0 Votes"
Shaiderhi-1776 asked JayceYang-MSFT commented

How to Set SMTP relay on iis , useing 365 mail

Hi everyone, I have a problem with setting up a virtual smtp on my IIS server 2019..
I want it to be compatible with my 365 mailbox, and unfortunately I have not found any solutions online :(

First of all, what are the settings that should be in IIS (according to 365)?
In outbond connection tcp port 587/25?
I have already created a connector in 365 admin, I need to insert the MX somewhere?

step by step will be amazing!!!
Tnx for help!

windows-server-iisoffice-exchange-server-mailflow
· 1
5 |1600 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.

@Shaiderhi-1776 , just circling back to check to see how things are going on with this thread. Did you test Kael's steps? If the issue has been resolved, please mark the helpful replies as answers.

0 Votes 0 ·

1 Answer

KaelYao-MSFT avatar image
1 Vote"
KaelYao-MSFT answered

Hi @Shaiderhi-1776

Did you follow the steps in this link to create a receive connector?
If yes, here is my configuration in IIS SMTP server:
1. In General, add local ip address of the IIS SMTP server and listen on port 25
197231-01.png
2. In Access>Access control, select Anonymous access
197099-02.png
In Access>Relay, add the ip addresses of the devices which are allowed to relay via the IIS SMTP server
197130-03.png
3. In Delivery>Outbound Security, select Anonymous access
197100-04.png
4. In Delivery>Outbound connections, configure TCP port to 25
197150-05.png
5. In Delivery>Advanced, configure Smart host to be the MX record of your domain
197242-06.png
6. test sending an email and see if the recipient can receive it

This method doesn't require an existing mailbox in Office 365.
If you would like to use an existing mailbox, you may need to use SMTP AUTH.


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.



01.png (25.4 KiB)
02.png (31.8 KiB)
03.png (32.3 KiB)
04.png (36.5 KiB)
05.png (29.3 KiB)
06.png (26.6 KiB)
5 |1600 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.