Today, I am going to show you how to use SendGrid as SMTP relay at Sophos UTM firewall and help you send email out successful, the Sophos UTM firewall and exchange servers are VMs of Nested Hyper-V host at Azure, if you don’t know how to build a Nested Hyper-V host in Azure, you can reference our Building Real Word lab in Azure Volume 1 book from https://leanpub.com/buildingrealworldlabsinazurevolume1) , this is step by step to tell you how to build your own lab in Azure.
If you are existing Azure customer, you can unlock 25,000 free emails each month. If you don’t know how to create a free SendGrid account, please check my previously blog.
- Login to exchange server VM.
-
Open Exchange admin center.
-
On the Exchange admin center page, select mail flow.
-
On the mail flow page, select connectors and then click +.
-
On the new send connector page, type send connector name and select Internet Type, click Next.
-
On the Network settings page, select Route mail through smart hosts and click +.
-
On the Add smart host page, enter utm.gdmcgy.gooddealmart.ca (this is UTM Internal interface IP address) and click Save.
-
On the new send connector page, click Next.
-
On the Smart host authentication page, select None. Click Next.
-
On the Address space page, click +.
-
On the add domain page, enter * as Full Qualified Domain Name (FQDN), click Save.
-
On the new send connector page, select Scoped send connector, click Next.
-
On the Source server page, click +.
-
Select the exchange server and click add and then click OK.
-
On the new send connector page, click Finish.
-
Login to UTM WebAdmin.
-
On the WebAdim page, select Email Protection.
-
On the Email Protection page, Select SMTP.
-
On the Smtp page, select Global and enable SMTP Proxy.
-
On the SMTP page, select Routing, add internal and external domains name to Domains and add exchange servers to the Host List, Click Apply.
-
On the SMTP page, select Relaying, add Exchange Servers to the Allowed Hosts/Networks, click Apply.
-
On the Content Scan for Relayed (outgoing) message, select Scan relayed (outgoing) messages, click Apply.
-
On the SMTP page, select Advanced.
- On the Smathost settings, select Use a smarthost and then add smtp.sendgrid.net as smart host, enter 2525 as Smarthost Port.
-
Select This smarthost requires authentication, and enter SendGrid account user name and password, click Apply.
You will notice send email out without issues now.
Ps. Don’t forget to add your external IP address to whitelisted at SendGrid IP Access Management.
Hope you enjoy this post.
Cary Sun
Twitter: @SifuSun
Author: Cary Sun
Cary Sun has a wealth of knowledge and expertise in data center and deployment solutions. As a Principal Consultant, he likely works closely with clients to help them design, implement, and manage their data center infrastructure and deployment strategies.
With his background in data center solutions, Cary Sun may have experience in server and storage virtualization, network design and optimization, backup and disaster recovery planning, and security and compliance management. He holds CISCO CERTIFIED INTERNETWORK EXPERT (CCIE No.4531) from 1999. Cary is also a Microsoft Most Valuable Professional (MVP), Microsoft Azure MVP, Veeam Vanguard and Cisco Champion. He is a published author with several titles, including blogs on Checkyourlogs.net, and the author of many books.
Cary is a very active blogger at checkyourlogs.net and is permanently available online for questions from the community. His passion for technology is contagious, improving everyone around him at what they do.
Blog site: https://www.checkyourlogs.net
Web site: https://carysun.com
Blog site: https://gooddealmart.com
Twitter: @SifuSun
in: https://www.linkedin.com/in/sifusun/
Amazon Author: https://Amazon.com/author/carysun