Created on
‎09-20-2023
09:58 AM
Edited on
‎01-04-2026
10:40 PM
By
Jean-Philippe_P
| Description | This article describes how to resolve the issue where the policy that should allow traffic to smtp.office365.com on port TCP 587 is not working consistently, resulting in periods where the connection is blocked and periods where it is allowed. |
| Scope | FortiGate. |
| Solution |
To solve this problem, the dynamic nature of the FQDN address of smtp.office365.com was identified as the root cause, which resolved to different addresses on FPMs and was addressed by increasing the cache TTL for the FQDN to 24 hours.
Here are the step-by-step instructions to carry out this solution:
Ensure Policy ID (Policy ID number) is correctly set up to allow traffic from the specific source to smtp.office365.com on port TCP 587. Port 587 is commonly used for SMTP (Simple Mail Transfer Protocol) for mail submission. It is designated for client-to-server communication, facilitating the sending of email messages to the mail server. It is technically possible to change the port number as long as the service/server communicating with it supports the port number change.
Confirm that DNS settings are correctly synchronized between the firewall and the server.
config firewall address set cache-ttl 86400
Related article: Technical Tip: How to identify port 587 is open for smtp.office365.com |
The Fortinet Security Fabric brings together the concepts of convergence and consolidation to provide comprehensive cybersecurity protection for all users, devices, and applications and across all network edges.
Copyright 2026 Fortinet, Inc. All Rights Reserved.