Office 365 SMTP Relay Using IIS

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
hey guys it's tom from liftoff today I'm going to show you how to set up smtp relay for office 365 using iis on windows for our example we're gonna use Windows Server 2019 the process is pretty similar for all versions of Windows the first thing we want to do is install SMTP server so I'm going to open PowerShell from the Start menu and I'm gonna right-click and choose run as administrator here you're gonna want to type add windows feature and then space SMTP - server and hit enter ok that takes a little bit of time so while that's running we're gonna open a browser and the first thing we want to do is go to Google I'm already there and type what's my IP just like I did it there go ahead and hit enter this is gonna give you the IP that your server uses to get to the Internet go ahead and copy that to your clipboard and now we're gonna go to admin microsoft comm for the 365 admin portal if you're not already logged in login as a global administrator then scroll down on the left-hand side and under admin centers choose exchange and once it loads you're gonna go to mail flow and then at the top you're gonna go to connectors here go ahead and click the plus and choose from your organization's email server - office 365 and choose next give it a name I prefer SMTP relay shortened to the point go ahead and uncheck that bottom box this isn't an exchange server so we don't want to keep old headers and choose next here you're gonna choose the second radio button and you're gonna click plus and paste that IP you copied earlier click OK choose next and then save this can take a few moments go ahead and click okay now you're going to click on protection and at the top you're going to click connection filter and double click on default here you're gonna go to connection filtering and click the top plus for the allow list and once again you're gonna paste the IP that's on your clipboard click OK and save this is gonna make sure that Microsoft doesn't filter your SMTP relay messages as spam go ahead and click OK and one more thing we're gonna do in the 365 side of things is click back on the admin center tab that we had open if you need to get there again again its admin microsoft comm and scroll up and go to settings domains if you're not in the new admin center it might be under setup domains and if you're in GCC high you're not gonna have this feature I'll tell you what to do in a second double click on your default domain and once it loads you're gonna copy this top points to value for M X for your domain just like I've done here it should end in Outlook com if you're in the GCC hi for this part you're just gonna use the MX record that Microsoft provided you ok now that I have that copied to my clipboard I'm gonna minimize this page we can see that in PowerShell SMTP servers installed so I'm gonna minimize PowerShell and now I'm gonna go to start and I'm gonna type services I want to hit enter and here we're gonna scroll down to Simple Mail Transfer Protocol I'm going to double click on it this is the server for SMTP relay and we can see it's running but it's set to manual which means it won't start on its own I'm gonna change that to automatic under startup type and click OK and now I'm gonna go ahead and close services so now if we install updates or we reboot SMTP services will start automatically next I'm going to click start and type iis and we want to choose Internet Information Services 6 so sometimes you'll see Internet Information Services manage you want to make sure you choose the one that says 6.0 in it okay I'm gonna go ahead and open that maximize that hearing when I expand the server name and then right-click on SMTP virtual server and choose properties and we're gonna start on the delivery tab okay here I'm gonna click advanced and under smart host I'm gonna paste the name I copied earlier so again this is the MX record from office 365 for your primary domain I'm gonna click OK and apply now I'm gonna go to outbound connections and confirm the default settings most importantly that the outbound port is port 25 so I'm going to leave it that way go ahead and click cancel here I'm going to click outbound security and this is important check this bottom box for TLS encryption this makes sure that your outbound messages that go over the Internet are encrypted okay go ahead and click OK and apply under messages I like to uncheck the top two boxes those are limitations on this server for accepting emails I don't like there to be any limitations here if you send a message that's too large for office 365 it'll be rejected on that side I don't like it to be rejected here so I'm gonna go ahead and click apply here I'm gonna click access and under relay at the bottom I'm gonna change it to all except the list below so this means that all accepted messages on this server are going to be allowed to relay to office 365 that's what we want go ahead and click OK and apply if you do want to limit connectivity to this server you do that under connection control you're going to click connection and here you're going to change it to only the list below and then click Add and either add the IP addresses for the devices or services you want to use this server for or add your subnet here in this case I'm going to leave it open so I'm going to change it back to all except the list below and click OK and apply and finally I'm going to click general and check the box to enable logging down here and click ok and that's it my server is all set up and ready to go ok so now what do I use on my copiers and scanners and maybe help desk software or webpages to send emails through this server I'll show you when I minimize iis here and I'm going to in this powershell i'm gonna type ipconfig to show my IP address and the IP that matters is this server's IP right so i'm gonna copy that and hit enter I'm gonna bring up a document that shows the settings I'm gonna replace the IP here with the one I just copied ok so I'm gonna read this to you real quick the important stuff isn't highlighted in the middle here but here are the settings you're gonna use for smtp relay the server IP address that you're gonna put in say a copier is the IP of this server the port is gonna be 25 on your scanners and copiers and whatever you're using smtp relay for your gonna say no encryption ok and no authentication it's gonna allow the connection on your land to this server you just set up the important thing is the from address has to be at your domain ok so you can't send from something like localhost or you know say for cisco unity your address can't be voicemail at unity it has to be at your domain or Microsoft won't allow you to send it if you adhere to these settings though if you send from your domain and use the rest of the settings as indicated here the message should flow through your iis server to office 365 and then go out either to the internet or to the mailboxes in your organization one extra piece of information here is if you're blocking port 25 to the internet make sure that you open it up for this server okay that's it hopefully that helped if you have any questions you can see our email address in the comments below
Info
Channel: LiftOff 365 U
Views: 54,401
Rating: undefined out of 5
Keywords: Office365, Office 365, SMTP Relay, Microsoft
Id: RMFuTCuJfLc
Channel Id: undefined
Length: 9min 1sec (541 seconds)
Published: Wed Apr 15 2020
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.