I'm currently setting up an email infrastructure with FortiMail acting as our gateway, and I could use some guidance to refine my configuration for better security and functionality. Here's a brief overview of my setup and the issues I'm facing:
Setup Overview:
No private DNS server or LDAP.
Backend testing with CWP (Postfix, Dovecot, Roundcube + Outlook, Thunderbird as mail client).
Two domains to manage.
SMTP authentication created on the same mail server.
FortiMail in gateway mode with a DNAT VIP redirecting mail.
Can send and receive emails inbound and outbound.
Issues:
Firewall Policies:
I need help configuring firewall policies to ensure that SMTPS and HTTPS traffic goes to FortiMail, while IMAP, POP3S, and other services (webmail, etc.) go to the backend mail server.
I have only one public IP, so any recommendations for port forwarding at FortiGate to manage services better would be appreciated.
SMTP Authentication and Relay:
I want to use the SMTP authentication created on the same mail server as FortiMail.
The auth proxy cannot save mailboxes in gateway mode, so I need to ensure successful authentication.
FortiMail Policies:
I prefer IP-based access control for now.
My main objectives are anti-spam, antivirus, CDR, and DLP.
My Questions:
How can I make my firewall policies specific so that SMTPS and HTTPS traffic goes to FortiMail, and other services go to the backend mail server?
What are the best practices for authentication and general FortiMail policies, especially for anti-spam, antivirus, CDR, and DLP?
I've configured the mailserver host file, set the domain as relay as host, and set the mail server settings in FortiMail. However, I'm still facing challenges with traffic routing and authentication.Any advice or recommendations from your experiences would be greatly appreciated. Thank you in advance for your help!
Solved! Go to Solution.
for smtp(s) and http(s) to go towards fortimail, you would need to create a VIP for this, map Public IP:Public Port to Private IP:Port ( ex: 1.1.1.1:587 > 192.168.100.1:587 ) , then use these VIPs in the firewall rules, WAN > LAN and the same for the other ports/services to the backend with the observation that the services/ports mapped cannot overlap/use the same public ip:port for 2 different destinations.
for smtp(s) and http(s) to go towards fortimail, you would need to create a VIP for this, map Public IP:Public Port to Private IP:Port ( ex: 1.1.1.1:587 > 192.168.100.1:587 ) , then use these VIPs in the firewall rules, WAN > LAN and the same for the other ports/services to the backend with the observation that the services/ports mapped cannot overlap/use the same public ip:port for 2 different destinations.
Created on ‎08-03-2025 02:31 PM Edited on ‎08-03-2025 02:36 PM
Thanks buddy i will surely give it a try, have you ever implemented the smtp based authentication or not?
havent gotten the chance to work with FortiMail so far unfortunately :(
Hello rabbito
you shouldn't have any problem with smtp authentication.
Just define an authentication profile against your backend email server and refer it in your incoming recipient policies (or IP policies if need to)
This is well documented in FML admin guide too.
hope it helps
regards
/ Abel
Helpful Information
User | Count |
---|---|
2551 | |
1356 | |
795 | |
646 | |
455 |
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 2025 Fortinet, Inc. All Rights Reserved.