website/integrations/security/fortimail/index.mdx
import Tabs from "@theme/Tabs"; import TabItem from "@theme/TabItem";
FortiMail is a secure email gateway from Fortinet that provides protection against phishing, spam, malware, and data loss for on-premises or cloud-hosted email environments.
The following placeholders are used in this guide:
authentik.company is the FQDN of the authentik installation.fortimailadmin.company is the FQDN (or IP) of your FortiMail admin interface.fortimailuser.company is the WAN-facing FQDN of your FortiMail user/webmail portal.:::info This documentation lists only the settings that you need to change from their default values. Changing settings not mentioned in this guide can prevent single sign-on from working correctly. :::
:::info FortiMail 7.6.4 and later allows you to configure separate service providers for the admin and user/webmail portals. If you plan to use the user/webmail portal, avoid importing FortiMail’s auto-generated metadata directly, as you will need to edit the ACS URL in that XML to replace the host with your user-facing FQDN. :::
To support the integration of the FortiMail with authentik, you need to create an application/provider pair in authentik.
You can configure either Admin Portal SSO or User Portal SSO (or both), depending on the intended user and the desired scope of authentication.
<Tabs defaultValue="admin" values={[ { label: "Admin Portal SSO", value: "admin" }, { label: "User Portal SSO", value: "user" }, ]}> <TabItem value="admin">
Log in to authentik as an administrator and open the authentik Admin interface.
Navigate to Applications > Applications and click Create with Provider to create an application and provider pair. (Alternatively you can first create a provider separately, then create the application and connect it with the provider.)
FortiMail Admin), an optional group for the type of application, the policy engine mode, and optional UI settings. Take note of the slug as it will be required later.https://fortimailadmin.company/sso/SAML2/POST.https://fortimailadmin.company/sp.Post.authentik default SAML Mapping: Username is selected as a Selected User Property Mappings; other mappings are optional and can be removed if not needed.Click Submit to save the application and provider.
Provider for FortiMail Admin).https://fortimailadmin.company/sphttps://fortimailadmin.company/sso/SAML2/POSTEnsure that these values match those configured in authentik. If not, update the values in authentik and re-download the authentik metadata file.
http://schemas.goauthentik.io/2021/02/saml/username.:::info User Provisioning FortiMail does not auto-provision administrator accounts via SSO.
You must manually create admin users and, for each account, configure the Authentication type as Single Sign On to enable authentication through the SAML provider.
:::
To require SSO for FortiMail Admin Portal logins:
Single Sign On only.To support the integration of the FortiMail User Portal with authentik, you need to create an application/provider pair in authentik.
Log in to authentik as an administrator and open the authentik Admin interface.
Navigate to Applications > Applications and click Create with Provider to create an application and provider pair. (Alternatively you can first create a provider separately, then create the application and connect it with the provider.)
FortiMail User Portal), an optional group for the type of application, the policy engine mode, and optional UI settings. Take note of the slug as it will be required later.https://fortimailuser.company/sp2/sso/SAML2/POST.https://fortimailuser.company/sp.Post.authentik default SAML Mapping: Email is selected as a Selected User Property Mapping; other mappings are optional and can be removed if not needed.Click Submit to save the application and provider.
Provider for FortiMail User Portal).https://fortimailuser.company/spfortimailuser.company (for example, https://fortimailuser.company/sp2/sso/SAML2/POST)Ensure that these values match those configured in authentik. If not, update the values in authentik and re-download the authentik metadata file.
http://schemas.xmlsoap.org/ws/2005/05/identity/claims/emailaddress.To require SSO for FortiMail User Portal logins: