Fortimail Admin 620
Fortimail Admin 620
Fortimail Admin 620
Version 6.2.0
FortiMail 6.2.0 Administration Guide
August 12, 2019
2nd Edition
Copyright © 2019 Fortinet, Inc. All rights reserved. Fortinet®, FortiGate®, FortiCare® and
FortiGuard®, and certain other marks are registered trademarks of Fortinet, Inc., and other
Fortinet names herein may also be registered and/or common law trademarks of Fortinet. All
other product or company names may be trademarks of their respective owners. Performance
and other metrics contained herein were attained in internal lab tests under ideal conditions,
and actual performance and other results may vary. Network variables, different network
environments and other conditions may affect performance results. Nothing herein represents
any binding commitment by Fortinet, and Fortinet disclaims all warranties, whether express or
implied, except to the extent Fortinet enters a binding written contract, signed by Fortinet’s
General Counsel, with a purchaser that expressly warrants that the identified product will
perform according to certain expressly-identified performance metrics and, in such event, only
the specific performance metrics expressly identified in such binding written contract shall be
binding on Fortinet. For absolute clarity, any such warranty will be limited to performance in the
same ideal conditions as in Fortinet’s internal lab tests. Fortinet disclaims in full any covenants,
representations, and guarantees pursuant hereto, whether express or implied. Fortinet reserves
the right to change, modify, transfer, or otherwise revise this publication without notice, and the
most current version of the publication shall be applicable.
Page 1
Configuring administrator accounts and access profiles .................................... 179
Configuring system time, options, and other system options ............................. 185
Configuring mail settings ..................................................................................... 195
Customizing GUI, replacement messages, email templates, and SSO............... 220
Configuring RAID ................................................................................................. 234
Using high availability (HA) .................................................................................. 240
Managing certificates........................................................................................... 279
Using FortiSandbox antivirus inspection ............................................................. 289
Configuring FortiGuard services .......................................................................... 291
System maintenance ........................................................................................... 298
Configuring domains and users .................................................................. 310
Configuring protected domains ........................................................................... 310
Managing users ................................................................................................... 328
Configuring user aliases ...................................................................................... 340
Configuring address mappings............................................................................ 342
Configuring IBE users .......................................................................................... 344
Managing the address book (server mode only) ................................................. 349
Sharing calendars and address books (server mode only).................................. 354
Migrating email from other mail servers (server mode only)................................ 359
Configuring policies ..................................................................................... 362
What is a policy?.................................................................................................. 362
How to use policies ............................................................................................. 363
Controlling SMTP access and delivery ................................................................ 365
Controlling email based on IP addresses ............................................................ 378
Controlling email based on sender and recipient addresses .............................. 384
Configuring profiles...................................................................................... 392
Configuring session profiles ................................................................................ 392
Configuring antispam profiles and antispam action profiles ............................... 412
Configuring antivirus profiles and antivirus action profiles .................................. 431
Configuring content profiles and content action profiles..................................... 436
Configuring resource profiles............................................................................... 449
Workflow to enable and configure authentication of email users........................ 451
Configuring authentication profiles...................................................................... 452
Configuring VIP mappings ................................................................................... 456
Configuring LDAP profiles ................................................................................... 461
Configuring dictionary profiles............................................................................. 491
Configuring security profiles ................................................................................ 495
Configuring IP pools ............................................................................................ 501
Configuring email and IP groups ......................................................................... 503
Configuring notification profiles ........................................................................... 505
This section describes some basic email concepts, how FortiMail works in general, and the
tools that you can use to configure your FortiMail unit.
This section includes:
• Email protocols
• Client-server connections in SMTP
• The role of DNS in email delivery
• How FortiMail processes email
• FortiMail operation modes
• FortiMail high availability modes
• FortiMail management methods
Email protocols
SMTP
Simple Mail Transfer Protocol (SMTP) is the standard protocol for sending email between:
• two mail transfer agents (MTA)
• a mail user agent (MUA) and an MTA
For definitions of MTA and MUA, see “Client-server connections in SMTP” on page 8.
Page 6
While the basic protocol of SMTP is simple, many SMTP servers support a number of protocol
extensions for features such as authentication, encryption, multipart messages and
attachments, and may be referred to as extended SMTP (ESMTP) servers.
FortiMail units can scan SMTP traffic for spam and viruses, and support several SMTP
extensions.
POP3
Post Office Protocol version 3 (POP3) is a standard protocol used by email clients to retrieve
email that has been delivered to and stored on an email server.
POP3 communications typically occur on TCP port number 110.
Unlike IMAP, after a POP3 client downloads an email to the email user’s computer, a copy of the
email usually does not remain on the email server’s hard disk. The advantage of this is that it
frees hard disk space on the server. The disadvantage of this is that downloaded email usually
resides on only one personal computer. Unless all of their POP3 clients are always configured to
leave copies of email on the server, email users who use multiple computers to view email, such
as both a desktop and laptop, will not be able to view from one computer any of the email
previously downloaded to another computer.
FortiMail units do not scan POP3 traffic for spam and viruses, but may use POP3 when
operating in server mode, when an email user retrieves their email.
IMAP
Internet Message Access Protocol (IMAP) is a standard protocol used by email clients to
retrieve email that has been delivered to and stored on an email server.
IMAP communications typically occur on TCP port number 143.
Unless configured for offline availability, IMAP clients typically initially download only the
message header. They download the message body and attachments only when the email user
selects to read the email.
Unlike POP3, when an IMAP client downloads an email to the email user’s computer, a copy of
the email remains on the email server’s hard disk. The advantage of this is that it enables email
users to view email from more than one computer. This is especially useful in situations where
more than one person may need to view an inbox, such where all members of a department
monitor a collective inbox. The disadvantage of this is that, unless email users delete email,
IMAP may more rapidly consume the server’s hard disk space.
FortiMail units do not scan IMAP traffic for spam and viruses, but may use IMAP when
operating in server mode, when an email user retrieves their email.
Client-server connections and connection directionality in SMTP differ from how you may be
familiar with them in other protocols.
For example, in the SMTP protocol, an SMTP client connects to an SMTP server. This seems
consistent with the traditional client-server model of communications. However, due to the
notion of relay in SMTP, the SMTP client may be either:
• an email application on a user’s personal computer
• another SMTP server that acts as a delivery agent for the email user, relaying the email to its
destination email server
The placement of clients and servers within your network topology may affect the operation
mode you choose when installing a FortiMail unit. If your FortiMail unit will be operating in
gateway mode or server mode, SMTP clients — including SMTP servers connecting as clients
— must be configured to connect to the FortiMail unit.
Terms such as MTA and MUA describe server and client relationships specific to email
protocols.
MTA
A Mail Transfer Agent (MTA) is an SMTP server that relays email messages to another SMTP
server.
FortiMail units operating in gateway mode function as an MTA. FortiMail units operating in
server mode function as an MTA and full (SMTP, IMAP, POP3, webmail) email server.
In order to deliver email, unless the email is incoming and the email server has no domain name
and is accessed by IP address only, MTAs must query a DNS server for the MX record and the
corresponding A record. For more information, see “The role of DNS in email delivery” on
page 9.
MUA
A Mail User Agent (MUA), or email client, is software such as Microsoft Outlook that enables
users to send and receive email.
FortiMail units support SMTP connections for sending of email by a MUA.
FortiMail units operating in server mode support POP3 and IMAP connections for retrieval of
email by a MUA. For email users that prefer to use their web browsers to send and retrieve
email instead of a traditional MUA, FortiMail units operating in server mode also provide
FortiMail webmail.
SMTP can be configured to operate without DNS, using IP addresses instead of domain names
for SMTP clients, SMTP servers, and recipient email addresses. However, this configuration is
rare.
SMTP as it is typically used relies upon DNS to determine the mail gateway server (MX) for a
domain name, and to resolve domain names into IP addresses. As such, you usually must
configure email servers and FortiMail units to be able to query a DNS server.
In addition, you may also be required to configure the DNS server with an MX record, an A
record, and a reverse DNS record for protected domain names and for the domain name of the
FortiMail unit itself.
If your FortiMail unit will operate in gateway mode or server mode, or in transparent mode while
not fully transparent, configure the MX record to refer to the FortiMail unit, and remove other MX
records. If you do not configure the MX record to refer to the FortiMail unit, or if other MX
records exist that do not refer to the FortiMail unit, external MTAs may not be able to deliver
email to or through the FortiMail unit, or may be able to bypass the FortiMail unit. If you have
configured secondary MX records for failover reasons, consider configuring FortiMail high
availability (HA) instead. For details, see “FortiMail high availability modes” on page 24.
Exceptions include if you are configuring a private DNS server for use with the Use MX Record
option. In that case, rather than referencing the FortiMail unit as the mail gateway and being
used by external SMTP servers to route mail, the MX record references the protected SMTP
server and is used by the FortiMail unit to define the SMTP servers for the protected domain.
Reverse DNS records are required for FortiMail units operating in gateway mode or server
mode. However, they are also required for FortiMail units operating in transparent mode, unless
they have been configured to be completely transparent.
FortiMail units receive email for defined email domains and control relay of email to other
domains. Email passing through the FortiMail unit can be scanned for viruses and spam.
Policies and profiles govern how the FortiMail unit scans email and what it does with email
messages containing viruses or spam. For information about policies, see “Configuring
policies” on page 362. For information about profiles, see “Configuring profiles” on page 392.
In addition to policies and profiles, other configured items, such as email domains, may affect
how your FortiMail unit processes email.
Email domains
An email domain is a set of email accounts that reside on a particular email server. The email
domain name is the portion of the user’s email address following the “@” symbol.
FortiMail units can be configured to protect email domains (referred to as “protected domains”
in this Administration Guide) by defining policies and profiles to scan and relay email that is
incoming to or outbound from protected domains.
If the FortiMail unit is operating in gateway mode or transparent mode, there is one local email
domain that represents the FortiMail unit itself. If the FortiMail unit is operating in server mode,
protected domains reside locally on the FortiMail unit’s built-in email server.
For information about creating protected domains, see “Configuring protected domains” on
page 310.
In transparent mode, each network interface includes a proxy and/or implicit MTA that receives
and relays email. By default, the proxy/implicit MTA responds to SMTP greetings (HELO/EHLO)
using the host name of the SMTP server of the protected domain. For information on
configuring the SMTP greeting, see “Configuring protected domains” on page 310.
Antispam techniques
Spam detection is a key feature of the FortiMail unit. The feature is based on two tiers of spam
defense:
• FortiMail antispam techniques
• FortiGuard Antispam service
Each tier plays an important role in separating spam from legitimate email. FortiGuard Antispam
delivers a highly-tuned managed service for the classification of spam while the FortiMail unit
offers superior antispam detection and control technologies.
In addition to scanning incoming email messages, FortiMail units can also inspect the content
of outgoing email messages. This can help eliminate the possibility that an employee or a
compromised computer could send spam, resulting in the blocklisting of your organization’s
email servers.
For more information on FortiMail antispam techniques, see “Configuring profiles” on page 392
and “Configuring security settings” on page 506.
Image spam scanning See “Configuring image spam options” on page 422.
Banned word scanning See “Configuring banned word options” on page 420.
Safe list word scanning See “Configuring safelist word options” on page 421.
Order of execution
FortiMail units perform each of the antispam scanning and other actions in the following
sequence, from the top of the table towards the bottom. Disabled scans are skipped. Note that
is this only a general sequence and the actions are taken based on the results of many factors.
This table does not include everything the FortiMail unit does when a client connects to deliver
email. Only the antispam techniques, and other functions having an effect on the antispam
techniques, are included. Other non-antispam functions may be running in parallel to the ones
in the table.
The PDF file type scan does not appear in this table. When enabled, the PDF file type converts
the first page of any PDF attachments into to a format the heuristic, banned word, and image
spam scanners can scan. If any of these scanners are enabled, they will scan the first page of
the PDF at the same time they examine the message body, according to the sequence in the
table below.
Sender Client IP address If the client IP is in the sender Add the IP address
reputation reputation database, check the to the sender
score and enable any appropriate reputation database
restrictions, if any. and keep a
reputation score
based on the email
received.
Proceed to the next
check.
FortiGuard Client IP address If the “Check FortiGuard Block IP Proceed to the next
block IP check at connection phase” is enabled check.
in a session profile, FortiMail will
check the client IP address
against the FortiGuard block IP
list. If positive, FortiMail rejects
the email.
Endpoint Client endpoint ID If the client endpoint ID is in the Add the IP address
reputation sender reputation database, to the endpoint
check the score and enable any reputation database
appropriate restrictions, if any. and keep a
reputation score
based on the email
received.
Proceed to the next
check.
Sender rate Client IP address Apply any connection limitations In there are no
control per specified in the session profile. connection
connection Proceed to the next check. limitations, or if no
session profile
applies, proceed to
the next check.
HELO/EHLO Domain of the If invalid characters appear in the Proceed to the next
HELO/EHLO domain, reject the HELO/EHLO check.
command command. Session will not
continue until a proper
HELO/EHLO command is received.
MAIL FROM: and RCPT TO: commands received from SMTP client
Sender rate Client IP address Apply any connection limitations In there are no
control per specified in the session profile. connection
message Proceed to the next check. limitations, or if no
session profile
applies, proceed to
the next check.
Sender Domain of If any of the domain checks (the Proceed to the next
domain check envelope sender Check sender domain and check.
(MAIL FROM:) Reject empty domains checks
listed in Unauthenticated Session
Settings in the session profile) fail,
an error is returned to the SMTP
client. The error depends on
which particular check failed.
System safe Client IP address If the client IP or email Proceed to the next
list and email address/domain of the sender check.
(Phase I) address/domain of appear in the system safe list,
the envelope deliver the email and cancel
sender remaining antispam checks (but
(MAIL FROM:) not the antivirus and content
checks).
System block Client IP address If the client IP or email Proceed to the next
list and email address/domain of the sender check.
(Phase I) address/domain of appear in the system block list,
the envelope invoke the block list action for the
sender email.
(MAIL FROM:)
Authentication Envelope sender Checks to see if the sender email Proceed to the next
difference (MAIL FROM:) address in the SMTP envelope check.
check matches the authenticated user
name. If not allowed in the
IP-based policy, the email will be
rejected.
Bounce Envelope recipient Apply actions specified in the Proceed to the next
Verification (RCPT TO:) bounce verification settings. check.
Recipient Domain of If any of the domain checks (the Proceed to the next
domain check envelope recipient Check recipient domain and check.
(RCPT TO:) Reject if recipient and helo
domain match but sender domain
is different checks listed in
Unauthenticated Session Settings
in the session profile) fail, an error
is returned to the SMTP client.
The error depends on which
check failed.
Session Envelope recipient If the recipient appears in the Proceed to the next
recipient safe (RCPT TO:) session recipient safe list, deliver check.
list the message and cancel
remaining antispam checks (but
not the antivirus and content
checks).
Session Envelope recipient If the recipient appears in the Proceed to the next
recipient block (RCPT TO:) session recipient block list, reject check.
list the message.
Recipient Envelope recipient If the recipient is unknown, reject Proceed to the next
verification (RCPT TO:) the message. check.
Greylist Envelope sender If the sender is in the greylist If the sender is not in
(MAIL FROM:), database or if the client IP subnet the greylist
envelope recipient appears in the greylist exempt list, database, a
(RCPT TO:), and the message is passed to the next temporary failure
client IP subnet check. code is returned to
address the SMTP client.
Note: This check is omitted if the
access control rule’s action is
RELAY.
System safe Message header If the email address/domain of the Proceed to the next
list sender (From:) sender appears in the system safe check.
(Phase II) list, deliver the message and
cancel remaining antispam
checks (but not the antivirus and
content checks).
System block Message header If the email address/domain of the Proceed to the next
list sender (From:) sender appears in the system check.
(Phase II) block list, invoke the block list
action for the message.
Domain safe Client IP, envelope If the client IP, email Proceed to the next
list sender address/domain of the sender check.
(MAIL FROM:) appears in the domain safe list,
and message deliver the message and cancel
header sender remaining antispam checks (but
(From:) not the antivirus and content
checks).
Domain block Client IP, envelope If the client IP, email Proceed to the next
list sender address/domain of the sender check.
(MAIL FROM:) appears in the domain block list,
and message invoke the block list action for the
header sender message.
(From:)
Session Message header If the email address/domain of the Proceed to the next
sender safe sender (From:) sender appears in the session check.
list sender safe list, deliver the
(Phase II) message and cancel remaining
antispam checks (but not the
antivirus and content checks).
Session Message header If the email address/domain of the Proceed to the next
sender block sender (From:) sender appears in the session check.
list sender block list, the block list
(Phase II) action is invoked.
Personal safe Client IP, envelope If the client IP, email Proceed to the next
list sender address/domain of the sender check.
(MAIL FROM:) appears in the personal safe list,
and message deliver the message and cancel
header sender remaining antispam checks (but
(From:) not the antivirus and content
checks).
Personal block Client IP, envelope If the client IP, email Proceed to the next
list sender address/domain of the sender check.
(MAIL FROM:) appears in the personal block list,
and message the message is discarded.
header sender
(From:)
Safe List Word Message subject If the safelisted word scanner Proceed to the next
and/or body determines that the message is check.
not spam, deliver the message
and cancel remaining antispam
checks.
SPF check Client IP address This option compares the client IP Proceed to the next
address to the IP addresses of check.
authorized senders in the DNS
record (RFC 4408).
If failed, treat the email as spam.
Behavior Message body If the scanner determines the Proceed to the next
analysis message is spam, the configured check.
individual action is invoked. If the
individual action is set to default,
then the antispam profile default
action is used.
Impersonation Message header If the scanner determines the Proceed to the next
analysis message is spam, the configured check.
individual action is invoked. If the
individual action is set to default,
then the antispam profile default
action is used.
Banned Word Message subject If the banned word scanner Proceed to the next
and/or body determines that the message is check.
spam, the configured individual
action is invoked. If the individual
action is set to default, then the
antispam profile default action is
used.
DNSBL Client IP address If the DNSBL scanner determines Proceed to the next
that the message is spam, the check.
configured individual action is
invoked. If the individual action is
set to default, then the antispam
profile default action is used.
SURBL Every URI in the If the SURBL scanner determines Proceed to the next
message body that the message is spam, the check.
configured individual action is
invoked. If the individual action is
set to default, then the antispam
profile default action is used.
Heuristic Message body If the heuristic antispam scanner Proceed to the next
determines that the message is check.
spam, the configured individual
action is invoked. If the individual
action is set to default, then the
antispam profile default action is
used.
Image Spam Embedded images If the image spam scanner Proceed to the next
determines that the message is check.
If Aggressive scan
spam, the configured individual
is enabled,
action is invoked. If the individual
attached images
action is set to default, then the
are also examined.
antispam profile default action is
used.
Header Message header If the header analysis scan Proceed to the next
analysis determines that the message is check.
spam, the configured individual
action is invoked. If the individual
action is set to default, then the
antispam profile default action is
used.
Suspicious Message header If the newsletter scan determines Proceed to the next
Newsletter and body that the message is a newsletter, check.
the configured individual action is
invoked. If the individual action is
set to default, then the antispam
profile default action is used.
Content Message header, If the content scanner determines Proceed to the next
body, and that the message is spam or check.
attachment prohibited, the action configured
in the content profile individual
action is invoked. If the individual
action is set to default, then the
antispam profile default action is
used.
DLP Message header, Apply the action configured in the Deliver the message.
body, and DLP profile.
attachment
FortiMail units can run in one of three operation modes: gateway mode, transparent mode, and
server mode.
Gateway mode
• The FortiMail unit acts as a mail transfer agent (MTA), or email gateway, relaying email to
and from the email servers that it protects.
• Simple DNS MX record change redirects email to FortiMail for antispam and antivirus
scanning.
• FortiMail does not locally store email unless queued or quarantined.
Transparent mode
• The FortiMail unit transparently proxies or relays email traffic to and from the email
servers that it protects.
• Eliminates the need to change existing mail server network configuration.
• FortiMail does not locally store email unless queued or quarantined.
Server mode
• The FortiMail unit operates as a standalone, full-featured email server and MTA.
• The FortiMail unit locally stores email for delivery to its email users. Email users can
access their email using FortiMail webmail, POP3, or IMAP.
All operation modes can scan email traffic for viruses and spam, and can quarantine suspicious
email and attachments.
FortiMail units can be configured to operate in high availability (HA) clusters. FortiMail HA has
two modes: active-passive and config-only.
• Active-passive HA: Two FortiMail units operate as an HA cluster, synchronizing both
configuration and data, providing failover protection.
• Config-only HA: Up to 25 FortiMail units use an identical configuration, but do not
synchronize data, and therefore operate as independent FortiMail units.
Fortinet recommends HA to achieve uninterrupted service.
For more information on HA, see “Using high availability (HA)” on page 240.
After you install the FortiMail unit, you can configure and manage it with either of:
• the web-based manager
• and/or the command line interface (CLI)
The CLI is only available to administrator accounts whose Domain is System. It is not available
to domain (tiered) administrator accounts. For more information on domain administrators, see
“About administrator account permissions and domains” on page 179.
Depending on the FortiMail unit’s model number, you may also be able to reset the
configuration and to configure basic settings such as operation mode and IP addresses using
the buttons and LCD on the front panel. For details, see “Configuring system options” on
page 186.
This Administration Guide describes the web UI. For equivalent documentation of the CLI, see
the FortiMail CLI Reference.
These instructions in this chapter will guide you to the point where you have a simple, verifiably
working installation. From there, you can begin to use optional features and fine-tune your
configuration.
FortiMail initial setup involves the following steps:
• Connecting to the Web UI or CLI
• Choosing the operation mode
• Running the Quick Start Wizard
• Connecting to FortiGuard services
• Gateway mode deployment
• Transparent mode deployment
• Server mode deployment
• Testing the installation
• Backing up the configuration
To configure, maintain, and administer the FortiMail unit, you need to connect to it. There are
three methods for these tasks:
• using the web UI, a graphical user interface (GUI), from within a current web browser (see
“Connecting to the FortiMail web UI for the first time”)
• using the command line interface (CLI), a command line interface similar to DOS or UNIX
commands, from a Secure Shell (SSH) or Telnet terminal (see “Connecting to the FortiMail
CLI for the first time” on page 28)
• using the front panel’s LCD display and control buttons available on some models (see
“Using the front panel’s control buttons and LCD display” on page 33).
URL https://192.168.1.99/admin
Page 26
Table 3: Default settings for connecting to the web UI
Administrator admin
Account
Password (none)
If you are connecting to FortiMail-VM with a trial license or to a LENC version of FortiMail, you
may not be able to see the logon page due to an SSL cipher error during the connection. In this
case, you must configure your browser to accept low encryption.
For example, in Mozilla Firefox, if you receive this error message:
ssl_error_no_cypher_overlap
you may need to enter about:config in the URL bar, then set
security.ssl3.rsa.rc4_40_md5 to true.
To support HTTPS authentication, the FortiMail unit ships with a self-signed security
certificate, which it presents to clients whenever they initiate an HTTPS connection to the
FortiMail unit. When you connect, depending on your web browser and prior access of the
FortiMail unit, your browser might display two security warnings related to this certificate:
• The certificate is not automatically trusted because it is self-signed, rather than being
signed by a valid certificate authority (CA). Self-signed certificates cannot be verified with
a proper CA, and therefore might be fraudulent. You must manually indicate whether or
not to trust the certificate.
• The certificate might belong to another web site. The common name (CN) field in the
certificate, which usually contains the host name of the web site, does not exactly match
the URL you requested. This could indicate server identity theft, but could also simply
indicate that the certificate contains a domain name while you have entered an IP
address. You must manually indicate whether this mismatch is normal or not.
Both warnings are normal for the default certificate.
4. Verify and accept the certificate, either permanently (the web browser will not display the
self-signing warning again) or temporarily. You cannot log in until you accept the certificate.
For details on accepting the certificate, see the documentation for your web browser.
The Login dialog appears.
5. In the Name field, type admin, then select Login. (In its default state, there is no password
for this account.)
Login credentials entered are encrypted before they are sent to the FortiMail unit. If your
login is successful, the web UI appears.
Requirements
• a computer with an available serial communications (COM) port
• the RJ-45-to-DB-9 or null modem cable included in your FortiMail package
• terminal emulation software such as PuTTY
The following procedure describes connection using PuTTY software; steps may vary with
other terminal emulators.
Data bits 8
Stop bits 1
Parity None
4. In the Category tree on the left, go to Session (not the sub-node, Logging) and from
Connection type, select Serial.
5. Click Open.
6. Press the Enter key to initiate a connection.
The login prompt appears.
7. Type a valid administrator account name (such as admin) and press Enter.
8. Type the password for that administrator account then press Enter. (In its default state, there
is no password for the admin account.)
The CLI displays the following text, followed by a command line prompt:
Welcome!
Requirements
• a computer with an available serial communications (COM) port and RJ-45 port
• terminal emulation software such as PuTTY
• the RJ-45-to-DB-9 or null modem cable included in your FortiMail package
• a network cable
• prior configuration of the operating mode, network interface, and static route
To enable SSH or Telnet access to the CLI using a local console connection
1. Using the network cable, connect the FortiMail unit’s network port either directly to your
computer’s network port, or to a network through which your computer can reach the
FortiMail unit.
2. Note the number of the physical network port.
3. Using a local console connection, connect and log into the CLI. For details, see “Local
console connection and initial configuration” on page 28.
4. Enter the following commands:
config system interface
edit <interface_name>
set allowaccess {http https ping snmp ssh telnet}
end
where:
• <interface_str> is the name of the network interface associated with the physical
network port, such as port1
• {aggregator http https ping ssh telnet webservice} is the complete,
space-delimited list of permitted administrative access protocols, such as https ssh
telnet; omit protocols that you do not want to permit
For example, to exclude HTTP, SNMP, and Telnet, and allow only HTTPS, ICMP ECHO (ping),
and SSH administrative access on port1:
config system interface
edit "port1"
set allowaccess ping https ssh
next
end
Telnet is not a secure access method. SSH should be used to access the CLI from the Internet
or any other untrusted network.
Requirements
• a FortiMail network interface configured to accept SSH connections (see “Enabling access
to the CLI through the network (SSH or Telnet)” on page 30)
• terminal emulation software such as PuTTY
If four incorrect login or password attempts occur in a row, you will be disconnected. Wait one
minute, then reconnect to attempt the login again.
The CLI displays a command line prompt (by default, its host name followed by a #). You can
now enter CLI commands.
Telnet is not a secure access method. SSH should be used to access the CLI from the Internet
or any other untrusted network.
Requirements
• a FortiMail network interface configured to accept Telnet connections (see “Enabling access
to the CLI through the network (SSH or Telnet)” on page 30)
• terminal emulation software such as PuTTY
If three incorrect login or password attempts occur in a row, you will be disconnected. Wait one
minute, then reconnect to attempt the login again.
The CLI displays a command line prompt (by default, its host name followed by a #). You can
now enter CLI commands.
Once the FortiMail unit is mounted and powered on, and you have completed initial
configuration, you can configure the operation mode of the FortiMail unit using the CLI or web
UI.
FortiMail units can run in one of three operation modes: gateway mode, transparent mode, or
server mode. Requirements of each operation mode vary.
In addition, some FortiMail features are specific to the operation mode. As a result, changing
the operation mode may reset your FortiMail configuration.
You will usually choose the operation mode that is appropriate for your topology and
requirements and configure the operation mode only once, just after physical installation and
initial configuration, and before using the Quick Start Wizard.
This section describes each operation mode, assisting you in choosing the mode that best suits
your requirements.
Deployment guidelines
Generally speaking, gateway mode is suitable for most deployment environments. It is usually
easier to implement and better understood. Exceptions are situations where neither DNS MX
records nor IP addresses cannot be modified.
Transparent mode was developed for the purpose of implementing FortiMail in carrier
environments to combat outgoing spam. It is suitable for certain environments but needs more
careful routing handling and good understanding of network and application layer transparency.
Transparent mode is the best choice for combatting outgoing spam in carrier environments.
You use server mode to set up a standalone email server or to replace an existing email server.
After you set the operation mode, run the Quick Start Wizard to set up a basic system. Then
deploy your FortiMail unit. The details vary depending on the operation mode you chose. For
instructions, consult the applicable sections:
• Gateway mode deployment
• Transparent mode deployment
• Server mode deployment
External
Email Server
internal wan1
Switch 172.16.1.1
1.1 10.10.10.1
10.1
port1
p or
172.16.1.5
For example, an Internet service provider (ISP) could deploy a FortiMail unit to protect their
customers’ email servers. For security reasons, customers do not want their email servers to be
directly visible to external MTAs. Therefore, the ISP installs the FortiMail unit in gateway mode,
and configures its network such that all email traffic must pass through the FortiMail unit before
reaching customers’ email servers.
For sample deployment scenarios, see “Gateway mode deployment” on page 46.
Port 1 is the only port permanently attached to the built-in bridge and thus cannot be set in
route mode.
Protected Domain:
@example.com
Transparent Mode
Router 10.10.10.1
port2
port1 Remote Email Users
Do not connect two ports to the same VLAN on a switch or the same hub. Some Layer 2
switches become unstable when they detect the same media access control (MAC) address
originating on more than one network interface on the switch, or from more than one VLAN.
For example, a school might want to install a FortiMail unit to protect its mail server, but does
not want to make any changes to its existing DNS and SMTP client configurations or other
network topology. Therefore, the school installs the FortiMail unit in transparent mode.
For sample deployment scenarios, see “Transparent mode deployment” on page 72.
LocalEm ailUsers
Rem ote Em ailUsers
External
EmailerSver
internal
172.16.1.1
w an1
dmz VitualIP 10.10.10.1:25
mapped ot 192.168.1.5:25
192.168.1.1
port1
192.168.1.5
Private DNS Server
Public DNS Server
exam ple.com IN M X 10 fortim ail.exam ple.com
fortim ailIN A 10.10.10.1
Server M ode
Email omain:
D
@ exam ple.com
For example, a company might be creating a network, and does not have an existing email
server. The company wants the convenience of managing both their email server and email
security on one network device. Therefore, the company deploys the FortiMail unit in server
mode.
For sample deployment scenarios, see “Server mode deployment” on page 94.
The default mode is gateway. If that is your chosen mode, you can skip the following procedure.
Do not change the operation mode once you have committed resources to configuring
FortiMail. Changing the operation mode resets most configurations to the factory defaults.
The Quick Start Wizard leads you through required configuration steps, helping you to quickly
set up your FortiMail unit.
While al settings configured by the Quick Start Wizard can also be configured through the
standard and advanced modes of the web UI, the wizard presents each setting in the necessary
order. The wizard also provides descriptions to assist you in configuring each setting. These
descriptions are not available in the web UI.
The Quick Start Wizard allows you to set up FortiMail in server mode or gateway mode. but not
in the transparent mode.
The following topics describe how to use the Quick Start Wizard:
• Starting the wizard
• Step 1: Time Settings
• Step 2: Network Settings
• Step 3: Local Host Settings
• Step 4: Edit Administrator Password
• Step 5: Operation Mode
• Step 6: Domain Configuration
• Step 7: Policy Settings
• Step 8: Reviewing and saving the configuration
• Continuing the installation
None of the settings you make on the wizard take effect until you click OK on the last step.
Primary DNS Enter the IP address of the primary server to which the FortiMail unit
will make DNS queries.
Caution: Verify connectivity with the DNS servers. Failure to verify
connectivity could result in many issues, including the inability of the
FortiMail unit to process email.
Secondary DNS Enter the IP address of the secondary server to which the FortiMail
unit will make DNS queries.
The local domain name must be globally DNS-resolvable only if the FortiMail unit is used as a
relay server for outgoing email.
Local domain Enter the local domain name to which the FortiMail unit belongs.The
name FortiMail unit’s fully qualified domain name (FQDN) is in the format:
<Host Name>.<Local Domain Name>
This option does not appear if the FortiMail unit is operating in server
mode.
Note: The local domain name can be a subdomain of an internal
domain if the MX record for the domain on the DNS server can direct
the mail destined for the subdomain to the intended FortiMail unit.
Failure to configure a strong administrator password could compromise the security of your
FortiMail unit.
Domain name Enter the fully qualified domain name (FQDN) of the protected
domain.
For example, if you want to protect email addresses such as
[email protected], you would enter the protected domain name
example.com.
Use MX record Select to enable the FortiMail unit to query the DNS server’s MX
(gateway mode only) record for the FQDN or IP address of the SMTP server for this domain
name.
Note: If enabled, you may also be required to configure the FortiMail
unit to use a private DNS server whose MX and/or A records differ
from that of a public DNS server. Requirements vary by the topology
of your network and by the operating mode of the FortiMail unit. For
details, see “Configuring DNS records” on page 46 (gateway mode)
or “Configuring DNS records” on page 94 (transparent mode).
SMTP server Enter the fully qualified domain name (FQDN) or IP address of the
primary SMTP server for this protected domain, then also configure
(gateway mode only)
Port.
If you have an internal mail relay that is located on a physically
separate server from your internal mail server, this could be your
internal mail relay, instead of your internal mail server. Consider your
network topology, directionality of the mail flow, and the operation
mode of the FortiMail unit.
Port Enter the port number on which the SMTP server listens.
(gateway mode only) The default SMTP port number is 25.
Use SMTPS Enable to use SMTPS for connections originating from or destined for
this protected server.
(gateway mode only)
Use SMTP for Enable it if you want to use the SMTP server to verify the recipients.
recipient verification
(gateway mode only)
Inbound email scan Enable to scan the inbound email destined to the protected
domains.
Outbound email Enable to scan the outbound email destined to the unprotected
scan domains.
Email relay for If you specify the SMTP server’s IP address in the previous step, the
protected domain option appears. Enable it to add the protected domain to the ACL
and set the action to relay.
(gateway mode only)
None of the settings you made on the wizard take effect until you click OK on the final page.
The wizard and the dashboard disappear, and FortiMail prompts you to log in.
After the FortiMail unit is physically installed and configured to operate in your network, if you
have subscribed to FortiGuard Antivirus and/or FortiGuard Antispam services, connect the
FortiMail unit to the Fortinet Distribution Network (FDN).
Connecting your FortiMail unit to the FDN or override server ensures that your FortiMail unit
can:
• download the most recent FortiGuard Antivirus definitions and engine packages
• query the FDN for blocklisted servers and other real-time information during FortiGuard
Antispam scans, if configured
This way, you scan email using the most up-to-date protection.
The FDN is a world-wide network of Fortinet Distribution Servers (FDS). When a FortiMail unit
connects to the FDN to download FortiGuard engine and definition updates, by default, it
connects to the nearest FDS based on the current time zone setting. You can override the FDS
to which the FortiMail unit connects.
Your FortiMail unit may be able to connect using the default settings. However, you should
confirm this by verifying connectivity.
You must first register the FortiMail unit with the Fortinet Technical Support web site,
https://support.fortinet.com/, to receive service from the FDN. The FortiMail unit must also have
a valid Fortinet Technical Support contract which includes service subscriptions, and be able to
connect to the FDN or the FDS that you will configure to override the default FDS addresses.
Before performing the next procedure, if your FortiMail unit connects to the Internet using a
proxy, use the CLI command config system fortiguard antivirus to enable the
FortiMail unit to connect to the FDN through the proxy.
Figure 5: DNS error when resolving the FortiGuard Antispam domain name
Verify that the DNS servers contain A records to resolve service.fortiguard.net and other FDN
servers. You may be able to obtain additional insight into the cause of the query failure by
manually performing a DNS query from the FortiMail unit using the following CLI command:
execute nslookup name service.fortiguard.net
If the FortiMail unit cannot successfully connect, or if your FortiGuard Antispam license does
not exist or is expired, a message appears notifying you that a connection error has
occurred.
Verify that:
• your FortiGuard Antispam license is valid and currently active
• the default route (located in System > Network > Routing) is correctly configured
• the FortiMail unit can connect to the DNS servers you configured during the Quick Start
Wizard (located in System > Network > DNS), and to the FDN servers
• firewalls between the FortiMail unit and the Internet or override server allow FDN traffic
(For configuration examples specific to your operation mode, see “Gateway mode
deployment” on page 46, “Transparent mode deployment” on page 72, or “Server mode
deployment” on page 94.)
Obtain additional insight into the point of the connection failure by tracing the connection
using the following CLI command:
execute traceroute <address_ipv4>
where <address_ipv4> is the IP address of the DNS server or FDN server.
When query connectivity is successful, antispam profiles can use the FortiGuard-AntiSpam
scan option.
If FortiGuard Antispam scanning is enabled, you can use the antispam log to analyze any
query connectivity interruptions caused because FortiMail cannot connect to the FDN
and/or its license is not valid. To enable the antispam log, go to Log and Report >
Log Settings > Local Log Settings in the advanced mode of the web UI. To view the
antispam log, go to Monitor > Log > AntiSpam, then mark the check box of a log file and
click View.
If FortiMail cannot connect with the FDN server, the log Message field contains:
FortiGuard-Antispam: No Answer from server.
Verify that the FortiGuard Antispam license is still valid, and that network connectivity has
not been disrupted for UDP port 53 traffic from the FortiMail unit to the Internet.
Updating FortiGuard Antivirus definitions can cause a short disruption in traffic currently being
scanned while the FortiMail unit applies the new signature database. To minimize disruptions,
update when traffic is light, such as during the night.
After completing the Quick Start Wizard, you may need to configure some items that are
specific to your network topology or the operation mode of your FortiMail unit.
This section contains examples of how to deploy a FortiMail unit operating in gateway mode.
Other sections discuss deployment in the other two modes.
This section includes the following topics:
• Configuring DNS records
• Example 1: FortiMail unit behind a firewall
• Example 2: FortiMail unit in front of a firewall
• Example 3: FortiMail unit in DMZ
If you are unfamiliar with configuring DNS and related MX and A records, first read “The role of
DNS in email delivery” on page 9.
For performance reasons, and to support some configuration options, you may also want to
provide a private DNS server for exclusive use by the FortiMail unit.
This section includes the following:
• Configuring DNS records for the protected domains
• Configuring DNS records for the FortiMail unit itself
• Configuring a private DNS server
If your FortiMail unit will operate in gateway mode, configure the MX record to refer to the
FortiMail unit, and remove other MX records. If you fail to do so, external MTAs may not be able
to deliver email to or through the FortiMail unit, or may be able to bypass the FortiMail unit by
using the other MX records. If you have configured secondary MX records for failover reasons,
consider configuring FortiMail high availability (HA) instead. For details, see “FortiMail high
availability modes” on page 24.
An A record must also exist to resolve the host name of the FortiMail unit into an IP address.
For example, if the MX record indicates that fortimail.example.com is the email gateway for a
domain, you must also configure an A record in the example.com zone file to resolve
fortimail.example.com into a public IP address:
fortimail IN A 10.10.10.1
where 10.10.10.1 is either the public IP address of the FortiMail unit, or a virtual IP address
on a firewall or router that maps to the private IP address of the FortiMail unit.
If your FortiMail unit will relay outgoing email, you should also configure the public reverse DNS
record. The public IP address of the FortiMail unit, or the virtual IP address on a firewall or router
that maps to the private IP address of the FortiMail unit, should be globally resolvable into the
FortiMail unit’s FQDN. If it is not, reverse DNS lookups by external SMTP servers will fail.
For example, if the public network IP address of the FortiMail unit is 10.10.10.1, a public DNS
server’s reverse DNS zone file for the 10.10.10.0/24 subnet might contain:
1 IN PTR fortimail.example.com.
where fortimail.example.com is the FQDN of the FortiMail unit.
External
Email Server
internal wan1
Switch
tc 172.16.1.1
.1 1
10.10.10.1
port1
por
172.16.1.5
In some situations, a private DNS server may be required. A private DNS server is required if you
enable the Use MX record option. Because gateway mode requires that public DNS servers
have an MX record that routes mail to the FortiMail unit, but Use MX record requires an MX
record that references the protected SMTP server, if you enable that option, you must configure
the records of the private DNS server and public DNS server differently.
For example, if both a FortiMail unit (fortimail.example.com) operating in gateway mode
and the SMTP server reside on your private network behind a router or firewall as illustrated in
Figure 7 on page 49, and the Use MX Record option is enabled, Table 6 on page 75 illustrates
differences between the public and private DNS servers for the authoritative DNS records of
example.com.
Table 5: Public versus private DNS records when “Use MX record” is enabled
example.com IN MX 10 example.com IN MX 10
mail.example.com fortimail.example.com
1 IN PTR fortimail.example.com
If you choose to add a private DNS server, to configure the FortiMail unit to use it, go to System
> Network > DNS in the advanced mode of the web UI.
External
Email Server
internal wan1
Switch 172.16.1.1
1.1 10.10.10.1
10.1
port1
p or
172.16.1.5
The private DNS server is configured to locally replicate records from public DNS servers for
most domains, with the exception of records for protected domains, which instead have been
configured differently locally in order to support the Use MX record option.
To deploy the FortiMail unit behind a NAT device such as a firewall or router, you must complete
the following:
• Configuring the firewall
• Configuring the MUAs
• Testing the installation
This example assumes you have already completed the Quick Start Wizard and configured
records on the DNS server for each protected domain. For details, see “Running the Quick Start
Wizard” on page 39 and “Configuring DNS records” on page 46.
The following procedures use a FortiGate unit running FortiOS v3.0 MR7. If you are using a
different firewall appliance, consult the appliance’s documentation for completing similar
configurations.
For more information on protocols and port numbers used by FortiMail units, see Fortinet
Communication Ports and Protocols at http://docs.fortinet.com.
Destination Port
To add virtual IPs, the FortiGate unit must be operating in NAT mode.
5. Select NAT.
6. Select OK.
dmz
192.168.1.1 wan1
1
10.10.10.1 Switch
internal
172.16.1.1 port1
(virtual IP: 10.10.10.5
172.16.1.2)
DNS Server
Protected Domain: example.com IN M 10 fortimail.example.com
exa
example.com
example.com fortimail IN A 10.10.10.5
To deploy the FortiMail unit in front of a NAT device such as a firewall or router, you must
complete the following:
• Configuring the firewall
• Configuring the MUAs
• Testing the installation
This example assumes you have already completed the Quick Start Wizard and configured
records on the DNS server for each protected domain. For details, see “Running the Quick Start
Wizard” on page 39 and “Configuring DNS records” on page 46.
The following procedures use a FortiGate unit running FortiOS v3.0 MR7. If you are using a
different firewall appliance, consult the appliance’s documentation for completing similar
configurations.
5. Select OK.
5. Select OK.
5. Select OK.
To add a service group for internal email user and protected server traffic to the FortiMail
unit
1. Access FortiGate.
2. Go to Firewall > Service > Group.
3. Select Create New.
4. In Group Name, enter a name to identify the service group entry, such as
SMTP_quar_services.
5. In the Available Services area, select HTTP, HTTPS, and SMTP, then select the right arrow to
move them to the Members area.
6. Select OK.
To add a service group for POP3 and IMAP traffic to the protected email server
1. Access FortiGate.
2. Go to Firewall > Service > Group.
3. Select Create New.
To add virtual IPs, the FortiGate unit must be operating in NAT mode.
5. Select OK.
5. Select OK.
5. Select NAT.
6. Select OK.
5. Select NAT.
6. Select OK.
5. Select NAT.
6. Select OK.
5. Select NAT.
6. Select OK.
Email Domain:
Local Email Users example.com
Internal Email Server Remote Email Users
172.16.1.10
External
Email Server
internal
172.16.1.1
(virtual IP: wan1
172.16.1.2)) 10.10.10.1
1
Switch
S it h dmz
192.168.1.1
168 1 1
(virtual IP:
192.168.1.2)
port1
192.168.1.5
DNS Server
example.com IN M 10 fortimail.example.com
ex
fortimail IN A 10.10.10.1
Protected Domain:
example.com
example.com
This example assumes you have already completed the Quick Start Wizard and configured
records on the DNS server for each protected domain. For details, see “Running the Quick Start
Wizard” on page 39 and “Configuring DNS records” on page 46.
The following procedures use a FortiGate unit running FortiOS v3.0 MR7. If you are using a
different firewall appliance, consult the appliance’s documentation for completing similar
configurations.
5. Select OK.
5. Select OK.
For more information on protocols and port numbers used by FortiMail units, see Fortinet
Communication Ports and Protocols at http://docs.fortinet.com.
Destination Port
5. Select OK.
Destination Port
5. Select OK.
To add a service group for internal email user traffic to the FortiMail unit
1. Access FortiGate.
To add a service group for POP3 and IMAP traffic to the protected email server
1. Access FortiGate.
2. Go to Firewall > Service > Group.
3. Select Create New.
4. In Group Name, enter a name to identify the service group entry, such as
PO3_IMAP_services.
5. In the Available Services area, select POP3 and IMAP, then select the right arrow to move
them to the Members area.
6. Select OK.
To add virtual IPs, the FortiGate unit must be operating in NAT mode.
5. Select OK.
5. Select OK.
5. Select OK.
5. Select OK.
5. Select NAT.
6. Select OK.
5. Select OK.
5. Select NAT.
6. Select OK.
5. Select NAT.
6. Select OK.
The following procedures and examples show you how to deploy the FortiMail unit in
transparent mode.
• Configuring DNS records
• Example 1: FortiMail unit in front of an email server
• Example 2: FortiMail unit in front of an email hub
• Example 3: FortiMail unit for an ISP or carrier
If you are unfamiliar with configuring DNS and related MX and A records, first read “The role of
DNS in email delivery” on page 9.
For performance reasons, and to support some configuration options, you may also want to
provide a private DNS server for exclusive use by the FortiMail unit.
This section includes the following:
• Configuring DNS records for the FortiMail unit itself
• Configuring a private DNS server
Protected Domain:
@example.com
Transparent Mode
Router 10.10.10.1
port2
port1 Remote Email Users
Table 6: Public versus private DNS records when “Use MX Record” is enabled
example.com IN MX 10 example.com IN MX 10
mail.example.com mail.example.com
If you choose to add a private DNS server, to configure the FortiMail unit to use it, go to System
> Network > DNS in the advanced mode of the web UI.
This example assumes that the FortiMail unit is protecting a single email server. If your FortiMail
unit is protecting multiple email servers and they are not on the same subnet, you must first
remove some network interfaces from the bridge and configure static routes. For an example of
configuring out-of-bridge network interfaces, see “Removing the network interfaces from the
bridge” on page 88.
Protected Domain:
@example.com
Transparent Mode
Router 10.10.10.1
port2
port1 Remote Email Users
To deploy the FortiMail unit in front of an email server, you must complete the following:
• Configuring the protected domains and session profiles
• Configuring the proxies and implicit relay
• Testing the installation
This example assumes you have already completed the Quick Start Wizard. For details, see
“Running the Quick Start Wizard” on page 39.
This server is on Select the network interface (port) to which the protected
SMTP server is connected.
(transparent mode only)
Note: Selecting the wrong network interface will result in
the FortiMail sending email traffic to the wrong network
interface.
Hide the transparent Enable to preserve the IP address or domain name of the
box SMTP client for incoming email messages in:
(transparent mode only) • the SMTP greeting (HELO/EHLO) in the envelope and in
the Received: message headers of email messages
• the IP addresses in the IP header
This masks the existence of the FortiMail unit to the
protected SMTP server.
Disable to replace the SMTP client’s IP address or domain
name with that of the FortiMail unit.
Note: If the protected SMTP server applies rate limiting
according to IP addresses, enabling this option can
improve performance. The rate limit will then be separate
for each client connecting to the protected SMTP server,
rather than shared among all connections handled by the
FortiMail unit.
Note: Unless you have enabled Take precedence over
recipient based policy match in the IP-based policy, this
option has precedence over the Hide this box from the mail
server option in the session profile, and may prevent it from
applying to incoming email messages.
Note: This function does not take effect if the email is sent
from protected domains to protected domains.
Use this domain’s SMTP Enable to allow SMTP clients to send outgoing email
server to deliver the directly through the protected SMTP server.
mail
Disable to, instead of allowing a direct connection, proxy
(transparent mode only) the connection using the incoming proxy, which queues
email messages that are not immediately deliverable.
4. Select OK.
Hide this box from the Enable to preserve the IP address or domain name of the
mail server SMTP client in:
(transparent mode only) • the SMTP greeting (HELO/EHLO) and in the Received:
message headers of email messages
• the IP addresses in the IP header
This masks the existence of the FortiMail unit.
Disable to replace the IP addresses or domain names with
that of the FortiMail unit.
Note: Unless you have enabled Take precedence over
recipient based policy match in the IP-based policy, the
Hide the transparent box option in the protected domain
has precedence over this option, and may prevent it from
applying to incoming email messages.
4. Select OK.
5. Repeat the previous three steps for each IP-based policy.
In this deployment example, incoming connections arriving on port2 must be scanned before
traveling to the main email server, and therefore are configured to be Proxy — that is, picked up
by the implicit relay.
Outgoing connections arriving on port1 will contain email that has already been scanned once,
during SMTP clients’ relay to the main email server. Scanning outgoing connections again using
either the outgoing proxy or the implicit relay would waste resources. Therefore outgoing
connections will be Pass through.
Port 2
If Use client-specified SMTP server to send email is disabled under System > Mail Settings >
Proxies, and an SMTP client is configured to authenticate, you must configure and apply an
authentication profile. Without the profile, authentication with the built-in MTA will fail. Also, the
mail server must be explicitly configured to allow relay in this case.
External
Email Server
Router
WAN
port2
port1
To deploy the FortiMail unit in front of one or more email servers, you must complete the
following:
• Configuring the protected domains and session profiles
• Configuring the proxies and implicit relay
• Testing the installation
This example assumes you have already completed the Quick Start Wizard. For details, see
“Running the Quick Start Wizard” on page 39.
This server is on Select the network interface (port) to which the protected
SMTP server is connected.
(transparent mode only)
Note: Selecting the wrong network interface will result in
the FortiMail sending email traffic to the wrong network
interface.
Hide the transparent Enable to preserve the IP address or domain name of the
box SMTP client for incoming email messages in:
(transparent mode only) • the SMTP greeting (HELO/EHLO) in the envelope and in
the Received: message headers of email messages
Note: This function does
not take effect if the email • the IP addresses in the IP header
is sent from protected This masks the existence of the FortiMail unit to the
domains to protected protected SMTP server.
domains.
Disable to replace the SMTP client’s IP address or domain
name with that of the FortiMail unit.
Note: If the protected SMTP server applies rate limiting
according to IP addresses, enabling this option can
improve performance. The rate limit will then be separate
for each client connecting to the protected SMTP server,
rather than shared among all connections handled by the
FortiMail unit.
Note: Unless you have enabled Take precedence over
recipient based policy match in the IP-based policy, this
option has precedence over the Hide this box from the mail
server option in the session profile, and may prevent it from
applying to incoming email messages.
Note: This function does not take effect if the email is sent
from protected domains to protected domains.
Use this domain’s SMTP Enable to allow SMTP clients to send outgoing email
server to deliver the directly through the protected SMTP server.
mail
Disable to, instead of allowing a direct connection, proxy
(transparent mode only) the connection using the incoming proxy, which queues
email messages that are not immediately deliverable.
4. Select OK.
Hide this box from the Enable to preserve the IP address or domain name of the
mail server SMTP client in:
(transparent mode only) • the SMTP greeting (HELO/EHLO) and in the Received:
message headers of email messages
• the IP addresses in the IP header
This masks the existence of the FortiMail unit.
Disable to replace the IP addresses or domain names with
that of the FortiMail unit.
Note: Unless you have enabled Take precedence over
recipient based policy match in the IP-based policy, the
Hide the transparent box option in the protected domain
has precedence over this option, and may prevent it from
applying to incoming email messages.
4. Select OK.
5. Repeat the previous three steps for each IP-based policy.
In this deployment example, incoming connections arriving on port2 must be scanned before
traveling to the main email server, and therefore are configured to be Proxy — that is, picked up
by the implicit relay.
Outgoing connections arriving on port1 will contain email that has already been scanned once,
during SMTP clients’ relay to the main email server. In addition, outgoing connections by the
main mail server will be encrypted using TLS. Encrypted connections cannot be scanned.
Therefore outgoing connections will be passed through, and neither proxied nor implicitly
relayed.
Port 2
For increased session-handling capacity, multiple FortiMail units could be clustered into a
config-only HA group and deployed behind a load balancer that is attached to the router.
Connections to the same source IP address would be handled by the same FortiMail unit to
avoid sessions split among multiple units, and to maintain the accuracy of IP statistics.
Otherwise, attach a single FortiMail unit to the router.
External MTA
SMTP SESSIONS
TO INTERNAL
IPs
SMTP SESSIONS
TO EXTERNAL
IPs
RADIUS ACCOUNTING
NOTICES OF TRANSPARENT MODE
CURRENT SUBSCRIBER CONFIG-ONLY HA
IP ADDRESSES
Load Balancer
port2
t2
Subscsriber
Network Administrator
DSLAM GGSN
DSL Subscriber
Each network interface in the dual-arm attachment (port2 and port3) is removed from the
Layer 2 bridge, and is configured with its own IP address. This reduces the possibility of
Ethernet loops and improves compatibility with other filtering devices.
Because port1 cannot be removed from the bridge, and the management IP is accessible from
any bridging network interface, port1 is reserved for direct connections from the administrator's
computer. (If the administrator’s computer is not directly connected but is instead part of a
management LAN, a route must also be configured for port1.)
Network address translation (NAT) must not occur on any device between the FortiMail unit and
SMTP clients, such as subscribers and external MTAs. Antispam scans involving the SMTP
client’s IP address, such as sender reputation, carrier endpoint reputation, session rate limits,
and mail rate limits, require the ability to correctly identify each source of email by its unique IP
address in order to operate correctly. NAT would interfere with this requirement.
Full transparency is configured. Popular email services such as Microsoft Hotmail may rate limit
by an SMTP client’s IP address in order to reduce spam. If the FortiMail unit were not
transparent to those mail servers, all SMTP connections from your subscribers would appear to
come from the FortiMail unit. The result is that external mail servers could throttle the
connections of all subscribers behind the FortiMail unit. To prevent this, each individual SMTP
client’s IP address should be visible to external MTAs. NAT therefore would also interfere with
the requirement of transparency.
You could configure ACLs to reject SMTP connections from specific IP addresses if required by
your security policy.However, in this example, because no protected domains are configured,
ACLs are not required. For connections to unprotected SMTP servers, the implicit ACL permits
the connection if no other ACL is configured.
To prevent SMTP clients’ access to open relays, the outgoing proxy will require all connections
to be authenticated using the SMTP AUTH command, but will not apply authentication profiles
on behalf of the SMTP servers, as no protected domains are configured. It will also not interfere
with command pipelining. However, the outgoing proxy will be configured to block TLS
connections, whose encryption would prevent the FortiMail unit from being able to scan the
connection.
The outgoing proxy is enabled. Unlike other transparent mode deployments, because no
protected domains are defined, all connections will be considered to be outgoing — that is,
destined for an SMTP server whose IP address is not configured in the SMTP server field in a
protected domain. As a result, all connections will be handled by the outgoing proxy. The
built-in MTA will never be implicitly used, and the incoming proxy will never be used. If a
destination SMTP server is unavailable, the outgoing proxy will refuse the connection. The
FortiMail unit will not queue undeliverable mail. Instead, each SMTP client will be responsible
for retrying its own delivery attempts.
Unlike other FortiMail deployments, because the ISP or carrier uses a RADIUS server to
authenticate and/or track the currently assigned IP addresses of subscribers, the FortiMail unit
can combat spam using the carrier endpoint reputation feature.
The FortiMail unit scans SMTP connections originating from both the internal and external
network.
• Scanning connections from the external network protects subscribers from viruses and
spam.
• Scanning connections from the internal network protects subscribers’ service levels and
reduces cost of operation to the ISP or carrier by preventing its public IP addresses from
being added to DNS block list (DNSBL) servers.
Why should you scan email originating from the internal network?
Spammers often use a subscriber account to send spam, either by purchasing temporary
Internet access or, increasingly, by infecting subscriber’s computers or phones. Infected
devices become part of a botnet that can be used to infect more devices, and to send spam.
Because many mail servers use DNSBL to combat spam, if a subscriber’s IP address is added
to a DNSBL, it can instantly cause email service interruption. If the subscriber’s IP address is
dynamic rather than static, when the spammer’s IP address is reassigned to another subscriber,
this can cause problems for an innocent subscriber. Even worse, if many subscribers on your
network share a single public IP address, if that single IP address is blocklisted, all of your
customers could be impacted.
Protecting the public range of IP addresses from being blocklisted is essential for service
providers to be able to guarantee a service level to subscribers.
In addition to jeopardizing customer retention, spam originating from your internal network can
also cost money and time. Spam consumes bandwidth and network resources. Tracking which
in your block of IPs is currently blocklisted, and paying to have them de-listed, can be a
significant recurring cost.
This example assumes you have already completed the Quick Start Wizard. For details, see
“Running the Quick Start Wizard” on page 39.
To configure the session profile for connections from external SMTP clients
1. Go to Profile > Session in the advanced mode of the web UI.
2. Select New.
3. In Profile Name, type a name for the session profile, such as
external_session_profile.
4. Configure the following:
Connection Settings
Hide this box from the Enable to preserve the IP address or domain name of the
mail server SMTP client in:
(transparent mode only) • the SMTP greeting (HELO/EHLO) and in the Received:
message headers of email messages
• the IP addresses in the IP header
This masks the existence of the FortiMail unit.
Sender Reputation
Throttle client at Enter a sender reputation score over which the FortiMail
unit will rate limit the number of email messages that can
be sent by this SMTP client.
The enforced rate limit is either Restrict number of email
per hour to n or Restrict email to n percent of the previous
hour, whichever value is greater.
Restrict number of Enter the maximum number of email messages per hour
email per hour to that the FortiMail unit will accept from a throttled SMTP
client.
Temporarily fail client at Enter a sender reputation score over which the FortiMail
unit will return a temporary failure error when the SMTP
client attempts to initiate a connection.
Reject client at Enter a sender reputation score over which the FortiMail
unit will return a permanent rejection error when the SMTP
client attempts to initiate a connection.
Session Settings
Prevent open relaying Enable to prevent clients from using open relays to send
email by blocking sessions that are unauthenticated.
(transparent mode only)
(Unauthenticated sessions are assumed to be occurring to
an open relay.)
If you permit SMTP clients to use open relays to send
email, email from their domain could be blocklisted by
other SMTP servers.
5. Select Create.
To configure the session profile for connections from internal SMTP clients
1. Go to Profile > Session in the advanced mode of the web UI.
2. Select New.
3. In Profile Name, type a name for the session profile, such as
internal_session_profile.
4. Configure the following:
Connection Settings
Hide this box from the Enable to preserve the IP address or domain name of the
mail server SMTP client in:
(transparent mode only) • the SMTP greeting (HELO/EHLO) and in the Received:
message headers of email messages
• the IP addresses in the IP header
This masks the existence of the FortiMail unit.
Do not let client connect Enable to prevent clients from connecting to SMTP servers
to blocklisted SMTP that have been blocklisted in antispam profiles or, if
servers enabled, the FortiGuard AntiSpam service.
(transparent mode only)
Auto blocklist score Enter the endpoint reputation score over which the
trigger value FortiMail unit will add the MSISDN/subscriber ID to the
automatic blocklist.
The trigger score is relative to the period of time configured
as the automatic blocklist window.
Session Settings
Prevent open relaying Enable to prevent clients from using open relays to send
email by blocking sessions that are unauthenticated.
(transparent mode only)
(Unauthenticated sessions are assumed to be occurring to
an open relay.)
If you permit SMTP clients to use open relays to send
email, email from their domains could be blocklisted by
other SMTP servers.
To configure the IP-based policy for connections from internal SMTP clients
1. Go to Policy > IP Policy in the advanced mode of the web UI.
To move a policy
1. Select the new IP policy and click Move.
A menu appears with four choices: Down, Up, after, Before.
2. Do one of the following:
• Select Up to move it one position in that direction and repeat the movement until the new
record is in the top position.
• Select Before. A dialog appears.
• In the field beside Move right before, enter 1.
• Click OK
Your new policy for internal SMTP clients should now appear above the default policy, in the
row whose index number is 1.
To configure the IP-based policy for connections from external SMTP clients
1. Go to Policy > IP Policy in the advanced mode of the web UI.
2. Select Edit for the default policy whose Match column contains
0.0.0.0/0 --> 0.0.0.0/0.
3. From Session, select external_session_profile.
4. From AntiSpam, select the name of an antispam profile. When this profile detects spam, it
will affect the SMTP client’s sender reputation score.
5. From AntiVirus, select the name of an antivirus profile. When this profile detects a virus, it will
affect the SMTP client’s sender reputation score.
6. Select OK.
In this deployment example, there are no protected domains; therefore, all connections are
outgoing. In addition, per-domain and per-recipient Bayesian databases and per-recipient
quarantines do not exist and, therefore, the FortiMail unit does not need to receive local SMTP
connections in order to train databases or delete or release a domain’s recipient’s quarantined
email.
The FortiMail unit must not expend resources to queue undeliverable email, nor reroute
connections, and therefore it must not implicitly use its built-in MTA. Instead, it must always use
its outgoing proxy by enabling Use client-specified SMTP server to send email under System >
Mail Settings > Proxies. Because port1 is used exclusively for administration, the outgoing
proxy must be configure to pick up outgoing connections only on port2 and port3.
Port 2
Port 3
Unlike other deployments, this deployment requires that SMTP clients be configured to use the
SMTP AUTH command, and not to use TLS. Before testing, you should verify that SMTP clients
that will connect for themselves through the FortiMail unit meet those requirements. If some
subscribers require TLS or do not use authentication, consider first making separate session
profiles and IP-based policies for those subscribers.
The following procedures and examples show you how to deploy the FortiMail unit in server
mode.
• Configuring DNS records
• Example 1: FortiMail unit behind a firewall
• Example 2: FortiMail unit in front of a firewall
• Example 3: FortiMail unit in DMZ
If you are unfamiliar with configuring DNS and related MX and A records, first read “The role of
DNS in email delivery” on page 9.
For performance reasons, you may also want to provide a private DNS server for use exclusively
by the FortiMail unit.
This section includes the following:
• Configuring DNS records for protected domains
• Configuring DNS records for the FortiMail unit itself
• Configuring a private DNS server
If your FortiMail unit will operate in server mode, configure the MX record to refer to the
FortiMail unit, and remove other MX records. If you fail to do so, external MTAs may not be able
to deliver email to or through the FortiMail unit, or may be able to bypass the FortiMail unit by
using the other MX records. If you have configured secondary MX records for failover reasons,
consider configuring FortiMail high availability (HA) instead. For details, see “FortiMail high
availability modes” on page 24.
An A record must also exist to resolve the host name of the FortiMail unit into an IP address.
For example, if the MX record indicates that fortimail.example.com is the email gateway for a
domain, you must also configure an A record in the example.com zone file to resolve
fortimail.example.com into a public IP address:
fortimail IN A 10.10.10.1
where 10.10.10.1 is either the public IP address of the FortiMail unit, or a virtual IP address
on a firewall or router that maps to the private IP address of the FortiMail unit.
If your FortiMail unit will relay outgoing email, you should also configure the public reverse DNS
record. The public IP address of the FortiMail unit, or the virtual IP address on a firewall or router
that maps to the private IP address of the FortiMail unit, should be globally resolvable into the
FortiMail unit’s FQDN. If it is not, reverse DNS lookups by external SMTP servers will fail.
For example, if the public network IP address of the FortiMail unit is 10.10.10.1, a public DNS
server’s reverse DNS zone file for the 10.10.10.0/24 subnet might contain:
1 IN PTR fortimail.example.com.
where fortimail.example.com is the FQDN of the FortiMail unit.
External
Email Server
internal
172.16.1.1
wan1
dmz Virtu
Virtual IP 10.10.10.1:25
192.168.1.1 mapped to 192.168.1.5:25
port1
Private DNS Server 192.168.1.5
Public DNS Server
example.com IN M 10 fortimail.example.com
fortimail IN A 10.10.10.1
Server Mode
Email Domain:
example.com
If the FortiMail unit is operating in server mode, the private DNS server should contain identical
records to a public DNS server.
If you choose to add a private DNS server, to configure the FortiMail unit to use it, go to System
> Network > DNS in the advanced mode of the web UI.
External
Email Server
internal wan1
Switch 172.16.1.1
.1 10.10.10.1
1
port1
172.16.1.5
5
DNS Server
Email Domain: example.com IN M 10 fortimail.example.com
example.com fortimail IN A 10.10.10.1
To deploy the FortiMail unit behind a NAT device such as a firewall or router, you must complete
the following:
• Configuring the firewall
• Configuring the email user accounts
• Configuring the MUAs
• Testing the installation
This example assumes you have already completed the Quick Start Wizard and configured
records on the DNS server for each protected domain. For details, see “Running the Quick Start
Wizard” on page 39 and “Configuring DNS records” on page 94.
The following procedures use a FortiGate unit running FortiOS v3.0 MR7. If you are using a
different firewall appliance, consult the appliance’s documentation for completing similar
configurations.
5. Select OK.
For more information on protocols and port numbers used by FortiMail units, see the Fortinet
Knowledge Center article FortiMail Traffic Types and TCP/UDP Ports.
Destination Port
5. Select OK.
Destination Port
5. Select OK.
To add virtual IPs, the FortiGate unit must be operating in NAT mode.
5. Select OK.
5. Select OK.
5. Select NAT.
6. Select OK.
External
Email Server
internal
172.16.1.1 Switch
wan1
10.10.10.1
port1 Router
10.10.10.5
DNS Server
Email Domain: example.com IN M 10 fortimail.example.com
example.com fortimail IN A 10.10.10.5
To deploy the FortiMail unit in front of a NAT device such as a firewall or router, you must
complete the following:
• Configuring the firewall
• Configuring the email user accounts
• Configuring the MUAs
• Testing the installation
This example assumes you have already completed the Quick Start Wizard and configured
records on the DNS server for each protected domain. For details, see “Running the Quick Start
Wizard” on page 39 and “Configuring DNS records” on page 94.
The following procedures use a FortiGate unit running FortiOS v3.0 MR7. If you are using a
different firewall appliance, consult the appliance’s documentation for completing similar
configurations.
5. Select OK.
5. Select OK.
To add a service group for email user traffic to the FortiMail unit
1. Access FortiGate.
2. Go to Firewall > Service > Group.
3. Select Create New.
4. In Group Name, enter a name to identify the service group entry, such as
local_email_users_services.
5. Select NAT.
6. Select OK.
LocalEm ailUsers
Rem ote Em ailUsers
External
EmailerSver
internal
172.16.1.1
w an1
dmz VitualIP 10.10.10.1:25
mapped ot 192.168.1.5:25
192.168.1.1
port1
192.168.1.5
Private DNS Server
Public DNS Server
exam ple.com IN M X 10 fortim ail.exam ple.com
fortim ailIN A 10.10.10.1
Server M ode
Email omain:
D
@ exam ple.com
To deploy the FortiMail unit in the DMZ of a NAT device such as a firewall or router, you must
complete the following:
• Configuring the firewall
• Configuring the email user accounts
• Configuring the MUAs
• Testing the installation
This example assumes you have already completed the Quick Start Wizard and configured
records on the DNS server for each protected domain. For details, see “Running the Quick Start
Wizard” on page 39 and “Configuring DNS records” on page 94.
Note: The following procedures use a FortiGate unit running FortiOS v3.0 MR7. If you are using a different
firewall appliance, consult the appliance’s documentation for completing similar configurations.
5. Select OK.
4. Select OK.
For more information on protocols and port numbers used by FortiMail units, see the Fortinet
Knowledge Center article FortiMail Traffic Types and TCP/UDP Ports.
Destination
Port
5. Select OK.
Destination Port
To add a service group for email user traffic to the FortiMail unit
1. Access FortiGate.
2. Go to Firewall > Service > Group.
3. Select Create New.
4. In Group Name, enter a name to identify the service group entry, such as
local_email_users_services.
5. In the Available Services area, select HTTP, HTTPS, SMTP, POP3, and IMAP, then select the
right arrow to move them to the Members area.
6. Select OK.
5. Select OK.
5. Select OK.
5. Select NAT.
6. Select OK.
5. Select OK.
After completing the installation, test it by sending email between legitimate SMTP clients and
servers at various points within your network topology.
If the FortiMail unit is operating in gateway mode or transparent mode, you may also wish to
test access of email users to their per-recipient quarantined email.
If the FortiMail unit is operating in server mode, you may also wish to test access to FortiMail
webmail, POP3, and/or IMAP.
External
SMTP
Email Server
connection
Internal test paths
Email Server Switch
Quarantine
connection
test paths
External
SMTP
Email Server
connection
Private test paths
DNS Server Switch
Quarantine
connection
test paths
Transparent Mode
Public DNS Server
Internal
Email Server
External
SMTP
Email Server
connection
test paths
Private Webmail
DNS Server POP3/IMAP
connection
test paths
Server Mode
Public DNS Server
To verify all SMTP connections to and from your FortiMail unit, consider both internal and
external recipient email addresses, as well as all possible internal and external SMTP clients
and servers that will interact with your FortiMail unit, and send email messages that test the
connections both to and from each of those clients and servers. For example:
1. Using an SMTP client on the local network whose MTA is the FortiMail unit or protected
email server, send an email from an internal sender to an internal recipient.
2. Using an SMTP client on the local network whose MTA is the FortiMail unit or protected
email server, send an email from an internal sender to an external recipient.
3. Send an email from an external sender to an internal recipient.
4. If you have remote SMTP clients such as mobile users or branch office SMTP servers, using
an SMTP client on the remote network whose MTA is the FortiMail unit or protected email
server, send an email from an internal sender to an internal recipient.
5. If you have remote SMTP clients such as mobile users or branch office SMTP servers, using
an SMTP client on the remote network whose MTA is the FortiMail unit or protected email
server, send an email from an internal sender to an external recipient.
If you cannot connect, receive error messages while establishing the connection, or the
recipient does not receive the email message, verify your configuration, especially:
• routing and policy configuration of intermediary NAT devices such as firewalls or routers
• connectivity of the FortiMail unit with the Fortinet Distribution Network (FDN)
• external email servers’ connectivity with and the configuration of the public DNS server that
hosts the MX records, A records, and reverse DNS records for your domain names
• the FortiMail unit’s connectivity with and the configuration of the local private DNS server (if
any) that caches records for external domain names and, if the Use MX record option is
enabled, hosts private MX records that refer to your protected email servers
• access control rules on your FortiMail unit
• configuration of MUAs, including the IP address/domain name of the SMTP and POP3/IMAP
server, authentication, and encryption (such as SSL or TLS)
For information on tools that you can use to troubleshoot, see “Troubleshooting tools” on
page 117.
Both ping and traceroute require that network nodes respond to ICMP ping. If you have
disabled responses to ICMP on your network, hosts may appear to be unreachable to ping and
traceroute, even if connections using other protocols can succeed.
If the host is not reachable, you can use traceroute to determine the router hop or host at which
the connection fails:
FortiMail-400 # execute traceroute 192.168.1.10
traceroute to 192.168.1.10 (192.168.1.10), 32 hops max, 72 byte
packets
1 192.168.1.2 2 ms 0 ms 1 ms
2 * * *
Nslookup
It is critical that FortiMail has good access to DNS services to properly handle SMTP sessions
and apply antispam scans, including FortiGuard Antispam. If DNS queries fail, they will be
recorded in the event log under Monitor > Log > System Event.
If a DNS query fails or resolves incorrectly, you may want to manually query your DNS server to
verify that the records are correctly configured. You can do this from the FortiMail unit using CLI
commands.
For example, you might query for the mail gateway of the domain example.com (commands
that you would type are highlighted in bold; responses from the FortiMail unit are not bolded):
FortiMail-400 # execute nslookup mx example.com
example.com mail exchanger = 10 mail.example.com.
Like verifying DNS connectivity and configuration from the FortiMail unit, you may also be able
to verify DNS connectivity and configuration from protected and external mail servers using
similar commands. This can be necessary if the devices are configured to use different DNS
servers. For details, see the documentation for those mail servers.
If extended SMTP error codes are installed and enabled on the target SMTP server, a manual
Telnet connection may enable you to view additional error descriptions. For example, the
enhanced error code 4.3.2 Please Try Again Later may notify you that a temporary
condition exists preventing delivery, such as greylisting or service unavailability, and that the
SMTP client should try delivery again later.
How you should establish the connection depends on the origin and destination of the SMTP
connection that you want to test, either:
• From the FortiMail unit to an SMTP server
• To or through the FortiMail unit
Log messages
Log messages often contain clues that can aid you in determining the cause of a problem.
FortiMail units can record log messages when errors occur that cause failures, upon significant
changes, and upon processing events.
Depending on the type, log messages may appear in either the history, event, antivirus, or
antispam logs. For example:
• To determine when and why an email was quarantined, you might examine the Classifier and
Disposition fields in the history log.
• To determine if an antiSpam scan query was able to reach the FDN, you might examine the
Message field in the antispam log.
During troubleshooting, you may find it useful to reduce the logging severity threshold for more
verbose logs, to include more information on less severe events.
For example, when the FortiMail unit cannot reach the FDN or override server for FortiGuard
Antispam queries, the associated log message in the antispam log has a severity level of
Notification. If your severity threshold is currently greater than Notification (such as Warning or
Error), the FortiMail unit will not record that log message, and you will not be notified of the error.
Often this error might occur due to temporary connectivity problems, and is not critical.
However, if you are frequently encountering this issue, you may want to lower the severity
threshold to determine how often the issue is occurring and whether the cause of the problem is
persistent.
Similar to how the FortiMail unit will not record log messages below the severity threshold, if the
FortiMail unit is not enabled to record event, history, antivirus, and antispam log messages, you
will not be able to analyze the log messages for events of that type. During troubleshooting, be
sure that log messages are enabled for the type of event that you want to analyze.
To configure the severity threshold, go to Log and Report > Log Setting and set the logging level
on one or both of the tabs. To enable logging of different types of events, select applicable
options under Logging Policy Configuration on either or both tabs.
If this menu path is not available, first select Advanced to switch to the advanced mode of the
web UI.
If these menu paths are not available, first select Advanced >> to switch to the advanced mode
of the web UI.
If these menu paths are not available, first select Advanced >> to switch to the advanced mode
of the web UI.
Packet capture
Packet capture, also known as sniffing, records some or all of the packets seen by a network
interface. By recording packets, you can trace connection states to the exact point at which
they fail, which may help you to diagnose some types of problems that are otherwise difficult to
detect.
FortiMail units have a built-in sniffer. To use the built-in sniffer, go to System > Network > Traffic
Capture, or connect to the CLI and enter the following command:
diagnose sniffer packet <interface_str> '<filter_str>'
<verbosity_level_int> <packet_count_int>
Packet capture can be very resource intensive. To minimize the performance impact on your
FortiMail unit, use packet capture only during periods of minimal traffic, with a serial console
CLI connection rather than a Telnet or SSH CLI connection, and be sure to stop the command
when you are finished.
For example, you might selectively capture packets for FortiGuard Antispam queries occurring
through port1 (commands that you would type are highlighted in bold; responses from the
FortiMail unit are not bolded):
FortiMail-400 # diag sniffer packet port1 'udp port 8889' 3
2.685841 172.16.1.10.47319 -> 212.95.252.120.8889: udp 64
0x0000 0009 0f84 27fe 0009 0f15 02e8 0800 4500....'.........E.
0x0010 005c 0000 4000 4011 44ff ac14 78a5 d45f.\..@[email protected].._
0x0020 fc78 b8d7 22b9 0048 9232 6968 726a b3c5.x.."..H.2ihrj..
0x0030 776c 2d2f 5a5f 545e 4555 5b5f 425b 545fwl-/Z_T^EU[_B[T_
0x0040 4559 6b6a 776b 646e 776c 6b6a 772b 646eEYkjwkdnwlkjw+dn
0x0050 776c 6b6a 776b 646e 776c 6b6a 776b 86a9wlkjwkdnwlkjwk..
0x0060 db73 21e1 5622 c618 7d6c .s!.V"..}l
Instead of reading packet capture output directly in your CLI display, you usually should save
the output to a plain text file using your CLI client. Saving the output provides several
advantages. Packets can arrive more rapidly than you may be able to read them in the buffer of
your CLI display, and many protocols transfer data using encodings other than US-ASCII. It is
usually preferable to analyze the output by loading it into in a network protocol analyzer
application such as Wireshark (http://www.wireshark.org/).
For example, you could use PuTTY or Microsoft HyperTerminal to save the sniffer output.
Methods may vary. See the documentation for your CLI client.
Requirements
• terminal emulation software such as PuTTY
• a plain text editor such as Notepad
• a Perl interpreter
• network protocol analyzer software such as Wireshark
A dialog appears where you can configure PuTTY to save output to a plain text file.
5. In the Category tree on the left, go to Session > Logging.
6. In Session logging, select Printable output.
7. In Log file name, click the Browse button, then choose a directory path and file name such
as C:\Users\MyAccount\packet_capture.txt to save the packet capture to a plain
text file. (You do not need to save it with the .log file extension.)
8. Click Apply.
9. Press Enter to send the CLI command to the FortiMail unit, beginning packet capture.
10.If you have not specified a number of packets to capture, when you have captured all
packets that you want to analyze, press Ctrl + C to stop the capture.
11.Close the PuTTY window.
12.Open the packet capture file using a plain text editor such as Notepad.
The fgt2eth.pl script is provided as-is, without any implied warranty or technical support, and
requires that you first install a Perl module compatible with your operating system.
To use fgt2eth.pl, open a command prompt, then enter a command such as the following:
Once you have tested your basic installation and verified that it functions correctly, create a
backup. This “clean” backup can be used to:
• troubleshoot a non-functional configuration by comparing it with this functional baseline
• rapidly restore your installation to a simple yet working point
The following procedures only produce a backup of the configuration file. If you have also
configured other settings such as block/safe lists, dictionaries, and the Bayesian databases,
you should back them up as well.
Variable Description
<file-name_str> Type the file name of the backup.
<server_ipv4> Type the IP address or domain name of the server.
[<backup-password_s Optional. Type the password that will be used to encrypt the
tr>] backup file.
Caution: Do not lose this password. You will need to enter this
same password when restoring the backup file in order for the
appliance to successfully decrypt the file. If you cannot remember
the password, the backup cannot be used.
For example, the following command backs up a FortiMail-3000C’s configuration file to a file
named FortiMail-3000C.conf in the current directory on the TFTP server 172.16.1.10,
encrypting the backup file using the password P@ssw0rd1:
FortiMail-3000C # execute backup full-config tftp
FortiMail-3000c.conf 172.16.1.10 P@ssw0rd1
Time required varies by the size of the database and the specifications of the appliance’s
hardware, but could take several minutes.
Dashboard displays system statuses, most of which pertain to the entire system, such as CPU
usage and mail statistics.
This section includes:
• Viewing the dashboard
• Using the CLI Console
Dashboard > Status displays first after you log in to the web UI. It contains a dashboard with
widgets that each indicate performance level or other statistics.
By default, widgets display the serial number and current system status of the FortiMail unit,
including uptime, system resource usage, alert messages, host name, firmware version, system
time, and email throughput.
To access this part of the web UI, your administrator account’s:
• Domain must be System
• access profile must have Read-Write permission to the Others category
For details, see “About administrator account permissions and domains” on page 179.
To view the dashboard, go to Dashboard > Status.
Go to Dashboard > Console to access the CLI without exiting from the web UI.
You can click the Open in New Window button to move the CLI Console into a pop-up window
that you can resize and reposition.
For more information about CLI commands, see the FortiMail CLI Reference.
Page 128
Using FortiView
FortiView provides detailed summary of the mail, threat, and IP session statistics.
This section includes:
• Viewing mail statistics
• View threat statistics
• Viewing top user statistics
• Viewing current IP sessions
The FortiView > Mail Statistics > By Count tab contains summaries of the number of email
messages in each time period that the FortiMail unit detected viruses, spam, or neither.
The FortiView > Mail Statistics > By Size tab contains summaries by the file sizes of email
messages in each time period that the FortiMail unit detected viruses, spam, or neither.
For email messages classified as spam, mail statistics include which FortiMail feature classified
the email as spam, such as Bayesian antispam databases, access control rules, the
system-wide block list, or email user-configured block lists.
For email not classified as spam by any antispam scan, mail statistics label it as Not Spam.
In addition to viewing overall trends via the graph, you can also view details at each point in
time. To view these details, hover your mouse over a bar in the graph. A tool tip appears next to
that point on the graph, including the name of the antispam category, message count, and
percentage relative to the overall mail volume at that time.
To use the Mail Statistics tab, first configure your FortiMail unit to detect spam and/or viruses.
For more information, see “Configuring profiles” on page 392 and “Configuring policies” on
page 362.
To access this part of the web UI, your administrator account’s:
• Domain must be System
• access profile must have Read or Read-Write permission to the Others category
For details, see “About administrator account permissions and domains” on page 179.
Go to FortiView > Threat Statistics to view the summary of spam and virus mail. The
FortiSandbox scan results are also summarized under FortiView > Threat Statistics >
FortiSandbox Statistics.
The FortiView > Top User Statistics tab displays the top email senders and recipients, top virus
sender and recipients, and top spam senders and recipients.
Page 129
By default, this tab is hidden. To make this tab visible, use the following hidden CLI commands
to enable it:
config system global
set mailstat-service enable
end
The FortiView > Sessions tab displays information about the TCP sessions in established state,
to and from the FortiMail unit.
To access this part of the web UI, your administrator account’s:
• Domain must be System
• access profile must have Read or Read-Write permission to the Others category
For details, see “About administrator account permissions and domains” on page 179.
The Monitor menu displays system usage, mail queues, log messages, reports, and other
status-indicating items.
It also allows you to manage the contents of the mail queue and quarantines, and the sender
reputation and endpoint reputation scores.
This section includes:
• Viewing log messages
• Managing the quarantines
• Managing the mail queue
• Viewing the greylist statuses
• Viewing sender, authentication and endpoint reputation
• Managing archived email
• Viewing generated reports
The Log submenu displays locally stored log files. If you configured the FortiMail unit to store
log messages locally (that is, to the hard disk), you can view the log messages currently stored
in each log file.
You can also view history log messages from the History Log widget in Monitor > Log > History.
Logs stored remotely cannot be viewed from the web UI of the FortiMail unit. If you require the
ability to view logs from the web UI, also enable local storage. For details, see “Configuring
logging to the hard disk” on page 587.
The Log submenu includes the following tabs, one for each log type:
• History: Where you can view the log of sent and undelivered SMTP email messages.
• System Event: Where you can view the log of administrator activities and system events.
• Mail Event: Where you can view the log of normal email delivery activities.
• AntiVirus: Where you can view the log of email detected as infected by a virus.
• AntiSpam: Where you can view the log of email detected as spam.
• Encryption: Where you can view the log of IBE encryption. For more information about using
IBE, see “Configuring IBE encryption” on page 556.
For more information on log types, see “FortiMail log types” on page 581.
Each tab contains a similar display.
Page 131
The lists are sorted by the time range of the log messages contained in the log file, with the
most recent log files appearing near the top of the list.
For example, the current log file would appear at the top of the list, above a rolled log file whose
time might range from 2008-05-08 11:59:36 Thu to 2008-05-29 10:44:02 Thu.
To access this part of the web UI, your administrator account’s:
• Domain must be System
• access profile must have Read-Write permission to the Others category
For details, see “About administrator account permissions and domains” on page 179.
Start Time Lists the beginning of the log file’s time range.
End Time Lists the end of the log file’s time range.
To view the current page’s worth of the log messages as an HTML table, right-click and select
Export to Table. The table appears in a new tab. To download the table, click and drag to select
the whole table, then copy and paste it into a rich text editor such as Microsoft Word or
OpenOffice Writer.
Select All Select to select all log messages in the current page, so that you can
export all messages to a table.
Export to Table Select to export the selected log messages to a table format. A new tab
named Exported Table appears, displaying the exported information. The
table format allows you to copy the information and paste it elsewhere.
Cross Search Select to search for the log messages triggered by the same email
(Message) message. For details, see “Cross-searching log messages” on page 137.
View Quarantined When viewing quarantine logs on the History tab, select to view the
Message quarantined email message. For details about quarantined email, see
“Managing the quarantines” on page 137.
Release When viewing quarantine logs on the History tab, select one or multiple log
Quarantined entries of the “Quarantine to Review” or “Quarantine” messages, then
Message from the right-click popup menu, select the Release Quarantined Message
option to release the selected message/messages. For details about
quarantined email, see “Managing the quarantines” on page 137.
Some email processing such as mail routing and subject-line tagging modifies the recipient
email address, the sender email address, and/or the subject line of an email message. If you
search for log messages by these attributes, enter your search criteria using text exactly as it
appears in the log messages, not in the email message. For example, you might send an email
message from [email protected]; however, if you have configured mail routing on the
FortiMail unit or other network devices, this address, at the time it was logged by the FortiMail
unit, may have been [email protected]. In that case, you would search for
[email protected] instead of [email protected].
Keyword Enter any word or words to search for within the log messages.
For example, you might enter starting daemon to locate all log
messages containing that exact phrase in any log field.
Subject Enter all or part of the subject line of the email message as it appears in
the log message.
This option appears only for history log searches.
From Enter all or part of the sender’s email address as it appears in the log
message.
This option does not appear for event log searches.
To Enter all or part of the recipient’s email address as it appears in the log
message.
This option does not appear for event log searches.
Client name Enter all or part of the domain name or IP address of the SMTP client. For
(History log email users connecting to send email, this is usually an IP address rather
search only) than a domain name. For SMTP servers connecting to deliver mail, this
may often be a domain name.
Time Select the time span of log messages to include in the search results.
For example, you might want to search only log messages that were
recorded during the last 10 days and 8 hours previous to the current
date. In that case, you would specify the current date, and also specify
the size of the span of time (10 days and 8 hours) before that date.
The cross-search searches log files recorded five minutes before and after the log entry (this
design is for performance purpose). Therefore, the search may cover multiple log files but may
not cover all the related log files if any log files are recorded out of the ten minutes interval.
You can quarantine email messages based on the message content, such as whether the email
is spam or contains a prohibited word or phrase. FortiMail units have two types of quarantine:
• Personal quarantine
Quarantines email messages into separate folders for each recipient address in each
protected domain. The FortiMail unit periodically sends quarantine reports to notify
recipients, their designated group owner, and/or another email address of the email
To reduce the amount of hard disk space consumed by quarantined mail, regularly release or
delete the contents of each recipient’s quarantine.
To access this part of the web UI, your administrator account’s access profile must have
Read-Write permission to the Quarantine category. For details, see “About administrator
account permissions and domains” on page 179.
To reduce the amount of hard disk space consumed by quarantined mail, regularly release or
delete the contents of each recipient’s quarantine.
Email users can also manage their own per-recipient quarantines through quarantine reports.
For more information, see “Releasing and deleting email via quarantine reports” on page 514.
To reduce the amount of hard disk space consumed by the system quarantine, regularly release
or delete items from the system quarantine.
By default, the system quarantine is not used until you configure the FortiMail unit to send
per-recipient quarantine to system quarantine by selecting System quarantine in antivirus action
profiles, content action profiles, and antispam action profiles. For more information, see
“Configuring antivirus action profiles” on page 433, “Configuring antispam action profiles” on
page 427 and “Configuring content action profiles” on page 446.
To access this part of the web UI, your administrator account’s:
• Domain must be System
• access profile must have Read-Write permission to the Quarantine category
For details, see “About administrator account permissions and domains” on page 179.
View (button) Select a item in the table and click View to open item.
Compact Select the check boxes of each email user whose quarantine folder you
(button) want to compact and click Compact.
For performance reasons, when you delete an email, it is marked for
deletion but not actually removed from the hard disk at that time, and so
still consumes some disk space. Compaction reclaims this hard disk
space.
Note: FortiMail updates folder sizes once an hour. The reduction in folder
size is not immediately reflected after compacting.
Release Starting from 6.2.0 release, you can select a folder and batch release the
(button) email in the folder according to the criteria you specify:
• Start date
• End date
• Messge type: Either Unreleased Only or All Messages.
• Release to: Orginal recipient(s) or other recipient(s) you specify.
Mailbox Lists the current mailbox, which is named Inbox. Older system quarantine
mailboxes, also called rotated folders, are named according to their
creation date and the rename date. For information on configuring rotation
of the system quarantine mailbox, see “Configuring the system quarantine
setting” on page 515.
To view email messages quarantined in that mailbox, double-click its row.
For more information, see “Managing the system quarantine” on
page 141.
You can also configure a system quarantine administrator account whose exclusive purpose is
to manage the system quarantine. For more information, see “Configuring the system
quarantine setting” on page 515.
View (button) To view a message, either double-click it, or mark its check box and
click View.
Release To release all email messages in the current view, mark the top check
(button) box and click Release.
To release individual email messages, mark their check boxes and
click Release.
In the pop-up window, you can select to release email to the original
recipient and/or to other recipients. If want to release email to other
recipients, enter the email addresses. You can add up to five email
addresses.
Filter User the filter to display the released or unreleased email only.
By default, FortiMail only displays the unreleased email.
Search Click to search the system quarantine folder that you are currently
(button) viewing. For details, see “Searching email in the system quarantine”
on page 144.
Subject Lists the subject line of the email. Click to display the email message.
From Lists the display name of the sender as it appears in the message
header, such as "User 1".
Rcpt To Lists the user name portion (also known as the local-part) of the
recipient email address (RCPT TO:) as it appears in the message
envelope, such as user2 where the full recipient email address is
[email protected].
The FortiMail unit prioritizes the mail queue into two types:
• Regular mail queue
When the initial attempt to deliver an email fails, the FortiMail unit moves the email to the
regular mail queue.
• Slow mail queue
After another two failed delivery attempts, the FortiMail unit moves the email to the slow mail
queue. This allows the FortiMail unit to resend valid email quickly, instead of keep resending
invalid email (for example, email destined to an invalid MTA).
After the undelivered email remains in the deferred queue for five minutes, the mail appears
under Monitor > Mail Queue > Mail Queue. This also means that email staying in the deferred
queue for less than five minutes does not appear on the Mail Queue tab.
To reduce the amount of hard disk space consumed by quarantined mail, regularly release or
delete the contents of each recipient’s quarantine.
View (button) Select a message and click View to see its contents.
Resend Mark the check boxes of the rows corresponding to the email messages that
you want to immediately retry to send, then click Resend.
(button)
To determine if these retries succeeded, click Refresh. If a retry succeeds, the
email will no longer appear in either the deferred mail queue or the dead mail
folder. Otherwise, the retry has failed.
Type Select the directionality and priority level of email to filter the mail queue
display.
• Default: Displays all email in the regular mail queue. After three failed
delivery retries, the mail will be moved to the Default-slow mail queue.
• Incoming: Only displays the delayed incoming emai that meets the
following criteria: 1. The mail must be destined to both protected and
unprotected domains; 2. The mail must have triggered different actions in
regard to different domains, for example, inserting disclaimer for outgoing
email and tagging the subjects for incoming email. If the incoming email
action is triggered, the mail will be moved to the Incoming mail queue. If
both the outgoing email action and incoming email action are triggered, the
mail will be moved to both the Incoming and Outgoing mail queues.
After three failed delivery retries, the mail will be moved to the
Incoming-slow mail queue.
• Outgoing: Only displays the delayed outgoing emai that meets the
following criteria: 1. The mail must be destined to both protected and
unprotected domains; 2. The mail must have triggered different actions in
regard to different domains, for example, inserting disclaimer for outgoing
email and taking no action for incoming email is considered to be different
actions for different domains. If the outgoing email action is triggered, the
mail will be moved to the Outgoing mail queque. If both the outgoing email
action and incoming email action are triggered, the mail will be moved to
both the Incoming and Outgoing mail queues.
After three failed delivery retries, the mail will be moved to the
Outgoing-slow mail queue.
• IBE: Only displays the IBE email in the regular mail queue. For information
about IBE email, see “Configuring IBE encryption” on page 556. After three
failed delivery retries, the mail will be moved to the IBE-slow mail queue.
• Default-slow: Displays all email in the slow mail queue.
• Incoming-slow: Displays the incoming email in the slow mail queue.
• Outgoing-slow: Displays the outgoing email in the slow mail queue.
• IBE-slow: Displays the IBE email in the slow mail queue.
• Thresholded-queue: Displays the email throttled by delivery control policies
( see “Configuring delivery control policies” on page 377). After three
attempts, the mail will be moved to the outgoing-slow queue.
Search Select to filter the mail queue display by entering criteria that email must
(button) match in order to be visible.
Reason Lists the reasons why the email has been deferred, such as DNS lookup failure
or refused connections.
First Lists the date and time that the FortiMail unit first tried to send the email.
Processed
Last Lists the date and time that the FortiMail unit last tried to send the email.
Processed
Tries Lists the number of times that the FortiMail unit has tried to send the email.
The Greylist submenu lets you monitor automatic greylisting exemptions, and email currently
experiencing temporary failure of delivery due to greylisting.
Greylisting exploits the tendency of legitimate email servers to retry email delivery after an initial
temporary failure, while spammers will typically abandon further delivery attempts to maximize
spam throughput. The greylist scanner replies with a temporary failure for all email messages
whose combination of sender email address, recipient email address, and SMTP client IP
address is unknown. If an SMTP server retries to send the email message after the required
greylist delay but before expiry, the FortiMail unit accepts the email and adds the combination
of sender email address, recipient email address, and SMTP client IP address to the list of those
known by the greylist scanner. Subsequent known email messages are accepted. For details
on the greylisting mechanism, see “About greylisting” on page 526.
To use greylisting, you must enable the greylist scan in the antispam profile. For more
information, see “Managing antispam profiles” on page 412.
Enabling greylisting can improve performance by blocking most spam before it undergoes
other, more resource-intensive antispam scans.
You can configure the initial delay associated with greylisting, and manually exempt senders.
For details, see “Configuring the grey list TTL and initial delay” on page 530 and “Manually
exempting senders from greylisting” on page 532.
Search Click to filter the displayed entries. For details, see “Filtering pending and
(button) individual automatic greylist entries” on page 149.
Sender Lists the sender email address in the message envelope (MAIL FROM:),
such as [email protected].
If the displayed entries are currently restricted by a search filter, a filter
icon appears in the column heading. To remove the search filter, click the
tab to refresh the display.
Status Lists the current action of the greylist scanner when the FortiMail unit
receives a delivery attempt for an email message matching the entry.
• TEMPFAIL: The greylisting delay period has not yet elapsed, and the
FortiMail unit currently replies to delivery attempts with a temporary
failure code. For information on configuring the greylist delay period,
see “Configuring the grey list TTL and initial delay” on page 530.
• PASSTHROUGH: The greylisting delay period has elapsed, and the
greylist scanner will allow delivery attempts.
Time to Lists the time and date when the greylisting delay period for a pending
passthrough entry is scheduled to elapse. Delivery attempts after this date and time
confirm the pending greylist entry, and the greylist scanner converts it to
an individual automatic greylist entry. The greylist scanner may also
consolidate individual greylist entries. For information on consolidated
entries, see “Viewing the consolidated automatic greylist exemptions” on
page 150.
N/A appears if the greylisting period has already elapsed.
Expire Lists the time and date when the entry will expire. The greylist entry’s
expiry time is determined by the following two factors:
• Initial expiry period: After a greylist entry passes the greylist delay
period and its status is changed to PASSTHROUGH, the entry’s initial
expiry time is determined by the time you set with the CLI command
set greylist-init-expiry-period under config antispam
settings (for details, see the FortiMail CLI Reference). The default
initial expiry time is 4 hours. If the initial expiry time elapses without an
email message matching the automatic greylist entry, the entry
expires. But the entry will not be removed.
• TTL: Between the entry’s PASSTHROUGH time and initial expiry time,
if the entry is hit again (the sender retries to send the message again),
the entry’s expiry time will be reset by adding the TTL value (time to
live) to the message’s “Received” time. Each time an email message
matches the entry, the life of the entry is prolonged; in this way, entries
that are in active use do not expire. If the TTL elapses without an email
message matching the automatic greylist entry, the entry expires. But
the entry will not be removed. For information on configuring the TTL,
see “Configuring the grey list TTL and initial delay” on page 530.
Field Select one of the following columns in the greylist entries that you want
to use to filter the display.
• IP
• Sender
• Recipient
Operation Select how the column’s contents will be matched, such as whether the
row must contain the Value.
Value Enter a pattern or exact value based on your selection in Field and
Operation.
• IP: Enter the IP address of the SMTP client, such as 172.16.1.10.
• Sender: Enter the complete sender email address in the message
envelope (MAIL FROM:), such as [email protected].
• Recipient: Enter the complete recipient email address in the
message envelope (RCPT TO:), such as [email protected].
Use an asterisk (*) to match multiple patterns, such as typing user* to match
[email protected], [email protected], and so forth. Blank fields match any value.
Regular expressions are not supported.
4. Click Search.
The Display tab appears again, but its contents are restricted to entries that match your filter
criteria. To remove the filter criteria and display all entries, click the Display tab to refresh its
view.
IP Lists the /24 subnet of the IP address of the SMTP client that delivered or
attempted to deliver the email message.
If the displayed entries are currently restricted by a search filter, a filter
icon appears in the column heading. To remove the search filter, click the
tab to refresh the display.
Sender Lists the domain name portion of the sender email address in the
message envelope (MAIL FROM:), such as example.com.
If the displayed entries are currently restricted by a search filter, a filter
icon appears in the column heading. To remove the search filter, click the
tab to refresh the display.
Expire Lists the time and date when the entry will expire, determined by adding
the TTL value to the time the last matching message was received. For
information on configuring the TTL, see “Configuring the grey list TTL and
initial delay” on page 530.
FortiMail tracks and displays the reputation statuses of SMTP clients (sender reputation), login
accesses (authentication reputation), and carrier end points (endpoint reputation.).
Search Click to filter the displayed entries. For more information, see “Filtering
sender reputation score entries” on page 153.
(button)
State Lists the action that the sender reputation feature is currently performing for
delivery attempts from the SMTP client.
• Score controlled: The action is determined by comparing the current
Score value to the thresholds in the session profile.
Last Modified Lists the time and date the sender reputation score was most recently
modified.
Although sender reputation entries are used for only 12 hours after last delivery attempt, the
entry may still appear in list of sender reputation scores.
Field Select one of the following in the entries that you want to use to filter the
display.
• IP
• Score
• State
• Last Modified
Operation Select how to match the field’s contents, such as whether the row must
contain the contents of Value.
Value Enter a pattern or exact value, based on your selection in Field and
Operation.
• IP: Enter the IP address of the SMTP client, such as 172.16.1.10,
for the entry that you want to display.
• Score: Enter the minimum and maximum of the range of scores of
entries that you want to display.
• State: Select the State of entries that you want to display.
• Last modified: Select the year, month, day, and/or hour before or
after the Last Modified value of entries that you want to display.
Blank fields match any value. Regular expressions and wild cards are not supported.
Access Lists the access type: CLI, Mail, or Web. For details see “Configuring
authentication reputation” on page 506.
Expiry Time Displays when the blocking period will end. The blocking period is
configurable under Security > Authentication Reputation > Settings. For
details see “Configuring authentication reputation” on page 506.
Score Displays the reputation scores. An IP/score in red color means that the
IP address would have been blocked if the reputation setting was set to
Enable instead of Monitor only.
You can alternatively blocklist MSISDNs/subscriber IDs manually. For more information, see
“Manually blocklisting endpoints” on page 542.
You can exempt MSISDNs/subscriber IDs from automatic blocklisting. For more information,
see “Exempting endpoints from endpoint reputation” on page 543.
Move To move entries to the manual endpoint block list or safe list, in the check
(button) box column, mark the check boxes of entries that you want to move, then
click Move.
Search Click to filter the displayed entries. For more information, see “Filtering
(button) automatic endpoint block list entries” on page 155.
Endpoint ID Lists the mobile subscriber IDSN (MSISDN), subscriber ID, login ID, or
other unique identifier for the carrier end point.
Score Lists the number of text messages or email messages that the FortiMail
has detected as spam or infected from the MSISDN/subscriber ID during
the automatic endpoint block list window.
Expire Lists the time at which the automatic endpoint blocklisting entry expires
and is removed from the list.
N/A appears if the endpoint ID has not reached the threshold yet.
Operation Select how to match the field’s contents, such as whether the row must
contain the contents of Value.
Value Enter the identifier of the carrier end point, such as the subscriber ID or
MSISDN, for the entry that you want to display.
A blank field matches any value. Use an asterisk (*) to match multiple
patterns, such as typing 46* to match 46701123456, 46701123457,
and so forth. Regular expressions are not supported.
3. Click Search.
The Auto Blocklist tab appears again, but its contents are restricted to entries that match
your filter criteria. To remove the filter criteria and display all entries, click the Auto Blocklist
tab to refresh its view.
You can archive email according to criteria you specify. For details, see “Email archiving
workflow” on page 572.
You can view and search archived email through the web UI. You can also download them,
forward them to an email address, and use them to train the Bayesian databases.
For more information on Bayesian database training, see “Training the Bayesian databases” on
page 546.
To access this part of the web UI, your administrator account’s:
• Domain must be System
• access profile must have Read-Write permission to the Others category
For details, see “About administrator account permissions and domains” on page 179.
View To view the message, click its check box and click View. You can also
view the message by double-clicking the message.
(button)
Send Select the check box of each email that you want to send to an email
(button) address as a mailbox (.mbox) file, then click this button.
Export Select the check box of email that you want to download and click
(button) Export to download a mailbox (.mbox) file or an archive (.tar.gz) file
containing individual email (.eml) files.
Train Bayesian Mark the check box of each email message to use to train Bayesian
Database databases then click this button. For more information, see “To train
(button) Bayesian databases with archived mail” on page 157.
You can search archived email in both the current mailbox and rotated mailboxes, whether
email is archived on the local disk or remote host. However, you can view only the archived
email on the local disk.
The Report tab displays the list of reports generated from the report profiles. You can delete,
view, and/or download generated reports.
FortiMail units can generate reports automatically, according to the schedule that you configure
in the report profile, or manually, when you select a report profile and click Generate. For more
information, see “Configuring report profiles and generating reports” on page 589.
To reduce the amount of hard disk space consumed by reports, regularly download then delete
generated reports from the FortiMail unit.
Report File Name Lists the name of the generated report, and the date and time at
which it was generated.
For example, Report 1-2008-03-31-2112 is a report named
Report 1, generated on March 31, 2008 at 9:12 PM.
To view an individual section of the report in HTML format, click + next
to the report name to expand the list of HTML files that comprise the
report, then double-click one of the file names.
Last Access Time Lists the date and time when the FortiMail unit completed the
generated report.
Size Lists the file size of the report in HTML format, in bytes.
2. To view the report in PDF file format, mark the check box in the corresponding row and click
Download. On the pop-up menu, select Download PDF.
3. To view the report in HTML file format, you can view all sections of the report together, or you
can view report sections individually.
• To view all report sections together, mark the check box in the row corresponding to the
report, such as treportprofile-2011-06-27-1039, then click Download and select
Download HTML. Your browser downloads a file with an archive (.tgz.gz) file extension to
your management computer. To view the report, first extract the report files from the
archive, then open the HTML files in your web browser.
• Each Query Selection in the report becomes a separate HTML file. You can view the
report as individual HTML files. In the row corresponding to the report that you want to
view, click + next to the report name to expand the list of sections, then double-click the
file name of the section that you want to view, such as Spam_Recipient.html. The
report appears in a new browser window.
The System menu lets you administrator accounts, and configure network settings, system
time, SNMP, RAID, high availability (HA), certificates, and more.
This section includes:
• Configuring network settings
• Configuring administrator accounts and access profiles
• Configuring system time, options, and other system options
• Configuring mail settings
• Customizing GUI, replacement messages, email templates, and SSO
• Configuring RAID
• Using high availability (HA)
• Managing certificates
• Using FortiSandbox antivirus inspection
• Configuring FortiGuard services
• System maintenance
The Network submenu provides options to configure network connectivity and administrative
access to the web UI or CLI of the FortiMail unit through each network interface.
This section includes:
• About IPv6 Support
• About the management IP
• About FortiMail logical interfaces
• Configuring the network interfaces
• Configuring link status monitoring
• Configuring static routes
• Configuring DNS
• Configuring dynamic DNS
• Configuring port forwarding
• Scanning SMTP traffic redirected from FortiGate
• Using the traffic capture
Page 160
IPv6 has 128-bit addresses compared to IPv4's 32-bit addresses, effectively eliminating
address exhaustion. This new very large address space will likely reduce the need for network
address translation (NAT) since IPv6 provides more than a billion IP addresses for each person
on Earth. All hardware and software network components must support this new address size,
an upgrade that may take a while to complete and will force IPv6 and IPv4 to work side-by-side
during the transition period.
Starting from 4.3 release, FortiMail supports the following IPv6 features:
• Network interface
• Network routing
• High Availability
• DNS
• Admin access
• Webmail access
• Mail routing -- multiple combinations of IPv4/6 Server, IPv4/6 Remote Gateway
• Access Control Lists
• Grey list
• Local sender reputation
• IPv6 based policies
• Block/safe list
• LDAP
• IP pool (starting from 4.3.3 release)
FortiMail will support the following IPv6 feature in future releases:
• Port forwarding for IPv6
• FortiGuard antispam database populated with IPv6 addresses
VLAN subinterfaces
A Virtual LAN (VLAN) subinterface, also called a VLAN, is a virtual interface on a physical
interface. The subinterface allows routing of VLAN tagged packets using that physical interface,
but it is separate from any other traffic on the physical interface.
Virtual LANs (VLANs) use ID tags to logically separate devices on a network into smaller
broadcast domains. These smaller domains forward packets only to devices that are part of that
VLAN domain. This reduces traffic and increases network security.
One example of an application of VLANs is a company’s accounting department. Accounting
computers may be located at both main and branch offices. However, accounting computers
need to communicate with each other frequently and require increased security. VLANs allow
the accounting network traffic to be sent only to accounting computers and to connect
accounting computers in different locations as if they were on the same physical subnet.
For information about adding VLAN subinterfaces, see “Configuring the network interfaces” on
page 163.
Redundant interfaces
On the FortiMail unit, you can combine two or more physical interfaces to provide link
redundancy. This feature allows you to connect to two or more switches to ensure connectivity
in the event one physical interface or the equipment on that interface fails.
In a redundant interface, traffic is only going over one interface at any time. This differs from an
aggregated interface where traffic is going over all interfaces for increased bandwidth. This
difference means redundant interfaces can have more robust configurations with fewer possible
points of failure. This is important in a fully-meshed HA configuration.
A physical interface is available to be in a redundant interface if:
• it is a physical interface, not a VLAN interface
• it is not already part of a redundant interface
• it has no defined IP address and is not configured for DHCP
• it does not have any VLAN subinterfaces
• it is not monitored by HA
When a physical interface is included in a redundant interface, it is not listed on the System >
Network > Interface page. You cannot configure the interface anymore.
For information about adding redundant interfaces, see “Configuring the network interfaces” on
page 163.
Loopback interfaces
A loopback interface is a logical interface that is always up (no physical link dependency) and
the attached subnet is always present in the routing table.
If your FortiMail unit is not properly deployed and configured for the topology of your network,
including network interface connections, email may bypass the FortiMail unit.
Type Displays the interface type: physical, VLAN, redundant, or loopback. For details,
see “About FortiMail logical interfaces” on page 162.
Bridge In transparent mode, this column indicates if the port is on the same bridge as
Member the management IP. By default, all ports are on the bridge. See “Editing network
interfaces” on page 164 for information on bridged networks in transparent
mode.
IPv6/Netma Displays the IPv6 address and netmask of the network interface. For more
sk information about IPv6 support, see “About IPv6 Support” on page 160.
Access Displays the administrative access and webmail access services that are
enabled on the network interface, such as HTTPS for the web UI.
Status Indicates the up (available) or down (unavailable) administrative status for the
network interface.
• Green up arrow: The network interface is up and can receive traffic.
• Red down arrow: The network interface is down and cannot or receive traffic.
To change the administrative status (that is, bring up or down a network
interface), see “Editing network interfaces” on page 164.
Enable administrative access only on network interfaces connected to trusted private networks
or directly to your management computer. If possible, enable only secure administrative access
protocols such as HTTPS or SSH. Failure to restrict administrative access could compromise
the security of your FortiMail unit.
If your FortiMail unit operates in transparent mode and depending on your network topology,
you may need to configure the network interfaces of the FortiMail unit.
• If all email servers protected by the FortiMail unit are located on the same subnet, no
network interface configuration is necessary. Bridging is the default configuration for
network interfaces when the FortiMail unit operates in transparent mode, and the FortiMail
unit will bridge all connections occurring through it from the network to the protected email
servers.
• If email servers protected by the FortiMail unit are located on different subnets, you must
connect those email servers through separate physical ports on the FortiMail unit, and
configure the network interfaces associated with those ports, assigning IP addresses and
removing them from the bridge.
It is possible to configure a mixture of bridging and non-bridging network interfaces. For
example, if some email servers belong to the same subnet, network interfaces for those email
You can restrict which IP addresses are permitted to log in as a FortiMail administrator through
network interfaces. For details, see “Configuring administrator accounts” on page 182.
Interface Name If you are editing an existing interface, this field displays the name
(such as port2) and media access control (MAC) address for this
network interface.
If you are creating a logical interface, enter a name for the
interface.
VLAN If you want to create a VLAN subinterface, select the interface for
which you want to create the subinterface for.
Then specify a VLAN ID. Valid VLAN ID numbers are from 1 to
4094, while 0 is used for high priority frames, and 4095 is
reserved.
Loopback If you want to add a loopback interface, select the Loopback type
and the interface name will be automatically reset to “loopback”.
You can only add one loopback interface on FortiMail.
Addressing mode
Manual Select to enter a static IP address, then enter the IP address and
netmask for the network interface.
IP/Netmask Enter the IP address and netmask for the network interface. If the
FortiMail unit is operating in gateway mode or server mode, this
option is available only if Manual is selected.
Note: IP addresses of different interfaces cannot be on the same
subnet.
Retrieve default Enable to retrieve both the default gateway and DNS addresses
gateway and from the DHCP server, replacing any manually configured values.
DNS from
server
Connect to Enable for the FortiMail unit to attempt to obtain DNS addressing
server information from the DHCP server.
Disable this option if you are configuring the network interface
offline, and do not want the unit to attempt to obtain addressing
information at this time.
Advanced Setting
Access Enable protocols that this network interface should accept for
connections to the FortiMail unit itself. (These options do not
affect connections that will travel through the FortiMail unit.)
• HTTPS: Enable to allow secure HTTPS connections to the
web-based manager, webmail, and per-recipient quarantine
through this network interface.
• HTTP: Enable to allow HTTP connections to the web-based
manager, webmail, and per-recipient quarantine through this
network interface.
For information on redirecting HTTP requests for webmail and
per-recipient quarantines to HTTPS, see “Configuring global
quarantine report settings” on page 508.
• PING: Enable to allow ICMP ECHO (ping) responses from this
network interface.
For information on configuring the network interface from
which the FortiMail unit itself will send pings, see the FortiMail
CLI Reference.
• SSH: Enable to allow SSH connections to the CLI through this
network interface.
• SNMP: Enable to allow SNMP connections (queries) to this
network interface.
For information on further restricting access, or on configuring
the network interface that will be the source of traps, see
“Configuring the network interfaces” on page 163.
• TELNET: Enable to allow Telnet connections to the CLI
through this network interface.
Caution: HTTP and Telnet connections are not secure, and can
be intercepted by a third party. If possible, enable this option only
for network interfaces connected to a trusted private network, or
directly to your management computer. Failure to restrict
administrative access through this protocol could compromise
the security of your FortiMail unit. For information on further
restricting access of administrative connections, see “Configuring
administrator accounts” on page 182.
Web access Enable the GUI access type that this network interface should
accept.
• Admin: Enable to allow access the admin GUI through this
interface.
• Webmail: Enable to allow webmail access through this
interface.
Mail access Enable the email access protocols that this network interface
should accept: POP3, POP3S, IMAP, or IMAPS.
MTU
Override default Enable to change the maximum transmission unit (MTU) value,
MTU value (1500) then enter the maximum packet or Ethernet frame size in bytes.
If network devices between the FortiMail unit and its traffic
destinations require smaller or larger units of traffic, packets may
require additional processing at each node in the network to
fragment or defragment the units, resulting in reduced network
performance. Adjusting the MTU to match your network can
improve network performance.
The default value is 1500 bytes. The MTU size must be between
576 and 1500 bytes. Change this if you need a lower value; for
example, RFC 2516 prescribes a value of 1492 for the PPPoE
protocol.
Interface Name Displays the name (such as port2) and media access control
(MAC) address for this network interface.
If you are creating a logical interface, enter a name for the
interface.
VLAN If you want to create a VLAN subinterface, select the interface for
which you want to create the subinterface for.
Then specify a VLAN ID. Valid VLAN ID numbers are from 1 to
4094, while 0 is used for high priority frames, and 4095 is
reserved.
Loopback If you want to add a loopback interface, select the Loopback type
and the interface name will be automatically reset to “loopback”.
You can only add one loopback interface on FortiMail.
Addressing mode
Do not associate Enable to configure an IP address and netmask for this network
with management interface, separate from the management IP, then configure
IP “IP/Netmask” on page 164.
This option appears only if the network interface is not port1,
which is required to be a member of the bridge.
IP/Netmask Enter the IP address and netmask for the network interface. If the
FortiMail unit is operating in transparent mode, this option is
available only if “Do not associate with management IP” on
page 169 is enabled.
Access Enable protocols that this network interface should accept for
connections to the FortiMail unit itself. (These options do not
affect connections that will travel through the FortiMail unit.)
• HTTPS: Enable to allow secure HTTPS connections to the
web-based manager, webmail, and per-recipient quarantine
through this network interface.
• HTTP: Enable to allow HTTP connections to the web-based
manager, webmail, and per-recipient quarantine through this
network interface.
For information on redirecting HTTP requests for webmail and
per-recipient quarantines to HTTPS, see “Configuring global
quarantine report settings” on page 508.
• PING: Enable to allow ICMP ECHO (ping) responses from this
network interface.
For information on configuring the network interface from
which the FortiMail unit itself will send pings, see the FortiMail
CLI Reference.
• SSH: Enable to allow SSH connections to the CLI through this
network interface.
• SNMP: Enable to allow SNMP connections (queries) to this
network interface.
For information on further restricting access, or on configuring
the network interface that will be the source of traps, see
“Configuring the network interfaces” on page 163.
• TELNET: Enable to allow Telnet connections to the CLI through
this network interface.
Caution: HTTP and Telnet connections are not secure, and can
be intercepted by a third party. If possible, enable this option only
for network interfaces connected to a trusted private network, or
directly to your management computer. Failure to restrict
administrative access through this protocol could compromise
the security of your FortiMail unit. For information on further
restricting access of administrative connections, see “Configuring
administrator accounts” on page 182.
MTU
Override default Enable to change the maximum transmission unit (MTU) value,
MTU value (1500) then enter the maximum packet or Ethernet frame size in bytes.
If network devices between the FortiMail unit and its traffic
destinations require smaller or larger units of traffic, packets may
require additional processing at each node in the network to
fragment or defragment the units, resulting in reduced network
performance. Adjusting the MTU to match your network can
improve network performance.
The default value is 1500 bytes. The MTU size must be between
576 and 1500 bytes. Change this if you need a lower value; for
example, RFC 2516 prescribes a value of 1492 for the PPPoE
protocol.
SMTP Proxy When operating in transparent mode, the FortiMail unit can use
either transparent proxies or an implicit relay to inspect SMTP
connections. If connection pick-up is enabled for connections on
that network interface, the FortiMail unit can scan and process
the connection. If not enabled, the FortiMail unit can either block
or permit the connection to pass through unmodified.
Exceptions to SMTP connections that can be proxied or relayed
include SMTP connections destined for the FortiMail unit itself.
For those local connections, such as email messages from email
users requesting deletion or release of their quarantined email,
you must choose to either allow or block the connection.
For more information about FortiMail transparent mode proxy and
implicit STMP relay, see “Click Create.” on page 361.
Note: When a FortiMail unit proxies or relays traffic, whether the
email will be scanned or not depends on the policies you specify.
For more information about policies, see “Configuring policies”
on page 362.
Incoming Select how the proxy or built-in MTA will handle SMTP
connections connections for that interface that are incoming to the IP
addresses of email servers belonging to a protected domain.
• Pass through: Permit connections but do not proxy or relay.
Because traffic is not proxied or relayed, no policies will be
applied.
• Drop: Drop connections.
• Proxy: Proxy or relay connections. Once intercepted, policies
determine any further scanning or logging actions. For more
information, see “Configuring policies” on page 362.
Note: Depending on your network topology, you may want to
verify that email is not being scanned twice. This could result if,
due to mail routing, an email would travel through the FortiMail
unit multiple times in order to reach its final destination, and you
have selected Proxy more than once on this page. For an
example, see For details, see “Avoiding scanning email twice” on
page 215.
Outgoing Select how the proxy or built-in MTA will handle SMTP
connections connections for that interface that are outgoing to the IP
addresses of email servers that are not a protected domain.
• Pass through: Permit connections but do not proxy or relay.
Because traffic is not proxied or relayed, no policies will be
applied.
• Drop: Drop connections.
• Proxy: Proxy or relay connections. Once intercepted, policies
determine any further scanning or logging actions. For more
information, see “Configuring policies” on page 362.
Note: Depending on your network topology, you may want to
verify that email is not being scanned twice. This could result if,
due to mail routing, an email would travel through the FortiMail
unit multiple times in order to reach its final destination, and you
have selected Proxy more than once on this page. For an
example, see “Avoiding scanning email twice” on page 215.
Local connections elect how the FortiMail unit will handle SMTP connections on
each network interface that are destined for the FortiMail unit
itself, such as quarantine release or delete messages and
Bayesian training messages.
• Allow: SMTP connections will be allowed.
• Disallow: SMTP connections will be blocked.
port1 is required to be a member of the bridge and cannot be removed from it.
Interface tracking
FortiMail units can process email before delivering it to your company’s internal mail server. In
this configuration, mail comes from an external interface into the FortiMail unit. Then the mail is
processed for spam, viruses and such. The mail is then forwarded over an internal interface to a
company internal mail server for internal distribution.
For redundancy, companies can configure a secondary FortiMail unit that is connected to a
secondary internal mail server. In this configuration the secondary FortiMail unit is normally not
active with all mail going through the primary FortiMail unit. The secondary system is activated
when the external interface on the primary FortiMail unit is unreachable. Mail is routed to the
secondary system until the primary unit is can be reached and then the mail is delivered to the
primary FortiMail unit once again. In this configuration the mail only goes to one FortiMail unit or
the other - it is never divided between the two.
If the internal mail server becomes unreachable from the primary FortiMail unit's internal
interface, the primary FortiMail unit needs to stop the incoming email or the email will continue
to accumulate and not be delivered.
The FortiMail unit can track the status of the internal interface. When interface tracking sees the
internal interface go down, it brings down the FortiMail external interface. This stops email from
accumulating on the primary FortiMail unit. If your company has the redundant secondary
FortiMail unit configured, email can be routed to it until the primary FortiMail unit can be
reached again. Interface tracking also brings the external interface up when the internal
interface comes back up.
With interface tracking, you can set which interfaces are associated. You can also set how often
interface tracking checks the status of the interfaces. This is the maximum delay before the
interfaces associated with the downed interface are brought down as well.
Configuring DNS
FortiMail units require DNS servers for features such as reverse DNS lookups, FortiGuard
connectivity, and other aspects of email processing. Your ISP may supply IP addresses of DNS
servers, or you may want to use the IP addresses of your own DNS servers.
If the FortiMail unit is operating in gateway mode, you must configure the MX record of the DNS
server for each protected domain to direct all email to this FortiMail unit instead of the protected
SMTP servers. Failure to update the records of your DNS server may enable email to
circumvent the FortiMail unit.
For improved FortiMail unit performance, use DNS servers on your local network.
Go to System > Network > DNS to configure the DNS servers that the FortiMail unit queries to
resolve domain names into IP addresses.
To access this part of the web UI, your administrator account’s:
• Domain must be System
• access profile must have Read-Write permission to the Others category
For details, see “About administrator account permissions and domains” on page 179.
User Name Displays your user name for the DDNS service provider.
Host/Domain Name A public host name or fully qualified domain name (FQDN) that
should resolve to the public IP address of the FortiMail unit.
Its public DNS records are updated by the DDNS service provider
when the FortiMail unit sends its current public IP address. As such,
it might not be the same as the host name and local domain name
that you configured in “Host name” on page 198 and “Local domain
name” on page 198, which could be valid only for your internal
network.
Update Time Displays the interval in hours that the FortiMail unit waits between
contacts to the DDNS service provider.
2. If you have not yet configured the dynamic DNS account that the FortiMail unit will use when
it connects to the DDNS service provider, click New.
A dialog appears.
Server Select a DDNS service provider to which the FortiMail unit will
send DDNS updates.
User name Enter the user name of your account with the DDNS service
provider. The FortiMail unit will provide this to authenticate itself
with the service when sending updates.
Update time Enter the interval in hours between each time that the FortiMail
unit will query the DDNS service provider’s IP detection page if
“IP mode” on page 176 is Auto detect.
Caution: Do not exceed the recommended frequency published
by your DDNS service provider. Some DDNS service providers
consider excessive connections to be abusive, and may ignore
further queries from the FortiMail unit.
3. Click Create.
4. The tab returns to the list of dynamic DNS accounts, which should now include your new
account.
5. Double-click the row corresponding to the new DDNS account.
The Host/Domain Name Setting area is now visible.
6. In the Host/Domain Name Setting area, click Create New, or, to modify an existing
host/domain name, select its row and click Edit.
A dialog appears.
Status Enable to update the DDNS service provider when the FortiMail unit’s
public IP address changes.
Disable to notify the DDNS service provider that this FQDN should use its
offline redirect, if you configured any. If the FortiMail unit’s public IP
address changes, it will not notify the DDNS service provider.
Host name Enter the fully qualified domain name (FQDN) whose records the DDNS
provider should update.
IP mode Select which of the following ways the FortiMail unit should use to
determine its current publicly routable IP address.
• Auto detect: Periodically query the DDNS service provider’s IP address
detection web page to see if the FortiMail unit’s public IP address has
changed. The IP detection web page returns the apparent source IP
address of the query. If this IP address has changed, the FortiMail unit
then sends an update request to the DDNS service provider, causing it
to update DNS records for the FQDN in “Host name” on page 176.
This option is the most common choice. To configure the interval of
DDNS IP detection queries, see “Update time” on page 175.
Note: If this query occurs through a NAT device such as a router or
firewall, its apparent source IP address will not be the private network IP
address of any of the FortiMail unit’s network interfaces. Instead, it will be
the IP address of the NAT device’s externally facing network interface.
For example, a public virtual IP (VIP) on a FortiGate unit in NAT mode
might be used to route email from the Internet to a FortiMail unit. DDNS
updates are also routed out from the VIP to the DDNS service provider on
the Internet. From the DDNS service provider’s perspective, the DDNS
update connection appears to come from the VIP, and therefore it updates
the DNS records with the IP address of the VIP. The DDNS service provider
does not know the private network address of the FortiMail unit.
• Bind interface: Use the current IP address of one of the FortiMail unit’s
network interfaces. Choose this option only if the network interface has
an IP address that is routable from the Internet — that is, it is not an
RFC 1918 private network address.
• Static IP: Use an IP address that you configure. You must manually
update the accompanying field if the FortiMail unit’s public IP address
changes.
To verify your DDNS configuration and connectivity, do not query DNS servers: depending
on DNS caching, record propagation, and other effects, DNS queries may not be able to
determine whether the update actually reached your DDNS service provider.
Instead, log in to your DDNS service provider account and verify whether its host records
Host Port Displays the assigned port number on the host computer.
Destination Port Displays the assigned port number of the destination computer.
2. Select New to configure a new forwarding rule or double-click a rule to modify it.
A dialog appears.
3. In Protocol, specify the protocol that the rule will apply to: TCP, UDP, or Both.
4. In Host IP and Port, enter the IP address and port number that will be mapped. In most
cases, they are the IP address and port of the receiving FortiMail interface. In the above
example, they are 192.168.37.4 and 7000.
5. In Destination IP and Port, enter the IP address and port number that will be mapped to. In
most cases, they are the IP address and port of the system behind the FortiMail unit. In the
above example, they are 10.10.10.42 and 8000.
6. Click Create.
Local IP Enter the IP address of the FortiMail interface that communicates with
FortiGate.
Remote IP Enter the IP address of the FortiGate interface that communicate with
FortiMail.
There are exceptions. Domain administrators can configure IP-based policies, the global block
list, the global safe list, the blocklist action, and the global Bayesian database. If you do not
want to allow this, do not provide Read-Write permission to those categories in domain
administrators’ access profiles.
Domain & User except for the domain, its subdomains, associated domains, and user
preference.
Security except for Security > Bayesian > User and Security > Block/Safe List
Email Archiving
Access profiles assign either read, read/write, or no access to each area of the FortiMail
software. To view configurations, you must have read access. To make changes, you must have
write access. For more information on configuring an administrator access profile, see
“Configuring admin profiles” on page 184.
Domain Select System for the entire FortiMail unit or the name of a protected
domain, such as example.com, to which this administrator account will be
assigned.
For more information on protected domain assignments, see “About
administrator account permissions and domains” on page 179.
Note: If Domain is a protected domain, the administrator cannot use the
CLI, or the basic mode of the web UI.
Note: If you enable domain override in the RADIUS profile, this setting will
be overwritten by the value of the remote attribute returned from the
RADIUS server, if the returned value matches an existing protected
domain. For details, see “Configuring authentication profiles” on
page 452.
Access profile Select the name of an access profile that determines which functional
areas the administrator account may view or affect.
Click New to create a new profile or Edit to modify the selected profile.
For details, see “Configuring admin profiles” on page 184.
Note: If you enable remote access override in the RADIUS profile, this
access profile will be overwritten by the value of the remote attribute
returned from the RADIUS server, if the returned value matches an
existing access profile. For details, see “Configuring authentication
profiles” on page 452.
Authentication Select RADIUS or LDAP. And then select the RADIUS or LDAP profile.
type
For details, see “Configuring authentication profiles” on page 452.
Trusted hosts Enter an IPv4 or IPv6 address or subnet from which this administrator can
log in. You can add up to 10 trusted hosts.
If you want the administrator to access the FortiMail unit from any IP
address, use 0.0.0.0/0.0.0.0.
Enter the IP address and netmask in dotted decimal format. For example,
you might permit the administrator to log in to the FortiMail unit from your
private network by typing 192.168.1.0/255.255.255.0.
Note: For additional security, restrict all trusted host entries to
administrative hosts on your trusted private network.
Note: For information on restricting administrative access protocols that
can be used by these hosts, see “Editing network interfaces” on
page 164.
Language Select this administrator account’s preference for the display language of
the web UI.
This setting overwrites the default language configured under System
Customization > Appearance. See “Customizing the GUI appearance” on
page 230.
Theme Select this administrator account’s preference for the display theme.\
This setting overwrites the default theme configured under System
Customization > Appearance. See “Customizing the GUI appearance” on
page 230.
If you configured a system quarantine administrator account, this account does not appear in
the list of standard FortiMail administrator accounts. For more information on the system
quarantine administrator account, see “Configuring the system quarantine setting” on
page 515.
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Others category.
For details, see “About administrator account permissions and domains” on page 179.
Enable Select it to enable the new account. If disabled, the account will not be
able to access FortiMail.
Domain Select System for the entire FortiMail unit or the name of a protected
domain, such as example.com, to which this administrator account will be
assigned.
For more information on protected domain assignments, see “About
administrator account permissions and domains” on page 179.
Note: If Domain is a protected domain, the administrator cannot use the
CLI, or the basic mode of the web UI.
Admin profile Select the name of an admin profile that determines which functional
areas the administrator account may view or affect.
Click New to create a new profile or Edit to modify the selected profile.
For details, see “Configuring admin profiles” on page 184.
Authentication Select the local or remote type of authentication that the administrator will
type use:
• Local
• RADIUS
• PKI
• LDAP
Note: RADIUS, LDAP and PKI authentication require that you first
configure a RADIUS authentication profile, LDAP authentication profile, or
PKI user. For more information, see “Configuring authentication profiles”
on page 452 and “Configuring PKI authentication” on page 335.
Password If you select Local as the authentication type, enter a secure password for
this administrator account.
The password can contain any character except spaces.
If you are changing your own password, the new password cannot be the
same as the old one. And after you change the password, your will be
required to re-login. However, if you are changing other administrators’
passwords, these rules do not apply.
This field does not appear if authentication type is not Local or
RADIUS+Local.
LDAP profile If you choose to use LDAP authentication, select an LDAP profile you
want to use.
RADIUS profile If you choose to use RADIUS or RADIUS + Local authentication, select a
RADIUS profile you want to use.
PKI profile If you choose to use PKI authentication, select a PKI profile you want to
use.
Trusted hosts Enter an IPv4 or IPv6 address or subnet from which this administrator can
log in. You can add up to 10 trusted hosts.
If you want the administrator to access the FortiMail unit from any IP
address, use 0.0.0.0/0.0.0.0.
Enter the IP address and netmask in dotted decimal format. For example,
you might permit the administrator to log in to the FortiMail unit from your
private network by typing 192.168.1.0/255.255.255.0.
Note: For additional security, restrict all trusted host entries to
administrative hosts on your trusted private network.
Note: For information on restricting administrative access protocols that
can be used by these hosts, see “Editing network interfaces” on
page 164.
Language Select this administrator account’s preference for the display language of
the web UI.
This setting overwrites the default language configured under System
Customization > Appearance. See “Customizing the GUI appearance” on
page 230.
Theme Select this administrator account’s preference for the display theme.\
This setting overwrites the default theme configured under System
Customization > Appearance. See “Customizing the GUI appearance” on
page 230.
(Green dot in Indicates whether or not the profile is being used in one or more
column administrator accounts. If so, a red dot appears in this column, and the
heading.) profile cannot be deleted.
Note: The access profile named super_admin_prof is always used by the
admin administrator account, and cannot be deleted. In this case, a grey
dot indicates only that the profile is not being used by any other
administrator account.
2. Either click New to add an account or double-click an access profile to modify it.
A dialog appears.
3. In Profile Name, enter the name for this access profile.
4. In the Access Control table, for each access control option, select the permissions to be
granted to administrator accounts associated with this access profile. For details, see About
administrator account permissions and domains.
For System Quarantine, you can assign either all folders or some folders to the administrator.
By default, all folders are assigned. To change the setting, click on All folders. In the popup
box, disable All folders, and then move the folders from the Available list to the Members list.
Starting from 6.0.4 release, administrators with Read Only privileges to System Quarantine,
Personal Quarantine, Archive, and Mail Queque categories cannot view emal contents
anymore. Only administrators with Read-Write privileges can view email contents.
The System > Configuration submenu lets you configure the system time, various global
settings (such as idle timeout) of the web UI, and SNMP access.
This topic includes:
• Configuring the time and date
• Configuring system options
• Configuring SNMP queries and traps
For many features to work, including scheduling, logging, and certificate-dependent features,
the FortiMail system time must be accurate.
Idle timeout Enter the amount of time that an administrator may be inactive
before the FortiMail unit automatically logs out the administrator.
Note: For better security, use a low idle timeout value.
PIN Protection Enable to require administrators to first enter the PIN before
using the LCD display panel and control buttons on the FortiMail
unit, then enter the 6-digit PIN number.
This option appears only on FortiMail models whose hardware
includes an LCD panel.
Caution: For better security, always configure an LCD PIN;
otherwise, anyone with physical access can reconfigure the unit.
Login You can use the default disclaimer text or customize it.
disclaimer
Reset To If you have customized the disclaimer text but want to use the
Default default text, select this button.
(button)
Apply to login Admin: Select to display the disclaimer message when the
page administrator logs in to the FortiMail unit web-based manager.
Webmail: Select to display the disclaimer message when the
user logs into the FortiMail Webmail.
IBE: Select to display the disclaimer message when the user logs
into the FortiMail unit to view the IBE encrypted email.
Administration Ports Specify the TCP ports for administrative access on all interfaces.
Default port numbers:
• HTTP: 80
• HTTPS: 443
• SSH: 22
• TELNET: 23
SNMP agent Enable to activate the FortiMail SNMP agent. This must be enabled to
enable accept queries from SNMP managers or send traps from the FortiMail
unit.
SNMP Threshold To change a value in the four editable columns, select the value in any
row. It becomes editable. Change the value and click outside of the
field. A red triangle appears in the field’s corner and remains until you
click Apply.
Trigger You can enter either the percent of the resource in use or the number
of times the trigger level must be reached before it is triggered.
For example, using the default value, if the mailbox disk is 90% or
more full, it will trigger.
Threshold Sets the number of triggers that will result in an SNMP trap.
For example, if the CPU level exceeds the set trigger percentage once
before returning to a lower level, and the threshold is set to more than
one, an SNMP trap will not be generated until that minimum number
of triggers occurs during the sample period.
Sample Sets the time period in seconds during which the FortiMail unit SNMP
Period(s) agent counts the number of triggers that occurred.
This value should not be less than the Sample Freq(s) value.
Community Displays the list of SNMP communities (for SNMP v1 and v2c) added
to the FortiMail configuration. For information on configuring a
community, see either “Configuring an SNMP v1 and v2c community”
or “Configuring an SNMP v3 user” on page 191.
Name Displays the name of the SNMP community. The SNMP Manager
must be configured with this name.
Status A green check mark icon indicates that the community is enabled.
Queries A green check mark icon indicates that queries are enabled.
Traps A green check mark icon indicates that traps are enabled.
Name Displays the name of the SNMP v3 user. The SNMP Manager must be
configured with this name.
Status A green check mark icon indicates that the user is enabled.
Queries A green check mark icon indicates that queries are enabled.
Traps A green check mark icon indicates that traps are enabled.
Name Enter a name to identify the SNMP community. If you are editing an
existing community, you cannot change the name.
You can add up to 16 communities.
Enable Enable to send traps to and allow queries from the community’s SNMP
managers.
Community Lists SNMP managers that can use the settings in this SNMP
Hosts community to monitor the FortiMail unit. Click Create to create a new
entry.
You can add up to 16 hosts.
Create Click to add a new default entry to the Hosts list that you can edit as
(button) needed.
Queries Enter the Port number (161 by default) that the SNMP managers in this
community use for SNMP v1 and SNMP v2c queries to receive
configuration information from the FortiMail unit. Mark the Enable check
box to activate queries for each SNMP version.
Traps Enter the Local Port and Remote Port numbers (162 local, 162 remote by
default) that the FortiMail unit uses to send SNMP v1 and SNMP v2c
traps to the SNMP managers in this community. Enable traps for each
SNMP version that the SNMP managers use.
SNMP Event Enable each SNMP event for which the FortiMail unit should send traps
to the SNMP managers in this community.
Note: Since FortiMail checks its status in a scheduled interval, not all the
events will trigger traps. For example, FortiMail checks its hardware
status every 60 seconds. This means that if the power is off for a few
seconds but is back on before the next status check, no system event
trap will be sent.
User name Enter a name to identify the SNMP user. If you are editing an existing
user, you cannot change the name.
Enable Enable to send traps to and allow queries from the user’s SNMP
managers.
Authenticatio For Security level, if you select either Authentication option, you must
n Protocol specify the authentication protocol and password. Both the
authentication protocol and password on the SNMP manager and
FortiMail must match.
Privacy For Security level, if you select Privacy, you must specify the encryption
protocol protocol and password. Both the encryption protocol and password on
the SNMP manager and FortiMail must match.
Notification Lists the SNMP managers that FortiMail will send traps to. Click Create
Hosts to create a new entry. You can add up to 16 host.
Create Click to add a new default entry to the Hosts list that you can edit as
(button) needed.
Queries Enter the Port number (161 by default) that the SNMP managers use for
SNMP v3 queries to receive configuration information from the FortiMail
unit. Select the Enable check box to activate queries.
Traps Enter the Local Port and Remote Port numbers (162 local, 162 remote by
default) that the FortiMail unit uses to send SNMP v3 traps to the SNMP
managers. Select the Enable check box to activate traps.
SNMP Event Enable each SNMP event for which the FortiMail unit should send traps
to the SNMP managers.
Note: Since FortiMail checks its status in a scheduled interval, not all the
events will trigger traps. For example, FortiMail checks its hardware
status every 60 seconds. This means that if the power is off for a few
seconds but is back on before the next status check, no system event
trap will be sent.
FortiMail MIBs
The FortiMail SNMP agent supports Fortinet proprietary MIBs as well as standard RFC 1213
and RFC 2665 MIBs. RFC support includes support for the parts of RFC 2665 (Ethernet-like
MIB) and the parts of RFC 1213 (MIB II) that apply to FortiMail unit configuration.
fortimail.mib Displays the proprietary Fortinet MIB includes detailed FortiMail system
configuration information. Your SNMP manager requires this
information to monitor FortiMail configuration settings. For more
information, see “MIB fields” on page 194.
fortimail.trap.mib Displays the proprietary Fortinet trap MIB includes FortiMail trap
information. Your SNMP manager requires this information to receive
traps from the FortiMail SNMP agent. For more information, see
“FortiMail traps” on page 193.
FortiMail traps
The FortiMail unit’s SNMP agent can send traps to SNMP managers that you have added to
SNMP communities. To receive traps, you must load and compile the FortMail trap MIB into the
SNMP manager.
All traps sent include the trap message as well as the FortiMail unit serial number and host
name.
Trap Description
MIB fields
The Fortinet MIB contains fields reporting current FortiMail unit status information. The tables
below list the names of the MIB fields and describe the status information available for each.
You can view more details about the information available from all Fortinet MIB fields by
compiling the MIB file into your SNMP manager and browsing the MIB fields.
Table 16: MIB fields
fmlSysOptIdleTimeout Idle period after which the administrator is automatically logged out
off the system.
Go to System > Mail Settings to configure assorted settings that apply to the SMTP server and
webmail server that are built into the FortiMail unit.
Local domain Enter the local domain name to which the FortiMail unit belongs.
name
The local domain name is used in many features such as email quarantine,
Bayesian database training, quarantine report, and delivery status
notification (DSN) email messages.
FortiMail unit’s fully qualified domain name (FQDN) is in the following format:
<host-name>.<local-domain-name>
such as fortimail-400.example.com, where fortimail-400 is the
“Host name” on page 198 and example.com is the “Local domain name”
on page 198.
Note: The IP address should be globally resolvable into the FQDN of the
FortiMail unit if it will relay outgoing email. If it is not globally resolvable,
reverse DNS lookups of the FortiMail unit’s domain name by external SMTP
servers will fail. For quarantine reports, if the FortiMail unit is operating in
server mode or gateway mode, DNS records for the local domain name may
need to be globally resolvable to the IP address of the FortiMail unit. If it is
not globally resolvable, web and email release/delete for the per-recipient
quarantines may fail.
Note: The “Local domain name” on page 198 is not required to be different
from or identical to any protected domain. It can be a subdomain or different,
external domain. For example, a FortiMail unit whose FQDN is
fortimail.example.com could be configured with the protected domains
example.com and accounting.example.net.
When sending out qurantine reports, if the FortiMail local domain name is
different from its protected domains, FortiMail will use its local domain name,
because the local domain name is unique; however, if the FortiMail local
domain is the same as one of its protected domains, FortiMail will use its
FQDN to send out reports, so as to distinguish itself from the protected
domains or other subdomains.
SMTP server Enter the port number on which the FortiMail unit’s SMTP server will listen
port number for SMTP connections. The default port number is 25.
SMTP over Enable to allow SSL- and TLS-secured connections from SMTP clients that
SSL/TLS request SSL/TLS.
When disabled, SMTP connections with the FortiMail unit’s built-in MTA
must occur as clear text, unencrypted.
Note: This option must be enabled to receive SMTPS connections. However,
it does not require them. To enforce client use of SMTPS, see “Configuring
access control rules” on page 366.
SMTPS server Enter the port number on which the FortiMail unit’s built-in MTA listens for
port number secure SMTP connections. The default port number is 465.
This option is unavailable if SMTP over SSL/TLS is disabled.
SMTP MSA Enable let your email clients use SMTP for message submission on a
service separate TCP port number from deliveries or mail relay by MTAs.
For details on message submission by email clients as distinct from SMTP
used by MTAs, see RFC 2476.
SMTP MSA port Enter the TCP port number on which the FortiMail unit listens for email
number clients to submit email for delivery. The default port number is 587.
POP3 server Enter the port number on which the FortiMail unit’s POP3 server will listen for
port number POP3 connections. The default port number is 110.
This option is available only if the FortiMail unit is operating in server mode.
Default domain If you set one domain as the default domain, users on the default domain
for only need to enter their user names without the domain part for
authentication webmail/SMTP/IMAP/POP3 authentication, such as user1. Users on the
non-default domains must enter both the user name part and domain part to
authentication, such as [email protected].
DSN (NDR) Enable to allow the FortiMail unit to send DSN messages to notify email
email users of delivery delays and/or failure.
generation
Note that if the email message triggers an antispam or antivirus profile, no
DSN message will be sent. If it triggers a content profile, a DSN message will
still be sent.
Maximum time Select the maximum number of hours that deferred email messages
for email in can remain in the deferred or quarantined email queue, during which
queue the FortiMail unit periodically retries to send the message.
After it reaches the maximum time, the FortiMail unit sends a final
delivery status notification (DSN) email message to notify the sender
that the email message was undeliverable.
Maximum time Select the maximum number of hours a delivery status notification
for DSN email in (DSN) message can remain in the mail queues. After it reaches the
queue maximum, the FortiMail unit moves the DSN email to the dead mail
folder.
If set to zero (0), the FortiMail unit attempts to deliver the DSN only
once.
Time before Select the number of hours after an initial failure to deliver an email
delay warning message before the FortiMail unit sends the first delivery status
notification (DSN) message to notify the sender that the email
message was deferred.
After sending this initial DSN, the FortiMail unit continues trying to
sending the email until reaching the limit configured in “Maximum
time for email in queue” on page 200.
Time interval for Select the number of minutes between delivery retries for email
retry messages in the deferred and spam mail queues.
Dead mail Enter the number of days that undeliverable email and its associated
retention period DSN will be kept in the dead mail folder. After this time, the dead
email and its DSN are automatically deleted.
Deliver to relay host Select a relay that you configured in “Configuring SMTP relay hosts”
on page 203.
Disable ESMTP Mark the check box to disable (ESMTP) for outgoing email.
By default, FortiMail units can use ESMTP commands. ESMTP
supports email messages with graphics, sound, video, and text in
various languages. For more information on ESMTP, see RFC 1869.
Delivery Failure When email delivery fails, you can choose to use the mail queue
Handling settings (“Configuring mail queue setting” on page 200) to handle the
temporary or permanent failures. You can also try another relay that
you know might work.
Normal Select this option if you want to queue the email and use the mail
queue settings.
Deliver to relay Select another relay (backup relay) that you want to use for failed
host deliveries. Then specify how long the undelivered email should wait
in the normal queue before trying the backup relay.
You can also specify which types of failed connections the backup
relay should take over and retry:
• DNS failure: failed DNS lookups
• Network failure -- connection
• Network failure -- other
• Temporary failure from remote MTA (4XX reply code)
• Permanent failure from remote MTA (5XX reply code)
Perform LDAP Enable to verify the existence of domains that are not configured as
domain protected domains. Also configure “LDAP profile for domain check” on
verification for page 203.
unknown
To verify the existence of unknown domains, the FortiMail unit queries an
domains
LDAP server for a user object that contains the email address. If the user
object exists, the verification is successful, and:
• If “Automatically create domain association for verified domain” on
page 203 is enabled, the FortiMail unit automatically adds the unknown
domain as a domain associated of the protected domain selected in
Internal domain to hold association.
• If “Automatically create domain association for verified domain” on
page 203 is disabled, and the LDAP domain name lookup of the
unknown domain name is successful, the FortiMail unit routes the email
to the IP address resolved for the domain name during the lookup.
Because the domain is not formally defined as a protected domain, the
email is considered to be outgoing, and outgoing recipient-based policies
are used to scan the email. For more information, see “Controlling email
based on sender and recipient addresses” on page 384.
LDAP profile for Select the LDAP profile to use when verifying existence of unknown
domain check domains. The LDAP query is configured under User Query Options in an
LDAP profile. If you also enable the domain lookup option in the LDAP
profile, the option must be enabled for the domain.
This option is available only if “Perform LDAP domain verification for
unknown domains” on page 203 is enabled.
Internal domain Select the name of a protected domain with which to associate unknown
to hold domain domains, if they pass domain verification. However, if the domain lookup
association query (see “Configuring domain lookup options” on page 475) returned its
own parent domain, that parent domain is used.
This option is available only if “Automatically create domain association for
verified domain” on page 203 is enabled.
Server relay is ignored if the FortiMail unit is operating in transparent mode, and “Use
client-specified SMTP server to send email” on page 219 (for outgoing connections) or “Use
this domain’s SMTP server to deliver the mail” on page 317 (for incoming connections
containing outgoing email messages) is enabled.
Server relay is ignored for email that matches an antispam or content profile where you have
enabled “Deliver to alternate host” on page 434.
Port Enter the TCP port number on which the SMTP relay listens.
This is typically provided by your Internet service provider (ISP).
Use SMTPS Enable to initiate SSL- and TLS-secured connections to the SMTP relay if it
supports SSL/TLS.
When disabled, SMTP connections from the FortiMail unit’s built-in MTA or
proxy to the relay will occur as clear text, unencrypted.
This option must be enabled to initiate SMTPS connections.
Authentication If the relay server requires use of the SMTP AUTH command, enable this
Required option, click the arrow to expand the section and configure:
• User name: Enter the name of the FortiMail unit’s account on the SMTP
relay.
• Password: Enter the password for the FortiMail unit’s user name.
• Authentication type: Available SMTP authentication types include:
• AUTO (automatically detect and use the most secure SMTP
authentication type supported by the relay server)
• PLAIN (provides an unencrypted, scrambled password)
• LOGIN (provides an unencrypted, scrambled password)
• DIGEST-MD5 (provides an encrypted hash of the password)
• CRAM-MD5 (provides an encrypted hash of the password, with hash
replay prevention, combined with a challenge and response mechanism)
• NTLM (supports NT LAN Manager protocols and provides an hashed
password)
If “Allow per-domain settings” on page 206 is enabled, you can configure disclaimer messages
that are specific to each protected domain. For more information, see “Disclaimer for a domain”
on page 323.
Allow per-domain settings Enable to allow protected domains to select from either the
system-wide disclaimer messages, configured below, or
their own separate disclaimer messages.
Disable to require that all protected domains use the
system-wide disclaimer messages.
If this option is disabled, domain-specific disclaimers
cannot be configured. For information on configuring
disclaimer messages specific to a protected domain, see
“Disclaimer for a domain” on page 323.
Insert new header Enable to insert a new header to the email and append a
disclaimer message to the new header, then enter the
disclaimer message. The maximum length is 256
characters.
Insert disclaimer at Select to insert the disclaimer at the end or start of the
email and click Edit to author a disclaimer. This disclaimer
can be in HTML or text. The maximum length is 1024
characters.
Enable disclaimer exclusion If you do not want to insert disclaimers to the email
list messages from certain senders or to certain recipients, you
can enable this option. For details about disclaimer
exclusion list, see “Configuring disclaimer exclusion list” on
page 206.
If the FortiMail unit is a member of an active-passive HA group, and the HA group stores mail
data on a remote NAS server, disable mail data synchronization to prevent duplicate mail data
traffic. For details, see “Configuring the HA mode and group” on page 254.
If you store the mail data on a remote NAS device, you cannot back up the data. You can only
back up the mail data stored locally on the FortiMail hard disk. For information about backing
up mail data, see “Configuring mailbox backups” on page 305.
If you choose remote storage, mail data will not be duplicated locally. Mail data on remote
storage cannot be transferred back to local storage either, if you choose to switch to local
storage later.
NAS section
Local Select to store email on the FortiMail unit’s local disk or RAID.
NAS server Select to store email on a remote network attached storage (NAS)
server.
Test Click to verify the NAS server settings are correct and that the
FortiMail unit can access that location. The test action basically tries
(button)
to discover, login, mount, and unmount the remote device.
This button is available only when NAS server is selected.
Refresh This button appears when you configure an iSCSI server. Click it to
update the information in the Status field.
(button)
Click here to These two links appear when you configure an iSCSI server and click
format this Apply.
device
Click a link to initiate the described action (that is, format the device
or check its file system). A message appears saying the action is
Click here to
being executed. Click OK to close the message and click Refresh to
check file
see a Status update.
system on
this device Note: If the ISCSI disk has never been formatted, FortiMail needs to
format it before it can be used. If the disk has been formatted before,
you do not need to format it again. unless you want to wipe out the
data on it.
Disabled Select to store the quarantines on the FortiMail unit’s local disk or
RAID.
Centralized IBE
section
Disabled Select to store IBE encrypted email on the FortiMail unit’s local disk
or RAID.
Receive IBE Select to have this FortiMail unit act as a centralized IBE mail storage
messages server, then enter the IP addresses of all valid clients which are the
from clients FortiMail units that are configured to send IBE messages to this unit.
This option is available on some high end models.
FortiMail VM02, 400E, 1000D and 2000E models can host a
maximum of 10 clients and FortiMail 3000 series and above models
can host up to 20 clients. Any FortiMail model can be a client.
Other FortiMail units acting as clients send all their IBE email to this
FortiMail unit. This FortiMail unit will only accept a connection if the
client’s IP address matches an IP address on the list of clients
configured here.
Note: The protected domains on the IBE mail server must match the
domains on the clients. Otherwise the secure mail recipients cannot
retrieve their secure email from the server.
Send IBE Select to have this FortiMail unit act as a centralized IBE storage
messages to client. All IBE email will be saved on the centralized IBE mail storage
remote server, if available.
server over
When selected, enter the following information:
SSL
• Name: Enter a name to identify this client to the centralized IBE
mail storage server. This value must match the name of the client
as it is configured on the centralized IBE mail storage server.
Otherwise, the connection will fail.
• Host: Enter the IP address of the FortiMail unit that is acting as a
centralized IBE mail storage server.
You can determine whether a connection was handled using the built-in MTA or one of the
proxies by viewing the Mailer column of the history log messages.
• mta: The connection was handled by the built-in MTA.
• proxy: The connection was handled by either the incoming proxy or the outgoing proxy.
For information on viewing the history log, see “Viewing log messages” on page 131.
Directionality at the connection level may be different than directionality at the level of
email messages contained by the connection. It is possible that an incoming connection
could contain an outgoing email message, and vice versa.
For example, in Figure 25 on page 214, connections from the internal mail relays to the internal
mail servers are outgoing connections, but they contain incoming email messages. Conversely,
connections from remote MUAs to the internal mail relays are incoming connections, but may
contain outgoing email messages if the recipients’ email addresses (RCPT TO:) are external.
For information on the concept of incoming versus outgoing at the application layer, see
“Inbound versus outbound email” on page 363.
When the FortiMail unit is operating in transparent mode, directionality correlates with which
proxy will be used, if any.
For example, in Figure 25 on page 214, the protected domain is example.com. Mailboxes for
example.com are stored on servers located at the company’s headquarters, separate from the
mail relays, which are located at a branch office. All email is routed through the mail relays, and
so the FortiMail unit is deployed in front of the mail relays at the branch office.
On the FortiMail unit, you have configured the protected domain’s “SMTP Server” on page 311
to be 192.168.0.1, a mail relay, because all email must be routed through that mail relay. You
have also enabled “Use client-specified SMTP server to send email” on page 219, so, for
outgoing connections, the outgoing proxy will be used instead of the built-in MTA. However, you
You can configure interception and transparency separately for each of the two proxies.
Regardless of which proxy is used, the proxy may not be fully transparent unless you have
configured it to be so. For details, see “Transparency of the proxies and built-in MTA” on
page 215.
Remote MUA
SMTP Server:
Connection
192.168.0.1
could contain
either incoming
TELECOMMUTE
WORKERS or outgoing email Protected Domain’s
External MTAs messages “SMTP Server”
10.0.0.1 Internal Mail Relays
192.168.0.1
port2 port1
TRANSPARENT MODE
Incoming
connection
contains
outgoing
email Outgoing
messages connection
contains incoming
email messages
INCOMING
CONNECTION
(DST IP=192.168.0.1)
OUTGOING 172.16.0.1
CONNECTION
(DST IP=NOT 192.168.0.1) Internal Mail Servers
Setting Value
MUAs’ SMTP server/MTA the virtual IP on the FortiGate unit, or other public IP
address, that routes to 192.168.0.1 (the internal mail
relays)
INCOMING
CONNECTION
(DST IP=192.168.0.1) Protected Domain’s
OUTGOING “SMTP Server”
External MTAs CONNECTION
10.0.0.1 (DST IP=NOT 192.168.0.1) Internal Mail Relay
192.168.0.1
TRANSPARENT MODE
port2 port1
192.168.0.2
0
Internal Mail
Connection
Implicit MTA Server
could contain
Remote MUA either incoming intercepts and
SMTP Server: or outgoing email redirects to
192.168.0.2 messages the recipient’s
domain’s MX
TELECOMMUTE
WORKERS
Setting Value
MUAs’ SMTP server/MTA the virtual IP on the FortiGate unit, or other public
IP address, that routes to 192.168.0.2 (the internal
mail server, not the internal mail relays)
MX record for each protected domain on domain name resolving to 192.168.0.1 (the internal
the internal DNS server mail relays)
Unlike external MTAs making incoming connections to the relays, remote MUAs instead make
outgoing connections through port2: their destination is the internal mail server, whose IP
address is not configured in the protected domain. (The protected domain’s “SMTP Server” on
page 311 field is instead configured with the IP address of the internal mail relay.) As a result,
you can configure pick-up for these connections separately from those of external MTAs — they
pass through the same port, but are distinct in their directionality.
In this case, we want to intercept connections for both external MTAs and remote MUAs. To
solve this, we select Proxy for both “Incoming connections” on page 171 from external MTAs
and “Outgoing connections” on page 171 (from remote MUAs) on port 2. (If we wanted to block
remote MUAs only, we could simply select Drop for “Outgoing connections” on page 171 on
port2.)
However, the remote MUAs’ configuration also means that the directionality of remote MUAs’
connections coincides with that of the internal relays’ connections to external relays: both are
outgoing. Therefore if you configure the FortiMail unit to proxy outgoing connections instead of
using the built-in MTA by enabling “Use client-specified SMTP server to send email” on
page 219, both outgoing connections are proxied.
Remote MUAs’ connections would all travel through the internal mail server, regardless of
whether the recipient has an account on that mail server or not. Outgoing email would then
need to be forwarded to the internal mail relay, and back out through the FortiMail unit. The
result? Outgoing email from remote MUAs would travel extra mail hops. This would burden the
internal network with traffic destined for an external network, and needlessly increases points of
potential failure.
Additionally, because the FortiMail unit is deployed directly in front of both the relays and the
mail server, which is not on the same network as remote MUAs, remote MUAs’ outgoing email
If this option is enabled, consider also enabling “Prevent open relaying” on page 405. Failure to
do so could allow clients to use open relays.
If this option is disabled, and an SMTP client is configured to authenticate, you must configure
and apply an authentication profile. Without the profile, authentication with the built-in MTA will
fail. Also, the mail server must be explicitly configured to allow relay from the built-in MTA in this
case.
If this option is enabled, you cannot use IP pools. For more information, see “Configuring IP
pools” on page 501.
For security reasons, this option does not apply if there is no session profile selected in the
applicable IP-based policy. For more information on IP policies, see “Controlling email based on
IP addresses” on page 378.
Creating variables
In addition to the predefined variables, you can create new ones to customize replacement
messages and email templates. Typically, these variables represent messages that you will use
frequently. You can modify the variables that you create, but you cannot edit or delete the
predefined variables.
%%FILE%% The name of the file that is System > Customization >
infected with a virus. Custom Message >
Replacement > Virus
%%VIRUS%% The name of the virus that has message
infected the file.
%%FILE%% The name of the file that was System > Customization >
removed from the email. Custom Message >
Replacement > Suspicious
message
%%EMAIL_ID%% The ID that FortiMail assigns to the System > Customization >
the quarantined email. Note that Custom Email Template >
this email ID is different from the Report > Quarantine
standard message ID in the email summary
header.
%%QUARANTINE_TO%% The end time of the quarantine System > Customization >
summary. Custom Email Template >
Report > Quarantine
%%SPAM_DELETE_ALL_EMA Under email actions in the summary
IL%% quarantine summary, the Click
Here link that, if being clicked,
sends an email to delete all
quarantined messages.
%%SERVICE_NAME%% The From, To, and Subject lines of System > Customization >
the secure message. Custom Message > Secure
message > Secure
message header
%%DAY%% The day when the link in the System > Customization >
notification to reset the account Custom Email Template >
will expire. Secure message > Account
reset notification
%%LINK_URI%% The link in the notification that you
can click to complete the account
reset.
%%DAY%% The day when the link in the System > Customization >
notification to reset the password Custom Email Template >
will expire. Secure message >
Password reset notification
%%LAST_NAME%% The last name of the notification
recipient.
%%LINK_URI%% The link in the notification that you System > Customization >
can click to complete the Custom Email Template >
password reset. Secure message >
Password reset notification
%%SERVICE_NAME%% Signature of the notification.
%%URI_ABOUT%% The About link in the notification System > Customization >
about secure email. Custom Email Template >
Secure message > Secure
%%SEMAIL_SUBJECT%% The subject of the notification. message notification - Push
%%EVENT_LOCATION%% The location where the event is to System > Customization >
be held. Custom Email Template >
Notification > Calendar
%%EVENT_TITLE%% The nature of the event. For event notification
example, meeting or party.
%%LOCAL_HOST_NAME%% Host name of the FortiMail unit System > Customization >
which sends out the notification. Custom Email Template >
Notification
%%LOCAL_DOMAIN_NAME%% Domain name of the Fortimail unit
which sends out the notification.
Admin Portal
Product name Enter the name of the product. This name will precede
Administrator Login in the title on the login page of the web UI.
Product icon Select Change to upload an icon that will be used as the favicon
of the FortiMail web UI. The default icon is the Fortinet company
icon.
Custom top logo Select Change to upload a graphic that will appear at the top of
all pages in the web UI. The image’s dimensions must be 460
pixels wide by 36 pixels tall.
For best results, use an image with a transparent background.
Non-transparent backgrounds will not blend with the underlying
theme graphic, resulting in a visible rectangle around your logo
graphic.
Note: Uploading a graphic overwrites the current graphic. The
FortiMail unit does not retain previous or default graphics. If you
want to revert to the current graphic, use your web browser to
save a backup copy of the image to your management computer,
enabling you to upload it again at a later time.
Default language Select the default language for the display of the web-based
manager and the login page.
You can configure a separate language preference for each
administrator account. For details, see “Configuring
administrator accounts” on page 182.
Default theme Select the default display theme (red, green, blue, and light blue)
for the display of the web-based manager and the login page.
You can configure a separate theme preference for each
administrator account. For details, see “Configuring
administrator accounts” on page 182.
Webmail Portal
Webmail login Enter a word or phrase that will appears on top of the webmail
login page, such as Webmail Login.
Login user name Enter a hint for the user name, such as Your Email Address. This
hint hint will appear as a mouse-over display on the login name field.
Allow user to If selected, the webmail users will be able to customize the
change theme theme by themselves.
Show online help If selected, the Help button will appear on the webmail interface.
link The default help contents are provided by Fortinet.
If you want to use your own organization’s help contents, you can
enable this option and enter the online help URL in the below
field.
Custom online Enter the URL if you want to use your own online help file,
help URL instead of the default one that comes with FortiMail.
Custom webmail Click Change to upload a graphic that will appear at the top of all
top logo webmail pages. The image’s dimensions must be 314 pixels wide
by 36 pixels tall.
Note: Uploading a graphic overwrites the current graphic. The
FortiMail unit does not retain previous or default graphics. If you
want to revert to the current graphic, use your web browser to
save a backup copy of the image to your management computer,
enabling you to upload it again at a later time.
Default language Select the language in which webmail pages will be displayed. By
default, the FortiMail unit will use the same language as the web
UI. For web UI language settings, see “Configuring system
options” on page 186.
Webmail language Displays the list of languages installed on the FortiMail unit in
customization English and in their own language.
• Create: Click to add a new language to the list. See “To add a
custom language” on page 232.
• Download: Select a language in the list, then click this button
to download the language’s resource file for that language.
You can then edit the resource files using an XML editor that
supports UTF-8.
• Upload: Select a language in the list, then click this button to
update the language’s resource file for this language from
your management computer to the FortiMail unit. In addition
to uploading new language resource files, you can also use
this button to update existing languages.
• Delete: Select a language in the list, then click this button to
remove the language. This option is available only for
non-default languages.
When webmail SSO is enabled, CalDav and WebDav authentication will not be working
because they only support simple local password authentication.
To configure SSO
1. Go to System > Customization > Single Sign On
2. Configure the following:
Apply to Apply SSO to Webmail portal and/or Admin portal. If SSO is enabled for the
admin portal, the administrator login page will be presented with a SSO
option. If SSO is enabled for the webmail portal, the webmail login page will
be the SSO login page.
Identify You choose to retrieve the metadata from the IDP URL or upload from a file.
Provider (IDP)
Metadata
FortiMail After you uploaded the IDP metadata, the FortiMail service provider
Service metadat will be automatically generated.
Provider
You can download the service provider metadata and upload it to the IDP.
Metada
If your FortiMail model supports RAID, go to System > RAID to configure a redundant array of
independent disks (RAID) for the FortiMail hard disks that are used to store logs and email.
Most FortiMail models can be configured to use RAID with their hard disks. The default RAID
level should give good results, but you can modify the configuration to suit your individual
requirements for enhanced performance and reliability. For more information, see “Configuring
RAID for FortiMail models with software RAID controllers” on page 235 or “Configuring RAID on
FortiMail models with hardware RAID controllers” on page 237.
For some FortiMail models, you can configure the RAID levels for the local disk partitions used
for storing email files or log files, depending on your requirements for performance, resiliency,
and cost.
RAID events can be logged and reported with alert email. These events include disk full and
disk failure notices. For more information, see “About FortiMail logging” on page 579, and
“Configuring alert email” on page 593.
If your FortiMail model does not support RAID, the tab in the RAID menu displays the message,
RAID is not available on this system.
1 0 0
2 0, 1 1
3 0, 1 + hot spare, 5 5
4 5 + hot spare, 10 10
6 10, 50 10
Hot spares
FortiMail models with a hardware RAID controller have a hot spare RAID option. This feature
consists of one or more disks that are pre-installed with the other disks in the unit. The hot
spare disk is idle until an active hard disk in the RAID fails. Then the RAID immediately puts the
hot spare disk into service and starts to rebuild the data from the failed disk onto it. This
rebuilding may take up to several hours depending on system load and amount of data stored
on the RAID, but the RAID continues without interruption during the process.
The hot spare feature has one or more extra hard disks installed with the RAID. A RAID 10
configuration requires two disks per RAID 1, and has only one hot spare disk. A RAID 50
configuration requires three disks per RAID 5, and can have up to two hot spare disks.
Device Displays the name of the RAID unit. This indicates whether it is used for log
message data or for mailboxes, mail queues, and other email-related data.
This is hard-coded and not configurable.
Unit Displays the internal mount point of the RAID unit. This is hard-coded and
not configurable.
Level Displays the RAID level that indicates whether it is configured for optimal
speed, failure tolerance, or both. For more information on RAID levels, see
“About RAID levels” on page 234.
Resync If the RAID unit is not synchronized and you have clicked Click here to
Status check array to cause it to rebuild itself, such as after a hard disk is replaced
in the RAID unit, a progress bar indicates rebuild progress.
The progress bar appears only when Click here to check array has been
clicked and the status of the RAID is not clean no-errors.
Speed Displays the average speed in kilobytes (KB) per second of the data transfer
for the resynchronization. This is affected by the disk being in use during the
resynchronization.
Refresh Click to manually initiate the tab’s display to refresh itself with current
information.
(button)
ID/Port Indicates the identifier of each hard disk visible to the RAID controller.
Part of Unit Indicates the RAID unit to which the hard disk belongs, if any.
To be usable by the FortiMail unit, you must add the hard disk to a RAID
unit.
2. In the Level column, click the row corresponding to the RAID device whose RAID level you
want to change.
The Level field changes to a drop-down menu.
3. Select RAID level 0 or 1.
4. Click Apply.
A warning message appears.
5. Click Yes to confirm the change.
To configure RAID
1. Go to System > RAID > RAID System.
Set RAID level Select the RAID level, then click Change.
For more information about RAID levels, see “About RAID levels” on
page 234.
Change Select the RAID style, then click this button to apply the RAID level.
(button)
Re-scan Click to rebuild the RAID unit with disks that are currently a member
(button) of it, or detect newly added hard disks, and start a diagnostic check.
Size Indicates the total disk space, in gigabytes (GB), available for the
RAID unit.
Available space varies by your RAID level selection. Due to some
space being consumed to store data required by RAID, available
storage space will not equal the sum of the capacities of hard disks
in the unit.
Ignore ECC Click turn on to ignore the Error Correcting Code (ECC). This option
is off by default.
Ignoring the ECC can speed up building the RAID, but the RAID will
not be as fault-tolerant.
This option is not available on FortiMail-2000B/3000C models.
ID/Port Indicates the identifier of each hard disk visible to the RAID
controller.
Part of Unit Indicates the RAID unit to which the hard disk belongs, if any.
To be usable by the FortiMail unit, you must add the hard disk to a
RAID unit.
Back up data on the disk before beginning this procedure. Changing the device’s RAID level
temporarily suspends all mail processing and erases all data on the hard disk. For more
information on creating a backup, see “Backup and restore” on page 299.
To locate the correct hard disk to remove on a FortiMail-2000B or 3000C, refer to the
following diagram.
To locate the correct hard disk to remove on a FortiMail-4000A, look for the failed disk. (Disk
drive locations vary by the RAID controller model.)
5. Replace the hard disk with a new hard disk, inserting it into its drive bay on the FortiMail unit.
6. Click Re-scan.
The RAID controller will scan for available hard disks and should locate the new hard disk.
Depending on the RAID level, the FortiMail unit may either automatically add the new hard
disk to the RAID unit or allocate it as a spare that will be automatically added to the array if
one of the hard disks in the array fails.
The FortiMail unit rebuilds the RAID array with the new hard disk. Time required varies by the
size of the array.
Go to System > High Availability to configure the FortiMail unit to act as a member of a high
availability (HA) cluster in order to increase processing capacity or availability.
For the general procedure of how to enable and configure HA, see “How to use HA” on
page 248.
This section contains the following topics:
• About high availability
• About the heartbeat and synchronization
• About logging, alert email and SNMP in HA
• How to use HA
• Monitoring the HA status
• Configuring the HA mode and group
• Configuring service-based failover
• Example: Failover scenarios
• Example: Active-passive HA group in gateway mode
Active-passive HA Config-only HA
No data loss when hardware fails Data loss when hardware fails
* For exceptions to synchronized configuration items, see “Configuration settings that are not
synchronized” on page 244.
Maill Server
Internal
network
Switch
Switch
Active-passive
HA Group
Mail Server
Internal
network
Load
Loa
ad bala
balancer
ncer
Config
Co
onfig
g only mode HA Gr
Group
roup
You can mix different FortiMail models in the same HA group. However, all units in the HA group
must have the same firmware version.
When mixing FortiMail models, the HA group is limited by the capacity and configuration limits
of the least powerful model.
To use FortiGuard Antivirus or FortiGuard Antispam with HA, license all FortiMail units in the
cluster. If you license only the primary unit in an active-passive HA group, after a failover, the
secondary unit cannot connect to the FortiGuard Antispam service. For FortiMail units in a
config-only HA group, only the licensed unit can use the subscription services.
For instructions of how to enable and configure HA, see “How to use HA” on page 248.
Service monitoring traffic can also, for short periods, be used as a heartbeat. For details, see
“Remote services as heartbeat” on page 258.
FortiGuard Antispam packages and FortiGuard Antivirus engines and definitions are not
synchronized between primary and secondary units.
When the primary unit’s configuration changes, it immediately synchronizes the change to the
secondary unit (or, in a config-only HA group, to the peer units) through the primary heartbeat
interface. If this fails, or if you have inadvertently de-synchronized the secondary unit’s
configuration, you can manually initiate synchronization. For details, see “Start configuration
sync” on page 251. You can also use the CLI command diagnose system ha sync on
either the primary unit or the secondary unit to manually synchronize the configuration. For
details, see the FortiMail CLI Reference.
During normal operation, the secondary unit expects to constantly receive heartbeat traffic from
the primary unit. Loss of the heartbeat signal interrupts the HA group, and, if it is active-passive
in style, generally triggers a failover. For details, see “Failover scenario 1: Temporary failure of
the primary unit” on page 265.
Exceptions include system restarts and the execute reload CLI command. In case of a
system reboot or reload of the primary unit, the primary unit signals the secondary unit to wait
for the primary unit to complete the restart or reload. For details, see “Failover scenario 2:
System reboot or reload of the primary unit” on page 266.
Periodically, the secondary unit checks with the primary unit to see if there are any configuration
changes on the primary unit. If there are configuration changes, the secondary unit will pull the
configuration changes from the primary unit, generate a new configuration, and reload the new
configuration. In this case, both the primary and secondary units send alert email. For details,
see “Failover scenario 3: System reboot or reload of the secondary unit” on page 267.
Behavior varies by your HA mode when the heartbeat fails:
• Active-passive HA
A new primary unit is elected: the secondary unit becomes the new primary unit and
assumes the duty of processing of email. During the failover, no mail data or configuration
changes are lost, but some in-progress email deliveries may be interrupted. These
interrupted deliveries may need to be restarted, but most email clients and servers can
gracefully handle this. Additional failover behaviors may be configured. For details, see “On
failure” on page 256.
Host name The host name distinguishes members of the cluster. For details, see
“Host name” on page 198.
Static route Static routes are not synchronized because the HA units may be in
different networks (see “Configuring static routes” on page 173).
Interface Each FortiMail unit in the HA group must be configured with different
configuration network interface settings for connectivity purposes. For details, see
“Configuring the network interfaces” on page 163.
(gateway and server
mode only) Exceptions include some active-passive HA settings which affect the
interface configuration for failover purposes. These settings are
synchronized. For details, see “Virtual IP Address” on page 276.
SNMP system Each FortiMail unit in the HA group will have its own SNMP system
information information, including the Description, Location, and Contact. For details,
see “Configuring the network interfaces” on page 163.
RAID configuration RAID settings are hardware-dependent and determined at boot time by
looking at the drives (for software RAID) or the controller (hardware
RAID), and are not stored in the system configuration. Therefore, they are
not synchronized.
If the failed primary unit effective HA operating mode is failed, a sequence similar to the
following occurs automatically when the problem that caused the failure is corrected.
1. The secondary unit detects the failure of the primary unit, and becomes the new primary
unit.
3. The former primary unit pushes its mail queue to the new primary unit.
This synchronization occurs through the heartbeat link between the primary and secondary
units, and prevents duplicate email messages from forming in the primary unit’s mail queue.
4. The new primary unit delivers email in its mail queues, including email messages
synchronized from the new secondary unit.
As a result, as long as the failed primary unit can restart, no email is lost from the mail queue.
Even if you choose to synchronize the mail queue, because its contents change very rapidly and
synchronization is periodic, there is a chance that some email in these directories will not be
synchronized at the exact moment a failover occurs.
To distinguish alert email from each member of the HA cluster, configure a different host name
for each member. For details, see “Host name” on page 198.
To use SNMP, configure each cluster member separately and enable HA events for the
community. If you enable SNMP for all units, they can all send SNMP traps. Additionally, you
can use an SNMP server to monitor the primary and secondary units for HA settings, such as
the HA configured and effective mode of operation. For details on SNMP, see “Configuring the
network interfaces” on page 163.
To aid in quick discovery and diagnosis of network problems, consider configuring SNMP,
Syslog, and/or alert email to monitor the HA cluster for failover messages.
How to use HA
In general, to enable and configure HA, you should perform the following:
1. If the HA cluster will use FortiGuard Antivirus and/or FortiGuard Antispam services, license
all FortiMail units in the HA group for the FortiGuard Antispam and FortiGuard Antivirus
services, and register them with the Fortinet Technical Support web site,
https://support.fortinet.com/.
2. Physically connect the FortiMail units that will be members of the HA cluster.
You must connect at least one of their network interfaces for heartbeat and synchronization
traffic between members of the cluster. For reliability reasons, Fortinet recommends that you
connect both a primary and a secondary heartbeat interface, and that they be connected
directly or through a dedicated switch that is not connected to your overall network.
3. For config-only clusters, configure each member of the cluster to store mail data on a NAS
server that supports NFS connections. (Active-passive groups may also use a NAS server,
but do not require it.) For details, see “Selecting the mail data storage location” on page 206.
4. On each member of the cluster:
• Enable the HA mode that you want to use (either active-passive or config-only) and select
whether the individual member will act as a primary unit or secondary unit within the
cluster. For information about the differences between the HA modes, see “About high
availability” on page 240.
• Configure the local IP addresses of the primary and secondary heartbeat and
synchronization network interfaces.
• For active-passive clusters, configure the behavior on failover, and how the network
interfaces should be configured for whichever FortiMail unit is currently acting as the
primary unit. Additionally, if the FortiMail units store mail data on a NAS, disable mail data
synchronization between members.
• For config-only clusters, if the FortiMail unit is a primary unit, configure the IP addresses
of its secondary units; if the FortiMail unit is a secondary unit, configure the IP address of
its primary unit.
For details, see “Configuring the HA mode and group” on page 254.
Mode Status
Effective Displays the mode that the unit is currently operating in, either:
Operating
• master: Acting as primary unit.
Mode
• slave: Acting as secondary unit.
• off: For primary units, this indicates that service/interface
monitoring has detected a failure and has taken the
primary unit offline, triggering failover. For secondary units,
this indicates that synchronization has failed once; a
subsequent failure will trigger failover. For details, see “On
failure” on page 256 and “Restart the HA system” on
page 252.
• failed: Service/network interface monitoring has detected a
failure and the diagnostic connection is currently
determining whether the problem has been corrected or
failover is required. For details, see “On failure” on
page 256.
The configured HA operating mode matches the effective
operating mode unless a failure has occurred.
For example, after a failover, a FortiMail unit configured to
operate as a secondary unit could be acting as a primary unit.
For explanations of combinations of configured and effective
HA modes of operation, see “Monitoring the HA status” on
page 249.
For information on restoring the FortiMail unit to an effective
HA operating mode that matches the configured operating
mode, see “Restore to configured operating mode” on
page 252.
This option appears only if the FortiMail unit is a member of an
active-passive HA group.
Daemon Status
Data Displays the time at which the secondary unit HA daemon will
synchronize mail data from the primary unit to the secondary
unit.
The message slave unit is currently
synchronizing appears when the HA daemon is
synchronizing data.
For details, see “Backup mail data directories” on page 257
and “Backup MTA queue directories” on page 257.
This option appears only for secondary units in active-passive
HA groups.
Switch to SLAVE mode Click to manually switch the effective HA operating mode of
the primary unit so that it becomes a secondary unit.
This option appears only if the FortiMail unit is currently
operating as a primary unit.
Restart the HA system Click to restart HA processes after they have been halted due
to detection of a failure by service monitoring. For details, see
“On failure” on page 256, “Configuring service-based failover”
on page 262, and “Restarting the HA processes on a stopped
primary unit” on page 253.
This option appears only if the FortiMail unit is configured to
operate as the primary unit (master), but its effective HA
operating mode is off.
master off The primary unit has experienced a failure, or the FortiMail unit is in
the process of switching to operating in HA mode.
HA processes and email processing are stopped.
slave off The secondary unit has detected a failure, or the FortiMail unit is in
the process of switching to operating in HA mode.
After the secondary unit starts up and connects with the primary unit
to form an HA group, the first configuration synchronization may fail
in special circumstances. To prevent both the secondary and
primary units from simultaneously acting as primary units, the
effective HA mode of operation becomes off.
If subsequent synchronization fails, the secondary unit’s effective
HA mode of operation becomes master.
master failed The remote service monitoring or local network interface monitoring
on the primary unit has detected a failure, and will attempt to
connect to the other FortiMail unit. If the problem that caused the
failure has been corrected, the effective HA mode of operation
switches from failed to slave, or to match the configured HA mode of
operation, depending on the On failure setting.
Additionally, f the HA group is operating in transparent mode, and if
the effective HA mode of operation changes to failed, the network
interface IP/netmask on the secondary unit displays bridging
(waiting for recovery). For details, see “Configuring the network
interfaces” on page 163.
master slave The primary unit has experienced a failure but then returned to
operation. When the failure occurred, the unit configured to be the
secondary unit became the primary unit. When the unit configured
to be the primary unit restarted, it detected the new primary unit and
so switched to operating as the secondary unit.
slave master The secondary unit has detected that the FortiMail unit configured to
be the primary unit failed. When the failure occurred, the unit
configured to be the secondary unit became the primary unit.
config slave N/A Normal for the secondary unit of a config-only HA group.
To configure HA options
1. Go to System > High Availability > Configuration.
The appearance of sections and the options in them options vary greatly with your choice in
the Mode of operation drop-down-list.
Mode of Enables or disables HA, selects active-passive or config-only HA, and selects
operation the initial configured role this FortiMail unit in the HA group.
• off: The FortiMail unit is not operating in HA mode.
• master: The FortiMail unit is the primary unit in an active-passive HA group.
• slave: The FortiMail unit is the secondary unit in an active-passive HA
group.
• config master: The FortiMail unit is the primary unit in a config-only HA
group.
• config slave: The FortiMail unit is a secondary unit in a config-only HA
group.
Caution: For config-only HA, if the FortiMail unit is operating in server mode,
you must store mail data externally, on a NAS server. Failure to store mail data
externally could result in mailboxes and other data scattered over multiple
FortiMail units. For details on configuring NAS, see “Storing mail data on a
NAS server” on page 259 and “Selecting the mail data storage location” on
page 206
On failure Select one of the following behaviors of the primary unit when it detects a
failure, such as on a power failure or from service/interface monitoring.
• switch off: Do not process email or join the HA group until you manually
select the effective operating mode (see “Restart the HA system” on
page 252 and “Restore to configured operating mode” on page 252).
• wait for recovery then restore original role: On recovery, the failed primary
unit‘s effective HA mode of operation resumes its configured master role.
This also means that the secondary unit needs to give back the master role
to the primary unit. This behavior may be useful if the cause of failure is
temporary and rare, but may cause problems if the cause of failure is
permanent or persistent.
• wait for recovery then restore slave role: On recovery, the failed primary
unit’s effective HA mode of operation becomes slave, and the secondary
unit continue to assume the master role. The primary unit then
synchronizes the content of its MTA queue directories with the current
master unit. The new master unit can then deliver email that existed in the
former primary unit’s MTA queue at the time of the failover. For information
on manually restoring the FortiMail unit to acting in its configured HA mode
of operation, see “Restore to configured operating mode” on page 252.
In most cases, you should select the wait for recovery then restore slave role
option.
This option appears only if “Mode of operation” on page 255 is master.
Shared Enter an HA password for the HA group. You must configure the same Shared
password password value on both the primary and secondary units.
Because the backup settings are not synchronized, to use this feature, you must enable it on
both the master and slave units.
Backup mail Synchronize system quarantine, email archives, email users’ mailboxes (server
data mode only), preferences, and per-recipient quarantines.
directories
Unless the HA cluster stores its mail data on a NAS server, you should
configure the HA cluster to synchronize mail directories.
If mail data changes frequently, you can manually initiate a data
synchronization when significant changes are complete. For details, see “Start
configuration sync” on page 251.
Backup MTA Synchronize the mail queue of the FortiMail unit. For more information on the
queue mail queue, see “Managing the mail queue” on page 144.
directories
Caution: If the primary unit experiences a hardware failure and you cannot
restart it, and if this option is disabled, MTA queue directory data could be lost.
Note: Enabling this option can affect the FortiMail unit’s performance, because
periodic synchronization of the mail queue can be processor and
bandwidth-intensive. Additionally, because the content of the MTA queue
directories is very dynamic, periodically synchronizing MTA queue directories
between FortiMail units may not guarantee against loss of all email in those
directories. Even if MTA queue directory synchronization is disabled, after a
failover, a separate synchronization mechanism may successfully prevent loss
of MTA queue data. For details, see “Synchronization of MTA queue directories
after a failover” on page 246.
HA base port Enter the first of four TCP port numbers that will be used for:
• the heartbeat signal
• synchronization control
• data synchronization
• configuration synchronization
Note: For active-passive groups, in addition to configuring the heartbeat, you
can configure service monitoring. For details, see “Configuring service-based
failover” on page 262.
Note: In addition to automatic immediate and periodic configuration
synchronization, you can also manually initiate synchronization. For details,
see “Start configuration sync” on page 251.
Heartbeat lost Enter the total span of time, in seconds, for which the primary unit can be
threshold unresponsive before it triggers a failover and the secondary unit assumes the
role of the primary unit.
The heartbeat will continue to check for availability once per second. To
prevent premature failover when the primary unit is simply experiencing very
heavy load, configure a total threshold of three (3) seconds or more to allow
the secondary unit enough time to confirm unresponsiveness by sending
additional heartbeat signals.
Note: If the failure detection time is too short, the secondary unit may falsely
detect a failure when during periods of high load.
Caution: If the failure detection time is too long the primary unit could fail and
a delay in detecting the failure could mean that email is delayed or lost.
Decrease the failure detection time if email is delayed or lost because of an HA
failover.
Slave IP Double-click in order to modify, then enter the IP address of the primary
address network interface on that secondary unit.
Create Click to add a secondary unit to the list of Peer systems, then double-click its
IP address.
The primary unit synchronizes only with secondary units in the list of Peer
systems.
Delete Click the row corresponding to a peer IP address, then click this button to
remove that secondary unit from the HA group.
If the FortiMail unit is a member of an active-passive HA group, and the HA group stores mail
data on a remote NAS server, disable mail data synchronization to prevent duplicate mail data
traffic. For details, see “Backup mail data directories” on page 257.
For instructions on storing mail data on a NAS server, see “Selecting the mail data storage
location” on page 206.
The interface IP address must be different from, but on the same subnet as, the IP addresses of
the other heartbeat network interfaces of other members in the HA group.
When configuring other FortiMail units in the HA group, use this value as the:
• Remote peer IP (for active-passive groups)
• Master configuration (for secondary units in config-only groups)
Peer systems (for the primary unit on config-only groups)
5. Select a row in the table and click Edit to configure the following HA settings on the
interface.
Enable port Enable to monitor a network interface for failure. If the port fails, the primary
monitor unit will trigger a failover.
Heartbeat Specify if this interface will be used for HA heartbeat and synchronization.
status
• Disable
Do not use this interface for HA heartbeat and synchronization.
• Primary
Select the primary network interface for heartbeat and synchronization
traffic. For more information, see “About the heartbeat and synchronization”
on page 242.
This network interface must be connected directly or through a switch to
the Primary heartbeat network interface of other members in the HA group.
• Secondary
Select the secondary network interface for heartbeat and synchronization
traffic. For more information, see “About the heartbeat and synchronization”
on page 242.
The secondary heartbeat interface is the backup heartbeat link between the
units in the HA group. If the primary heartbeat link is functioning, the
secondary heartbeat link is used for the HA heartbeat. If the primary
heartbeat link fails, the secondary link is used for the HA heartbeat and for
HA synchronization.
This network interface must be connected directly or through a switch to
the Secondary heartbeat network interfaces of other members in the HA
group.
Caution: Using the same network interface for both HA
synchronization/heartbeat traffic and other network traffic could result in
issues with heartbeat and synchronization during times of high traffic load,
and is not recommended.
Note: In general, you should isolate the network interfaces that are used for
heartbeat traffic from your overall network. Heartbeat and synchronization
packets contain sensitive configuration information, are latency-sensitive,
and can consume considerable network bandwidth.
Peer IP Enter the IP address of the matching heartbeat network interface of the
address other member of the HA group.
For example, if you are configuring the primary unit’s primary heartbeat
network interface, enter the IP address of the secondary unit’s primary
heartbeat network interface.
Similarly, for the secondary heartbeat network interface, enter the IP
address of the other unit’s secondary heartbeat network interface.
For information about configuration synchronization and what is not
synchronized, see “About the heartbeat and synchronization” on page 242.
This option appears only for active-passive HA.
Peer IPv6 Enter the peer IPv6 address in the active-passive HA group. For IPv6
address support, see “About IPv6 Support” on page 160.
Virtual IP Select whether and how to configure the IP addresses and netmasks of the
action FortiMail unit whose effective HA mode of operation is currently master.
For example, a primary unit might be configured to receive email traffic
through port1 and receive heartbeat and synchronization traffic through
port5 and port6. In that case, you would configure the primary unit to set
the IP addresses or add virtual IP addresses for port1 of the secondary unit
on failover in order to mimic that of the primary unit.
• Ignore: Do not change the network interface configuration on failover,
and do not monitor. For details on service monitoring for network
interfaces, see “Configuring the network interfaces” on page 163.
• Set: Add the specified virtual IP address and netmask to the network
interface on failover. Normally, you will configure your network (MX
records, firewall policies, routing and so on) so that clients and mail
services use the virtual IP address. Both originating and reply traffic uses
the virtual IP address. This option results in the network interface having
two IP Addresses: the actual and the virtual. For examples, see
“Example: Active-passive HA group in gateway mode” on page 271. In
v3.0 MR2 and older releases, the behavior is different -- the originating
traffic uses the actual IP address, instead of the virtual IP address.
• Bridge: Include the network interface in the Layer 2 bridge. While the
effective HA mode of operation is slave, the interface is deactivated and
cannot process traffic, preventing Layer 2 loops. Then, when the
effective HA mode of operation becomes master, the interface is
activated again and can process traffic. This option appears only if the
FortiMail unit is operating in transparent mode. This option is not
available for Port1 and the ports not in the bridge group. For information
on configuring bridging network interfaces, see “Editing network
interfaces” on page 164.
Note: Settings in this section are synchronizable. Configure the primary
unit, then synchronize it to the secondary unit. For details, see “Start
configuration sync” on page 251.
Virtual IPv6 Enter the virtual IPv6 address for this interface. For IPv6 support, see
address “About IPv6 Support” on page 160.
HA service monitoring settings are not synchronized and must be configured separately on
each primary and secondary unit.
Retries Enter the number of consecutively failed tests that are allowed before the
primary unit is deemed unresponsive and a failover occurs.
Enable Enable local hard drive monitoring to check if the local hard drive is still
accessible, or if the mail data disk is almost full. If the hard disk is not
responsive, or if the mail data disk is 95 percent full, a failover will occur.
Interface monitoring is enabled when you configure interface monitoring.
See “Configuring interface monitoring” on page 259.
Network interface monitoring tests all active network interfaces whose:
• Virtual IP action setting is not Ignore
• Configuring interface monitoring setting is enabled
For details, see “Configuring interface monitoring” on page 259 and “Virtual
IP action” on page 262.
Retries Specify the number of consecutively failed tests that are allowed before the
local interface or hard drive is deemed unresponsive and a failover occurs.
Active-passive HA group
port1
172.16.5.10
172.16.5.2)
(HA virtual IP: 172.
Switch
ch port6
Heartbeat link
port1
172.16.5.11
6. S2 records event log messages (among others) indicating that S2 has determined that P1
has failed and that S2 is switching its effective HA operating mode to master.
• switch off
P1 will not process email or join the HA group until you manually select the effective HA
operating mode (see “Restart the HA system” on page 252 and “Restore to configured
operating mode” on page 252).
• wait for recovery then restore original role
On recovery, P1’s effective HA operating mode resumes its configured master role. This also
means that S2 needs to give back the master role to P1. This behavior may be useful if the
cause of failure is temporary and rare, but may cause problems if the cause of failure is
permanent or persistent.
In the case, the S2 will send out another alert email similar to the following:
This is the HA machine at 172.16.5.11.
After recovery, P1 also sends out an alert email similar to the following:
External
EmailerSver
internal w an1
Sw itch 172.16.1.1
1.1 10.10.10.1
10
port3
por port1
172.16.1.6 Secondary 192.168.1.6
172.16.1.6 192.1
168.1
unit
Active-passive H A group
G atew ay m ode
Protected Dom ain:
@ exam ple.com
The active-passive HA group is located on a private network with email users and the protected
email server. All are behind a FortiGate unit which separates the private network from the
Internet. The DNS server, remote email users, and external SMTP servers are located on the
Internet.
For both FortiMail units:
port1 • connected to a switch which is connected only to the computer that the
FortiMail administrator uses to manage the HA group
• administrative access occurs through this port
The secondary unit will become the new primary unit when a failover occurs. In order for it to
receive the connections formerly destined for the failed primary unit, the new primary unit must
adopt the failed primary unit’s IP address. You will configure an HA virtual IP address on port3
for this purpose.
port3 172.16.1.2 Email connections to the FortiMail unit; the target of your email
DNS A records. (No administrative access.)
Similarly, for the HA group, DNS A records should target the IP address of the port3 interface of
the primary FortiMail-400 unit. Additionally, administrators should administer each FortiMail unit
in the HA group by connecting to the IP address of each FortiMail unit’s port1.
If a failover occurs, the network must be able to direct traffic to port3 of the secondary unit
without reconfiguring the DNS A record target. The secondary unit must cleanly and
automatically substitute for the primary unit, as if they were a single, standalone unit.
Unlike the configuration of the standalone unit, for the HA group to accomplish that
substitution, all email connections must use an IP address that transfers between the primary
unit and the secondary unit according to which one’s effective HA operating mode is currently
master. This transferable IP address can be accomplished by configuring the HA group to
either:
• set the IP address of the current primary unit’s network interface
• add a virtual IP address to the current primary unit’s network interface
In this example, the HA group uses the method of adding a virtual IP address. Email
connections will not use the actual IP address of port3. Instead, all email connections will use
only the virtual IP address 172.16.1.2, which is used by port3 of whichever FortiMail unit’s
Setting IP address
port3 172.16.1.5 Set 172.16.1.2 Email connections to the FortiMail unit; the
target of your email DNS MX and A
records. Connections should not be
destined for the actual IP address, but
instead the virtual IP address (172.16.1.2)
which follows the FortiMail unit whose
effective HA operating mode is master. No
administrative access.
Because the “Virtual IP action” on page 262 settings are synchronized between the primary and
secondary units, you do not need to configure them separately on the secondary unit. However,
you must configure the secondary unit with other settings listed in Table 36.
HA Configuration section .
Interface port6
Interface port5
Virtual IP Address
port2 Ignore
port3 Set
172.16.1.2/255.255.255.0
port4 Ignore
port5 Ignore
port6 Ignore
6. Click Apply.
The FortiMail unit switches to active-passive HA mode, and, after determining that there is
no other primary unit, sets its effective HA operating mode to master. The virtual IP
172.16.1.2 is added to port3; if not already complete, configure DNS records and firewalls to
route email traffic to this virtual IP address, not the actual IP address of the port3 network
interface.
7. To confirm that the FortiMail unit is acting as the primary unit, go to System >
High Availability > Status and compare the Configured Operating Mode and Effective
Operating Mode. Both should be master.
If the effective HA operating mode is not master, the FortiMail unit is not acting as the
primary unit. Determine the cause of the failover, then restore the effective operating mode
to that matching its configured HA mode of operation.
Interface port6
Interface port5
port1 Ignore
port2 Ignore
port3 Set
172.16.1.2/255.255.255.0
port4 Ignore
port5 Ignore
port6 Ignore
6. Click Apply.
The FortiMail unit switches to active-passive HA mode, and, after determining that the
primary unit is available, sets its effective HA operating mode to slave.
7. Go to System > High Availability > Status.
8. Select click HERE to start a configuration/data sync.
The secondary unit synchronizes its configuration with the primary unit, including “Virtual IP
action” on page 262 settings that configure the HA virtual IP that the secondary unit will
adopt on failover.
If the heartbeat interfaces are not connected, the secondary unit cannot connect to the primary
unit, and so the secondary unit will operate as though the primary unit has failed and will switch
its effective HA operating mode to master.
When both primary unit and the secondary unit are operating in their configured mode,
configuration of the active-passive HA group is complete. For information on managing both
members of the HA group, see “Administering an HA group” on page 279.
Administering an HA group
In most cases, you will an HA group by connecting to the primary unit as if it were a standalone
unit.
If the initial configuration synchronization fails, such as if it is disrupted or the network cable is
loose, you should manually trigger synchronization after changing the configuration of the
primary unit. For information on manually triggering configuration synchronization, see “Start
configuration sync” on page 251.
Some parts of the configuration are not synchronized, and must be configured separately on
each member of the HA group. For details, see “Configuration settings that are not
synchronized” on page 244.
Managing certificates
This section explains how to manage X.509 security certificates using the FortiMail web UI.
Using the Certificate submenu, you can generate certificate requests, install signed certificates,
Certificate Usage
type
Server FortiMail must present its local server certificate for the following secure
certificates connections:
• the web UI (HTTPS connections only)
• webmail (HTTPS connections only)
• secure email, such as SMTPS, IMAPS, and POP3S
For details, see “Managing local certificates” on page 280.
Personal Mail users’ personal certificates are used for S/MIME encryption. For details,
certificates see “Configuring certificate bindings” on page 560.
View Select a certificate and click View to display its issuer, subject, and range of
dates within which the certificate is valid.
(button)
Generate Click to generate a local certificate request. For more information, see
(button) “Generating a certificate signing request” on page 282.
Download Click the row of a certificate file or certificate request file in order to select it,
(button) then click this button and select either:
• Download: Download a certificate (.cer) or certificate request (.csr) file. You
can send the request to your certificate authority (CA) to obtain a signed
certificate for the FortiMail unit. For more information, see “Downloading a
certificate signing request” on page 284.
• Download PKCS12 File: Download a PKCS #12 (.p12) file. For details, see
“Downloading a PKCS #12 certificate” on page 286.
Set status Click the row of a certificate in order to select it, then click this button to use it
as the “default” (that is, currently chosen for use) certificate. The Status
column changes to indicate that the certificate is the current (Default)
certificate.
This button is not available if the selected certificate is already the “default.”
Import Click to import a signed certificate for local use. For more information, see
(button) “Importing a certificate” on page 285.
Name Displays the name of the certificate file or certificate request file.
Subject Displays the Distinguished Name (DN) located in the Subject field of the
certificate.
If the certificate has not yet been signed, this field is empty.
Status Displays the status of the local certificates or certificate signing request.
• Default: Indicates that the certificate was successfully imported, and is
currently selected for use by the FortiMail unit.
• OK: Indicates that the certificate was successfully imported, but is not
selected as the certificate currently in use. To use the certificate, click the
row of the certificate in order to select it, then click Set status.
• Pending: Indicates that the certificate request has been generated, but
must be downloaded, signed, and imported before it can be used as a
local certificate. For details, see “Obtaining and installing a local
certificate” on page 282.
Certification name Enter a unique name for the certificate request, such as
fmlocal.
Domain name Type the fully-qualified domain name (FQDN) of the FortiMail
unit.
The domain name may resolve to either a static or, if the
FortiMail unit is configured to use a dynamic DNS service, a
dynamic IP address. For more information, see “Configuring the
network interfaces” on page 163 and “Configuring dynamic
DNS” on page 174.
If a domain name is not available and the FortiMail unit
subscribes to a dynamic DNS service, an unable to verify
certificate message may appear in the user’s browser
whenever the public IP address of the FortiMail unit changes.
This option appears only if ID Type is Domain name.
E-mail Type the email address of the owner of the FortiMail unit.
This option appears only if ID type is E-mail.
Optional Information Information that you may include in the certificate, but which is
not required.
Organization Type the name of your organizational unit, such as the name of
unit your department. (Optional.)
To enter more than one organizational unit name, click the +
icon, and enter each organizational unit separately in each field.
Locality(City) Type the name of the city or town where the FortiMail unit is
located. (Optional.)
State/Province Type the name of the state or province where the FortiMail unit
is located. (Optional.)
Country Select the name of the country where the FortiMail unit is
located. (Optional.)
E-mail Type an email address that may be used for contact purposes.
(Optional.)
Key type Displays the type of algorithm used to generate the key.
This option cannot be changed, but appears in order to indicate
that only RSA is currently supported.
Key size Select a security key size of 1024 Bit, 1536 Bit or 2048 Bit.
Larger keys are slower to generate, but provide better security.
4. Click OK.
The certificate is generated, and can be downloaded to your management computer for
submission to a certificate authority (CA) for signing. For more information, see
“Downloading a certificate signing request” on page 284.
Importing a certificate
You can upload Base64-encoded certificates in either privacy-enhanced email (PEM) or public
key cryptography standard #12 (PKCS #12) format from your management computer to the
FortiMail unit.
DER encoding is not supported in FortiMail version 4.0 GA and MR1 releases.
Certificate file Enter the location of the previously .cert or .pem exported certificate
(or, for PKCS #12 certificates, the .p12 certificate-and-key file), or
click Browse to locate the file.
Key file Enter the location of the previously exported key file, or click Browse
to locate the file.
This option appears only when Type is Certificate.
Password Enter the password that was used to encrypt the file, enabling the
FortiMail unit to decrypt and install the certificate.
This option appears only when Type is PKCS12 certificate or
Certificate.
View Select a certificate and click View to display certificate details including
the certificate name, issuer, subject, and the range of dates within which
(button)
the certificate is valid.
Download Click the row of a certificate in order to select it, then click Download to
(button) download a copy of the CA certificate (.cer).
Subject Displays the Distinguished Name (DN) located in the Subject field of the
certificate.
View Select a certificate revocation list and click View to display details.
(button)
Download Select a certificate revocation list and click Download to download a copy of the
(button) CRL file (.cer).
Subject Displays the Distinguished Name (DN) located in the Subject field of the
certificate revocation list.
Download Click the row of a certificate in order to select it, then click
(button) Download to download a copy of the OCSP server certificate (.cer).
Subject Displays the Distinguished Name (DN) located in the Subject field of
the certificate.
The FortiSandbox appliance and FortiSandbox cloud service are used for automated sample
tracking, or sandboxing. You can send suspicious email attachments to FortiSandbox for
inspection when you configure antivirus profiles (see “Managing antivirus profiles” on
page 431). If the file exhibits risky behavior, or is found to contain a virus, the result will be sent
back to FortiMail and a new virus signature is created and added to the FortiGuard antivirus
signature database as well.
If email attachments are sent to FortiSandbox, and the "reject" action is configured in the action
profile, the actual action will fallback to "system quarantine" if spam or viruses are detected
afterwards.
FortiSandbox If you use an appliance, specify the appliance’s host name or IP address;
type If you use the cloud service, see “FortiCloud service” on page 290.
Server Enter the FortiSandbox host name or IP address. The port to use is 514. If
name/IP you have a firewall in between FortiMail and FortiSandbox, make this port
is allowed.
Notification This is the email address that FortiSandbox will use to send out
email notifications and reports. If you want to receive such email, enter your
email address. For details, see the FortiSandbox documentation.
Statistics Specify how long FortiMail should wait to retrieve some high level
interval statistics from FortiSandbox. The default interval is 5 minutes. The
statistics include how many malwares are detected and how many files
are clean among all the files submitted.
Scan timeout Specify how long FortiMail will wait to get the scan results. If you receive
timeouts and want to wait longer for the results, you can increase the
timeout.
Scan result Specify how long FortiMail will cache the results.
expires in
File types Select what types of attachment files will be uploaded to FortiSandbox for
scanning.
File patterns Create your own file pattern that will be uploaded to FortiSandbox, for
example, *.txt.
File size Specify the maximum file size to upload to FortiSandbox. You may want
to limit the file size to improve performance.
Enable Enable to scan the URIs to determine if they are malicious or phishing
sites.
Note: If you do not want to send any URIs to FortiSandbox, you can do so
by adding them to the URL exempt list. For details, see “Configuring the
URL exempt list” on page 536.
Email selection Specify to scan URIs in all email or the suspicious email only. Suspicious
email messages are those received during spam outbreaks.
URI selection Specify to scan all URIs or the unrated URIs only. The unrated URIs are
the URIs that are tagged as unrated by the FortiGuard antispam service.
Upload URI on Sometimes, FortiMail may not be able to get results from the FortiGuard
rating error queries (for example, ratings errors due to network connection failures). In
this case, you can choose whether to upload those URIs to FortiSandbox
for scanning. Choosing not to upload those URIs may help improving the
FortiSandbox performance.
Number of Specify how many URIs will be scanned in one email message.
URIs per email
FortiCloud service
FortiCloud service, or FortiSandbox cloud service, allows you to use the FortiSandbox antivirus
service without owning your own FortiSandbox appliances.
If you are running FortiMail HA, you must activate FortiCloud service on the master and slave
units. For active-passive HA, this is to ensure that the slave unit can continue to use the
FortiCloud service in case of HA failover. For config-only HA, this is because all the units need
to access the service.
FortiMail uses Fortinet FortiGuard antivirus, antispam, and URI protection services.
Go to System > FortiGuard > License to view the most recent updates to FortiGuard Antivirus
engines, antivirus definitions, and FortiGuard antispam definitions (antispam heuristic rules).
FortiMail units receive updates from the FortiGuard Distribution Network (FDN), a world-wide
network of FortiGuard Distribution Servers (FDS). FortiMail units connect to the FDN by
connecting to the FDS nearest to the FortiMail unit by its configured time zone.
In addition to manual update requests, FortiMail units support two kinds of automatic update
mechanisms:
• scheduled updates, by which the FortiMail unit periodically polls the FDN to determine if
there are any available updates
• push updates, by which the FDN notifies FortiMail units when updates become available
You may want to configure both scheduled and push updates. In this way, if the network
experiences temporary problems such as connectivity issues that interfere with either method,
the other method may still provide your FortiMail unit with updated protection. You can
alternatively manually update the FortiMail unit by uploading an update file by going to
Dashboard > Status and click Update under Licence Information.
For FortiGuard Antispam and FortiGuard Antivirus update connectivity requirements and
troubleshooting information, see “Troubleshoot FortiGuard connection issues” on page 618.
FortiGuard server FortiGuard uses either port 443 or 8890. The default port is 443.
port
Use override server Enable to override the default FDN server to which the FortiMail unit
connects for updates.
Override server IP Enter the IP address of the override public or private FDN server.
address
Use override push IP Enable to override the IP address and default port number to which
the FDN sends push notifications.
• When enabled, the FortiMail unit notifies the FDN to send push
updates to the IP address and port number that you enter (for
example, a virtual IP/port forward on a NAT device that will
forward push notifications to the FortiMail unit).
• When disabled, the FortiMail unit notifies the FDN to send push
updates to the FortiMail unit’s IP address, using the default port
number (UDP 9443). This is useful only if the FortiMail unit has a
public network IP address.
This option is available only if Allow push update is enabled.
Virus outbreak When a virus outbreak occurs, the FortiGuard antivirus database
protection may need some time to get updated. Therefore, you can choose to
defer the delivery of the suspicious email messages and scan them
for the second time.
• Disable: Do not query FortiGuard antivirus service.
• Enable: Query FortiGuard antivirus service.
• Enable with Defer: If the first query returns no results, defer the
email for the specified time and do the second query.
Virus outbreak If you specify Enable with Defer in the above field, specify how
protection period many minutes later a second query will be done.
Server location Use FortiGuard servers either in US only or in any locations in the
world.
Updating FortiGuard Antivirus definitions can cause a short disruption in traffic currently being
scanned while the FortiMail unit applies the new signature database. To minimize disruptions,
update when traffic is light, such as during the night.
3. After a few minutes, click the System > FortiGuard > License tab to check the update status.
If an update was available, new version numbers appear for the packages that were
updated. If you have enabled logging, messages are recorded to the event log indicating
whether the update was successful or not. For details, see “Logs, reports and alerts” on
page 579.
Figure 34: DNS error when resolving the FortiGuard Antispam domain name
4. Verify that the DNS servers contain A records to resolve service.fortiguard.net and
other FDN servers. To try to obtain additional insight into the cause of the query failure,
manually perform a DNS query from the FortiMail unit using the following CLI command:
execute nslookup name service.fortiguard.net
If the FortiMail unit cannot successfully connect, or if your FortiGuard Antispam license does
not exist or has expired, a message appears notifying you that a connection error occurred.
URI Rewrite FortiMail must rewrite URIs to ensure that the URIs will be
directed to FortiMail first when users click the URIs.
Base URL Enter prefix “https://” and the FortiMail FQDN or IP address.
Note that without the prefix, the URL will not work.
The rewritten URI will be in this format:
https://company.com/fmlurlsvc/?fewReq/baseValue&url=original
UrlEscaped. Using the originalUrlEscaped part, you can get the
original URL with the help of a URL decoding web site, such as
https://www.urldecoder.org.
URI Click Handling When users click the URIs in the email messages, you can
choose to block or allow their access.
Category Choose the URI category for the below action. For information
about URI categories, see “Configuring a FortiGuard URI filter
profile” on page 417.
Action Specify either to Block or Allow with Confirmation for the above
URI category.
FortiSandbox For all other URI categories not specified above, you can choose
Scan to send them to FortiSandbox (see “Using FortiSandbox
antivirus inspection” on page 289) for further scanning.
Enable: Toggle to enable or disable FortiSandbox scan.
Action: Allow with Confirmation means to allow access with
warning; Block means to block access; and Submit only means
to allow access while sending the URIs for scanning.
Timeout action: When the URIs are sent to FortiSandbox for
scanning, it may take a while to get the results back. You should
specify how long you want to wait for the results before you take
Block, Allow, or Allow with Confirmation actions.
Timeout: Specify how long (in seconds) you want to wait for
FortiSandbox scan results before you take Block, Allow, or Allow
with Confirmation actions.
FortiIsolator Integration
Base URL Enter prefix “https://” and the FortiIsolator FQDN or IP address.
Note that without the prefix, the URL will not work.
URI Removal You can also choose to remove the URIs in the specified
category.
Category Specify the URI category to remove the URIs. For information
about URI categories, see “Configuring a FortiGuard URI filter
profile” on page 417.
When entering IP addresses for GeoIP overrides, only IPv4 addresses are supported.
System maintenance
The Maintenance menu contains features for use during scheduled maintenance: updates,
backups, restoration, and centralized administration.
The Maintenance menu also lets you install firmware using one of the possible methods. For
information on this and other installation methods and preparation, see “Installing firmware” on
page 596.
In addition to downloading email archives to your management computer, you can configure
the FortiMail unit to store email archives on an SFTP or FTP server. For details, see “Managing
archived email” on page 156 and “Configuring email archiving accounts” on page 572.
The core configuration file does not contain all configuration data. Failure to perform a complete
backup could result in data loss of items such as Bayesian databases, dictionary databases,
mail queues, and other items. For details on performing a complete backup, see “Backup and
restore” on page 299.
To back up the configuration file using the CLI, enter the following command:
execute backup config tftp <filename_str> <tftp_ipv4>
where:
• <filename_str> is the name of the file located in the TFTP server’s root directory
• <tftp_ipv4> is the IP address of the TFTP server
Mail data backup only works for local storage. If you have configured remote storage (see
“Selecting the mail data storage location” on page 206), mail data cannot be backed up.
Table 42:Backing up and restoring mailboxes from System > Maintenance > Mail Data
GUI item Description
Automatically refresh Select the interval in seconds to set how often the web UI
interval automatically refreshes its display of this tab.
Bytes Copied Indicates the number of bytes of data transferred to or from the
(Total) backup media so far, and the total amount that will be
transferred when the backup or restoration is complete.
Total number Indicates the number of errors that occurred during the previous
of errors is backup attempt. If any errors occurred, they may also be
individually listed.
For example, if the backup media is an NFS server, and the NFS
share could not be mounted, such as if the FortiMail unit could
not contact the NFS server or did not have permissions to
access the share, an error message similar to the following
would appear:
failed to mount archive filesystem
[protocol=nfs,host=192.168.1.10,port=2049,directory=/
home/fortimail]
stopped, waiting for requested shutdown
watch dog stopped, killing backup process
This field appears only if the previous backup attempt was not
successful.
Last Backup Indicates the date and time of the previous backup attempt. If a
backup has not yet occurred, this field displays the message, No
backup has been run.
Last Indicates the date and time of the previous restoration attempt.
Restore If a restoration has not yet occurred, this field is empty.
Click here to start a Click to manually initiate an immediate mailbox backup to the
backup media configured in “Configuring mailbox backups” on
page 305. Time required to complete a backup varies by the size
of the backup and the speed of your network connection, and
also by whether the backup is a full or incremental backup.
Alternatively, you can schedule the FortiMail unit to
automatically back up the mailboxes. For details, see
“Configuring mailbox backups” on page 305.
This link does not appear if a backup or restoration is currently in
progress.
Click here to format If you use a USB device for backup, use this link to format the
backup device device for use with FortiMail.
Click here to check file If you use a USB device for backup, use this link to determine if
system on backup device the device is compatible for use with FortiMail.
Click here to stop the Click to cancel a backup that is currently in progress.
current backup
Time required to cancel the backup varies by the backup media,
but may be up to 30 seconds.
This link appears only if a backup is currently in progress.
Click here to stop the Click to cancel a restore that is currently in progress.
current restore
Time required to cancel the restore varies by the restore media,
but may be up to 30 seconds.
This link appears only if a restore is currently in progress.
You can only back up mail data when you store the data locally on the FortiMail hard disk. If you
store the mail data on a NAS device, you cannot back up the data. For information about
selecting a storage device, see “Selecting the mail data storage location” on page 206.
While a backup or restoration is occurring, you cannot change the configuration of this area,
and this area will display the message:
Backup/Restore is busy, no configuration changes can be made.
However, you can view the status of the backup or restoration to determine if there are any
errors. You can also manually initiate an immediate backup if the backup media was unavailable
at the time of a previously scheduled backup. For details, see “Backing up and restoring the
mailboxes” on page 302.
Before you can manually initiate a backup, or in order to configure automatic scheduled
backups, you must first enable backups and configure the backup media.
Enable Mark this check box, configure all other options in this area,
then click Apply to enable backups and restoration of email
users’ mailboxes.
Copies of full backups Enter a number of full backups to keep on the backup device.
Hour Select which time on the day that you selected in Day that the
FortiMail unit will automatically back up email users’
mailboxes to the backup media.
To minimize performance impacts, consider scheduling
backups during a time of the day and day of the week when
email traffic volume is typically low, such as at night on the
weekend.
If the backup media is not available when the backup is
scheduled to occur, the FortiMail unit will re-attempt the
backup at the next scheduled time.
This option is not available if Day is None.
Device
The availability of the following options varies with the device chosen.
Username Enter the user name of the FortiMail unit’s account on the
backup server.
Port Enter the TCP port number on which the backup server listens
for connections.
Directory Enter the path of the folder on the backup server where the
FortiMail unit will store the mailbox backups, such as:
/home/fortimail/mailboxbackups
Note: Do not use special characters such as a tilde ( ~ ).
Special characters will cause the backup to fail.
Share Enter the path of the folder on the backup server where the
FortiMail unit will store the mailbox backups, such as:
FortiMailMailboxBackups
Note: Do NOT type / before the path name. FortiMail v5.0
release supports both forward slash (/) and backslash (\) in the
path name, while FortiMail v4.0 release only supports forward
slash (/).
Encryption Enter the key that will be used to encrypt data stored on the
key backup media. Valid key lengths are between 6 and 64
single-byte characters.
ISCSI ID Enter the iSCSI identifier in the format expected by the iSCSI
server, such as an iSCSI Qualified Name (IQN), Extended
Unique Identifier (EUI), or T11 Network Address Authority
(NAA).
To configure restoration
1. Go to System > Maintenance > Mail Data.
2. Configure the following in the Restore Options section:
Created by this device Select to restore mailboxes from backups identified by the
current fully qualified domain name (FQDN) of this FortiMail
unit.
If you changed the host name and/or local domain name of
the FortiMail unit, the backup files are still identified by the
previous FQDN. In this case, do not select this option.
Instead, use the Created by option.
For this domain Mark this check box if you want to restore only the mailboxes
of a specific protected domain, then select the name of the
protected domain from the drop-down list.
If you want to restore only the mailbox of a specific email user
within this protected domain, also configure For this user.
For this user Mark this check box if you want to restore only the mailbox of
a specific email user, then enter the name of the email user
account, such as user1.
This option is available only if For this domain is enabled.
The Domains & User menu allows you to configure the protected domains and users.
This section includes:
• Configuring protected domains
• Configuring local user accounts (server mode only)
• Configuring user aliases
• Configuring address mappings
• Configuring IBE users
• Managing the address book (server mode only)
• Sharing calendars and address books (server mode only)
• Migrating email from other mail servers (server mode only)
For FortiMail units operating in server mode, protected domains list only the domain name, not
the IP address: the IP address of the SMTP server is the IP address of the FortiMail unit itself.
For example, if you wanted to scan email from email addresses such as [email protected]
hosted on the SMTP server 10.10.10.10, you would configure a protected domain of
example.com whose SMTP server is 10.10.10.10.
Aside from defining the domain, protected domains contain settings that apply specifically to all
email destined for that domain, such as mail routing and disclaimer messages.
Many FortiMail features require that you configure a protected domain. For example, when
applying recipient-based policies for email messages incoming to the protected domain, the
FortiMail unit compares the domain name of the protected domain to the domain name portion
of the recipient email addresses.
When FortiMail units operating in transparent mode are proxying email connections for a
protected domain, the FortiMail unit will pass, drop or intercept connections destined for the IP
address of an SMTP server associated with the protected domain, and can use the domain
name of the protected domain during the SMTP greeting.
Page 310
Usually, you have already configured at least one protected domain during installation of your
FortiMail unit; however, some configurations may not require any protected domains. You can
add more domains or modify the settings of existing ones if necessary.
If you have many mail domains that will use identical settings, instead of creating many
protected domains, you may want to create one protected domain, and then configure the
others as associated domains. For details, see “Domain Association” on page 321.
If the FortiMail unit is operating in gateway mode, you must change the MX entries for the DNS
records for your email domain, referring email to the FortiMail unit rather than to your email
servers. If you create additional protected domains, you must modify the MX records for each
additional email domain. Similarly, MX records must also refer to the FortiMail unit if it is
operating in server mode.
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Policy category.
For details, see “About administrator account permissions and domains” on page 179.
Before you begin, if the protected domain will use an IP pool profile, first configure the IP pool
profile. For details, see “Configuring IP pools” on page 501.
Domain FQDN Displays the fully qualified domain name (FQDN) of the protected
domain.
If the protected domain is a subdomain or domain association, click the
+ next to a domain entry to expand the list of subdomains and domain
associations. To collapse the entry, click the -.
Relay Type Indicates one of the methods by which the SMTP server will receive
email from the FortiMail unit for the protected domain: Host, MX Record
(transparent and
(this domain), MX Record (alternative domain), IP Group, LDAP Domain
gateway mode
Mail Host.
only)
SMTP Server Displays the host name or IP address and port number of the mail
exchanger (MX) for this protected domain.
(transparent and
gateway mode If “Relay Type” on page 311 is MX Record (this domain) or MX Record
only) (alternative domain), this information is determined dynamically by
querying the MX record of the DNS server, and this field will be empty.
Configuring domains and users Page 311 FortiMail 6.2.0 Administration Guide
GUI item Description
Sub The number indicates how many subdomains this domain has.
(transparent and
gateway mode
only)
Association The number indicates how many domain associations this domain has.
For more information on domain associations, see “Domain Association”
(transparent and
on page 321.
gateway mode
only)
2. Either click New to create a new protected domain, or click an row to modify it.
A multisection dialog appears. Its options vary with the operation mode.
3. Configure the general information as it applies to the current operation mode and your
choice for relay type:
Domain name Enter the fully qualified domain name (FQDN) of the protected
domain.
For example, if you want to protect email addresses such as
[email protected], you would enter the protected domain name
example.com.
Generally, your protected domain will use a valid,
globally-resolvable top-level domain (TLD) such as .com.
Exceptions could include testing scenarios, where you have created
a .lab mail domain on your private network to prevent accidental
conflicts with live mail systems legitimately using their
globally-resolvable FQDN.
Is subdomain Mark this check box to indicate the protected domain you are
creating is a subdomain of an existing protected domain, then also
configure “Main domain” on page 312.
Subdomains, like their parent protected domains, can be selected
when configuring policies specific to that subdomain. Unlike
top-level protected domains, however, subdomains will appear as
grouped under the parent protected domain when viewing the list of
protected domains.
This option is available only when another protected domain exists
to select as the parent domain.
Main Select the protected domain that is the parent of this subdomain.
domain For example, lab.example.com might be a subdomain of
example.com.
This option is available only when “Is subdomain” on page 312 is
enabled.
Configuring domains and users Page 312 FortiMail 6.2.0 Administration Guide
GUI item Description
Relay type Select from one of the following methods of defining which SMTP
server will receive email from the FortiMail unit that is destined for
(transparent and
the protected domain:
gateway mode only)
• Host: Configure the connection to one protected SMTP server or,
if any, one fallback. Also configure “SMTP server” on page 314
and “Fallback SMTP server” on page 314.
• MX Record (this domain): Query the DNS server’s MX record of
the protected domain name for the FQDN or IP address of the
SMTP server. If there are multiple MX records, the FortiMail unit
will load balance between them.
• MX Record (alternative domain): Query the DNS server’s MX
record of a domain name you specify for the FQDN or IP address
of the SMTP server. If there are multiple MX records, the
FortiMail unit will load balance between them. Also configure
“Alternative domain name” on page 314.
• IP Group: Configure the connection to rotate among one or
many protected SMTP servers for load balancing. Also configure
the IP “IP group” on page 314.
• LDAP Domain Mail Host: Query the LDAP server for the FQDN or
IP address of the SMTP server. Also configure the LDAP Profile
(see “Configuring LDAP profiles” on page 461).
Note: If an MX option is used, you may also be required to configure
the FortiMail unit to use a private DNS server whose MX and/or A
records differ from that of a public DNS server. Requirements vary
by the topology of your network and by the operating mode of the
FortiMail unit.
Configuring domains and users Page 313 FortiMail 6.2.0 Administration Guide
GUI item Description
SMTP server Enter the fully qualified domain name (FQDN) or IP address of the
primary SMTP server for this protected domain, then also configure
(transparent and
“Port” on page 314 and “Use SMTPS” on page 315.
gateway mode only)
If you have an internal mail relay that is located on a physically
separate server from your internal mail server, this could be your
internal mail relay, instead of your internal mail server. Consider your
network topology, directionality of the mail flow, and the operation
mode of the FortiMail unit. For more information, see “Inbound
versus outbound email” on page 363 and “Avoiding scanning email
twice” on page 215.
This field appears only if “Relay type” on page 313 is Host.
Fallback SMTP Enter the fully qualified domain name (FQDN) or IP address of the
server secondary SMTP server for this protected domain, then also
configure Port and Use SMTPS.
(transparent and
gateway mode only) This SMTP server will be used if the primary SMTP server is
unreachable.
This field appears only if “Relay type” on page 313 is Host.
IP group Select the name of the IP group that is the range of IP addresses.
(transparent and Also configure Port and Use SMTPS.
gateway mode only)
This field appears only if “Relay type” on page 313 is IP Group.
LDAP profile Select the name of the LDAP profile that has the FQDN or IP
address of the SMTP server you want to query. Also configure Port
(transparent mode
and Use SMTPS.
and gateway mode
only) This field appears only if “Relay type” on page 313 is LDAP Domain
Mail Host.
Port Enter the port number on which the SMTP server listens.
If you enable “Use SMTPS” on page 315, “Port” on page 314
automatically changes to the default port number for SMTPS, but
can still be customized.
Displays the default SMTP port number is 25; the default SMTPS
port number is 465.
This field appears only if “Relay type” on page 313 is Host, IP Group
or LDAP Domain Mail Host.
Alternative domain Enter the domain name to use when querying the DNS server for
name MX records.
(transparent and
This option appears only if “Relay type” on page 313 is MX Record
gateway mode only)
(alternative domain name).
LDAP User Profile Select the name of an LDAP profile in which you have configured
(see “Configuring LDAP profiles” on page 461), enabling you to
(server mode only)
authenticate email users and expand alias email addresses or
replace one email address with another by using an LDAP query to
retrieve alias members.
Configuring domains and users Page 314 FortiMail 6.2.0 Administration Guide
GUI item Description
Use SMTPS Enable to use SMTPS for connections originating from or destined
for this protected server.
This field appears only if “Relay type” on page 313 is Host, IP Group
or LDAP Domain Mail Host.
Relay Authentication To test relay authentication, enable it and enter an email user
name/password pair that exists on the mail server. Also specify the
authentication type.
Test (button) After you have entered the relay server information, you can click
the Test button to test if the relay server is accessible.
To further test mail delivery, click Advanced Group, and enter the
EHLO, sender (MAIL FROM), and recipient (RCPT TO) information.
Click Test. The test results will be dispalyed.
Note: STARTTLS is not supported for relay host testing.
This feature can impact performance and be noticeable during peak traffic times. For a lesser
performance impact, you can alternatively periodically automatically remove quarantined email
messages for invalid email user accounts, rather than actively preventing them during each
email message.
Configuring domains and users Page 315 FortiMail 6.2.0 Administration Guide
4. Configure the following:
Disable Do not verify that the recipient address is an email user account that
actually exists.
Use SMTP Query the SMTP server using either the SMTP VRFY command or RCPT
server command to verify that the recipient address is an email user account that
actually exists. RCPT is the default command.
If you want to query an SMTP server other than the one you have defined
as the protected SMTP server, also enable Use alternative server, then
enter the IP address or FQDN of the server in the field next to it. Also
configure Port with the TCP port number on which the SMTP server
listens, and enable Use SMTPS if you want to use SMTPS for recipient
address verification connections with the server.
Use LDAP Query an LDAP server to verify that the recipient address is an email user
server account that actually exists. Also select the LDAP profile that will be used
to query the LDAP server. For more information on configuring LDAP
profiles, see “Configuring LDAP profiles” on page 461.
This server is Select the network interface (a port) to which the protected SMTP server
on is connected.
Note: Selecting the wrong network interface will result in the FortiMail
sending email traffic to the wrong network interface.
Hide the Enable to preserve the IP address or domain name of the SMTP client for
transparent incoming email messages in:
box
• the SMTP greeting (HELO/EHLO) in the envelope and in the Received:
message headers of email messages
• the IP addresses in the IP header
This masks the existence of the FortiMail unit to the protected SMTP
server.
Disable to replace the SMTP client’s IP address or domain name with that
of the FortiMail unit.
For example, an external SMTP client might have the IP address
172.168.1.1, and the FortiMail unit might have the domain name
fortimail.example.com. If the option is enabled, the message header
would contain (difference highlighted in bold):
Configuring domains and users Page 316 FortiMail 6.2.0 Administration Guide
GUI item Description
Use this Enable to use the protected SMTP server, instead of the FortiMail built-in
domain’s MTA, to deliver outgoing email messages from the SMTP clients whose
SMTP server sending MTA is the protected SMTP server.
to deliver the
For example, if the protected domain example.com has the SMTP server
mail
192.168.1.1, and an SMTP client for [email protected] connects to it to
send email to [email protected], enabling this option would
cause the FortiMail unit to pass the mail message via its built-in MTA to
the protected SMTP server, which will deliver the message.
Disable to relay email using the built-in MTA to either the SMTP relay
defined in “Configuring SMTP relay hosts” on page 203, if any, or directly
to the MTA that is the mail exchanger (MX) for the recipient email
address’s (RCPT TO:) domain. The email may not actually travel through
the protected SMTP server, even though it was the relay originally
specified by the SMTP client.
This option does not affect incoming connections containing incoming
email messages, which will always be handled by the built-in MTA. For
details, see “When FortiMail uses the proxies instead of the built-in MTA”
on page 212.
Note: This option will be ignored for email that matches an antispam or
content action profile.
Configuring domains and users Page 317 FortiMail 6.2.0 Administration Guide
Select a method by which to periodically remove quarantined spam for which an email user
account does not actually exist on the protected email server.
If you select either Use SMTP server or Use LDAP server, the FortiMail unit queries the server
daily (at 4:00 AM daily unless configured for another time in the CLI; see the FortiMail CLI
Reference) to verify the existence of email user accounts. If an email user account does not
currently exist, the FortiMail unit removes all spam quarantined for that email user account.
If you have also enabled Recipient Address Verification (see “Configuring recipient address
verification” on page 315), the FortiMail unit does not form quarantine accounts for email user
accounts that do not exist on the protected email server. In that case, invalid quarantine
accounts are never formed, and this option may not be necessary, except when you delete
email user accounts on the protected email server. If this is the case, you can improve the
performance of the FortiMail unit by disabling this option.
Disable Do not verify that the recipient address is an email user account that
actually exists.
Use SMTP Query the SMTP server to verify that the recipient address is an email user
server account that actually exists.
Use LDAP Query an LDAP server to verify that the recipient address is an email user
server: account that actually exists. Also select the LDAP profile that will be used
to query the LDAP server. For more information on configuring LDAP
profiles, see “Configuring LDAP profiles” on page 461.
LDAP user Select the name of an LDAP profile in which you have enabled and
alias / address configured, enabling you to expand alias email addresses or replace one
mapping email address with another by using an LDAP query to retrieve alias
profile members and/or address mappings. For more information, see
(transparent “Configuring LDAP profiles” on page 461.
and gateway
mode only)
Configuring domains and users Page 318 FortiMail 6.2.0 Administration Guide
Mail routing Enable to perform mail routing, then click the arrow to expand the options
LDAP profile and select the name of an LDAP profile in which you have enabled and
configured. For more information, see “Configuring LDAP profiles” on
page 461.
Scan override Enable to query an LDAP server for an email user’s preferences to enable
profile or disable antispam, antivirus, and/or content processing for email
messages destined for them, then select the name of an LDAP profile in
which you have enabled and configured. For more information, see
“Configuring LDAP profiles” on page 461.
Starting from FortiMail 4.1, domain-wide quarantine report settings are independent from the
system-wide quarantine report settings.
However, in older releases, domain-wide quarantine report settings are a subset of the
system-wide quarantine report settings. For example, if the system settings for schedule
include only Monday and Thursday, when you are setting the schedule for the quarantine
reports of the protected domain, you can select either Monday or Thursday.
For information on system-wide quarantine report settings and quarantine reports in general,
see “Configuring global quarantine report settings” on page 508 and “Customizing GUI,
replacement messages, email templates, and SSO” on page 220.
Configuring domains and users Page 319 FortiMail 6.2.0 Administration Guide
GUI item Description
Send to
Original Enable to send the quarantine report to all recipients. For more
recipient information, see “Managing the personal quarantines” on
page 138.
Other Select to send the quarantine report to a recipient other than the
recipient individual recipients or group owner. For example, you might
delegate quarantine reports by sending them to an administrator
whose email address is not locally deliverable to the protected
domain, such as [email protected].
LDAP group Enable to send the quarantine report to a group owner, rather than
owner based individual recipients, then select the name of an LDAP profile in
on LDAP which you have enabled and configured the group query options
profile (see “Configuring group query options” on page 465.
Also configure the following two options for more granular control:
• Only when original recipient is group
• When group owner is found, do not send to original recipient
These Hours Select which hours to send the quarantine report for this protected
domain.
This option is available only when “Setting” on page 320 is Use
domain settings.
These Days Select which days to send the quarantine report for this protected
domain.
This option is available only when “Setting” on page 320 is Use
domain settings.
Replacement messages often include variables, such as the MIME type of the file that was
overwritten by the replacement message.
Configuring domains and users Page 320 FortiMail 6.2.0 Administration Guide
Typically, you will customize text, but should not remove variables from the replacement
message. Removing variables may result in an error message and reduced functionality. For
example, removing %%SPAM_DELETE_URL%% would make users incapable of using the
quarantine report to delete email individually from their personal quarantines.
Domain Association
The Domain Association section that appears when configuring a protected domain lets you
configure associated domains. An associated domain uses the settings of the protected domain
or subdomain with which it is associated.
Domain associations can be useful for saving time when you have multiple domains, and you
would otherwise need to configure multiple protected domains with identical settings.
For example, if you have one SMTP server handling email for ten domains, you could:
• Create ten separate protected domains and configure each with identical settings.
• Create one protected domain and list the nine other domains as domain associations.
The advantage of using the second method is that you do not have to repeatedly configure the
same things when creating or modifying the protected domains. This saves time and reduces
chances for error. Changes to one protected domain automatically apply to all of its associated
domains.
Associated domains do not re-use DKIM keys and signing settings. Domain keys are by nature
tied to the exact protected domain only, and cannot be used for any other protected domain,
including associated domains.
The maximum number of domain associations that you can create is separate from the
maximum number of protected domains.
Configuring domains and users Page 321 FortiMail 6.2.0 Administration Guide
8. When done, click Create or OK.
DKIM Setting
The FortiMail unit will sign outgoing email messages using the domain key for this protected
domain if you have selected it when configuring sender validation in the session profile. For
more information, see “Configuring session profiles” on page 392.
DKIM signing requires a public-private key pair. The private key is kept on and used by the
FortiMail unit to generate the DKIM signatures for the email messages; the public key is stored
on the DNS server in the DNS record for the domain name, and used by receiving parties to
verify the signature.
You can generate the key pair by creating a domain key selector; you can also manually import
an existing key pair in PEM format.
After you generate or import the key pair, you can export the DNS record that contains the
public key. The following is a sample of the exported DNS record:
example_com._domainkey IN TXT "t=y; k=rsa;
p=MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC5xvUazqp2sBovpfumPuR5xC+y
DvGbfndyHZuVQdSHhwdKAdsfiyOa03iPniCfQEbuM0d+4/AoPyTXHHPFBBnChMMHkW
gHYlRDm5UMjrH5J1zDT5OyFxUEur+NtfS6LF29Te+6vSS+D3asfZ85V6WJDHSI9JV0
504uwDeOOh/aewIDAQAB"
Then you can publish the public key by adding it to the DNS zone file as a text record for the
domain name on the DNS server. The recipient SMTP server, if enabled to use DKIM verification,
will use the public key to decrypt the signature and compare the hash values of the email
message in order to verify that the hash values match.
FortiMail performs DKIM signing for an associated domain with its parent domain DKIM key.
You must publish the DKIM public key for the associated domain in order for the receiving MTA
to validate the DKIM signature.
When a new key is created or imported, it is not active by default. This allows you to publish the
public key on the DNS server before you activate the key. Also note that only one key pair can
be active at a time.
Configuring domains and users Page 322 FortiMail 6.2.0 Administration Guide
9. Click to select the domain key, then click Download.
Your web browser downloads the plain text file which contains the exported DNS record
(.dkim) file.
10.Publish the public key by inserting the exported DNS record into the DNS zone file of the
DNS server that resolves this domain name. For details, see the documentation for your DNS
server.
11.Now you can activate the key by selecting the key and then clicking Activate.
If the FortiMail unit is operating in transparent mode, to use disclaimers, you must enable
clients to send email using their specified SMTP server. For more information, see “Use
client-specified SMTP server to send email” on page 219.
You cannot configure the domain disclaimer unless the Allow per-domain settings option is
enabled on the System > Mail Settings > Disclaimer tab.
Configuring domains and users Page 323 FortiMail 6.2.0 Administration Guide
GUI item Description
Disclaimer
Configuring domains and users Page 324 FortiMail 6.2.0 Administration Guide
4. Click to expand Sender Address Rate Control.
5. For email users under this domain, you can configure the following rate control settings:
• Maximum number of messages per half hour. The default value is 30.
• Maximum number of recipients per half hour. The default value is 60.
• Maximum data size per half hour (MB). The default value is 100 MB.
• Maximum number of spam messages per sender per half hour. The default value is 5.
• Send email notification upon rate control violations and select a notification profile (see
“Configuring notification profiles” on page 505).
Webmail Select either to use the default system language or a different language
language that the FortiMail unit will use to display webmail and quarantine folder
pages. By default, the FortiMail unit uses the same language as the web
UI. For more information, see “Customizing the GUI appearance” on
page 230.
Maximum Enter the limit in kilobytes (KB) of the message size. Email messages over
message size the threshold size are rejected.
(KB)
Note: If the same email message is sent to recipients in multiple protected
domains and the maximum message size limits in the domain settings are
different, the smallest size setting will take effect and thus the email won't
be delivered to any recipients. In this case, you can use the maximum
message size setting in the content profile instead (under Profile >
Content > Scan Options). However, you can use the reject action only for
separate SMTP sessions, not for one same session.
Note: When you configure session profile settings under Profile >
Session, you can also set the message size limit. Here is how the two
settings work together:
• For outgoing email, only the size limit in the session profile will be
matched. If there is no session profile defined or no IP-based policy
matched, the default size limit of 10 MB will be used.
• For incoming email, the size limits in both the session profile and
domain settings will be checked. If there is no session profile defined
or no IP-based policy matched, the default size limit of 10 MB will be
compared with the size limit in the domain settings. The smaller size
will be used.
Configuring domains and users Page 325 FortiMail 6.2.0 Administration Guide
SMTP greeting Select how the FortiMail unit will identify itself during the HELO or EHLO
(EHLO/HELO) greeting when delivering mail to the protected SMTP server as a client.
Name (As
• Use this domain name: The FortiMail unit will identify itself using the
Client)
domain name for this protected domain.
If the FortiMail unit will handle internal email messages (those for which
both the sender and recipient addresses in the envelope contain the
domain name of the protected domain), to use this option, you must
also configure your protected SMTP server to use its host name for
SMTP greetings. Failure to do this will result in dropped SMTP
sessions, as both the FortiMail unit and the protected SMTP server will
be using the same domain name when greeting each other.
• Use system host name: The FortiMail unit will identify itself using its
own host name.
• Use other name: Specify a greeting name if you want to use a
customized host name. For example, if you choose to use an IP group
for this domain, you can specify a greeting name for this IP pool to use.
By default, the FortiMail unit uses the domain name of the protected
domain.
This setting does not apply if email is incoming, according to the sender
address in the envelope, from an unprotected domain.
IP pool You can use a pool of IP addresses as the source IP address when
sending email from this domain, or as the destination IP address when
receiving email destined to this domain, or as both the source and
destination IP addresses.
• If you want to use the IP pool as the source IP address for this
protected domain, according to the sender’s email address in the
envelope (MAIL FROM:), select the IP pool to use and select Delivering
as the Direction.
• If you want to use the IP pool as the destination IP address (virtual
host) for this protected domain, according to the recipient’s email
address in the envelope (RCPT TO:), select the IP pool to use and
select Receiving as the Direction. You must also configure the MX
record to direct email to the IP pool addresses as well.
This feature can be used to support multiple virtual hosts on a single
physical interface, so that different profiles can be applied to different
host and logging for each host can be separated as well.
• If you want to use the IP pool as both the destination and source IP
address, select the IP pool to use and select Both as the Direction
Note: IP pools are skipped for email delivery between protected domains.
Each email that the FortiMail unit sends will use the next IP address in the
range. When the last IP address in the range is used, the next email will
use the first IP address.
If the FortiMail unit is operating in transparent mode, and you have
enabled “Hide the transparent box” on page 316 or “Use client-specified
SMTP server to send email” on page 219, you cannot use IP pools.
For more information on IP pools, see “Configuring IP pools” on
page 501.
Configuring domains and users Page 326 FortiMail 6.2.0 Administration Guide
Remove Enable to remove the Received: message headers from email whose:
received
• sender email address belongs to this protected domain
header of
outgoing email • recipient email address is outgoing (that is, does not belong to this
protected domain); if there are multiple recipients, only the first
recipient’s email address is used to determine whether an email is
outgoing
You can alternatively remove this header from any matching email using
session profiles. For details, see “Remove received header” on page 407.
Use global Enable to use the global Bayesian database instead of the Bayesian
Bayesian database for this protected domain.
database
If you do not need the Bayesian database to be specific to the protected
domain, you may want to use the global Bayesian database instead in
order to simplify database maintenance and training.
Disable to use the per-domain Bayesian database.
Note: Train the global or per-domain Bayesian database before using it. If
you do not train it first, Bayesian scan results may be unreliable. For more
information on Bayesian database types and how to train them, see
“Types of Bayesian databases” on page 545 and “Training the Bayesian
databases” on page 546.
Bypass Mark this check box to disable bounce verification for this protected
bounce domain.
verification
This option appears only if bounce verification is enabled. For more
information, see “Configuring bounce verification and tagging” on
page 536.
Email account Specify the maximum number of email account are allowed on this
limit domain.
Max user quota Specify the maximum disk quota for each user.
(MB)
Configuring domains and users Page 327 FortiMail 6.2.0 Administration Guide
Mail access Specify the allowed mail access protocol for the users: POP3, IMAP, or
Webmail.
Webmail For webmail access, if you select Limited Service, the users will be only
service type able to change their passwords and configure mail forwarding. All other
features will not be available.
Managing users
The User menu enables you to configure email user-related settings, such as user preferences
and PKI authentication. If the FortiMail unit is operating in server mode, the User menu also
enables you to add email user accounts.
This section includes:
• Configuring local user accounts (server mode only)
• Configuring user preferences
• Configuring PKI authentication
Configuring domains and users Page 328 FortiMail 6.2.0 Administration Guide
To view email user accounts, go to Domain & User > User > User.
Maintenance Select a user and click this button to manage that user’s mailboxes, such as
(button) Inbox, Drafts and Sent. You can check the size of each mailbox, and empty or
delete mailboxes as required.
The SecureMail mailbox contains the secured email for the user.
The Bulk mailbox contains spam quarantined by the FortiMail unit.
Click Back to return to the Users tab.
Export .CSV Click to download a backup of the email users list in comma-separated value
(button) (CSV) file format. The user passwords are encoded for security.
Caution: Most of the email user accounts data, such as mailboxes and
preferences, is not included in the .csv file. For information on performing a
complete backup, see “Backup and restore” on page 299.
Import .CSV In the field to the right of Import .CSV, enter the location of a CSV-formatted
(button) email user backup file, then click Import .CSV to upload the file to your
FortiMail unit.
The import feature provides a simple way to add a list of new users in one
operation. See “Importing a list of users” on page 331.
Before importing a user list or adding an email user, you must first configure
one or more protected domains to which the email users will belong. For more
information, see “Configuring protected domains” on page 310. You may also
want to back up the existing email user accounts. For details, see “Backup
and restore” on page 299.
Password Select a user and click this button to change a user’s password. A dialog
(button) appears. Choose whether to change the user password or to switch to LDAP
authentication. You can create a new LDAP profile or edit an existing one. For
details, see “Configuring LDAP profiles” on page 461.
Domain Select the protected domain to display its email users, or to select the
protected domain to which you want to add an email user account before
clicking New.
You can see only the domains that are permitted by your administrator profile.
Search user Enter the name of a user, or a partial user name with wildcards, and press
Enter. The list of users redisplays with just those users that meet the search
criteria.
To return to the complete user list, clear the search field and press Enter.
User Name Displays the user name of an email user, such as user1. This is also the local
portion of the email user’s primary email address.
Display Name Displays the display name of an email user, such as "J Smith". This name
appears in the From: field in the message headers of email messages sent
from this email user.
Disk Usage Displays the disk space used by mailboxes for the email user in kilobytes (KB).
(KB)
Configuring domains and users Page 329 FortiMail 6.2.0 Administration Guide
Configuring users in server mode
You can create users one at a time or import a list of users. Before importing a user list or
adding an email user, you must first configure one or more protected domains to which the
email users will belong. For more information, see “Configuring protected domains” on
page 310.
The LDAP option requires that you first create an LDAP profile in which you have enabled and
configured in “Configuring user authentication options” on page 467.
7. In Display Name, enter the name of the user as it should appear in the From: field in the
message header.
For example, an email user whose email address is [email protected] may prefer that
their Display Name be "J Zang".
8. Click OK.
For a new user, the FortiMail unit creates the account. Authentication is not yet enabled and
a policy may not exist that allows the account to send and receive email.
Complete the next two steps as applicable.
9. To enable the user account, create a recipient-based policy that both matches its email
address and uses a resource profile in which User account status is enabled. For details, see
“Workflow to enable and configure authentication of email users” on page 451 and
“Configuring resource profiles” on page 449.
Configuring domains and users Page 330 FortiMail 6.2.0 Administration Guide
10.To allow the user account to send and receive email, configure an access control rule and
either an IP-based policy or an incoming recipient-based policy. For details, see
“Configuring policies” on page 362.
If you rename an existing user account to a new user account name using the CLI command, all
the user’s preferences and mail data will be ported to the new user. However, due to the
account name change, the new user will not be able to decrypt and read the encrypted email
that is sent to the old user name before.
7. Use the Save As feature to save the file in plain CSV format.
8. On the User tab, click Import.
A dialog appears.
9. Click Browse to locate the CSV file to import and click Open.
10.Click OK.
A field appears showing the percentage of import completion.
A dialog appears showing the number of imported records.
The import feature does not overwrite existing records.
This procedure sets the same password for one or more email user accounts, which can result
in reduced security of the email users’ accounts. To reduce risk, set a strong password and
notify each email user whose password has been reset to configure a unique, strong password
as soon as possible.
Configuring domains and users Page 331 FortiMail 6.2.0 Administration Guide
3. To change the passwords of all email user accounts for the protected domain, mark the
check box located in the check box column heading.
To change the passwords of individual email user accounts, in the check box column, mark
the check boxes of each email user account whose password you want to change.
4. Click Password.
5. Select either:
• Password, then enter the password for this email account, or
• LDAP, then select the name of an LDAP profile in which you have enabled and configured
the User Auth Options query, which enables the FortiMail unit to query the LDAP server to
authenticate the email user.
You can create LDAP profiles using the advanced mode of the web-based manager. For more
information, see “Configuring LDAP profiles” on page 461.
6. Click OK.
Configuring domains and users Page 332 FortiMail 6.2.0 Administration Guide
Although you may have created a local user account, the user’s preferences may not be
created. You can either wait for an event that requires it to be automatically initialized using the
default values, or you can manually create and modify it.
Administrators can modify preferences for each email user through the web UI. Email users can
modify their own preferences by logging in to the FortiMail webmail or email quarantine.
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Policy category.
For details, see “About administrator account permissions and domains” on page 179.
Delete User Data Select the user and then click this button to delete the user preference
(button) settings and mail data.
Domain Select the protected domain to display its email users, or to select the
protected domain to which you want to add an email user account
before clicking New.
You can see only the domains that are permitted by your administrator
profile.
Search user Enter the name of a user, or a partial user name with wildcards, and
press Enter. The list of users redisplays with just those users that meet
the search criteria.
To return to the complete user list, clear the search field and press
Enter.
User Name Displays the user name of an email user, such as user1.
Language Displays the language in which this email user prefers to display their
quarantine and, if the FortiMail unit is operating in server mode,
webmail. By default, this language preference is the same as the
system-wide default webmail language preference. For more
information, see “Customizing the GUI appearance” on page 230.
Configuring domains and users Page 333 FortiMail 6.2.0 Administration Guide
GUI item Description
Safe List The icon in this column indicates whether or not a personal safe list
currently exists for this email user. Hover the mouse pointer over the
list icon to determine its status:
• New: A personal safe list does not exist for this email user.
• Edit: A personal safe list exists for this email user.
Click the icon to open a dialog where you can configure, back up, or
restore the personal safe list. Safe lists include sender IP addresses,
domain names, and email addresses that the email user wants to
permit.
Note: System-level lists take precedence over domain-level lists while
domain-level lists take precedence over personal-level lists.
For more information on safe lists and block lists, see “Configuring the
personal block lists and safe lists” on page 523.
Block List The icon in this column indicates whether or not a personal block list
currently exists for this email user. Hover the mouse pointer over the
list icon to determine its status:
• New: A personal block list does not exist for this email user.
• Edit: A personal block list exists for this email user.
Click the icon to open a dialog where you can configure, back up, or
restore the personal block list. Block lists include sender IP addresses,
domain names, and email addresses that the email user wants to
block
Note: System-level lists take precedence over domain-level lists while
domain-level lists take precedence over personal-level lists.
For more information on safe lists and block lists, see “Configuring the
personal block lists and safe lists” on page 523.
Secondary The icon in this column indicates whether or not this email user will
Accounts also handle quarantined email messages for other email addresses.
Hover the mouse pointer over the list icon to determine its status:
• New: A secondary access list does not exist for this email user.
• Edit: A secondary access list exists for this email user.
Click the icon to open a dialog where you can add or remove
secondary accounts. The addresses must exist in one of the existing
FortiMail domains to be added.
Configuring domains and users Page 334 FortiMail 6.2.0 Administration Guide
GUI item Description
Outgoing The icon indicates whether or not the FortiMail unit will automatically
Recipient add recipient addresses in outgoing email sent by this email user to
Safelisting their per-user safe list, if it is allowed in the antispam profile.
(icon)
• A green check mark icon indicates automatic per-user safelisting is
enabled.
• A red X icon indicates automatic per-user safelisting is disabled.
Email users can change this setting in their webmail preferences. For
more information, log in to the FortiMail webmail, then click Help.
This setting can be initialized manually or automatically. FortiMail
administrators can manually create and configure this setting when
configuring email user preferences. If the setting has not yet been
created when either:
• an email user logs in to FortiMail webmail
• an email user sends outgoing email through the FortiMail unit
• a FortiMail administrator configures the email user’s personal block
or safe list (see “Configuring the personal block lists and safe lists”
on page 523)
then the FortiMail unit will automatically initialize this setting as
disabled.
Preference The green check mark indicates that the user preference has been
configured and the settings will be used.
The red check mark indicates that the user preference has not be
configured and the default settings will be used.
Configuring domains and users Page 335 FortiMail 6.2.0 Administration Guide
When a PKI user connects to the FortiMail unit with a web browser, the browser presents the
PKI user’s certificate to the FortiMail unit. If the certificate is valid, the FortiMail unit then
authenticates the PKI user. To be valid, a client certificate must:
• not be expired
• not be revoked by either certificate revocation list (CRL) or, if enabled, online certificate
status protocol (OCSP)
• be signed by a certificate authority (CA), whose certificate you have imported into the
FortiMail unit
• contain a CA field whose value matches the CA certificate
• contain a Issuer field whose value matches the Subject field in the CA certificate
• contain a Subject field whose value contains the subject, or is empty
• contain a Common Name (CN) or Subject Alternative field, if LDAP Query is enabled,
whose value matches the email address of a user object retrieved using the User Query
Options of the LDAP profile.
Web browsers may have their own certificate validation requirements in addition to FortiMail
requirements. For example, personal certificates may be required to contain the PKI user’s
email address in the Subject Alternative Name field, and that Key Usage field contain
Digital Signature, Data Encipherment, Key Encipherment. For browser
requirements, see your web browser’s documentation.
If the client certificate is not valid, depending on whether you have configured the FortiMail unit
to require valid certificates, authentication will either fail absolutely, or fail over to user name and
password authentication.
If the certificate is valid and authentication succeeds, the PKI user’s web browser is redirected
to either the web UI (for PKI users that are FortiMail administrators), or FortiMail webmail or the
personal quarantine (for PKI users that are email users).
For details and examples about how to use PKI authentication for FortiMail email users and
administrators, see “Appendix F: PKI Authentication” on page 652.
To access this part of the web UI, your administrator account’s:
• Domain must be System
• access profile must have Read or Read-Write permission to the Policy category
For details, see “About administrator account permissions and domains” on page 179.
Domain Displays the protected domain to which the PKI user is assigned. If
“Domain” on page 336 is empty, the PKI user is an administrator.
CA Displays the name of the CA certificate used when validating the CA’s
signature of the client certificate. For more information, see “Managing
certificate authority certificates” on page 287.
Configuring domains and users Page 336 FortiMail 6.2.0 Administration Guide
GUI item Description
Subject Displays a string used to match part of the value in the Subject field of
the client certificate. It does not have to match the entire subject.
If empty, matching values are not considered when validating the client
certificate presented by the PKI user’s web browser.
LDAP If “LDAP query” on page 338 is enabled, the LDAP configuration of this
PKI user is shown in three parts:
• Whether the LDAP query setting is enabled (indicated by E) or disabled
(indicated by “-”).
• Displays the name of the LDAP profile used for the query. For more
information, see “Configuring LDAP profiles” on page 461.
• Displays the name of the field in the client certificate (either Subject
Alternative or CN) whose value must match the email address of a user
object in the LDAP directory.
For example, E/ldapprof/Subject Alternative indicates that LDAP
query is enabled, and will use the LDAP profile named ldapprof to
validate the Subject Alternative field of the client certificate.
OCSP If this is enabled, the OCSP configuration of this PKI user is shown in three
parts:
• Whether OSCP is enabled (indicated by E) or disabled (indicated by
“-”).
• Displays the URL of the OCSP server.
• Displays the action to take if the OCSP server is unavailable. If set to
ignore, the FortiMail unit allows the user to authenticate. If set to
revoke, the FortiMail unit behaves as if the certificate is currently
revoked, and authentication fails.
For example, E/https://www.example.com/Revoke indicates OCSP
is enabled, using the OSCP server at https://www.example.com, and if the
OSCP server is unavailable, the FortiMail unit prevents the user from
authenticating.
2. Click New to add PKI authentication for an email user or administrator account or
double-click an account to modify it.
3. Configure the following:
Configuring domains and users Page 337 FortiMail 6.2.0 Administration Guide
GUI item Description
User name For a new user, enter the name of the PKI user.
There is no requirement to use the same name as the administrator or email
user’s account name, although you may find it helpful to be so.
For example, you might have an administrator account named admin1.You
might therefore find it most straightforward to also name the PKI user
admin1, making it easy to remember which account you intended to use
these PKI settings.
Domain Select either the protected domain to which the PKI user is assigned, or, if
the PKI user is a FortiMail administrator, select System.
You can see only the domains that are permitted by your administrator
profile.
CA Select either None or the name of the CA certificate to use when validating
the CA’s signature of the client certificate. For more information, see
“Managing certificate authority certificates” on page 287.
If you select None, you must configure “Subject” on page 338.
Subject Enter the value which must match the Subject field of the client certificate,
or leave this field empty. If empty, matching values are not considered when
validating the client certificate presented by the PKI user’s web browser.
If you do not configure “Subject” on page 338, you must configure “CA” on
page 338.
LDAP query Enable to query an LDAP directory, such as Microsoft Active Directory, to
determine the existence of the PKI user who is attempting to authenticate,
then also configure “LDAP profile” on page 338 and “Query field” on
page 339.
Note: If this option is enabled, no local user configuration is necessary.
Instead, the FortiMail unit creates the personal quarantine folder and other
necessary items when PKI authentication queries the LDAP server.
LDAP profile From the drop-down list, select the LDAP profile to use when
querying the LDAP server.
• If no profile exists, click New to create one.
• If a profile exists but needs modification, select it and
click Edit.
In both cases, the Edit LDAP Profile dialog appears. For more
information, see “Configuring LDAP profiles” on page 461.
This option is available only if “LDAP query” on page 338 is
enabled.
Configuring domains and users Page 338 FortiMail 6.2.0 Administration Guide
GUI item Description
Query field Select the name of the field in the client certificate (either CN
or Subject Alternative) which contains the email address of
the PKI user.
This email address will be compared with the value of the
email address attribute for each user object queried from the
LDAP directory to determine if the PKI user exists in the
LDAP directory.
This option is available only if “LDAP query” on page 338 is
enabled.
OCSP Enable to use an Online Certificate Status Protocol (OCSP) server to query
whether the client certificate has been revoked, then also configure “URL” on
page 339, “Remote certificate” on page 339, and “Unavailable action” on
page 339.
Remote Select the remote certificate that is used to verify the identity
certificate of the OCSP server. For more information, see “Managing
OCSP server certificates” on page 288.
This option is available only if “OCSP” on page 339 is
enabled.
You need to take additional steps to activate and complete a PKI user’s configuration.
Configuring domains and users Page 339 FortiMail 6.2.0 Administration Guide
5. For PKI users that are email users, enable PKI user authentication in the incoming
recipient-based policies which match those email users. For more information, see
“Controlling email based on sender and recipient addresses” on page 384.
Control access to each PKI user’s computer. Certificate-based PKI authentication controls
access to the FortiMail unit based on PKI certificates, which are installed on each email user or
administrator’s computer. If anyone can access the computers where those PKI certificates are
installed, they can gain access to the FortiMail unit, which can compromise the security of your
FortiMail unit.
The User Alias tab lets you configure email address aliases for protected domains.
Aliases sometimes act as distribution lists; that is, they translate one email address into the
email addresses of several recipients, called members. An alias can also be a literal alias; that
is, it is an alternative email address that resolves to the real email address of a single email user.
For example, [email protected] might be an alias that the FortiMail unit will expand to
[email protected] and [email protected], having the effect of distributing an email
message to all email addresses that are members of that alias, while [email protected]
might be an alias that the FortiMail unit translates to [email protected]. In both cases, the
FortiMail unit converts the alias in the recipient fields of incoming email messages into the
member email addresses of the alias, each of which are the email address of an email user that
is locally deliverable on the SMTP server or FortiMail unit.
Members of an alias can include the email address of the alias itself.
Aliases can contain both or either local and non-local email addresses as members of the alias.
For example, if the local protected domain is mail.example.com, you could create an email
address alias whose members are:
• [email protected], which is locally deliverable to the protected domain
• [email protected], which is not locally deliverable to the protected domain
Alternatively to configuring aliases locally, you can configure the FortiMail unit to query an LDAP
directory. For details, see “Configuring LDAP profiles” on page 461.
Unlike address maps, aliases can be one-to-many relationships between the alias and its
members, but cannot be bidirectional — that is, recipient email addresses that are aliases are
translated into their member email addresses, but sender email addresses that are members
are not translated into aliases.
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Others category.
For details, see “About administrator account permissions and domains” on page 179.
Configuring domains and users Page 340 FortiMail 6.2.0 Administration Guide
To view and configure alias addresses
1. Go to Domain & User > User Alias > User Alias.
Domain Select the name of a protected domain to view email address aliases for
that protected domain.
You can see only the domains that are permitted by your administrator
profile.
Alias Name Displays the email address of the alias, such as [email protected].
Members Displays the email addresses to which the alias will translate, which may be
the email addresses of one or more local or non-local email users. Multiple
email addresses are comma-delimited.
Configuring domains and users Page 341 FortiMail 6.2.0 Administration Guide
Configuring address mappings
Both RCPT TO: and MAIL FROM: email addresses are always evaluated for a match with an
address mapping. If both RCPT TO: and MAIL FROM: contain email addresses that match the
mapping, both mapping translations will be performed.
Table 43:Match evaluation and rewrite behavior for email address mappings
Configuring domains and users Page 342 FortiMail 6.2.0 Administration Guide
Table 43:Match evaluation and rewrite behavior for email address mappings
For example, you could create an address mapping between the internal email address
[email protected] and the external email address [email protected]. The
following effects would be observable on the simplest case of an outgoing email and an
incoming reply:
• For email from [email protected] to other users, [email protected]
in both the message envelope (MAIL FROM:) and many message headers (From:, Cc:,
etc.) would then be replaced with [email protected]. Recipients would only be aware of
the email address [email protected].
• For email to [email protected] from others, the recipient address in the message
envelope (RCPT TO:), but not the message header (To:), would be replaced with
[email protected]. The recipient [email protected] would be aware
that the sender had originally sent the email to the mapped address, [email protected].
You can alternatively create address mappings by configuring the FortiMail unit to query an
LDAP server that contains address mappings. For more information, see “Configuring LDAP
profiles” on page 461.
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Others category.
For details, see “About administrator account permissions and domains” on page 179.
Domain Select the name of a protected domain to view address maps whose
internal email address belongs to that protected domain.
You can see only the domains that are permitted by your administrator
profile.
Configuring domains and users Page 343 FortiMail 6.2.0 Administration Guide
GUI item Description
2. Either click New to add an address mapping or double-click a mapping to modify it.
A dialog appears.
3. Configure the following:
If you use wildcards (* or ?) in the name, you must enter a pattern using the same wild card in
the external email address. The wild card indicates that the mapping could match many email
addresses, but also indicates, during the rewrite, which substring of the original email address
will be substituted into the position of the wild card in the external address. If there is no wild
card in the other half of the mapping, or the wild card is not the same (that is, * mapped to ? or
vice versa), this substitution will fail.
You can send secured email with Identity Based Encryption (IBE) through the FortiMail unit. The
IBE User option lets you manage the IBE mail users and configure secure questions for
forgotten passwords and IBE domains. For details about how to use IBE service, see “FortiMail
IBE configuration workflow” on page 557.
Configuring domains and users Page 344 FortiMail 6.2.0 Administration Guide
This section contains the following topics:
• Configuring active users
• Configuring expired users
• Configuring security questions
• Configuring IBE authentication
Maintenance Select a user and click this button to manage that user’s mailboxes, such
(button) as Inbox, Drafts and Sent. You can check the size of a mailbox and empty a
mailbox as required.
The SecureMail mailbox contains the secured email for the user. The
encrypted email are put into this mailbox if Pull is selected to retrieve IBE
mail.
The Bulk mailbox contains spam that are quarantined by the FortiMail unit.
Reset User Click to reset a mail user and require new login information to access the
(button) FortiMail unit.
Resetting a user sends the user a new notification and the user needs to
re-register on the FortiMail unit.
IBE domain Select the name of an IBE domain to view its active users.
For more information about IBE domain, see “Configuring IBE
authentication” on page 348.
Search Enter the name of a user, or a partial user name with wildcards, and press
Enter. The list of users redisplays with just those users that meet the search
criteria.
To return to the complete user list, clear the search field and press Enter.
Enabled Select the check box to activate a mail user. A disabled user cannot
access the FortiMail unit.
First Name, Last Displays the first and last name of a mail user. This information appears
Name when a mail user registers on the FortiMail unit.
Configuring domains and users Page 345 FortiMail 6.2.0 Administration Guide
GUI item Description
Maintenance Select a user and click this button to manage that user’s mailboxes, such
(button) as Inbox, Drafts and Sent. You can check the size of a mailbox and empty
a mailbox as required.
The SecureMail mailbox contains the secured email for the user. The
encrypted email are put into this mailbox if Pull is selected to retrieve IBE
mail.
The Bulk mailbox contains spam that are quarantined by the FortiMail unit.
IBE domain Select the name of an IBE domain to view its active users.
For more information about IBE domain, see “Configuring IBE
authentication” on page 348.
Configuring domains and users Page 346 FortiMail 6.2.0 Administration Guide
GUI item Description
Search Enter the name of a user, or a partial user name with wildcards, and press
Enter. The list of users redisplays with just those users that meet the
search criteria.
To return to the complete user list, clear the search field and press Enter.
First Name, Last Displays the first name of a mail user. This information appears when a
Name mail user registers on the FortiMail unit.
Last Name Displays the last name of a mail user. This information appears when a mail
user registers on the FortiMail unit.
Last Access Displays the time stamp when the user was last active.
Edit Select a question and click Edit to modify it. You cannot edit a predefined
(button) question except to disable or enable it.
Language From the drop-down list, select the language that applies to all questions
on this page.
Enabled Select to enable a question. Clear the check box to remove a question
from use.
Configuring domains and users Page 347 FortiMail 6.2.0 Administration Guide
To add a new security question
1. Double-click an empty row beneath the predefined questions.
A dialog appears.
2. Select Enable to activate the question.
3. Enter the question in the Question box.
The language is determined by the language choice on the tab.
4. Click OK.
Domain Enter a domain name that you want to bind to an LDAP authentication
pattern profile.
If you want all IBE users to authenticate through an LDAP profile and do not
want other non-LDAP-authenticated users to get registered on FortiMail,
you can use wildcard * for the domain name and then bind it to an LDAP
profile.
For more information about LDAP profiles, see “Configuring LDAP profiles”
on page 461.
LDAP profile Select the LDAP profile you want to use to authenticate the domain users.
Configuring domains and users Page 348 FortiMail 6.2.0 Administration Guide
To view those domains, go to Domain & User > IBE User > IBE Domain.
Remove All Select to delete all mail users in a selected domain. These users cannot
Users (button) access the FortiMail unit until they receive new secure mail notifications from
the FortiMail unit.
Active User Displays the active mail users in a domain. For more information about active
Count users, see “Configuring active users” on page 345.
Expired User Displays the expired mail users in a domain. For more information about active
Count users, see “Configuring expired users” on page 346.
The Domain & User > Address Book tab lets you create and maintain a global or domain-based
address book and contact groups, or to configure LDAP attribute mapping templates to retrieve
existing address books in your LDAP server.
This menu option appears only when the FortiMail unit is operating in server mode.
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Others category
For details, see “About administrator account permissions and domains” on page 179.
This section contains the following topics:
• Adding contacts (server mode only)
• Adding contact groups (server mode only)
• Configuring LDAP attribute mapping template (server mode only)
Configuring domains and users Page 349 FortiMail 6.2.0 Administration Guide
Individual FortiMail webmail users can access the global or domain-based address books for a
common set of contact information when composing email messages. For more information,
log in to FortiMail webmail and click Help.
More > Export Click to download a copy of the address book in comma-separated
value (.csv) or vCard (.vcf) file format.
(dropdow list)
Exporting the address book can be useful for backup purposes, or when
using a spreadsheet application such as Microsoft Excel to make large
numbers of changes to the address book before importing it again.
More > Import Click to select a comma-separated value (.csv) or vCard (.vcf) file format.
Then click Browse to import address book entries. Click OK to upload
(dropdow list)
the file.
Click and select LDAP allows you to import contacts from your LDAP
server. For details, see “To import contacts from the LDAP server” on
page 351.
Note: An LDAP attribute mapping template must be set up before you
can import contacts from the LDAP server. For details, see “Configuring
LDAP attribute mapping template (server mode only)” on page 353.
Importing the address book can be useful when restoring a backup of
the address book, or when importing large numbers of address book
entries.
Note: To replace existing entries, first delete those entries, then import
the address book file. The FortiMail unit compares the Webmail_ID
value of each entry in the address book file, and will not overwrite
existing address book entries.
More > Manage Select a contact and click this button to add a contact to or remove a
Group contact from a contact group. To do so, you must first add contact
groups. For more information on managing groups, see “To add or
(dropdow list)
remove users from contact groups” on page 351. For more information
on adding group names, see “Adding contact groups (server mode
only)” on page 352.
Search Enter a search value for a contact, such as the first name, last name, or
email address, and click this button to find the contact from the list.
Configuring domains and users Page 350 FortiMail 6.2.0 Administration Guide
2. Either click New to create a contact or double-click a contact to modify it.
A dialog appears.
3. Enter information for the contact.
Note: Before 5.4 release, an email address in valid format is required and other fields are
optional. After 5.4 release, the email address field is also optional and can be in any format.
4. Click Create or OK.
5. To add additional contact information, click the Address, Custom, and Advanced tabs.
Select LDAP Select an LDAP profile that contains the configuration for the LDAP
profile server from which you want to import the contacts. For information on
creating LDAP profiles, see “Configuring LDAP profiles” on page 461.
Select LDAP Select an LDAP attribute mapping template. The FortiMail unit will
mapping import the contacts from the LDAP server based on this template. For
information on creating the template, see “Configuring LDAP attribute
mapping template (server mode only)” on page 353.
New Click to create a new LDAP attribute mapping template. For details, see
“To view and configure an LDAP mapping list” on page 353.
(button)
Edit Click to modify the LDAP attribute mapping template you selected in
(button) the Select LDAP mapping field.
Overwrite Select if you want to overwrite the same contacts in your current
existing contacts address book with the imported contact list. This is especially useful
when you want to update the imported list.
Delete Select if you want to remove the contacts that were in a previous
nonexistent imported list but are not available in the updated list. This is especially
contacts useful when you want to update the imported list.
3. Select OK.
The FortiMail unit starts importing contacts from the LDAP server. When complete, a Status
field appears with information on whether the import was successful.
Configuring domains and users Page 351 FortiMail 6.2.0 Administration Guide
4. In Domain, select System to display all system-wide contact groups, or a domain name to
display all contact groups under that domain. For information on creating domains, see
“Configuring protected domains” on page 310.
5. Whether adding or removing users, both dialogs work the same.
• To add the users to a group or groups, select one or more groups under Available
group(s) on the Add to Group dialog and click -> to move them to the Selected group(s)
field.
• To remove the users from a group or groups, select one or more groups under Available
group(s) on the Delete from Group dialog and click -> to move them to the Selected
group(s) field.
Users are not removed from the contacts list, just removed from a group.
6. Click OK.
Configuring domains and users Page 352 FortiMail 6.2.0 Administration Guide
GUI item Description
Search Enter a search value for a group member, such as the first name, last
name, or email address, and click this button to find the group member
from the list.
Configuring domains and users Page 353 FortiMail 6.2.0 Administration Guide
GUI item Description
Mapping Name Enter the name of the LDAP attribute mapping template.
Contact Field Select the FortiMail attributes used for the contacts, such as First name,
Last name, or Mobile.
Note: The Email attribute must be entered.
LDAP Attribute Enter the matching contact attributes used in the LDAP server. For
example, Name may be used to represent first name and Surname may
be used for last name.
Delete Select an attribute row in the Mapping content table and click this
(button) button to remove it.
4. Click Create.
FortiMail v5.0 supports calendar sharing and LDAP-based address book sharing. The calendar,
meeting schedule, free-busy time, and resources like meeting rooms, projectors, and other
equipment usage are also supported.
To be specific, the following features are supported:
• FortiMail internal calendar sharing from/to FortiMail webmail users
• Internet calendar sharing from/to FortiMail webmail users
• Calendar sharing from/to Microsoft Outlook users using WebDAV (Outlook does not support
CalDAV)
• Calendar sharing from/to Mozilla Thunderbird users using WebDAV or CalDAV
• Address book query from Outlook using LDAP
• Address book query from Thunderbird using LDAP
Other email clients may also be supported if they support the standard WebDAV and CalDAV
protocols.
This section contains the following topics:
• Calendar sharing
• Address book sharing
Calendar sharing
To share calendars, you must first enable the service on FortiMail and then configure the
webmail or mail client settings.
Configuring domains and users Page 354 FortiMail 6.2.0 Administration Guide
FortiMail calendar settings
Thunderbird settings
Thunderbird Lightning users can publish and subscribe calendars to/from the FortiMail WebDAV
server. They can also subscribe the shared calendar via the CalDAV protocol which facilitates
calendar sharing and synchronization between FortiMail and Thunderbird Lightning.
Thunderbird users can schedule an event or meeting based on the free/busy information shared
and stored on FortiMail WebDAV server. Before scheduling a meeting, the free/busy settings
must be configured.
Configuring domains and users Page 355 FortiMail 6.2.0 Administration Guide
5. Enter the display name and other settings, then click Next.
6. Enter the user name and password required for FortiMail authentication.
7. The new calendar will appear in the left calendar pane. And it can be synchronized with the
FortiMail CalDAV service automatically or manually.
Outlook settings
Outlook users can publish and subscribe calendars to/from FortiMail WebDAV service (Outlook
does not support CalDAV). They can also schedule meetings based on the free/busy
information shared and stored on the FortiMail WebDAV server.
Outlook users can schedule an event or meeting based on the free/busy information shared and
stored on FortiMail WebDAV server. Before scheduling a meeting, the free/busy settings must
be configured.
Configuring domains and users Page 356 FortiMail 6.2.0 Administration Guide
4. Enter the publicly shared calendar location you get from the FortiMail webmail (see
“FortiMail webmail settings” on page 355).
5. Specify the folder name and description.
6. Click OK.
FortiMail settings
First, you need to enable the LDAP service on FortiMail.
To create a policy
1. Go to Policy > Recipient Policy > Inbound.
2. Click New.
3. Specify the sender and recipient patterns, and other settings.
4. For Resource profile, click New.
5. In the resource profile configuration, select Domain address book, Global address book, or
both.
Configuring domains and users Page 357 FortiMail 6.2.0 Administration Guide
Thunderbird settings
Thunderbird users can access the address books stored on FortiMail via the LDAP protocol.
Outlook settings
Outlook users can access the address books stored on FortiMail via the LDAP protocol.
Configuring domains and users Page 358 FortiMail 6.2.0 Administration Guide
To access FortiMail address books
1. Open the address book in Outlook.
2. Select the target address book.
3. Enter the user name you want to find.
4. Click Go.
If you already have other mail servers, such as Exchange or FortiMail server, and you want to
consolidate the mail user and data into one FortiMail server, you can do so by migrating the
users and data to your FortiMail unit.
The email migration process involves the following procedures:
1. Preparation
a. Enable the mail migration feature using the following CLI commands.
config system global
set email-migration-status enable
end
By default, the email migration feature does not appear on the GUI until you enable it with the
above CLI commands.
b. Define the remote mail server settings. For details, see “Defining a remote mail server for
mail migration” on page 360.
c. Create a domain for the to-be-migrated users. In v5.0 release, the domain name must be
the same as the users’ domain on the remote mail server. Beginning from v5.0.1 release,
the domain name can be different. For details, see “Creating domains for mail migration”
on page 360.
2. User migration: Because FortiMail will act as an IMAP client on behalf of the users to get
their email from the remote mail server, you must import the user/password information first.
To do this, you can use one of the following methods:
• If you only need to migrate email for a few users and you know the users’ login
credentials, you can manually enter their user name/password information by going to
Domain & User > Mail Migration > Migration User and click New.
• If you can export the user name/non-encrypted password list into a CSV file, you can
import the CSV file by going to Domain & User > Mail Migration > Migration User and click
Action > Import > From .CSV File.
• If the to-be-migrated users already have accounts on the FortiMail server, you can
import/copy the local user list to the migration user list by going to Domain & User > Mail
Migration > Migration User and click Action > Import > From Local Domain.
• If the user passwords are encrypted, you have to collect their passwords through
FortiMail webmail login or SMTP client login. To do this:
i. First create an authentication profile that uses the remote mail server as the
authentication server. For details, see “Configuring authentication profiles” on
page 452.
Configuring domains and users Page 359 FortiMail 6.2.0 Administration Guide
ii. Create a recipient-based policy that includes the migration users as senders and also
includes the authentication profile. For details, see the “Controlling email based on
sender and recipient addresses” on page 384.
iii. Use one of the following two methods to collect user passwords:
a. Through FortiMail webmail login: Inform the users to log in to the FortiMail webmail
portal, using their email addresses of the remote domain (the domain part needs to
match proper authentication policy) and their passwords. Upon successful login, the
users will be shown an empty webmail mailbox. This is because the email data has
not been migrated yet and this step is only meant to collect user passwords.
b. Through SMTP client login: Inform the users to use the FortiMail host name as their
outgoing mail server.
After you have done the above, when the users try to send email, they will have to
authenticate through FortiMail. Then FortiMail will record the user names and passwords
into the migration user list under Mail Settings > Mail Migration > Migration Users.
3. Mail data migration: After you have migrated the users, you can start to migrate the their
mail boxes from the remote server. To do this:
i. Go to Domain & User > Mail Migration > Migration User.
ii. From the Action dropdown list, select Migrate > Selected Users or All Users.
iii. If needed, you can click the Stop and Start button to control the migration process.
iv. After the user’s mail data is successfully migrated, you can export the user to the local
user list by clicking Action > Export > Selected Users or All Users. The exported users
will appear as local users under User > User.
In v5.0 release, the created domain name on FortiMail must be the same as the users’ domain
on the remote mail server. Beginning from v5.0.1 release, the domain names can be different.
Configuring domains and users Page 360 FortiMail 6.2.0 Administration Guide
4. Since you have enabled mail migration, a new section called Mail Migration Settings appears
at the bottom of the domain settings page. Expand this section and configure the following
settings.
5. Check Enable mail migration.
6. Specify the remote mail server from the dropdown list. See “Defining a remote mail server for
mail migration” on page 360.
7. Click Create.
Configuring domains and users Page 361 FortiMail 6.2.0 Administration Guide
Configuring policies
The Policy menu lets you create policies that use profiles to filter email.
It also lets you control who can send email through the FortiMail unit, and stipulate rules for how
it will deliver email that it proxies or relays.
Modify or delete policies and policy settings with care. Any changes made to a policy take
effect immediately.
What is a policy?
A policy defines which way traffic will be filtered. It may also define user account settings, such
as authentication type, disk quota, and access to webmail.
After creating the antispam, antivirus, content, authentication, TLS, or resource profiles (see
“Configuring profiles” on page 392), you need to apply them to policies for them to take effect.
FortiMail units support three types of policies:
• Access control and delivery rules that are typical to SMTP relays and servers (see
“Controlling SMTP access and delivery” on page 365)
• Recipient-based policies (see “Controlling email based on sender and recipient addresses”
on page 384)
• IP-based policies (see “Controlling email based on IP addresses” on page 378)
Page 362
Inbound versus outbound email
There are two types of recipient-based policies: inbound and outbound. The FortiMail unit
applies inbound policies to the incoming mail messages and outbound policies to the outgoing
mail messages.
Whether the email is inbound or outbound is decided by the domain name in the recipient’s
email address. If the domain is a protected domain, the FortiMail unit considers the message to
be inbound and applies the first matching inbound recipient-based policy. If the recipient
domain is not a protected domain, the message is considered to be outbound, and applies
outbound recipient-based policy.
To be more specific, the FortiMail unit actually matches the recipient domain’s IP address with
the IP list of the protected SMTP servers where the protected domains reside. If there is an IP
match, the domain is deemed protected and the email destined to this domain is considered to
be inbound. If there is no IP match, the domain is deemed unprotected and the email destined
to this domain is considered to be outbound.
For more information on protected domains, see “Configuring protected domains” on page 310.
IP-based policies are not divided into inbound and outbound types. The client IP address and,
for transparent mode, the server IP address are only used to determine whether or not the
IP-based policy matches.
Use access control rules and delivery rules to control which SMTP clients can send email
through an SMTP relay and how SMTP will deliver email that it proxies or relays.
Recipient-based policies are applied to individual email messages based on the recipient’s
email address.
IP-based policies are applied based on the IP address of the connecting SMTP client and, if the
FortiMail unit is operating in transparent mode, the SMTP server.
If SMTP traffic does not match any IP-based or recipient-based policy, it is allowed. However,
no antivirus or antispam protection may be applied.
If you are certain that you have configured policies to match and allow all required traffic, you
can tighten security by adding an IP policy at the bottom of the policy list to reject all other,
unwanted connections.
The Policy > Access Control submenu lets you configure access control rules for SMTP
sessions.
Unlike proxy/implicit relay pickup, access control rules take effect after the FortiMail unit has
initiated or received an IP and TCP-level connection at the application layer of the network.
Other protocols can also be restricted if the connection’s destination is the FortiMail unit. For
details, see “Configuring the network interfaces” on page 163.
Access control rules are categorized separately based on whether they affect either the receipt
or delivery of email messages by the FortiMail unit; that is, whether the FortiMail unit initiated
the SMTP session or was the destination.
• Configuring access control rules
• Configuring delivery rules
• Troubleshoot MTA issues
If no access control rules are configured, or no matching access control rules exist, and if the
SMTP client is not configured to authenticate, the FortiMail unit will perform the default action,
which varies by whether or not the recipient email address in the envelope (RCPT TO:) is a
member of a protected domain.
• For protected domains, the default action is delivery (with greylisting).
• For unprotected domains, the default action is REJECT.
For information on protected domains, see “Configuring protected domains” on page 310.
In the absence of access control rules, the FortiMail unit prevents SMTP clients from using your
protected server or FortiMail unit as an open relay: senders can deliver email incoming to
protected domains, but cannot deliver email outgoing to unprotected domains.
For information on the sequence in which access control rules are used relative to other
antispam methods, see “Order of execution” on page 16.
If you want to allow SMTP clients, such as your email users or email servers, to send email to
unprotected domains, you must configure at least one access control rule. You may need to
configure additional access control rules if, for example, you want to:
• discard or reject email from or to some email addresses, such as email addresses that no
longer exist in your protected domain
• discard or reject email from some SMTP clients, such as a spammer that is not yet known to
blocklists
Like IP-based policies, access control rules can reject connections based on IP address. Unlike
IP-based policies, access control rules cannot affect email in ways that occur after the
session’s DATA command, such as by applying antispam profiles.
Access control rules cannot be overruled by recipient-based policies, and cannot match
connections based on the SMTP server’s IP address. (By the nature of how ACL controls
access to or through the FortiMail unit, the SMTP server is always the FortiMail unit itself,
unless the FortiMail unit is operating in transparent mode.) For more information on IP-based
policies, see “Controlling email based on IP addresses” on page 378.
If possible, verify configuration of access control rules in a testing environment before applying
them to a FortiMail unit in active use. Failure to verify correctly configured reject, discard, and
accept actions can result in inability to correctly handle SMTP sessions.
Sender Pattern Displays the pattern that defines email senders for the rule.
Recipient Pattern Displays the pattern that defines email recipients for the rule.
Sender/IP Displays the IP address and netmask of the SMTP client attempting to
Netmask deliver the email message.
TLS Profile Displays the TLS profile, if any, used to allow or reject a connection.
Actions Displays the action to take when SMTP sessions match the rule.
2. Either click New to add an access control rule or double-click an access control rule to
modify it.
A dialog appears.
3. Configure the following:
Enabled Select whether or not the access control rule is currently in effect.
Sender pattern Select either User Defined and enter a complete or partial sender
(MAIL FROM:) email address to match, or select:
• Internal: Match any email address from a protected domain.
• External: Match any email address from an unprotected domain.
• Email Group: Match any email address in the group.
If you select this option, select an email group from the Email
Group Selection field. Click New to add a new email group or Edit
to modify an existing one.
For more information, see “Configuring email groups” on
page 503.
• LDAP Group: Match any email address in the group.
If you select this option, select an LDAP profile from the LDAP
Profile field.
• LDAP Verification: Match any individual email address queried by
the LDAP profile.
If you select this option, select an LDAP profile from the dropdown
list or click New to create a new one.
Note: Use "$s" to match sender addresses. For example, to reject
senders that are not in the recipient's allowed sender list:
a. Create an ACL rule and choose LDAP verification in the sender
pattern.
b. Choose a LDAP profile where below user query string is used:
(&(mail=$m)(!(allowedSenders=$s)))
c. Set the ACL rule action to Reject.
This will match a sender that is not in the allowedSenders list of
the recipient and reject email from such senders.
• Regular Expression: Use regular expression syntax instead of
wildcards to specify the pattern. See “Using wildcards and regular
expressions” on page 371.
• User Defined: Specify the email addresses. The pattern can use
wildcards or regular expressions. See “Appendix D: Regular
expressions” on page 641. For example, the sender pattern
*@example.??? will match messages sent to any email user at
example.com, example.net, or any “example” domain ending with
a three-letter top-level domain name.
Recipient pattern Either select User Defined and enter a complete or partial recipient
(RCPT TO:) email address to match, or select:
• Internal: Match any email address from a protected domain.
• External: Match any email address from an unprotected domain.
• Email Group: Match any email address in the group.
If you select this option, select an email group from the Email
Group Selection field. Click New to add a new email group or Edit
to modify an existing one.
For more information, see “Configuring email groups” on
page 503.
• LDAP Group: Match any email address in the group.
If you select this option, select an LDAP profile from the LDAP
Profile field.
• LDAP Verification: Match any individual email address queried by
the LDAP profile.
If you select this option, select an LDAP profile from the dropdown
list or click New to create a new one.
Note: Use "$m" to match recipient addresses.
• Regular Expression: Use regular expression syntax instead of
wildcards to specify the pattern. See “Using wildcards and regular
expressions” on page 371.
• User Defined: Specify the email addresses. The pattern can use
wildcards or regular expressions. See “Appendix D: Regular
expressions” on page 641. For example, the recipient pattern
*@example.??? will match messages sent to any email user at
example.com, example.net, or any “example” domain ending with
a three-letter top-level domain name.
Source • Select IP/Netmask and enter the IP address and netmask of the
SMTP client attempting to deliver the email message. Use the
netmask, the portion after the slash (/), to specify the matching
subnet.
For example, enter 10.10.10.10/24 to match a 24-bit subnet, or
all addresses starting with 10.10.10. This will appear as
10.10.10.0/24 in the access control rule table, with the 0 indicating
that any value is matched in that position of the address.
Similarly, 10.10.10.10/32 will appear as 10.10.10.10/32 and
match only the 10.10.10.10 address.
To match any address, enter 0.0.0.0/0.
• Select IP Group to choose an IP group. Click New to add a new
group or Edit to modify an existing one. For more information, see
“Configuring IP groups” on page 504.
• Select GeoIP Group to choose a GeoIP group. Click New to add a
new group or Edit to modify an existing one. For more information,
see “Configuring GeoIP groups (6.2 release)” on page 504.
Reverse DNS Enter a pattern to compare to the result of a reverse DNS look-up of
pattern the IP address of the SMTP client delivering the email message.
Because domain names in the SMTP session are self-reported by the
connecting SMTP server and easy to fake, the FortiMail unit does not
trust the domain name that an SMTP server reports. Instead, the
FortiMail does a DNS lookup using the SMTP server’s IP address. The
resulting domain name is compared to the reverse DNS pattern for a
match. If the reverse DNS query fails, the access control rule match
will also fail. If no other access control rule matches, the connection
will be rejected with SMTP reply code 550 (Relaying denied).
The pattern can use wildcards or regular expressions. See “Using
wildcards and regular expressions” on page 371.
For example, the recipient pattern mail*.com matches messages
delivered by an SMTP server whose domain name starts with “mail”
and ends with “.com”.
Note: Reverse DNS queries for access control rules require that the
domain name be a valid top level domain (TLD). For example, “.lab” is
not a valid top level domain name, and thus the FortiMail unit cannot
successfully perform a reverse DNS query for it.
Authentication Select whether or not to match this access control rule based on
status client authentication.
• Any: Match or do not match this access control rule regardless of
whether the client has authenticated with the FortiMail unit.
• Authenticated: Match this access control rule only for clients that
have authenticated with the FortiMail unit.
• Not Authenticated: Match this access control rule only for clients
that have not authenticated with the FortiMail unit.
TLS profile Select a TLS profile to allow or reject the connection based on
whether the communication session attributes match the settings in
the TLS profile.
• If the attributes match, the access control action is executed.
• If the attributes do not match, the FortiMail unit performs the
Failure action configured in the TLS profile.
Click New to add a new TLS profile or Edit to modify an existing one.
For more information on TLS profiles, see “Configuring TLS security
profiles” on page 495.
Action Select which action the FortiMail unit will perform for SMTP sessions
matching this access control rule.
• DISCARD: Accept the email, but silently delete it and do not
deliver it. Do not inform the SMTP client.
• REJECT: Reject delivery of the email and respond to the SMTP
client with SMTP reply code 550 (Relaying denied).
• RELAY: Relay or proxy, process, and deliver the email normally if it
passes all configured scans. Do not apply greylisting.
• SAFE: Relay or proxy and deliver the email, only if the recipient
belongs to a protected domain or the sender is authenticated. All
antispam profile processing will be skipped; but antivirus, content
and other scans will still occur.
• SAFE & RELAY: Relay or proxy and deliver the email. All antispam
profile processing will be skipped; but antivirus, content, and other
scans will still occur.
Recipient Pattern *
Action RELAY
Rule 1
The email account of former employee user932 receives a large amount of spam. Since this
employee is no longer with the company and all the user’s external contacts were informed of
their new Example Corporation employee contacts, messages addressed to the former
employee’s address must be spam.
Rule 1 uses only the recipient pattern. All other access control rule attributes are configured to
match any value. This rule rejects all messages sent to the [email protected] recipient
Rule 2
Much of the spam received by the Example Corporation has no sender specified in the
message envelope. Most valid email messages will have a sender email address.
Rule 2 uses only the sender pattern. The regular expression ^\s*$ will match a sender string
that contains one or more spaces, or is empty. If any non-space character appears in the
sender string, this rule does not match. This rule will reject all messages with a no sender, or a
sender containing only spaces.
Not all email messages without a sender are spam, however. Delivery status notification (DSN)
messages often have no specified sender. Bounce notifications are the most common type of
DSN messages. The FortiMail administrators at the Example Corporation decided that the
advantages of this rule outweigh the disadvantages.
Messages not matching this rule are checked against the next rule.
Rules 3 and 4
Recently, the Example Corporation has been receiving spam that appears to be sent by
example.org. The FortiMail log files revealed that the sender address is being spoofed and the
messages are sent from servers operated by spammers. Because spam servers often change
IP addresses to avoid being blocked, the FortiMail administrators decided to use two rules to
block all mail from example.org unless delivered from a server with the proper address and host
name.
When legitimate, email messages from example.org are sent from one of multiple mail servers.
All these servers have IP addresses within the 172.20.120.0/24 subnet and have a domain name
of mail.example.org that can be verified using a reverse DNS query.
Rule 3 uses the recipient pattern, the sender IP, and the reverse DNS pattern. This rule will relay
messages to email users of example.com sent from a client whose domain name is
mail.example.org and IP address is between 172.20.120.1 and 172.20.120.255.
Messages not matching this rule are checked against the next rule.
Rule 4 works in conjunction with rule 3. It uses only the sender pattern. Rule 4 rejects all
messages from example.org. But because it is positioned after rule 3 in the list, rule 4 affects
only messages that were not already proven to be legitimate by rule 3, thereby rejecting only
email messages with a fake sender.
Rules 3 and 4 must appear in the order shown. If they were reversed, all mail from example.org
would be rejected. The more specific rule 3 (accept valid mail from example.org) is placed first,
and the more general rule 4 (reject all mail from example.org) follows.
Messages not matching these rules are checked against the next rule.
Rules 5
The administrator of example.com has noticed that during peak traffic, a flood of spam using
random user names causes the FortiMail unit to devote a significant amount of resources to
recipient verification. Verification is performed with the aid of an LDAP server which also
Move Click a delivery rule to select it, click Move, then select either:
(button)
• the direction in which to move the selected rule (Up or Down), or
• After or Before, then in Move right after or Move right before indicate
the rule’s new location by entering the ID of another delivery rule
FortiMail units match the rules in sequence, from the top of the list
downwards.
Sender Pattern Displays the complete or partial envelope sender email address to
match.
Recipient Pattern Displays the complete or partial envelope recipient email address to
match.
TLS Destination Displays the IP address and netmask of the system to which the
IP FortiMail is sending the email message. 0.0.0.0/0.0.0.0 matches
any IP address.
TLS Profile Displays the TLS profile, if any, used to allow or reject a connection.
• If the attributes match, the access control action is executed.
• If the attributes do not match, the FortiMail unit performs the Failure
action configured in the TLS profile.
To edit the TLS profile, click its name. For details, see “Configuring
security profiles” on page 495.
IP Pool Profile Displays the IP pool profile that FortiMail uses as its local IP address
when communicating with destination mail servers.
Encryption Indicates the encryption profile used to apply S/MIME or IBE encryption
Profile to the email.
To edit the encryption profile, click its name. For details, see
“Configuring encryption profiles” on page 498.
2. Either click New to add a delivery control rule or double-click a delivery control rule to modify
it.
A dialog appears.
3. Configure the following:
Enabled Select whether or not the access control rule is currently in effect.
Sender pattern Enter a complete or partial envelope sender (MAIL FROM:) email
address to match.
Wild card characters allow you to enter partial patterns that can match
multiple sender email addresses. The asterisk (*) represents one or
more characters. The question mark (?) represents any single character.
For example, the sender pattern ??@*.com will match messages sent
by any email user with a two letter email user name from any “.com”
domain name.
Recipient pattern Enter a complete or partial envelope recipient (RCPT TO:) email
address to match.
Wild card characters allow you to enter partial patterns that can match
multiple recipient email addresses. The asterisk (*) represents one or
more characters. The question mark (?) represents any single character.
For example, the recipient pattern *@example.??? will match
messages sent to any email user at example.com, example.net,
example.org, or any other “example” domain ending with a three-letter
top-level domain name.
TLS Destination Enter the IP address and netmask of the system to which the FortiMail
IP/netmask unit is sending the email message using TLS connection. Use the
netmask, the portion after the slash (/) to specify the matching subnet.
For example, enter 10.10.10.10/24 to match a 24-bit subnet, or all
addresses starting with 10.10.10. This will appear as 10.10.10.0/24 in
the access control rule table, with the 0 indicating that any value is
matched in that position of the address.
Similarly, 10.10.10.10/32 will appear as 10.10.10.10/32 and match
only the 10.10.10.10 address.
To match any address, enter 0.0.0.0/0.
Note: This field is not used when considering whether or not to apply
an encryption profile.
TLS profile Select a TLS profile to allow or reject the connection based on whether
the communication session attributes match the settings in the TLS
profile.
• If the attributes match, the access control action is executed.
• If the attributes do not match, the FortiMail unit performs the Failure
action configured in the TLS profile.
Click New to add a new TLS profile or Edit to modify an existing one.
For more information on TLS profiles, see “Configuring TLS security
profiles” on page 495.
IP pool profile Starting from 6.2 release, you can specify an IP pool profile so that
FortiMail can use an IP address in the pool as its local IP address when
communicating with destination mail servers. For details about IP
pools, see “Configuring IP pools” on page 501.
Encryption profile Select an encryption profile used to apply S/MIME or IBE encryption to
the email.
Note that if you create a delivery rule that uses both IBE encryption
profile and TLS profile, the TLS profile will override the IBE encryption
profile and the IBE encryption will not be used. If you select an S/MIME
profile here and an IBE profile in the Encryption with profile field (Profile
> Content > Action), the S/MIME profile will override the IBE encryption
profile.
Click New to add a new encryption profile or Edit to modify an existing
one.
For more information, see “Configuring encryption profiles” on
page 498 and “Configuring certificate bindings” on page 560.
For information about content action profiles, see “Configuring content
action profiles” on page 446.
Recipient domain Specify the recipient domain to apply the policy on. Use wildcard * to
represent all recipient domains.
Restrict the Specify to limit the number of concurrent connections to the above
number of domain. 0 means no limit.
concurrent
connections
Restrict the Specify to limit the number of email messages to be sent for one
number of connection session. 0 means no limit.
messages per
connection
The IP Policies section of the Policies tab lets you create policies that apply profiles to SMTP
connections based on the IP addresses of SMTP clients and/or servers.
Due to the nature of relay in SMTP, an SMTP client is not necessarily always located on an email
user’s computer. The SMTP client is the connection initiator; it could be, for example, another
email server or a mail relay attempting to deliver email. The SMTP server, however, is always a
mail relay or email server that receives the connection.
For example, if computer A opened a connection to computer B to deliver mail, A is the client
and B is the server. If computer B later opened a connection to computer A to deliver a reply
email, B is now the client and A is now the server.
Like access control rules, IP-based policies can reject connections based on IP address. For
information about IP pools, see “Configuring IP pools” on page 501.
Unlike access control rules, however, IP-based policies can affect email in many ways that
occur after the session’s DATA command, such as by applying antispam profiles. IP-based
policies can also be overruled by recipient-based policies, and, if the FortiMail unit is operating
in server mode, may match connections based on the IP address of the SMTP server, not just
the SMTP client. For more information on access control rules, see “Configuring access control
rules” on page 366.
For information about how recipient-based and IP-based policies are executed and how the
order of policies in the list affects the order of execution, see “How to use policies” on
page 363.
If SMTP traffic does not match any IP-based or recipient-based policy, it is allowed. However,
no antivirus or antispam protection may be applied.
If you are certain that you have configured policies to match and allow all required traffic, you
can tighten security by adding an IP policy at the bottom of the policy list to reject all other,
unwanted connections.
To do this, create a new IP policy, enter 0.0.0.0/0 as the client IP/netmask, and set the action
to Reject. See the following procedures about how to configure an IP policy. Then, move the
policy to the very bottom of the IP policy list. Because this policy matches any connection, all
connections that do not match any other policy will match this final policy, and be rejected.
Domain administrators can create and modify IP-based policies. Because they can affect any IP
address, a domain administrator could therefore create a policy that affects another domain. If
you do not want to allow this, do not grant Read-Write permission to the Policy category in
domain administrators’ access profiles.
For details, see “About administrator account permissions and domains” on page 179.
To view the list of IP-based policies, go to Policy > IP Policy > IP Policy.
Move Click a policy to select it, click Move, then select either:
(button) • the direction in which to move the selected policy (Up or Down), or
• After or Before, then in Move right after or Move right before indicate
the policy’s new location by entering the ID of another policy
FortiMail units match the policies in sequence, from the top of the list
downwards.
Source Displays the IP address of the SMTP source to which the policy applies.
Destination Displays the IP address of the destination IP to which the policy applies.
Session Displays the name of the session profile applied by this policy.
To modify the or view a profile, click its name. The profile appears in a
pop-up window. For details, see “Configuring session profiles” on
page 392.
AntiSpam Displays the name of the antispam profile applied by this policy.
To modify or view the a profile, click its name. The profile appears in a
pop-up window. For details, see “Managing antispam profiles” on
page 412.
AntiVirus Displays the name of the antivirus profile applied by this policy.
To modify the or view a profile, click its name. The profile appears in a
pop-up window. For details, see “Configuring antivirus profiles and
antivirus action profiles” on page 431.
Content Displays the name of the content profile applied by this policy.
To modify the or view a profile, click its name. The profile appears in a
pop-up window. For details, see “Configuring content profiles” on
page 436.
DLP Displays the name of the DLP profile applied by this policy.
To modify the or view a profile, click its name. The profile appears in a
pop-up window. For details, see “Configuring DLP profiles” on page 566.
IP Pool Displays the name of the IP pool profile applied by this policy.
The IP addresses in the IP pool is used as the source IP address for the
SMTP sessions matching this policy.
The IP pool profile is ignored if the “Take precedence over recipient based
policy match” on page 383 option is disabled.
• An IP pool in an IP policy will be used to deliver incoming emails from
FortiMail to the protected server. It will also be used to deliver
outgoing emails if the sender domain doesn't have a delivery IP pool
or, although it has a delivery IP pool, Take precedence over recipient
based policy match is enabled in the IP-based policy.
• An IP pool (either in an IP policy or domain settings) will NOT be used
to deliver emails to the protected domain servers if the mail flow is
from internal to internal domains.
• When an email message’s MAIL FROM is empty "<>", normally the
email is a NDR or DSN bounced message. FortiMail will check the IP
address of the sender device against the IP list of the protected
domains. If the sender IP is found in the protected domain IP list, the
email flow is considered as from internal to internal and the above rule
is applied (the IP pool will be skipped). FortiMail will also skip the DNS
query if servers of the protected domains are configured as host
names and MX record.
Exclusive Indicates whether or not “Take precedence over recipient based policy match”
on page 383 is enabled in this policy. See “Order of execution of policies”
on page 364 for an explanation of that option.
• Green check mark icon: The option is enabled. Recipient-based
policies will not be applied if a connection matches this IP-based
policy.
• Red X icon: The option is disabled. Both the IP-based policy and any
applicable recipient-based policies will be applied.
Source You can use the following types of IP addresses of the SMTP clients
to whose connections this policy will apply.
• IP address and subnet mask
• IP group. See “Configuring IP groups” on page 504.
• GeoIP group. See “Configuring GeoIP groups (6.2 release)” on
page 504.
To match all clients, enter 0.0.0.0/0.
Destination If the FortiMail unit runs in transparent mode, enter the IP address of
the SMTP server to whose connections this policy will apply.
• IP address and subnet mask
• IP group. See “Configuring IP groups” on page 504.
To match all servers, enter 0.0.0.0/0.
If the FortiMail unit runs in gateway or server mode, the destination
will be the FortiMail unit itself. But if you use virtual hosts on the
FortiMail unit, you can specify which virtual host (IP/subnet or IP
pool) the email is destined to. Otherwise, you do not have to specify
the destination address.
If you use virtual hosts, you must also configure the MX record to
direct email to the virtual host IP addresses as well.
This feature can be used to support multiple virtual hosts on a single
physical interface, so that different profiles can be applied to different
host and logging for each host can be separated as well.
Go to Policy > Recipient Policy to create recipient-based policies based on the incoming or
outgoing directionality of an email message with respect to the protected domain.
Recipient-based policies have precedence if an IP-based policy is also applicable but conflicts.
Exceptions include IP-based policies where you have enabled “Take precedence over recipient
based policy match” on page 383. For information about how recipient-based and IP-based
policies are executed and how the order of polices affects the execution, see “How to use
policies” on page 363.
If the FortiMail unit protects many domains, and therefore creating recipient-based policies
would be very time-consuming, such as it might be for an Internet service provider (ISP),
consider configuring only IP-based policies. For details, see “Controlling email based on IP
addresses” on page 378.
Alternatively, consider configuring recipient-based policies only for exceptions that must be
treated differently than indicated by the IP-based policy.
Profiles used by the policy, if any, are listed in the policy table, and appear as linked text. To
modify profile settings, click the name of the profile.
Before you can configure a recipient policy, you first must have configured:
• at least one protected domain (see “Configuring protected domains” on page 310)
• at least one user group or LDAP profile with a configured group query, if you will use either to
define which recipient email addresses will match the policy (see “Managing users” on
page 328 or “Configuring LDAP profiles” on page 461)
• at least one PKI user, if you will allow or require email users to access their per-recipient
quarantine using PKI authentication (see “Configuring PKI authentication” on page 335)
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Policy category.
For details, see “About administrator account permissions and domains” on page 179.
Move FortiMail units match the policies for each domain in sequence, from the
top of the list downwards. Therefore, you must put the more specific
(button)
policies on top of the more generic ones.
To move a policy in the policy list:
1. Select a domain. Note: if the domain is “All”, the Move button is
disabled
2. Click a policy to select it.
3. Click Move, then select either:
• the direction in which to move the selected policy (Up or Down), or
• After or Before, then in Move right after or Move right before indicate
the policy’s new location by entering the ID of another policy.
Domain Name Indicates the domain part of the recipient’s email address in the
(column) envelope (RCPT TO:) that an email must match in order to be subject to
the policy.
• For incoming recipient-based policies, this is the name of a protected
domain.
• For outgoing recipient-based policies, this is System, indicating that
the recipient does not belong to a protected domain.
Sender Pattern A sender email address (MAIL FROM:) as it appears in the envelope or a
wildcard pattern to match sender email addresses.
AntiSpam Displays the antispam profile selected for the matching recipients.
To modify or view a profile, click its name. The profile appears in a
pop-up window. For details, see “Managing antispam profiles” on
page 412.
AntiVirus Displays the antivirus profile selected for the matching recipients.
To modify or view a profile, click its name. The profile appears in a
pop-up window. For details, see “Configuring antivirus profiles and
antivirus action profiles” on page 431.
Content Displays the content profile selected for the matching recipients.
To modify or view a profile, click its name. The profile appears in a
pop-up window. For details, see “Configuring content profiles” on
page 436.
DLP Displays the DLP profile selected for the matching recipients.
To modify or view a profile, click its name. The profile appears in a
pop-up window. For details, see “Configuring data loss prevention” on
page 564.
Resource Displays the resource profile selected for the matching recipients.
(server mode To modify or view a profile, click its name. The profile appears in a
only) pop-up window. For details, see “Configuring resource profiles” on
page 449.
Authentication Displays the authentication profile selected for the matching recipients.
(not in server To modify or view a profile, click its name.The profile appears in a
mode) pop-up window. For details, see “Configuring authentication profiles” on
page 452 or “Configuring LDAP profiles” on page 461.
Sender Select one of the following ways to define recipient (RCPT TO:) email addresses
Pattern that match this policy:
• User: Enter a recipient email address or a pattern with wild cards, such as
*@protected.example.com.
• Local group: Select the name of a protected domain in the second drop-down
list, then select the name of a user group in the first drop-down list.
• LDAP group: Select an LDAP profile in which you have enabled and configured
a group query, then enter either the group’s full or partial membership attribute
value as it appears in the LDAP directory.
Depending on your LDAP directory’s schema, and whether or not you have
enabled “Use group name with base DN as group DN” on page 466, this may
be a value such as 1001, admins, or
cn=admins,ou=Groups,dc=example,dc=com.
• Email address group: Select an email group from the dropdown list. For details
about creating an email group, see “Configuring email groups” on page 503.
Wild card characters allow you to enter patterns that can match multiple email
addresses. The asterisk (*) represents one or more characters and the question
mark (?) represents any single character.
Sender Select one of the following ways to define sender (MAIL FROM:) email addresses
Pattern that match this policy:
• User: Enter a sender email address or a pattern with wild cards, such as *@
• .example.com.
• Local group: Select the name of a protected domain in the second drop-down
list, then select the name of a user group in the first drop-down list.
• LDAP group: Select an LDAP profile in which you have enabled and configured a
group query, then enter either the group’s full or partial membership attribute
value as it appears in the LDAP directory.
Depending on your LDAP directory’s schema, and whether or not you have
enabled Use group name with base DN as group DN, this may be a value such
as 1001, admins, or cn=admins,ou=Groups,dc=example,dc=com.
• Email address group: Select an email group from the dropdown list. For details
about creating an email group, see “Configuring email groups” on page 503.
Wild card characters allow you to enter patterns that can match multiple email
addresses. The asterisk (*) represents one or more characters and the question
mark (?) represents any single character.
AntiSpam Select which antispam profile, if any, to apply to email matching the policy.
If you have not yet configured the profile that you want to apply, click New to
add the profile in a pop-up dialog. If you need to modify an existing profile
before applying it, click Edit. For details, see “Managing antispam profiles” on
page 412.
Tip: You can use an LDAP query to enable or disable antispam scanning on a
per-user basis.
AntiVirus Select which antivirus profile, if any, to apply to email matching the policy.
If you have not yet configured the profile that you want to apply, click New to
add the profile in a pop-up dialog. If you need to modify an existing profile
before applying it, click Edit. For details, see “Configuring antivirus profiles and
antivirus action profiles” on page 431.
Content Select which content profile, if any, to apply to email matching the policy.
If you have not yet configured the profile that you want to apply, click New to
add the profile in a pop-up dialog. If you need to modify an existing profile
before applying it, click Edit. For details, see “Configuring content profiles” on
page 436.
DLP Select which DLP profile, if any, to apply to email matching the policy.
If you have not yet configured the profile that you want to apply, click New to
add the profile in a pop-up dialog. If you need to modify an existing profile
before applying it, click Edit. For details, see “Configuring DLP profiles” on
page 566.
Resource Select which resource profile, if any, to apply to email matching the policy.
(server mode If you have not yet configured the profile that you want to apply, click New to
only) add the profile in a pop-up dialog. If you need to modify an existing profile
before applying it, click Edit. For details, see “Configuring resource profiles” on
page 449.
Authenticatio If you want the email user to authenticate using an external authentication
n type server, select the type of the authentication profile (SMTP, POP3, IMAP,
RADIUS, LDAP, or LOCAL for server mode).
Note: In addition to specifying an authentication server for SMTP email
messages that this policy governs, configuring “Authentication profile” on page 389
also allows email users to authenticate when accessing their per-recipient
quarantine using HTTP or HTTPS. For more information, see “How to enable,
configure, and use personal quarantines” on page 139.
Use for SMTP Enable to allow the SMTP client to use the SMTP AUTH command, and to use
authentication the server defined in “Authentication profile” on page 389 to authenticate the
(gateway and connection.
transparent
Disable to make SMTP authentication unavailable.
mode only)
This option is available only if you have selected an “Authentication profile” on
page 389.
Note: Enabling this option allows, but does not require, SMTP authentication.
To enforce SMTP authentication for connecting SMTP clients, ensure that all
access control rules require authentication. For details, see “Configuring
access control rules” on page 366.
Allow Enable to allow email users matching this policy to use POP3 to retrieve the
quarantined contents of their personal quarantine. For more information, see “How to
email access enable, configure, and use personal quarantines” on page 139.
through POP3
This option is available only if you have selected a profile in Authentication
(gateway and
profile.
transparent
mode only) Note: This option is for POP3 access only. Email users cannot access their
personal quarantine through IMAP.
Allow Enable to allow email users matching this policy to use FortiMail webmail
quarantined (HTTP or HTTPS) to retrieve the contents of their personal quarantine. For
email access more information, see “How to enable, configure, and use personal
through quarantines” on page 139.
webmail
This option is available only if you have selected a profile in “Authentication
(gateway and
profile” on page 389.
transparent
mode only)
Reject different Enable to require that the sender uses the same identity for: authentication
SMTP sender name, SMTP envelope MAIL FROM:, and header FROM:.
identity for
Disable to remove such requirements on sender identities. By default, this
authenticated
feature is disabled.
user
Sender identity In some cases, while you do not want to allow different SMTP sender
verification with identities for an authenticated user, you still want to:
LDAP server for
• allow users to authenticate with their identities (for example,
authenticated
[email protected]) and send email from their proxy email addresses
user
(for example, [email protected] and [email protected])
• or to allow users in an alias group to authenticate with their own identities
(for example, [email protected]) and send email from their
alias group address (for example, [email protected])
Then you can choose to verify the sender identity with the LDAP server. If the
verification is successful, the sender will be allowed to send email with
different identities.
Note: When the above rejection option is enabled, even though the
authentication identity can be different from the sender identity upon
successful LDAP verification. the envelope (MAIL FROM:)address is never
allowed to be different from the header FROM:)address. And the two
addresses cannot be empty either.
Enable PKI Enable if you want to allow web mail users to log in by presenting a
authentication certificate rather than a user name and password. Also configure “Certificate
for web mail validation is mandatory”.
access
For more information on configuring PKI users and what defines a valid
(Inbound policy
certificate, see “Configuring PKI authentication” on page 335.
only)
Certificate If the email user’s web browser does not provide a valid personal certificate,
validation is the FortiMail unit will fall back to standard user name and password-style
mandatory authentication. To require valid certificates only and disallow password-style
(Inbound policy fallback, enable this option.
only)
Session profiles focus on the connection and envelope portion of the SMTP session. This is in
contrast to other types of profiles that focus on the message header, body, or attachments.
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Policy category. For details, see “About administrator account
permissions and domains” on page 179.
Hide this box from the mail Enable to preserve the IP address or domain name of
server the SMTP client in:
(transparent mode only) • the SMTP greeting (HELO/EHLO) and in the
Received: message headers of email messages
• the client IP in email header src and dst?
This masks the existence of the FortiMail unitto the
protected SMTP server.
Disable to replace the SMTP client’s IP addresses or
domain names with that of the FortiMail unit.
Note: Unless you enabled Take precedence over
recipient based policy match in the IP-based policy, the
Hide the transparent box option in the protected
domain supersedes this option, and may prevent it
from applying to incoming email messages.
Note: For full transparency, also enable “Hide the
transparent box” on page 316.
Restrict the number of Specify the maximum connections per client IP address
connections per client per 30 in a period of 30 minutes. 0 means no limit.
minutes to
Restrict the number of Specify the maximum email messages (number of MAIL
messages per client per 30 FROM) a client can send in a period of 30 minutes. 0
minutes to means no limit.
Restrict the number of Specify the maximum recipients (number of RCPT TO)
recipients per client per 30 a client can send email to for a period of 30 minutes. 0
minutes to means no limit.
Connection idle timeout Enter a limit to the number of seconds a client may be
(seconds) idle before the FortiMail unit drops the connection.
For server mode, gateway mode, and transparent MTA
mode, 0 means the default value 30 seconds.
For transparent proxy mode, 0 means no limit.
Do not let client connect to Enable to prevent clients from connecting to SMTP
blocklisted SMTP servers servers that have been blocklisted in antispam profiles
or, the FortiGuard AntiSpam service if enabled. CS:
(transparent mode only)
Does this also consider personal/per-domain/system
blacklists?
CS: Verify. Doesn’t make sense for MTA path, but need
to make sure this is outgoing proxy-only.
This option applies only if you have enabled “Use
client-specified SMTP server to send email” on
page 259, and only for outgoing connections.
Enable sender reputation Enable to accept or reject email based upon sender
checking reputation scores.
The following options have no effect unless this option is
enabled.CS: Verify. Pending response from Nathalie Rivat.
This option may not function well for SMTP clients with
dynamic IP addresses. Instead, consider “Enable Endpoint
Reputation” on page 316.
Throttle client at n Enter a sender reputation score over which the FortiMail unit
will rate limit the number of email messages that can be sent
by this SMTP client.
Entering 0 means no score limit and thus no action. But
FortiMail still monitors the sender reputation and increases or
decreases the sender reputation scores accordingly.
The enforced rate limit is either Restrict number of emails per
hour to n or Restrict email to n percent of the previous hour,
whichever value is greater. After the sender reaches the limit,
Restrict number of Enter the maximum number of email messages per hour that
emails per hour to n the FortiMail unit will accept from a throttled SMTP client.
Restrict email to n Enter the maximum number of email messages per hour that
percent of the the FortiMail unit will accept from a throttled SMTP client, as a
previous hour percentage of the number of email messages that the SMTP
client sent during the previous hour.
Temporarily fail client Enter a sender reputation score over which the FortiMail unit
at n will return a temporary failure error when the SMTP client
attempts to initiate a connection. CS: SMTP reply code?
Entering 0 means no score limit and thus no action. But
FortiMail still monitors the sender reputation and increase or
decrease the sender reputation scores accordingly.
Reject client at n Enter a sender reputation score over which the FortiMail unit
will reject the email and reply to the SMTP client with SMTP
reply code 550 when the SMTP client attempts to initiate a
connection.
Entering 0 means no score limit and thus no action. But
FortiMail still monitors the sender reputation and increase or
decrease the sender reputation scores accordingly.
Enabling endpoint reputation can improve performance by rejecting known spammers before
more resource-intensive antispam scans are performed.
Enable Endpoint Enable to accept, monitor, or reject email based upon endpoint
Reputation reputation scores.
This option is designed for use with SMTP clients with dynamic IP
addresses. It requires that your RADIUS server provide mappings
between dynamic IP addresses and MSISDNs/subscriber IDs to
the FortiMail unit. If this profile governs sessions of SMTP clients
with static IP addresses, instead see “Configuring sender
reputation options” on page 394.
Auto blocklist score Enter the MSISDN reputation score over which the FortiMail unit
trigger value will add the MSISDN/subscriber ID to the automatic blocklist.
The trigger score is relative to the period of time configured as the
automatic blocklist window. For more information on the automatic
blocklist window, see “Configuring the endpoint reputation score
window” on page 544.
Enabling sender validation can improve performance by rejecting invalid senders before more
resource-intensive antispam scans are performed.
SPF check If the sender domain DNS record lists SPF authorized IP
addresses, use SPF check to compare the client IP address to the
IP addresses of authorized senders in the DNS record (RFC 4408).
An unauthorized client IP address increases the client sender
reputation score. An authorized client IP address decreases the
client sender reputation score.
If the DNS record for the domain name of the sender does not
publish SPF information, the FortiMail unit omits the SPF client IP
address validation.
Note: No SPF check is performed for direct connections from RFC
1918 private IP addresses.
Note: Before FortiMail 4.0 MR3 Patch 1 release, you must enable
SPF checking in the session profile before SPF checking in the
antispam profile takes effect. Starting from 4.0 MR3 Patch 2
release, SPF checking can be enabled in either a session profile or
an antispam profile, or both profiles. However, if you select to
Bypass SPF checking in the session profile, SPF checking will be
bypassed even though you enable it in the antispam profile.
Note: Before FortiMail 4.3.1 release, only SPF hardfailed
(-all) email is treated as spam. Starting from 4.3.2 to 6.0.2 release,
you can use a CLI command (set spf-checking {strict |
aggressive} under config antispam settings) to control if
the SPF softfailed (~all) email should also be treated as spam. For
details, see the FortiMail CLI Guide. Starting from 6.0.3, this
command is removed.
Enable DKIM check If a DKIM signature is present (RFC 4871), enable this to query the
DNS server that hosts the DNS record for the sender’s domain
name to retrieve its public key to decrypt and verify the DKIM
signature.
An invalid signature increases the client sender reputation score
and affects the deep header scan. A valid signature decreases the
client sender reputation score.
If the sender domain DNS record does not include DKIM
information or the message is not signed, the FortiMail unit omits
the DKIM signature validation.
Enable DKIM signing Enable to sign outgoing email with a DKIM signature.
for outgoing
This option requires that you first generate a domain key pair and
messages
publish the public key in the DNS record for the domain name of
the protected domain. If you do not publish the public key,
destination SMTP servers cannot validate your DKIM signature. For
details on generating domain key pairs and publishing the public
key, see “DKIM Setting” on page 322.
Before 6.2.0 release, Envelope From domain is used for DKIM
signatures. After 6.2.0 release, Header From domain is used
instead. If there is no DKIM key for the Header From domain, then
the key for the Envelope From domain will be used.
Enable DKIM signing Enable to sign outgoing email with a DKIM signature only if the
for authenticated sender is authenticated.
senders only
This option is effective only if Enable DKIM signing for outgoing
messages is enabled.
Enable domain key If a DomainKey signature is present, use this option to query the
check DNS server for the sender’s domain name to retrieve its public key
to decrypt and verify the DomainKey signature.
An invalid signature increases the client sender reputation score
and affects the deep header scan. A valid signature decreases the
client sender reputation score.
If the sender domain DNS record does not include DomainKey
information or the message is not signed, the FortiMail unit omits
the DomainKey signature validation.
Sender address Enable to verify sender email addresses on an LDAP server. Also
verification with select an LDAP profile from the dropdown list. Or click New to
LDAP create a new one. For details about LDAP profiles, see
“Configuring LDAP profiles” on page 461.
Session action Select an action profile or click New to create a new one. The
session action profile uses the content action profile. For more
information about actions, see “Configuring content action
profiles” on page 446.
Message selection The action can be applied to All messages or Accepted messages
only. For example, for header manipulation, tagging, some other
actions, you can choose to apply them to the accepted message
only.
Reject EHLO/HELO Enable to return SMTP reply code 501, and to reject the SMTP
commands with greeting, if the client or server uses a greeting that contains a
invalid characters in domain name with invalid characters.
the domain
To avoid disclosure of a real domain name, spammers sometimes
spoof an SMTP greeting domain name with random characters,
rather than using a valid domain name.
The following example shows invalid command in bold italics:
220 FortiMail-400.localdomain ESMTP Smtpd; Wed, 14 Feb
2008 13:30:20 GMT
EHLO ^^&^&^#$
501 5.0.0 Invalid domain name
Valid characters for domain names include:
• alphanumerics (A to Z and 0 to 9)
• brackets ( [ and ] )
• periods ( . )
• dashes ( - )
• underscores ( _ )
• number symbols( # )
• colons ( : )
Rewrite EHLO/HELO Enable to rewrite the domain name in the SMTP greeting
domain to [n.n.n.n] IP (HELO/EHLO) to the IP address of the client to prevent domain
string of the client name spoofing. CS: TAKES EFFECT ONLY IF HIDE IS NOT
address ENABLED?
(transparent mode
only)
Rewrite EHLO/HELO Enable to rewrite the domain name in the SMTP greeting
domain to (HELO/EHLO) to the specified value. CS: TAKES EFFECT ONLY IF
HIDE IS NOT ENABLED?
(transparent mode
only)
Allow pipelining for Enable to allow SMTP command pipelining. This lets multiple
the session SMTP commands to be accepted and processed simultaneously,
improving performance for high-latency connections. CS: Used by
(transparent mode
proxies and not built-in MTA?
only)
Disable to allow the SMTP client to send only a single command at
a time during an SMTP session.
Enforce strict RFC Enable to limit pipelining support to strict compliance with RFC
compliance 2920, SMTP Service Extension for Command Pipelining.
(transparent mode This option is effective only if Allow pipelining for the session is
only) enabled.
Perform strict syntax Enable to return SMTP reply code 503, and to reject a SMTP
checking command, if the client or server uses SMTP commands that are
syntactically incorrect.
EHLO or HELO, MAIL FROM:, RCPT TO: (can be multiple), and
DATA commands must be in that order. AUTH, STARTTLS, RSET, or
NOOP commands can arrive at any time. Other commands, or
commands in an unacceptable order, return a syntax error.
The following example shows invalid command in bold italics:
220 FortiMail-400.localdomain ESMTP Smtpd; Wed, 14
Feb 2008 13:41:15 GMT
EHLO example.com
250-FortiMail-400.localdomain Hello
[192.168.1.1], pleased to meet you
RCPT TO:<[email protected]>
503 5.0.0 Need MAIL before RCPT
Switch to SPLICE Enable to use splice mode. Enter threshold value based on time
mode after (seconds) or data size (kilobytes).
(transparent mode Splice mode lets the FortiMail unit simultaneously scan an email
only) and relay relay, or proxy? it to the SMTP server. This increases
throughput and reduces the risk of server timeout. If it detects
spam or a virus, it terminates the server connection and returns an
error message to the sender, listing the spam or virus name and
infected file name.
ACK EOM before Enable to acknowledge the end of message (EOM) signal
AntiSpam check immediately after receiving the carriage return and line feed (CRLF)
characters that indicate the EOM, rather than waiting for antispam
scanning to complete.
If the FortiMail unit does not completed antispam scanning within 4
minutes, it returns SMTP reply code 451(Try again later),
resulting in no permanent problems, since according to RFC 2821,
the minimum timeout value should be 10 minutes. However, in rare
cases where the server or client’s timeout is shorter than 4 minutes,
the sending client or server could time-out while waiting for the
FortiMail unit to acknowledge the EOM command. Enabling this
option prevents those rare cases.
Check HELO/EHLO Enable to return SMTP reply code 501, and reject the SMTP
domain command, if the domain name accompanying the SMTP greeting is
not a domain name that exists in either MX or A records.In the
following example, the invalid command is highlighted in bold:
220 FortiMail-400.localdomain ESMTP Smtpd; Wed, 14 Feb
2008 14:32:51 GMT
EHLO example.com
CS: Need error code line.
The following example shows the invalid command in bold italics:
220 FortiMail-400.localdomain ESMTP Smtpd; Wed, 20
Nov 2013 10:42:07 -0500
ehlo abc.qq
250-FortiMail-400.localdomain Hello
[172.20.140.195], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE 10485760
250-DSN
250-AUTH LOGIN PLAIN
250-STARTTLS
250-DELIVERBY
250 HELP
mail from:aaa@333
550 5.5.0 Invalid EHLO/HELO domain.
quit
221 2.0.0 FortiMail-400.localdomain closing
connection
Connection closed by foreign host.
Check sender domain Enable to return SMTP reply code 421, and reject the SMTP
command, if the domain name portion of the sender address is not
a domain name that exists in either MX or A records.
The following example shows the invalid command in bold italics:
220 FortiMail-400.localdomain ESMTP Smtpd; Wed, 14
Feb 2008 14:32:51 GMT
EHLO
250-FortiMail-400.localdomain Hello [192.168.1.1],
pleased to meet you
MAIL FROM:<[email protected]>
421 4.3.0 Could not resolve sender domain.
Check recipient Enable to return SMTP reply code 550, and reject the SMTP
domain command, if the domain name portion of the recipient address is
not a domain name that exists in either MX or A records.
The following example shows the invalid command in bold italics:
220 FortiMail-400.localdomain ESMTP Smtpd; Wed, 14
Feb 2008 14:48:32 GMT
EHLO example.com
250-FortiMail-400.localdomain Hello [192.168.1.1],
pleased to meet you
MAIL FROM:<[email protected]>
250 2.1.0 <[email protected]>... Sender ok
RCPT TO:<[email protected]>
550 5.7.1 <[email protected]>... Relaying denied.
IP name lookup failed [192.168.1.1]
Reject empty Enable to return SMTP reply code 553, and reject the SMTP
domains command, if the HELO/EHLO greeting does not have a domain, or
the sender address (MAIL FROM:) is empty.
The following example shows the invalid command in bold italics:
220 FortiMail-400.localdomain ESMTP Smtpd; Wed, 20
Nov 2013 10:42:07 -0500
ehlo
250-FortiMail-400.localdomain Hello
[172.20.140.195], pleased to meet you
250-ENHANCEDSTATUSCODES
250-PIPELINING
250-8BITMIME
250-SIZE 10485760
250-DSN
250-AUTH LOGIN PLAIN
250-STARTTLS
250-DELIVERBY
250 HELP
mail from:aaa@333
550 5.5.0 Empty EHLO/HELO domain.
quit
221 2.0.0 FortiMail-400.localdomain closing
connection
Prevent open relaying Enable to prevent clients from using open relays to send email by
blocking sessions that are unauthenticated. (Unauthenticated
(transparent mode
sessions are assumed to be occurring to an open relay.)
only)
If you permit SMTP clients to use open relays to send email, email
from your domain could be blocklisted by other SMTP servers.
This option is effective only if you have enabled “Use
client-specified SMTP server to send email” on page 219 for
outgoing mail. Otherwise, the FortiMail unit forces clients to use the
gateway you have defined as a relay server (see ““Configuring
SMTP relay hosts” on page 203), if any, or the MTA of the domain
name in the recipient email address (RCPT TO:), as determined
using an MX lookup, so it is not possible for them to use an open
relay. CS: What about domain option “Use this domain’s SMTP
server to deliver mail” ?
Reject if recipient and Enable to reject the email if the domain name in the SMTP greeting
helo domain match (HELO/EHLO) and recipient email address (RCPT TO:) match, but
but sender domain is the domain name in the sender email address (MAIL FROM:) does
different not.
Mismatching domain names is sometimes used by spammers to
mask the true identity of their SMTP client.
Restrict number of Enter the limit of SMTP greetings that a connecting SMTP server or
EHLO/HELOs per client can perform before the FortiMail unit terminates the
session to connection. Restricting the number of SMTP greetings allowed per
session makes it more difficult for spammers to probe the email
server for vulnerabilities. (More attempts results in a greater
number of terminated connections, which must then be
re-initiated.)
Restrict number of Enter the limit of email messages per session to prevent mass
emails per session to mailing.
Cap message size Enter the limit of the message size. Messages over the threshold
(KB) at size are rejected.
Note: When you configure domain settings under Domain & User >
Domain, you can also set the message size limit. Here is how the
two settings work together:
• For outgoing email (for information about email directions, see
“Inbound versus outbound email” on page 363), only the size
limit in the session profile will be matched. If there is no session
profile defined or no IP-based policy matched, the default size
limit of 10 MB will be used.
• For incoming email, the size limits in both the session profile
and domain settings will be checked. If there is no session
profile defined or no IP-based policy matched, the default size
limit of 10 MB will be compared with the size limit in the domain
settings. FortiMail will use the smaller size.
Cap header size (KB) Enter the limit of the message header size. Messages with headers
at over the threshold size are rejected.
Maximum number of Enter the limit of NOOP commands permitted per SMTP session.
NOOPs allowed for Some spammers use NOOP commands to keep a long session
each connection alive. Legitimate sessions usually require few NOOPs.
Maximum number of Enter the limit of RSET commands permitted per SMTP session.
RSETs allowed for Some spammers use RSET commands to try again after receiving
each connection error messages such as unknown recipient. Legitimate sessions
should require few RSETs.
Configuring error handling can improve performance by dropping connections with error-prone
SMTP clients.
Number of 'free' errors Enter the number of number of errors permitted before the
allowed for each client FortiMail unit imposes a delay. CS: Delay between the
command and the error responses? Or between the error
response and accepting a new command? By default, five
errors are permitted before the FortiMail unit imposes the first
delay.
Delay for the first Enter the delay time for the first error after the number of free
non-free error (seconds) errors is reached.
Delay increment for Enter the number of seconds by which to increase the delay for
subsequent errors each error after the first delay is imposed.
(seconds)
Maximum number of Enter the total number of errors the FortiMail unit accepts
errors allowed for each before dropping the connection.
connection
Remove received Enable to remove all Received: message headers from email
header messages.
You can alternatively remove this header on a per-domain basis.
For details, see “Remove received header of outgoing email” on
page 327.
Remove headers Enable to remove other configured headers from email messages,
then click Edit to configure which headers should be removed.
If you require regular expression support for safelisting and blocklisting sender and recipient
email addresses in the envelope, do not configure safe and block lists in the session profile.
Instead, configure access control rules and message delivery rules. For more information, see
“Managing the address book (server mode only)” on page 349.
Use block and safe lists with caution. They are simple and efficient tools for fighting spam and
enhancing performance, but can also cause false positives and false negatives if not used
carefully. For example, a safe list entry of *.edu would allow all email from the .edu top level
domain to bypass the FortiMail unit's other antispam scans, including SPF validation. CS:
What domain name/user name verification can you use to ensure that white listing does not
accidentally bypass antispam scans for spoofed addresses? Or is there no way to do this?
Enable sender safe Enable to check the sender addresses in the email envelope (MAIL
list checking FROM:) and email header (From:) against the safe list in the SMTP
sessions to which this profile is applied, then click Edit to define
the safelisted email addresses.
Enable sender block Enable to check the sender addresses in the email envelope (MAIL
list checking FROM:) and email header (From:) against the block list in the
SMTP sessions to which this profile is applied, then click Edit to
define the blocklisted email addresses. CS: If sender is blacklisted,
what is the SMTP reply code? Or is the connection
terminated/reset?
Allow recipients on Enable to check the recipient addresses in the email envelope
this list (RCPT TO:) against the safe list in the SMTP sessions to which this
profile is applied, then click Edit to define safelisted email
addresses.
Disallow recipients Enable to check the recipient addresses in the email envelope
on this list (RCPT TO:) against the block list in the SMTP sessions to which
this profile is applied, then click Edit to define blocklisted email
addresses.CS: If recipient is blacklisted, what is the SMTP reply
code? Or is the connection terminated/reset?
Rewrite sender Select an Address Rewrite profile to rewrite the sender address
address and specify which sender address to rewrite: Envelope From,
Header From, or Header Reply-to.
Select Use Envelope From value for selected headers if you want to
use the Envelope From value to rewrite the Header From and/or
Header Reply-to.
Click New to create a new profile. For details about configuring
Address Rewrite profiles, see “Configuring address rewrite profiles
in the session profile” on page 410.
Rewrite recipient Select an Address Rewrite profile to rewrite the recipient address
address and specify which recipient address to rewrite: Envelope recipient
or Header To and CC.
Note that if you set to deliver or quarantine the unmodified copy of
email when you configure the action profile preferences, the
envelope recipient/RCPT TO will still be rewritten.
Click New to create a new profile. For details about configuring
Address Rewrite profiles, see “Configuring address rewrite profiles
in the session profile” on page 410.
Mail routing Select a mail routing profile or click New to create one. For details
about creating mail routing profiles, see “Configuring mail routing
profiles in a session profile” on page 411.
Access control Select an access control profile or click New to create one. For
details, see “Configuring access control profiles in a session
profile” on page 411.
DSN Select a DNS profile or click New to create one. For details, see
“Configuring DSN profiles in a session profile” on page 411.
Remote logging Select a remote logging profile or click New to create one. Note
that the remote logging profiles used here are the same as the
system-wide remote logging profiles. For details, see “Configuring
logging to a Syslog server or FortiAnalyzer unit” on page 588.
The AntiSpam submenu lets you configure antispam profiles and related action profiles.
This section contains the following topics:
• Managing antispam profiles
• Configuring a FortiGuard URI filter profile
• Configuring email impersonation analysis/Business Email Compromise settings
• Configuring antispam action profiles
You can use an LDAP query to enable or disable antispam scanning on a per-user basis. For
details, see “Configuring LDAP profiles” on page 461 and “Configuring scan override options”
on page 473.
CS: Key differences between incoming and outgoing: you can’t “Quarantine” for outgoing email,
and outgoing policies have no associated domain so you can’t apply per-domain settings in an
outgoing profile. These are based on the fundamental differences between incoming and
outgoing.
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Policy category. For details, see “About administrator account
permissions and domains” on page 179.
Clone Click the row corresponding to the profile whose settings you want to
duplicate when creating the new profile, then click Clone. A single-field
(button)
dialog appears. Enter a name for the new profile. Click OK.
Batch Edit Edit several profiles simultaneously. See “Performing a batch edit” on
page 425.
(button)
Domain Select System to see profiles for the entire FortiMail unit, or select a
protected domain name to see profiles for that domain. You can see only
(drop-down list)
the domains that are permitted by your administrator profile.
Profile Name Displays the name of the profile. The profile name is editable.
(Green dot in Indicates whether or not the entry is currently referred to by another item
column heading) in the configuration. If another item is using this entry, a red dot appears
in this column, and the entry cannot be deleted.
Profile name For a new profile, enter the name of the profile.
Default action Select the default action to take when the policy matches. See
“Configuring antispam action profiles” on page 427.
SPF If the sender domain DNS record lists SPF authorized IP addresses,
use this option to compare the client IP address to the IP addresses of
authorized senders in the DNS record (RFC 4408).
If the DNS record for the domain name of the sender does not publish
SPF information, the FortiMail unit omits the SPF client IP address
validation.
If the client IP address fails the SPF check, FortiMail will take the
antispam action configured in this antispam profile. But unlike SPF
checking in a session profile, failed SPF checking in an antispam
profile will not increase the client’s reputation score.
Starting from 6.0.3 release, you can specify different actions towards
different SPF check results:
• Fail: the host is not authorized to send messages.
• Softfail: the host is not authorized to send messages but not a
strong statement.
• Sender Alignment: Header From and autorization domain
mismatch.
• Permanent Error: the SPF records are invalid.
• Temporary Error: Proccessing error.
• Pass: the host is authorized to send messages.
• Neutral: SPF record is found but no definitive assertion.
• None: No SPF record.
Note: No SPF check is performed for direct connections from RFC
1918 private IP addresses.
Note: Before FortiMail 4.0 MR3 Patch 1 release, you must enable SPF
checking in the session profile before SPF checking in the antispam
profile takes effect. Starting from 4.0 MR3 Patch 2 release, SPF
checking can be enabled in either a session profile or an antispam
profile, or both profiles. However, if you select to Bypass SPF
checking in the session profile (see “Configuring sender validation
options” on page 397), SPF checking will be bypassed even though
you enable it in the antispam profile.
Note: Before FortiMail 4.3.1 release, only SPF hardfailed
(-all) email is treated as spam. Starting from 4.3.2 to 6.0.2 release, you
can use a CLI command (set spf-checking {strict |
aggressive} under config antispam settings) to control if the
SPF softfailed (~all) email should also be treated as spam. For details,
see the FortiMail CLI Guide. Starting from 6.0.3, this command is
removed.
Behavior analysis Behavior analysis (BA) analyzes the similarities between the uncertain
email and the known spam email in the BA database and determines if
the uncertain email is spam.
The BA database is a gathering of spam email caught by FortiGuard
Antispam Service. Therefore, the accuracy of the FortiGuard Antispam
Service has a direct impact on the BA accuracy.
You can adjust the BA aggressiveness using the following CLI
commands:
config antispam behavior-analysis
set analysis-level {high | medium | low}
end
The high setting means the most aggressive while the low setting
means the least aggressive. The default setting is medium.
You can also reset (empty) the BA database using the following CLI
command:
diagnose debug application mailfilterd
behavior-analysis update
Header analysis Enable this option to examine the entire message header for spam
characteristics.
Newsletter Although newsletters and other marketing campaigns are not spam,
some users may find them annoying.
Enable detection of newsletters and select an action profile to deal
with them. For example, you can tag newsletter email so that users
can filter them in their email clients.
FortiGuard URI filter and URI scanning have two levels of control: strict or aggressive. For
details see “URI types” on page 418.
Starting from 6.0.4 release, the aggressive setting also scans the domain part of envelope
MAIL FROM, header From, and Reply-To addresses. If the domains are identified as spam,
the configured antispam actions will be applied.
If the FortiGuard option is enabled, you may improve performance and the spam catch rate by
also enabling Block IP and caching. For details on enabling caching, see ““Configuring
FortiGuard services” on page 291.
URI types
There are two types of URIs:
• Absolute URIs strictly follow the URI syntax and include the URI scheme names, such as
“http”, “https”, and “ftp”. For instance, http://www.example.com.
• Reference URIs do not contain the scheme names. For instance, example.com.
By default, FortiMail scans for absolute URIs.
You can use the following CLI command to change the default setting:
config antispam settings
set uri-checking {aggressive | strict}
end
• aggressive: Choose this option to scan for both the absolute and reference URIs.
• strict: Choose this option to scan for absolute URIs only. Note that web sites without
“http” or “https” but starting with “www” are also treated as absolute URIs. For instance,
www.example.com.
For more information about this command, see FortiMail CLI Reference.
See also
• Managing antispam profiles
• Configuring antispam action profiles
Heuristic scanning is resource intensive. If spam detection rates are acceptable without
heuristic scanning, consider disabling it or limiting its application to policies for problematic
hosts.
You can also apply this scan to PDF attachments. For more information, see “Configuring scan
options” on page 424.
See also
• Managing antispam profiles
• Configuring antispam action profiles
See also
• Managing antispam profiles
• Configuring antispam action profiles
Closing the pop-up window does not save the antispam profile and its associated DNSBL
server list. To save changes to the DNSBL server list, in the antispam profile, click OK before
navigating away to another part of the web UI.
6. Continue to the next section, or click Create or OK to save the antispam profile.
You can also apply this scan to PDF attachments. For more information, see “Configuring scan
options” on page 424.
Closing the pop-up window does not save the antispam profile and its associated banned word
list. To save changes to the banned word list, first click OK before navigating away to another
part of the web UI.
8. Continue to the next section, or click Create or OK to save the antispam profile.
Closing the pop-up window does not save the antispam profile and its associated banned word
list. To save changes to the banned word list, first click Save before navigating away to another
part of the web UI.
7. Continue to the next section, or click Create or OK to save the antispam profile.
See also
• Managing antispam profiles
• Configuring antispam action profiles
Be aware that, without ongoing training, Bayesian scanning will become significantly less
effective over time and thus Fortinet does not recommend enabling the Bayesian scanning
feature.
Use other Enable to use scan results from FortiGuard, SURBL, and per-user and
techniques system-wide safe lists to train the Bayesian databases.
for auto
This option is available only if Direction is Incoming. (Domain-level
training
Bayesian databases cannot be used when the recipient does not belong to
a protected domain, which defines outgoing email.)
5. Continue to the next section, or click Create or OK to save the antispam profile.
Max message Enter the maximum size of email messages, in bytes, that the FortiMail
size to scan unit will scan for spam. Messages larger than the set size are not
scanned for spam.
To disable the size limit, causing all messages to be scanned, regardless
of size, enter 0.
Note: Resource requirements for scanning messages increase with the
size of the email message. If the spam you receive tends not to be
smaller than a certain size, consider limiting antispam scanning to
messages under this size to improve performance.
Bypass scan on Enable to bypass spam scanning for authenticated SMTP connections.
SMTP Starting from 6.2 release, this option is enabled by default.
authentication
Note: If you can trust that authenticating SMTP clients are not a source
of spam, consider enabling this option to improve performance.
Scan PDF sic Spammers may attach a PDF file to an otherwise empty message to get
attachment their email messages past spam safeguards. The PDF file contains the
spam information. Since the message body contains no text, antispam
scanners cannot determine if the message is spam.
Enable this option to use the heuristic, banned word, and image spam
scans to inspect the first page of PDF attachments. CS: What about
white lists and dictionary?
This option applies only if you have enabled and configured heuristic,
banned word, and/or image spam scans. For information on configuring
those scans, see “Configuring heuristic options” on page 418,
“Configuring banned word options” on page 420, and “Configuring
image spam options” on page 422.
Apply default Select this option to take the default antispam action right away without
action without applying other antispam filters if the email matches the relevant IP or
scan upon policy recipient policy.
match
To use this feature, you must have a license for the Fortinet Enterprise Advanced Threat
Protection (ATP) bundle.
To fight against email impersonation, you can map high valued target display names with
correct email addresses and FortiMail can check for the mapping. For example, an external
spammer wants to impersonate the CEO of your company([email protected]). The spammer
will put "CEO ABC <[email protected]>" in the Email header From, and send such email to a
user([email protected]). If FortiMail has been configured with a manual entry "CEO
ABC"/"[email protected]" in an impersonation analysis profile to indicate the correct display
name/email pair, or it has learned display name/email pair through the dynamic process, then
such email will be detected by impersonation analysis, because the spammer uses an external
email address and an internal user's display name.
There are two ways to do the mapping:
• Manual: you manually enter mapping entries and create impersonation analysis profiles as
described below. Then you enable the impersonation profile in an antispam profile
(“Managing antispam profiles” on page 412). Eventually, you will apply the antispam profie in
the IP-based or recipient-based policies (“Controlling email based on IP addresses” on
page 378 and “Controlling email based on sender and recipient addresses” on page 384).
• Dynamic: FortiMail Mail Statistics Service can automatically learn the mapping. See details
below.
Impersonation analysis checks both the Header From and Reply-To fields.
You can alse add exempt entries so that FortiMail will skip the impersonation analysis check.
To avoid false positives, impersonation analysis also follows some other exempt rules.
To
Display name Enter the display name to be mapped to the email address. You can use
pattern wildcard or regular expression.
Email address Enter the email address to be mapped to the display name. The email
address can be from protected/internal domains or
unprotected/external domains.
If the email address is from an external domain, such as gmail.com or
hotmail.com, the display name matching the external email address will
be passed. Otherwise, it will be caught by impersonation analysis.
The specific action profile will override the default action profile when mailfilterd scans the email
and take disposition (action) against the email. When the email is out of the process of
mailfilterd, any remaining actions, such as spam report, web release, and sender safelisting, will
still be taken based on the default action profile.
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Policy category. For details, see “About administrator account
permissions and domains” on page 179.
Domain Select System to see profiles for the entire FortiMail unit, or select a
protected domain name to see profiles for that domain. You can see only
(drop-down list)
the domains that are permitted by your administrator profile.
(Green dot in Indicates whether or not the entry is currently referred to by another item
column heading) in the configuration. If another item is using this entry, a red dot appears
in this column, and the entry cannot be deleted.
2. Either click New to add a profile or double-click an existing profile to modify it.
A dialog appears.
3. Configure the following:
Tag subject Enable and enter the text that appears in the subject line of the
email, such as [spam], in the With value field. The FortiMail unit
will prepend this text to the subject line of spam before forwarding
it to the recipient.
Many email clients can sort incoming email messages into
separate mailboxes, including a spam mailbox, based on text
appearing in various parts of email messages, including the
subject line. For details, see the documentation for your email
client.
Insert header Enable and enter the message header key in the field, and the
values in the With value field. The FortiMail unit adds this text to
the message header of the email before forwarding it to the
recipient.
Many email clients can sort incoming email messages into
separate mailboxes, including a spam mailbox, based on text
appearing in various parts of email messages, including the
message header. For details, see the documentation for your
email client.
Message header lines are composed of two parts: a key and a
value, which are separated by a colon. For example, you might
enter:
X-Custom-Header: Detected as spam by profile 22.
If you enter a header line that does not include a colon, the
FortiMail unit will automatically append a colon, causing the entire
text that you enter to be the key.
Note: Do not enter spaces in the key portion of the header line, as
these are forbidden by RFC 2822.
Starting from 6.0.1 release, you can add multiple headers by
adding them to the header table. You can also insert the
predefined variables to the header value.
Insert disclaimer Starting from 6.0.1 release, you can insert disclaimer as an action.
You can modify the default discaimer or add new disclaimers by
going to System > Customization > Custom Message > Email
Content Resources > Disclaimer insertion message.
Deliver to alternate Enable to route the email to a specific SMTP server or relay, then
host type the fully qualified domain name (FQDN) or IP address of the
destination.
You can choose to deliver the original email or the modified email.
Note: If you enable this setting, the FortiMail unit uses this
destination for all email that matches the profile and ignores Relay
server name and Use this domain’s SMTP server to deliver the
mail.
Notify with profile Enable and select a notification profile to send a notification email
to the sender, recipient, or any other people as you configure in
the notification profile. The notification email is customizable and
will tell the users what happened to the email message. For
details about notification profiles and email templates, see
“Configuring notification profiles” on page 505 and “Customizing
email templates” on page 229.
Final action For details about final and non-final actions, see “Order of
execution” on page 16.
Reject Enable to reject the email and reply to the SMTP client with SMTP
reply code 550.
However, if email messages are held for FortiGuard spam
outbreak protection or sent to FortiSandbox, the actual action will
fallback to "system quarantine" if spam or viruses are detected
afterwards.
Discard Enable to accept the email, but then delete it instead of delivering
the email, without notifying the SMTP client.
Personal For incoming email, enable to redirect the email to the recipient’s
quarantine personal quarantine. For more information, see “Managing the
personal quarantines” on page 138.
For outgoing email, this action will fallback to the system
quarantine.
You can choose to quarantine the original email or the modified
email.
System Enable to redirect spam to the system quarantine folder. For more
quarantine to information, see “Managing the system quarantine” on page 141.
folder
You can choose to quarantine the original email or the modified
email.
The system quarantine and personal quarantine options are
mutually exclusive.
The AntiVirus submenu lets you configure antivirus profiles and related action profiles. See the
following topics for details:
• Managing antivirus profiles
• Configuring antivirus action profiles
Domain For a new profile, select either System to apply the profile
to the entire FortiMail unit, or select a specific protected
domain. You can see only the domains that are permitted
by your administrator profile.
Profile name For a new profile, type its name. The profile name is
editable later.
Default action Select an action profile or create a new action profile. See
“Configuring antivirus action profiles” on page 433.
File signature check Enable to scan for file signatures. For details, see “Adding
file signatures” on page 553.
Scan mode Submit and wait for result means to wait for scan results
before delivering the email.
Submit only means to submit the email to FortiSandbox
but still deliver the mail without waiting for scan results.
Domain Select System to see profiles for the entire FortiMail unit, or select a
protected domain name to see profiles for that domain. You can see only
(drop-down list)
the domains that are permitted by your administrator profile.
(Green dot in Indicates whether or not the entry is currently referred to by another item
column heading) in the configuration. If another item is using this entry, a red dot appears
in this column, and the entry cannot be deleted.
2. Either click New to add a profile or double-click an existing profile to modify it.
A dialog appears.
3. Configure the following:
Tag email’s subject line Enable and enter the text that appears in the subject line of the
email, such as [virus], in the With value field. The FortiMail unit
will prepend this text to the subject line of spam before forwarding
it to the recipient.
Many email clients can sort incoming email messages into
separate mailboxes, including a spam mailbox, based on text
appearing in various parts of email messages, including the
subject line. For details, see the documentation for your email
client.
Insert header Enable and enter the message header key in the field, and the
values in the With value field. The FortiMail unit adds this text to
the message header of the email before forwarding it to the
recipient.
Many email clients can sort incoming email messages into
separate mailboxes, including a spam mailbox, based on text
appearing in various parts of email messages, including the
message header. For details, see the documentation for your
email client.
Message header lines are composed of two parts: a key and a
value, which are separated by a colon. For example, you might
enter:
X-Custom-Header: Detected as virus by profile 22.
If you enter a header line that does not include a colon, the
FortiMail unit will automatically append a colon, causing the entire
text that you enter to be the key.
Note: Do not enter spaces in the key portion of the header line, as
these are forbidden by RFC 2822.
Starting from 6.0.1 release, you can add multiple headers by
adding them to the header table. You can also insert the
predefined variables to the header value.
Insert disclaimer Starting from 6.0.1 release, you can insert disclaimer as an action.
You can modify the default discaimer or add new disclaimers by
going to System > Customization > Custom Message > Email
Content Resources > Disclaimer insertion message.
Deliver to alternate Enable to route the email to a specific SMTP server or relay, then
host type the fully qualified domain name (FQDN) or IP address of the
destination.
You can choose to deliver the original email or the modified email.
Note: If you enable this setting, the FortiMail unit uses this
destination for all email that matches the profile and ignores Relay
server name and Use this domain’s SMTP server to deliver the
mail.
Notify with profile Enable and select a notification profile to send a notification email
to the sender, recipient, or any other people as you configure in
the notification profile. The notification email is customizable and
will tell the users what happened to the email message. For
details about notification profiles and email templates, see
“Configuring notification profiles” on page 505 and “Customizing
email templates” on page 229.
Reject Enable to reject the email and reply to the SMTP client with SMTP
reply code 550.
However, if email messages are held for FortiGuard spam
outbreak protection or sent to FortiSandbox, the actual action will
fallback to "system quarantine" if spam or viruses are detected
afterwards.
Discard Enable to accept the email, but then delete it instead of delivering
the email, without notifying the SMTP client.
System Quarantine Enable to redirect email to the system quarantine. For more
information, see “Managing the system quarantine” on page 141.
You can choose to quarantine the original email or the modified
email.
Rewrite recipient email Enable to change the recipient address of any infected email
address message.
Configure rewrites separately for the local-part (the portion of the
email address before the '@' symbol, typically a user name) and
the domain part (the portion of the email address after the '@'
symbol). For each part, select either:
• None: No change.
• Prefix: Prepend the part with text that you have entered in the
With field.
• Suffix: Append the part with the text you have entered in the
With field.
• Replace: Substitute the part with the text you have entered in
the With field.
Repackage email with Enable to forward the infected email as an attachment with the
customized content customized email body that you define in the custom email
template. For example, in the template, you may want to say “The
attached email is infected by a virus”. For details, see
“Customizing email templates” on page 229.
Repackage email with Enable to forward the infected email as an attachment but the
original content original email body will still be used without modification.
The Content submenu lets you configure content profiles for incoming and outgoing
content-based scanning. The available options vary depending on the chosen directionality.
This topic includes:
• Configuring content profiles
• Configuring file filters
• Configuring file password
• Configuring content action profiles
Clone Click the row corresponding to the profile whose settings you want to
duplicate when creating the new profile, then click Clone. A single-field
(button)
dialog appears. Enter a name for the new profile. Click OK.
Domain Select System to see profiles for the entire FortiMail unit, or select a
protected domain name to see profiles for that domain. You can see only
(drop-down list)
the domains that are permitted by your administrator profile.
(Green dot in Indicates whether or not the entry is currently referred to by another item
column heading) in the configuration. If another item is using this entry, a red dot appears
in this column, and the entry cannot be deleted.
File filter Select the file filter. See “Configuring file filters” on page 444.
Operator Select Is or Is Not. If Is is selected, the below action will be taken. If Is Not is
selected, the below action will not be taken. You can use the Is Not option
to whitelist some attachment types. For example, if you want to reject all
file types except for the PDF files, you can specify that PDF Is Not Reject.
Action Specify the action. Or click New to create a new action profile.
Bypass scan on Enable to omit content profile scanning if the SMTP session is
SMTP authenticated.
authentication
Detect Enable to apply the block action configured in the content action profile if
password an attached MS Office, OpenOffice, or PDF document is
protected password-protected, and therefore cannot be decompressed in order to
Office/PDF scan its contents.
document
Defer delivery of Enable to defer mail delivery from specific senders configured in policy to
message on conserve peak time bandwidth at the expense of sending low priority,
policy match bandwidth consuming traffic at scheduled times. For example, you can
apply this function to senders of marketing campaign emails or mass
mailing.
For information on policy, see “How to use policies” on page 363.
For information on scheduling deferred delivery, see “Configuring mail
server settings” on page 196.
Defer delivery of Enter the file size limit over which the FortiMail unit will defer processing
messages large email messages. If not enabled, large messages are not deferred.
larger than
For information on scheduling deferred delivery, see “Configuring mail
server settings” on page 196.
Maximum Specify how many attachments are allowed in one email message. The
number of valid range is between 1 and 100. The default value is 10.
attachment
Maximum size You can specify the actions to take against the email (either the message
itself or the attachments) that exceeds the specified maximum size.
Adult image If you have purchase the adult image scan license, you can enable it to
analysis scan for adult images.
You can also configure the scan sensitivity and image sizes under
Security > Other > Adult Image Analysis. For details, see “Configuring
adult image analysis” on page 554.
HTML content Enable to detect hypertext markup language (HTML) tags in the content
type text/html parts of the email messages.
• Convert HTML to text: convert the HTML content to text only content.
• Sanitize HTML content: produce new HTML content by removing the
potentially hazardous tags and attributes (such as hyperlinks and
scripts) and only preserving the safe and essential tags (such as
formatting tags).
• Remove URIs: remove the URIs in email message. To define which
URI category to remove URIs from, click View settings (see
“Configuring FortiGuard URI click protection service” on page 296).
• Click Protection: Rewrite the URI and in case the user clicks on the
URI, scan the URI and then take the configured actions (see
“Configuring FortiGuard URI click protection service” on page 296).
• FortiIsolator: Redirect the user to FortiIsolator so that the user will be
browsing through FortiIsolator. For information about FortiIsolator, see
“Configuring FortiGuard URI click protection service” on page 296.
• Click Protection + FortiIsolator: Rewrite the URI and when the user
clicks on the URI, the URI will be redirecte to FortiMail for scanning. If
the URI is malicious, the URL will be bocked; if the URI is clean, the
URI is rewritten to point to the FortiIsolator, and the user will browse
through FortiIsolator.
MS Office Enable to disarm and reconstruct the MS Office attachments. This also
includes the .zip files that are compressed once.
PDF Enable to disarm and reconstruct the PDF attachments. This also
includes the .zip files that are compressed once.
Check Archive Enable to determine which action to perform with the archive
Content attachments.
• blocking password protected archives if you have selected Detect
Password Protected Archive
• blocking archives that could not be successfully decompressed if you
have selected Detect on Failure to Decompress
• passing/blocking by comparing the depth of nested archives with the
nesting depth threshold configured in Max Level of Compression
By default, archives with less than 10 levels of compression will be
blocked if they cannot be successfully decompressed or are
password-protected.
Depending on the nesting depth threshold and the attachment’s depth of
nested archives, the FortiMail unit may also consider the file types of files
within the archive when determining which action to perform. For details,
see the section below.
If disabled, the FortiMail unit will perform the Block/Pass action solely
based upon whether an email contains an archive. It will disregard the
depth of nesting, password protection, successful decompression, and
the file types of contents within the archive.
Detect on Enable to apply the block action configured in the content action profile if
Failure to an attached archive cannot be successfully decompressed, such as if the
Decompress compression algorithm is unknown, and therefore cannot be
decompressed in order to scan its contents.
This option is available only if Check Archive Content is enabled.
Detect Enable to apply the block action configured in the content action profile if
Password an attached archive is password-protected, and therefore cannot be
Protected decompressed in order to scan its contents.
Archive
This option is available only if Check Archive Content is enabled.
Max Level of Enter the nesting depth threshold. Depending upon each attached
Compression archive’s depth of archives nested within the archive, the FortiMail unit
uses one of the following methods to determine if it should block or pass
the email.
• Max Level of Compression is 0, or attachment’s depth of nesting
equals or is less than Max Level of Compression: If the attachment
contains a file that matches one of the other MIME file types, perform
the action configured for that file type, either block or pass.
• Attachment’s depth of nesting is greater than Max Level of
Compression: Apply the block action, unless you have deselected the
check box for Max Level of Compression, in which case it will pass
the MIME file type content filter. Block actions are specified in the
content action profile.
The specified compression value is always considered if Check Archive
Content is enabled, but has an effect only if the threshold is exceeded.
This option is available only if Check Archive Content is enabled.
Move Mark a check box to select a content monitor profile, then click this button.
(button) Choose Up or Down from the pop-up menu.
Content monitor profiles are evaluated for a match in order of their
appearance in this list. Usually, content monitor profiles should be ordered
from most specific to most general, and from accepting or quarantining to
rejecting.
Delete Mark a check box to select a content monitor profile, then click this button
(button) to remove it.
Note: Deletion does not take effect immediately; it occurs when you save
the content profile.
Enable Select or clear the check box to enable or disable a content monitor.
4. Click New for a new monitor profile or double-click an existing profile to modify it.
A dialog appears.
5. Configure the following:
Enable Enable to use the content monitor to inspect email for matching email
and perform the configured action.
Dictionary Select either Profile or Group, then select the name of a dictionary
profile or group from the drop-down list next to it.
If no profile or group exists, click New to create one, or select an
existing profile or group and click Edit to modify it. A dialog appears.
For information on creating and editing dictionary profiles and
groups, see “Configuring dictionary profiles” on page 491.
Minimum score Displays the number of times that an email must match the dictionary
profile before it will receive the action configured in Action. Note that
the score value is based on individual dictionary profile matches, not
the dictionary group matches.
Action Displays action that the FortiMail unit will perform if the content of the
email message matches words or patterns from the dictionary profile.
If no action exists, click New to create one, or select an existing
action and click Edit to modify it. A dialog appears.
For information on action profiles, see “Configuring content action
profiles” on page 446.
6. Click Create or OK on the Content Monitor Profile dialog to save and close it.
File Type Either select from the predefined types and/or specify your own.
File Extension Either select from the predefined extensions and/or specify your own.
Encrypted email content cannot be scanned for spam, viruses, or banned content.
For each file type, you can use an action profile to overwrite the default action profile used by
the content profile. For example, if you want to redirect encrypted email to a third party box
(such as a PGP Universal Server) for decryption, You can:
1. Create a content action profile and enable the Send to alternate host option in the action
profile. Enter the PGP server as the alternate host. For details about how create a content
action profile, see “Configuring content action profiles” on page 446.
2. Select to block the encrypted/pgp file type under document/encrypted. “Block” means to
apply an action profile.
3. Select the action profile for the document/encrypted file type. This action profile will
overwrite the action profile you select for the entire content profile.
Domain Select System to see profiles for the entire FortiMail unit, or select a
protected domain name to see profiles for that domain. You can see
(drop-down list)
only the domains that are permitted by your administrator profile.
(Green dot in Indicates whether or not the entry is currently referred to by another item
column heading) in the configuration. If another item is using this entry, a red dot appears
in this column, and the entry cannot be deleted.
2. Either click New to add a profile or double-click an existing profile to modify it.
A dialog appears.
3. Configure the following:
Domain For a new profile, select either System to apply the profile to the
entire FortiMail unit, or select a protected domain name to apply it to
that domain. You can see only the domains that are permitted by
your administrator profile.
Tag email’s subject Enable and enter the text that will appear in the subject line of the
line email, such as “[PROHIBITED-CONTENT]”, in the With value field.
The FortiMail unit prepends this text to the subject line of the email
before forwarding it to the recipient.
Many email clients can sort incoming email messages into separate
mailboxes based on text appearing in various parts of email
messages, including the subject line. For details, see the
documentation for your email client.
Insert header Enable and enter the message header key in the field, and the values
in the With value field. The FortiMail unit adds this text to the
message header of the email before forwarding it to the recipient.
Many email clients can sort incoming email messages into separate
mailboxes based on text appearing in various parts of email
messages, including the message header. For details, see the
documentation for your email client.
Message header lines are composed of two parts: a key and a value,
which are separated by a colon. For example, you might enter:
X-Content-Filter: Contains banned word.
If you enter a header line that does not include a colon, the FortiMail
unit will automatically append a colon, causing the entire text that
you enter to be the key.
Note: Do not enter spaces in the key portion of the header line, as
these are forbidden by RFC 2822.
Starting from 6.0.1 release, you can add multiple headers by adding
them to the header table. You can also insert the predefined
variables to the header value.
Insert disclaimer Starting from 6.0.1 release, you can insert disclaimer as an action.
You can modify the default discaimer or add new disclaimers by
going to System > Customization > Custom Message > Email
Content Resources > Disclaimer insertion message.
Deliver to alternate Enable to route the email to a specific SMTP server or relay, then
host type the fully qualified domain name (FQDN) or IP address of the
destination.
You can choose to deliver the original email or the modified email.
Deliver to original Enable to route the email to the original SMTP server or relay. Note
host the you can deliver email to both the original and alternate hosts.
You can choose to deliver the original email or the modified email.
Replace with Enable to replace the email’s contents with a replacement message.
message Then select a replacement message from the dropdown list. For
more information, see “Customizing GUI, replacement messages,
email templates, and SSO” on page 220.
Note: When the action profile is used in a DLP profile, the replace
action will fallback to system quarantine action.
Archive to account Enable to send the email to an archiving account. As long as this
action is enabled, no matter if the email is delivered or rejected, it will
still be archived.
Click New to create a new archiving account or click Edit to modify
an existing account. For details about archiving accounts, see
“Email archiving workflow” on page 572.
Notify with profile Enable and select a notification profile to send a notification email to
the sender, recipient, or any other people as you configure in the
notification profile. The notification email is customizable and will tell
the users what happened to the email message. For details about
notification profiles and email templates, see “Configuring
notification profiles” on page 505 and “Customizing email
templates” on page 229.
Final action
Treat as spam Enable to perform the Actions selected in the antispam profile of the
policy that matches the email. For more information, see
“Configuring antispam action profiles” on page 427.
Reject Enable to reject the email and reply to the SMTP client with SMTP
reply code 550.
Discard Enable to accept the email, but then delete it instead of delivering
the email, without notifying the SMTP client.
Personal quarantine For incoming email, enable to redirect the email to the recipient’s
personal quarantine. For more information, see “Managing the
personal quarantines” on page 138.
For outgoing email, this action will fallback to the system quarantine.
You can choose to quarantine the original email or the modified
email.
System quarantine Enable to redirect the email to the system quarantine and specify the
to folder quarantine folder. For more information, see “Managing the system
quarantine” on page 141.
The two quarantine options are mutually exclusive.
You can choose to quarantine the original email or the modified
email.
Rewrite recipient Enable to change the recipient address of any email that matches
email address the content profile.
Configure rewrites separately for the local-part (the portion of the
email address before the '@' symbol, typically a user name) and the
domain part (the portion of the email address after the '@' symbol).
For each part, select either:
• None: No change.
• Prefix: Prepend the part with text that you have entered in the
With field.
• Suffix: Append the part with the text you have entered in the With
field.
• Replace: Substitute the part with the text you have entered in the
With field.
Encrypt with profile Enable to apply an encryption profile, then select which encryption
profile to use. For details, see “Configuring encryption profiles” on
page 498.
Note that If you select an IBE encryption profile, it will be overridden
if either S/MIME or TLS or both are selected in the message delivery
rule configuration (Policy > Access control > Delivery > New).
For information about message delivery rules, see “Configuring
delivery rules” on page 374.
To apply a content action profile, select it in the Action drop-down list of one or more
antispam profiles. For details, see “Managing antispam profiles” on page 412.
See also
• Configuring content profiles
Go to Profile > Resource to configure miscellaneous aspects of the email user accounts, such
as disk space quota.
For more information on settings that can be applied to email user accounts, see “Configuring
local user accounts (server mode only)” on page 328 and “Configuring user preferences” on
page 332.
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Policy category. For details, see “About administrator account
permissions and domains” on page 179.
Clone Click the row corresponding to the profile whose settings you want to
duplicate when creating the new profile, then click Clone. A single-field
(button)
dialog appears. Enter a name for the new profile. Click OK.
Domain Select System to see profiles for the entire FortiMail unit, or select a
protected domain name to see profiles for that domain. You can see only
(drop-down list)
the domains that are permitted by your administrator profile.
(Green dot in Indicates whether or not the entry is currently referred to by another item
column heading) in the configuration. If another item is using this entry, a red dot appears
in this column, and the entry cannot be deleted.
Domain For a new profile, select either System to apply the profile to the entire
FortiMail unit, or select a protected domain name to apply it to that
domain. You can see only the domains that are permitted by your
administrator profile.
Profile name For a new profile, enter the name of the profile. The profile name is
editable later.
Disk quota (MB) Enter the maximum amount of FortiMail webmail disk space that you
will allow to be consumed, or enter 0 to allow unlimited use.
User account Select to enable email user accounts using this resource profile.
status
Webmail access Enable to allow email users to access FortiMail webmail and other
webmail features, such as auto reply and address books.
Personal Specify the personal quarantine options, such as release method and
quarantine safelisting.
Email Retention Enter the number of days after which the FortiMail unit will
automatically delete email that is locally hosted in each folder. 0 means
not to delete email.
To apply the resource profile, you must select it in a policy. For details, see “Controlling email
based on sender and recipient addresses” on page 384 and “Controlling email based on IP
addresses” on page 378.
In general, to enable and configure email user authentication, you should complete the
following:
1. If you want to require authentication for SMTP connections received by the FortiMail unit,
examine the access control rules whose sender patterns match your email users to ensure
that authentication is required (Authenticated) rather than optional (Any).
Additionally, verify that no access control rule exists that allows unauthenticated
connections. For details, see “Configuring access control rules” on page 366.
2. For secure (SSL or TLS) authentication:
• Upload a local certificate. For details, see “Managing local certificates” on page 280.
• Enable SMTP over SSL/TLS. For details, see “Configuring mail server settings” on
page 196.
• If you want to configure TLS, create a TLS profile, and select it in the access control rules.
For details, see “Configuring TLS security profiles” on page 495 and “Configuring access
control rules” on page 366.
• If the email user will use a personal certificate to log in to webmail or their per-recipient
quarantine, define the certificate authority (CA) and the valid certificate for that user. If
OCSP is enabled, you must also configure a remote certificate revocation authority. For
details, see “Configuring PKI authentication” on page 335, “Managing certificate
authority certificates” on page 287, and “Managing OCSP server certificates” on
page 288.
3. If authentication will occur by querying an external authentication server rather than email
user accounts locally defined on the FortiMail unit, configure the appropriate profile type,
either:
• SMTP, IMAP, or POP3 (gateway mode or transparent mode only; see “Configuring
authentication profiles” on page 452)
• LDAP (see “Configuring LDAP profiles” on page 461)
• RADIUS (see “Configuring authentication profiles” on page 452)
4. For server mode, configure the email users and type their password, or select an LDAP
profile. Also enable webmail access in a resource profile. For details, see “Configuring local
user accounts (server mode only)” on page 328 and “Configuring resource profiles” on
page 449.
5. For gateway mode or transparent mode, select the authentication profile in the IP-based
policy or in the incoming recipient-based that matches that email user and enable Use for
SMTP authentication. If the user will use PKI authentication, in the incoming recipient-based
policy, also enable Enable PKI authentication for web mail spam access. For details, see
“Controlling email based on sender and recipient addresses” on page 384 and “Controlling
email based on IP addresses” on page 378.
For server mode, select the resource profile in the incoming recipient-based policy, and if
users authenticate using an LDAP profile, select the LDAP profile. For details, see
“Controlling email based on sender and recipient addresses” on page 384.
When the FortiMail unit is operating in server mode, only local and RADIUS authentication are
available.
LDAP profiles can configure many features other than authentication, and are not located in the
Authentication menu. For information on LDAP profiles, see “Configuring LDAP profiles” on
page 461.
In addition to authenticating email users for SMTP connections, SMTP profiles can be used to
authenticate email users making webmail (HTTP or HTTPS) or POP3 connections to view their
per-recipient quarantine, and when authenticating with another SMTP server to deliver email.
Depending on the mode in which your FortiMail unit is operating, you may be able to apply
authentication profiles through incoming recipient-based policies, IP-based policies, and email
user accounts. For more information, see “Controlling email based on sender and recipient
addresses” on page 384, “Controlling email based on IP addresses” on page 378, and
“Configuring local user accounts (server mode only)” on page 328.
For the general procedure of how to enable and configure authentication, see “Workflow to
enable and configure authentication of email users” on page 451.
To access this part of the web UI, your administrator account’s:
• Domain must be System
• access profile must have Read or Read-Write permission to the Policy category
For details, see “About administrator account permissions and domains” on page 179.
Domain For a new profile, select either System to apply the profile to the entire
FortiMail unit, or select a protected domain name to apply it to that
domain. You can see only the domains that are permitted by your
administrator profile.
Profile name For a new profile, enter the name of the profile. The profile name is
editabel later.
Server name/IP Enter the fully qualified domain name (FQDN) or IP address of a server
that will be queried to authenticate email users if they authenticate to
send email, or when they are accessing their personal quarantine.
Server port Enter the port number on which the authentication server listens.
The default value varies by the protocol. You must change this value if
the server is configured to listen on a different port number, including
if the server requires use of SSL.
For example, the standard port number for SMTP is 25. However, for
SMTP with SSL, the default port number is 465. Similarly, IMAP is
143, while IMAP with SSL is 993; POP3 is 110, while POP3 with SSL
is 995; and RADIUS is 1812.
Use generic LDAP Use generic LDAP mail host if available: For gateway and transparent
mail host if mode, select this option if your LDAP server has a mail host entry for
available (SMTP the generic user. for more information, see “Domain Lookup Query”
authentication on page 475.
only)
If you select this option, the FortiMail unit will query the generic LDAP
server first to authenticate email users. If no results are returned for
the query, the FortiMail unit will query the server you entered in the
Server name/IP field.
Authentication options
SSL/TLS Enable if you want to use transport layer security (TLS) to authenticate
and encrypt communications between the FortiMail unit and this
server, and if the server supports it. CS: Uses System >
Certificate?CS: Investigate... Secure auth, SSL, and TLS options were
not present for 3.0 MR5
STARTTLS Enable if you want to upgrade the existing insecure connection to the
secure connection using SSL/TLS.
Server requires Enable if the authentication server requires that email users
domain authenticate using their full email address (such as
[email protected]) and not just the user name (such as user1).
Domain For a new profile, select either System to apply the profile to the entire
FortiMail unit, or select a protected domain name to apply it to that
domain. You can see only the domains that are permitted by your
administrator profile.
Profile name For a new profile, enter the name of the profile.
Server name/IP Enter the fully qualified domain name (FQDN) or IP address of a server
that will be queried to authenticate email users if they authenticate to
send email, or when they are accessing their personal quarantine.
Server port Enter the port number on which the authentication server listens.
The default value varies by the protocol. You must change this value if
the server is configured to listen on a different port number, including
if the server requires use of SSL.
For example, the standard port number for SMTP is 25. However, for
SMTP with SSL, the default port number is 465. Similarly, IMAP is
143, while IMAP with SSL is 993; POP3 is 110, while POP3 with SSL
is 995; and RADIUS is 1812.
NAS IP/Called Enter the NAS IP address and Called Station ID (for more information
station ID about RADIUS Attribute 31, see RFC 2548 Microsoft Vendor-specific
RADIUS Attributes). If you do not enter an IP address, the IP address
that the FortiMail interface uses to communicate with the RADIUS
server will be applied.
Server secret Enter the secret required by the RADIUS server. It must be identical to
the secret that is configured on the RADIUS server.
Server requires Enable if the authentication server requires that email users
domain authenticate using their full email address (such as
[email protected]) and not just the user name (such as user1).
To apply the authentication profile, you must select it in a policy. You may also need to
configure access control rules, user accounts, and certificates. For details, see “Workflow to
enable and configure authentication of email users” on page 451.
The VIP Map tab enables you to configure virtual IP mappings, email address mappings, mail
routing, and access control configuration.
Virtual IP mapping allows the FortiMail unit to direct POP3, IMAP, secure POP3, and secure
IMAP connections to other servers. Per IP-based policy Syslog logging and the ability to rewrite
message headers to include email address mapping are defined in virtual IP map profiles. The
active email address map, mail routing map, and access control profile are selected in the VIP
map profile.
Note: The VIP map profile options do appear in gateway mode but are currently
non-functional there. VIP Map profile features are exclusive to transparent mode.
VIP map settings IP policies can be configured to have clients connecting to a virtual
IP for POP3, IMAP, POP3S, or IMAPS session redirected to other
servers. Enter the virtual IP as the Match Server Against address, and
choose the VIP map profile in the IP policy. Any connections of the
four supported types matching the IP policy will then be rerouted
according the settings in the selected VIP Map profile.
POP3 Enter the IP address of the server POP3
connections will be redirected to. Change the
default port setting of 110 if necessary. Select
the check box to activate.
IMAP Enter the IP address of the server IMAP
connections will be redirected to. Change the
default port setting of 143 if necessary. Select
the check box to activate.
From Enter a domain name. Mail addressed to this domain will be rerouted.
To Enter the address the email is to be rerouted to. Select MX, A, or IP in the drop-down
list and enter the appropriate address.
MX Enter a domain name. The FortiMail unit will then query the DNS for the MX
record of this domain and attempt delivery of the message to the servers
returned, in preference order.
A Enter an alias record for the host name which corresponds to the host IP
address. For example, sales.example.com would be a valid alias for
example.com.
IP Enter the IP address of the server to which the FortiMail unit is to deliver
the message.
Port The port number to be used to deliver the message. Port 25, the standard SMTP
port, is the default value.
4. Once the information has been entered, select Add. The new mail routing map entry will
appear in the table.
5. Select OK.
To create an Access Control list
1. Go to Profile > VIP Map > Access Control.
2. Select Create New to create an access control list. Enter a name for the new list and select
OK. The new access control list appears, though it is empty until entries are added.
Sender Pattern Enter the sender email address to match, or specify a partial address with
wildcard characters. Select Regular Expression to use regular expression
syntax instead of wildcard characters.
Recipient Pattern Enter the recipient email address to match, or specify a partial address with
wildcard characters. Select Regular Expression to use regular expression
syntax instead of wildcard characters.
Sender IP Mask Enter the sender IP mask. The default value of 0.0.0.0/0 matches all sender
IP addresses.
Permission Relay Messages matching the sender pattern, recipient pattern, and
sender IP mask are allowed relay privileges.
For the sender and recipient patterns, the @ symbol must appear even if you’re using wildcards.
For example, if you want to match all addresses, you must use *@* rather than just * to work
properly.
See also
• Configuring antispam profiles and antispam action profiles
• Configuring antivirus profiles
• Configuring authentication profiles
• Configuring resource profiles
• Configuring content profiles
• Configuring session profiles
• Configuring dictionary profiles
• Preparing your LDAP schema for FortiMail LDAP profiles
• Configuring LDAP profiles
• Configuring LDAP profiles
• Testing LDAP profile queries
• Clearing the LDAP profile cache
• Configuring IP pools
The LDAP submenu lets you configure LDAP profiles which can query LDAP servers for
authentication, email address mappings, and more.
Before using an LDAP profile, verify each LDAP query and connectivity with your LDAP server.
When LDAP queries do not match with the server’s schema and/or contents, unintended mail
processing behaviors can result, including bypassing antivirus scans. For details on preparing
an LDAP directory for use with FortiMail LDAP profiles, see ““Preparing your LDAP schema for
FortiMail LDAP profiles” on page 478.
LDAP profiles each contain one or more queries that retrieve specific configuration data, such
as user groups, from an LDAP server. The LDAP profile list indicates which queries you have
enabled in each LDAP profile.
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Policy category. For details, see “About administrator account
permissions and domains” on page 179.
To view the list of LDAP profiles, go to Profile > LDAP > LDAP.
Clone Click the row corresponding to the profile whose settings you want to
duplicate when creating the new profile, then click Clone. A single-field
(button)
dialog appears. Enter a name for the new profile. Click OK.
(Green dot in column Indicates whether or not the entry is currently referred to by another item
heading) in the configuration. If another item is using this entry, a red dot appears
in this column, and the entry cannot be deleted.
You can add an LDAP profile to define a set of queries that the FortiMail unit can use with an
LDAP server. You might create more than one LDAP profile if, for example, you have more than
one LDAP server, or you want to configure multiple, separate query sets for the same LDAP
server.
Server name/IP Enter the fully qualified domain name (FQDN) or IP address of the
LDAP server.
Port: Enter the port number where the LDAP server listens.
The default port number varies by your selection in Use secure
connection: port 389 is typically used for non-secure connections,
and port 636 is typically used for SSL-secured (LDAPS)
connections.
Fallback server Optional. Enter the fully qualified domain name (FQDN) or IP
name/IP address of an alternate LDAP server that the FortiMail unit can
query if the primary LDAP server is unreachable.
Port: Enter the port number where the fallback LDAP server
listens.
The default port number varies by your selection in Use secure
connection: port 389 is typically used for non-secure connections,
and port 636 is typically used for SSL-secured (LDAPS)
connections.
Use secure Select whether or not to connect to the LDAP servers using an
connection encrypted connection.
• none: Use a non-secure connection.
• SSL: Use an SSL-secured (LDAPS) connection.
Click Test LDAP Query to test the connection. A pop-up window
appears. For details, see “To verify user query options” on
page 489.
Note: If your FortiMail unit is deployed in server mode, and you
want to enable Enable webmail password change using an LDAP
server that uses a Microsoft ActiveDirectory-style schema, you
must select SSL. ActiveDirectory servers require a secure
connection for queries that change user passwords.
Base DN Enter the distinguished name (DN) of the part of the LDAP
directory tree within which the FortiMail will search for user
objects, such as ou=People,dc=example,dc=com.
User objects should be child nodes of this location.
Schema You can select a schema style by clicking Schema. Then you can edit the
(dropdown schema as desired. Or select User Defined and write your own schema.
list)
User query Enter an LDAP query filter that selects a set of user objects from the LDAP
directory.
The query string filters the result set, and should be based upon any
attributes that are common to all user objects but also exclude non-user
objects. For details, see “LDAP user query example” on page 464.
You can select a schema style by clicking Schema. Then you can edit the
schema as desired. Or select User Defined and write your own schema.
For details on query syntax, refer to any standard LDAP query filter
reference manual.
Warning: To avoid user query confusion, this field cannot be empty.
Scope Select which level of depth to query, starting from Base DN.
• One level: Query only the one level directly below the Base DN in the
LDAP directory tree.
• Subtree: Query recursively all levels below the Base DN in the LDAP
directory tree.
Derefer Select the method to use, if any, when dereferencing attributes whose
values are references. CS: References in a specific attribute, like mail:?
Or any reference?
• Never: Do not dereference.
• Always: Always dereference.
• Search: Dereference only when searching.
• Find: Dereference only when finding the base search object. CS: Base
DN?
Use LDAP tree node as Enable to use objects within the Base DN of User Query
group Options as if they were members of a user group object.
For example, your LDAP directory might not contain user group
objects. In that sense, groups do not really exist in the LDAP
directory. However, you could mimic a group’s presence by
enabling this option to treat all users that are child objects of
the Base DN in User Query Options as if they were members of
such a group.
Use group name with Enable to specify the base distinguished name (DN) portion of
base DN as group DN the group’s full distinguished name (DN) in the LDAP profile. By
specifying the group’s base DN and the name of its group
name attribute in the LDAP profile, you will only need to supply
the group name value when configuring each feature that uses
this query.
For example, you might find it more convenient in each
recipient-based policy to type only the group name, admins,
rather than typing the full DN,
cn=admins,ou=Groups,dc=example,dc=com. In this case,
you could enable this option, then configure Group base DN
(ou=Groups,dc=example,dc=com) and Group name
attribute (cn). When performing the query, the FortiMail unit
would assemble the full DN by inserting the common name
that you configured in the recipient-based policy between the
Group name attribute and the Group base DN configured in the
LDAP profile.
Note: Enabling this option is appropriate only if your LDAP
server’s schema specifies that the group membership
attribute’s value must use DN syntax. It is not appropriate if
this value uses another type of syntax, such as a number or
common name.
For example, if your user objects use both inetOrgPerson
and posixAccount schema, user objects have the attribute
gidNumber, whose value must be an integer that is the group
ID number, such as 10000. Because a group ID number does
not use DN syntax, you would not enable this option.
Group base DN Enter the base DN portion of the group’s full DN, such as
ou=Groups,dc=example,dc=com.
This option is available only if Use group name with base DN as
group DN is enabled.
Group name attribute Enter the name of the attribute, such as cn, whose value is the
group name of a group to which the user belongs. CS: Verify...
May not, as group objects may not be required if using virtual
groups... But then again, in that case, we wouldn’t be
configuring this option, would we? This attribute must be
present in group objects.
This option is available only if Use group name with base DN as
group DN is enabled.
Max group expansion Sepcify how many levels of nested groups will be expanded for
level lookup. Valid range is 1-6. Defult value is 1.
Lookup group owner Enable to query the group object by its distinguished name
(DN) to retrieve the DN of the group owner, which is a user that
will receive that group’s quarantine reports. Using that user’s
DN, the FortiMail unit will then perform a second query to
retrieve that user’s email address, where the quarantine report
will be sent.
For more information on sending quarantine reports to the
group owner, see “Quarantine Report Setting” on page 319
and “Managing the personal quarantines” on page 138.
Group owner attribute Enter the name of the attribute, such as groupOwner, whose
value is the distinguished name of a user object. You can
configure the FortiMail unit to allow that user to be responsible
for handling the group’s quarantine report.
If Lookup group owner is enabled, this attribute must be
present in group objects.
Group owner address Enter the name of the attribute, such as mail, whose value is
attribute the group owner’s email address.
If Lookup group owner is enabled, this attribute must be
present in user objects.
Try UPN or mail address as Select to form the user’s bind DN by prepending the user
bind DN name portion of the email address ($u) to the User Principle
Name (UPN, such as example.com).
By default, the FortiMail unit will use the mail domain as the
UPN. If you want to use a UPN other than the mail domain,
enter that UPN in the field named Alternative UPN suffix. This
can be useful if users authenticate with a domain other than
the mail server’s principal domain name.
Search user and try bind Select to form the user’s bind DN by using the DN retrieved
DN for that user by User Query Options.
Schema You can select a schema style by clicking Schema. Then you can edit the
(dropdown list) schema as desired. Or select User Defined and write your own schema.
Alias member Enter the name of the attribute, such as mail or rfc822MailMember,
attribute whose value is an email address to which the email alias resolves, such as
[email protected]. CS: Does this have to use full email address
syntax? rfc822MailMember seems to use only user name syntax, in which
case would it assume that the domain name portion is the same as the
alias address?
This attribute must be present in either alias or user objects, as
determined by your schema and whether it resolves aliases directly or
indirectly. For more information, see “Base DN” on page 471.
This option is preconfigured and read-only if, in User Alias Options, you
have selected from Schema any schema style other than User Defined.
Alias member Enter an LDAP query filter that selects a set of either user or email alias
query objects, whichever object class contains the attribute you configured in
Alias member attribute, from the LDAP directory.
This option is preconfigured and read-only if you have selected from
Schema any schema style other than User Defined.
The query string filters the result set, and should be based upon any
attributes that are common to all user/alias objects but also exclude
non-user/alias objects. For details, see “Alias member query example” on
page 471.
For more information on required object types and their attributes, see
“Preparing your LDAP schema for FortiMail LDAP profiles” on page 478.
For details on query syntax, refer to any standard LDAP query filter
reference manual.
User group Enable if your LDAP schema resolves email aliases indirectly. For more
expansion In information on direct versus indirect resolution, see “Base DN” on
advance page 471.
When this option is disabled, alias resolution occurs using one query. The
FortiMail unit queries the LDAP directory using the Base DN and the Alias
member query, and then uses the value of each Alias Member Attribute to
resolve the alias.
When this option is enabled, alias resolution occurs using two queries:
• The FortiMail unit first performs a preliminary query using the Base DN
and Group member query, and uses the value of each Group member
attribute as the base DN for the second query.
• The FortiMail unit performs a second query using the distinguished
names from the preliminary query (instead of the Base DN) and the
Alias member query, and then uses the value of each Alias member
attribute to resolve the alias.
The two-query approach is appropriate if, in your schema, alias objects
are structured like group objects and contain references in the form of
distinguished names of member user objects, rather than directly
containing email addresses to which the alias resolves. In this case, the
FortiMail unit must first “expand” the alias object into its constituent user
objects before it can resolve the alias email address.
This option is preconfigured and read-only if you have selected from
Schema any schema style other than User Defined.
Group member Enter the name of the attribute, such as member, whose value is the DN of
attribute a user object.
This attribute must be present in alias objects only if they do not contain
an email address attribute specified in Alias member attribute.
This option is preconfigured and read-only if you have selected from
Schema any schema style other than User Defined. If you have selected
User Defined, this option is available only if User group expansion In
advance is enabled.
Group member Enter an LDAP query filter that selects a set of alias objects, represented
query as a group of member objects in the LDAP directory.
The query string filters the result set, and should be based upon any
attributes that are common to all alias objects but also exclude non-alias
objects.
For example, if alias objects in your directory have two distinguishing
characteristics, their objectClass and proxyAddresses attributes,
the query filter might be:
(&(objectClass=group) (proxyAddresses=smtp:$m))
where $m is the FortiMail variable for an email address.
This option is preconfigured and read-only if you have selected from
Schema any schema style other than User Defined. If you have selected
User Defined, this option is available only if User group expansion In
advance is enabled.
For details on query syntax, refer to any standard LDAP query filter
reference manual.
Max alias Specify the maximum number of alias nesting levels that will be expanded
expansion level for lookup. Valid range is 1-12 and the default value is 1.
Scope Select which level of depth to query, starting from Base DN.
• One level: Query only the one level directly below the Base DN in the
LDAP directory tree.
• Subtree: Query recursively all levels below the Base DN in the LDAP
directory tree.
Derefer Select the method to use, if any, when dereferencing attributes whose
values are references. CS: References in a specific attribute, like
member:? Or any reference?
• Never: Do not dereference.
• Always: Always dereference.
• Search: Dereference only when searching.
• Find: Dereference only when finding the base search object. CS: Base
DN?
Max alias Enter the maximum number of alias nesting levels that the FortiMail unit
expansion level will expand for lookup. Valid range is 1-12. Defult value is 1.
Use separate bind (configure the following if “Default Bind Options” on page 462 is
not desired)
Base DN Enter the distinguished name (DN) of the part of the LDAP directory tree
within which the FortiMail will search for either alias or user objects.
User or alias objects should be child nodes of this location.
Whether you should specify the base DN of either user objects or alias
objects varies by your LDAP schema style. Schema may resolve alias
email addresses directly or indirectly (using references).
• With a direct resolution, alias objects directly contain one or more
email address attributes, such as mail or rfc822MailMember,
whose values are user email addresses such as [email protected],
and that resolves the alias. The Base DN, such as
ou=Aliases,dc=example,dc=com, should contain alias objects.
• With an indirect resolution, alias objects do not directly contain an
email address attribute that can resolve the alias; instead, in the style
of LDAP group-like objects, the alias objects contain only references
to user objects that are “members” of the alias “group.” User objects’
email address attribute values, such as [email protected], actually
resolve the alias. Alias objects refer to user objects by possessing one
or more “member” attributes whose value is the DN of a user object,
such as uid=user,ou=People,dc=example,dc=com. The
FortiMail unit performs a first query to retrieve the distinguished names
of “member” user objects, then performs a second query using those
distinguished names to retrieve email addresses from each user
object. The Base DN, such as ou=People,dc=example,dc=com,
should contain user objects.
The Mail Routing Options section query occurs after recipient tagging processing. If you have
enabled recipient tagging, the Mail Routing Options section query will then be based on the
tagged recipient address. If the tagged email address does not exist for the user in the LDAP
directory, you may prefer to transform the recipient address by using the User Alias Options.
Mail host attribute Enter the name of the attribute, such as mailHost, whose
value is the fully qualified domain name (FQDN) or IP address
of the email server that stores email for the user’s email
account.
This attribute must be present in user objects.
Internal address attribute Enter the name of the LDAP attribute, such as
internalAddress, whose value is an email address in the
same or another protected domain.
This email address will be rewritten to the value of the external
address attribute according to the match conditions and
effects.
The name of this attribute may vary by the schema of your
LDAP directory.
External address attribute Enter the name of the attribute, such as externalAddress,
whose value is an email address in the same or another
protected domain.
This email address will be rewritten to the value of the internal
address attribute according to the match conditions and
effects.
The name of this attribute may vary by the schema of your
LDAP directory.
Display name attribute Enter the name of the attribute, such as displayName,
whose value is the display name of the user.
This display name will be inserted into the Header From before
the external email address. For example, Display
Name<[email protected]>.
The name of this attribute may vary by the schema of your
LDAP directory.
If the Scan Override Options query fails, the FortiMail unit will instead use the antispam,
antivirus, and content processing settings defined in the profile for that policy.
AntiSpam attribute Enter the name of the attribute, such as antispam, whose
value indicates whether or not to perform antispam
processing for that user, and which antispam profile to use.
Multiple value syntaxes are permissible. For details, see
“LDAP directory requirements for each FortiMail LDAP profile
query” on page 481.
If enabled, this attribute setting takes precedence over the
generic antispam attribute setting in the domain lookup
options (see “Configuring domain lookup options” on
page 475).
If you enable this option but leave the attribute field blank, the
antispam profile in the matched recipient-based policy will be
used.
AntiVirus attribute Enter the name of the attribute, such as antivirus, whose
value indicates whether or not to perform antivirus processing
for that user and which antivirus profile to use. Multiple value
syntaxes are permissible. For details, see “LDAP directory
requirements for each FortiMail LDAP profile query” on
page 481.
If enabled, this attribute setting takes precedence over the
generic antivirus attribute setting in the domain lookup
options (see “Configuring domain lookup options” on
page 475).
If you enable this option but leave the attribute field blank, the
antivirus profile in the matched recipient-based policy will be
used.
Content attribute Enter the name of the attribute, such as content, whose
value indicates whether or not to perform content processing
for that user and which content profile to use. Multiple value
syntaxes are permissible. For details, see “LDAP directory
requirements for each FortiMail LDAP profile query” on
page 481.
If enabled, this attribute setting takes precedence over the
generic content attribute setting in the domain lookup options
(see “Configuring domain lookup options” on page 475).
If you enable this option but leave the attribute field blank, the
content profile in the matched recipient-based policy will be
used.
Domain Lookup Enter an LDAP query filter that selects a set of domain objects,
Query whichever object class contains the attribute you configured for this
option, from the LDAP directory.
Since each domain needs a generic user in the LDAP directory, you
can specify the query filter as the following:
mail=generic@$d
Where the value of $d is the domain name.
Parent domain Enter the name of the attribute, such as parentDomain, whose value
attribute is the name of the parent domain from which a domain inherits the
specific RCPT check settings and quarantine report settings.
The name of this attribute may vary by the schema of your LDAP
directory.
Mail host attribute Enter the name of the attribute, such as mailHost, whose value is
the IP address of the backend mail server hosting the mailboxes of
the domain.
The name of this attribute may vary by the schema of your LDAP
directory.
AntiVirus attribute Enter the name of the attribute, such as genericAntivirus, whose
value is the name of the antivirus profile assigned to the domain.
The name of this attribute may vary by the schema of your LDAP
directory.
If you do not specify this attribute at all (that is, leave this field blank),
the antivirus profile in the matched recipient-based policy will be
used.
Content attribute Enter the name of the attribute, such as genericContent, whose
value is the name of the content profile assigned to the domain.
The name of this attribute may vary by the schema of your LDAP
directory.
If you do not specify this attribute at all (that is, leave this field blank),
the content profile in the matched recipient-based policy will be used.
Enable remote domain Enable to override the domain you specify when you add an
override administrator with the value of the remote attribute returned
from the LDAP server, if the returned value matches an
existing protected domain. If there is no match, the specified
domain will still be used.
Also specify the domain name attribute.
Protocol version Select the LDAP protocol version used by the LDAP server.
Clear Cache Select to empty the FortiMail unit’s LDAP query cache.
This can be useful if you have updated the LDAP directory,
and want the FortiMail unit to refresh its LDAP query cache
with the new information. CS: Missing in 4.0
TTL Enter the amount of time, in minutes, that the FortiMail unit will
cache query results. After the TTL has elapsed, cached results
expire, and any subsequent request for that information
causes the FortiMail unit to query the LDAP server, refreshing
the cache.
The default TTL value is 1440 minutes (one day). The
maximum value is 10080 minutes (one week). Entering a value
of 0 effectively disables caching.
This option is applicable only if Enable cache is enabled.
Enable webmail password Enable if you want to allow FortiMail webmail users to change
change their password
This option does not appear for FortiMail units operating in
gateway or transparent mode. Active Directory appears only if
Use secure connection is SSL.
Password schema Select your LDAP server’s user schema style, either Openldap
sic or Active Directory.
Bypass user verification if If you have selected using LDAP server to verify recipient or
server is unavailable sender address and your LDAP server is not accessible,
enabling this option will bypass the address verification
process.
Note: This option only takes effect in gateway and transparent
mode.
For more information about recipient address verification, see
“Configuring recipient address verification” on page 315.
Verify your LDAP server’s configuration for each query type that you enable and configure. For
example, if you enable mail routing queries, verify connectivity and that each user object in the
LDAP directory includes the attributes and values required by mail routing. Failure to verify
enabled queries can result in unexpected mail processing behavior.
Before modifying your LDAP directory, verify that changes will be compatible with other
applications using the directory. You may prefer to modify the LDAP profile query and/or add
new attributes than to modify existing structures that are used by other applications, in order to
reduce the likelihood of disruption to other applications. For instructions on modifying schema
or setting attribute values, consult the documentation for your specific LDAP server.
The primary goal when modifying your LDAP directory is to provide, in some way that can be
retrieved by LDAP profile queries, the information required by FortiMail features which can use
LDAP profiles. Depending on the LDAP profile queries that you enable, you may need to add to
your LDAP directory:
• user objects
• user group objects
• email alias objects
Keep in mind that for some schema styles, such as that of Microsoft ActiveDirectory, user group
objects may also play a double role as both user group objects and email alias objects. For the
purpose of FortiMail LDAP queries, email alias objects can be any object that can be used to
expand email aliases into deliverable email addresses, which are sometimes called distribution
lists.
For each of those object types, you may also need to add required attributes in a syntax
compatible with the FortiMail features that uses those attributes.
At a minimum, your LDAP directory must have user objects that each contain an email address
attribute, and the value of that email address attribute must use full email address syntax (for
example, mail: [email protected]). This attribute is required by User Query Options, a
query which is required in every LDAP profile.
Many other aspects of LDAP profiles are flexible enough to query for the required information in
more than one way. It may be sufficient to modify the query strings and other fields in the LDAP
profile to match your individual LDAP directory.
For example, the purpose of the User Query Options is to find the distinguished name (DN) of
user objects by their email addresses, represented by the FortiMail variable $m. Often user
objects can be distinguished by the fact that they are the only records that contain the
attribute-value pair objectClass: User. If the class of user name objects in your LDAP
directory is not objectClass: User but instead objectClass: inetOrgPerson, you
could either modify:
• the LDAP profile’s user query to request user objects as they are denoted on your particular
server, using objectClass=inetOrgPerson; for example, you might modify the user
query from:
(&(objectClass=User)(mail=$m))
to be:
(&(objectClass=inetOrgPerson)(mail=$m))
• the LDAP server’s schema to match the queries’ expected structure, where user objects are
defined by objectClass=User
Alternatively, perhaps there are too many user objects, and you prefer to instead retrieve only
those user objects belonging to a specific group number. In this case, you might modify the
query string from:
Table 46:LDAP directory requirements for each FortiMail LDAP profile query
User object classes mail A user’s email Query compares the email address to
such as address. the value of this attribute to find the
inetOrgPerson, matching user, and retrieve that user’s
inetLocalMailR distinguished name (DN), which is the
ecipient, User, basis for most other LDAP profile
dominoPerson. queries.
(Objects from User gidNumber Varies by Query retrieves the group name for
Query Options.) or memberOf schema. any user defined by User Query
Typically is Options.
either a group
number or the
distinguished
name (DN) of
the group.
(Objects from User mail A user’s email Query uses the DN retrieved from
Query Options.) address. groupOwner to retrieve the email
address of the user specified by that
DN.
User group object groupOwner A user object’s Query retrieves the DN of a user object
classes such as DN. from the group defined in gidNumber
group or or memberOf. CS: Requires that the
groupOfNames. value be a DN, not gidNumber? How
does this support POSIX-style LDAP?
(Objects from User userPasswo Any. Query verifies user identity by binding
Query Options.) rd with the user password for any user
defined by User Query Options.
Email alias object rfc822Mail CS: Verify. Query expands an alias to one or more
classes such as Member (for Previously user email addresses.
nisMailAlias, or alias objects) specified only
If the alias is resolved directly, this
user objects from or mail (for email address
query retrieves the email addresses
User Query user objects) format, but this
from the alias object itself. If the alias
Options, depending does not appear
is resolved indirectly, this query first
on whether your to be the correct
queries the alias object for member
schema resolves syntax for
attributes, then uses the DN of each
email aliases rfc822MailMem
member in a second query to retrieve
directly or indirectly, ber.Either the
the email addresses of those user
respectively. For user name
objects. For details, see “Base DN” on
details, see portion of an
page 471.
“Base DN” on email address
page 471. (e.g. user; for
alias objects), or
the entire email
address (e.g.
user@example
.com; for user
objects).
User group object member A user object’s Query retrieves the DN of a user object
classes such as DN, or the DN of that is a member of the group.
group or another alias
This attribute is required only if aliases
groupOfNames. object.
resolve to user email addresses
User groups are not indirectly. For details, see “Base DN”
inherently on page 471.
associated with
email aliases, but
for some schemas,
such as Microsoft
ActiveDirectory,
group objects play
the role of email
alias objects, and
are used to
indirectly resolve
email aliases. For
details, see
“Base DN” on
page 471.
(Objects from User mailHost A fully qualified Query retrieves the fully qualified
Query Options.) domain name domain name (FQDN) or IP address of
(FQDN) or IP the mail server — sometimes also
address. called the mail host — that stores
email for any user defined by User
Query Options.
(Objects from User No default A user’s internal Query retrieves the user’s internal
Query Options.) attribute email address. email address
name.
(Objects from User userPasswo Any. Query, upon successful bind using the
Query Options.) rd existing password, changes the
password for any user defined by User
Query Options.
Each LDAP profile query filter string may indicate expected value syntax by the FortiMail
variables used in the query filter string.
• $b: the query filter expects the attribute’s value to be a bind DN
• $d: the query filter expects the attribute’s value to be a domain name
• $f: the query filter expects the attribute’s value to be a sender domain name
• $m: the query filter expects the attribute’s value to be a full email address
• $s: the query filter expects the attribute’s value to be a sender email address
• $u: the query filter expects the attribute’s value to be a user name
The following example illustrates a matching LDAP directory and LDAP profile. Labels indicate
the part of the LDAP profile that is configured to match the directory schema.
Empty input The query cannot be performed until you provide the information required
by the query.
Connection The FortiMail unit could not connect to the LDAP server. The LDAP server
Failed may be unreachable, or the LDAP profile may be configured with an
incorrect IP address, port number, or secure connection setting. CS:
Missing from 4.0. Seems to have been combined with the next message.
Failed to bind The FortiMail unit successfully connected to the LDAP server, but could
with bind DN and not authenticate in order to perform the query. If the server permits
password anonymous queries, the Bind DN and Bind password you specified in
User Query Options section should be blank. Otherwise, you must enter a
valid bind DN and its password.
Unable to found The FortiMail unit successfully connected to the LDAP server, and, if
sic user DN that configured, bound, but could not find a user whose email address
matches mail attribute matched that value. The user may not exist on the LDAP server
address in the Base DN and using the query filter you specified in User Query
Options, or the value of the user’s email address attribute does not match
the value that you supplied in Mail address.
Unable to find The FortiMail unit successfully located a user with that email address, but
LDAP group for their group membership attribute did not match your supplied value. The
user group membership attribute you specified in Group Query Options may
not exist, or the value of the group membership attribute may not match
the value that you supplied in Group DN. If the value does not match,
verify that you have supplied the Group DN according to the syntax
expected by both your LDAP server and your configuration of Group
Query Options.
Group owner The FortiMail unit successfully connected to the LDAP server, but could
query failure not find a group whose distinguished name matched that value. The
group may not exist on the LDAP server, or the value of the group’s
distinguished name attribute does not match the value that you supplied
in Group DN.
CS: Add error The FortiMail unit successfully located the group, but .
messages for
being unable to
find the group
owner attribute,
user represented
by that DN, or
their email
address
Authentication CS: Sometimes this message appears instead of the next one in 4.0. Not
failure sure why. Is is cache-related? Also not sure why this sometimes appears
when the password and email address are CORRECT???
Failed to bind The FortiMail unit successfully located a user with that email address, but
the user’s bind failed and the FortiMail unit was unable to authenticate the
user. Binding may fail if the value of the user’s password attribute does not
match the value that you supplied in Old password. If this error message
appears when testing Change Password, it also implies that the query
failed to change the password.
Unable to find The FortiMail unit was unable to find the email alias. The email address
mail alias alias may not exist on the LDAP server in the Base DN and using the
query filter you specified in User Alias Options, or the value of the alias’
email address attribute does not match the value that you supplied in Mail
address. CS: MR5 If this is the only message that appears, it could not
connect. If this appears after a connection and bind success message, it
connected, but could not locate the alias.
CS: Add error The FortiMail unit successfully located a user with that email address, but
messages for .
being unable to
find the mail host
and mail routing
address
attributes
CS: Add error The FortiMail unit successfully located a user with that email address, but
messages for .
being unable to
find the AS/AV
attributes
CS: Add error The FortiMail unit successfully located a user with that email address, but
messages for .
being unable to
find the int/ext
address
Error for LDAP The FortiMail unit failed to change the email user’s password. Verify that
user profile ID you have entered the correct existing password in Old password.
Only use an email account whose password it is acceptable to change, and make note of the
new password. Verifying the Webmail Password Options query configuration performs a real
password change, and does not restore the previous password after the query has been
verified.
Canadian SIN Canadian Social Insurance Number. The format is three groups of three digits,
such as 649 242 666.
US SSN United States Social Security number. The format is a nine digit number, such
as 078051111.
ABA Routing A routing transit number (RTN) is a nine digit bank code, used in the United
States, which appears on the bottom of negotiable instruments such as
checks identifying the financial institution on which it was drawn.
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Policy category. For details, see “About administrator account
permissions and domains” on page 179.
Export Select one dictionary check box and click Export. Follow the prompts to
(button) save the dictionary file.
Note that you can only export one dictionary at a time.
Import Select one dictionary check box and then click the import button to import
(button) dictionary entries into the existing dictionary. In the dialog, click Browse to
locate a dictionary in text format. Click OK to upload the file.
Note that you can only select one dictionary at a time and you can only
import dictionary entries into an existing dictionary.
Pattern Type a word or phrase that you want the dictionary to match,
expressed either verbatim, with wild cards, or as a regular expression.
Regular expressions do not require slash ( / ) boundaries. For
example, enter:
v[i1]agr?a
Matches are case insensitive and can occur over multiple lines as if
the word were on a single line. (That is, Perl-style match modifier
options i and s are in effect.)
The FortiMail unit will convert the encoding and character set into
UTF-8, the same encoding in which dictionary patterns are stored,
before evaluating an email for a match with the pattern. Because of
this, your pattern must match the UTF-8 string, not the originally
encoded string. For example, if the original encoded string is:
=?iso-8859-1?B?U2UgdHJhdGEgZGVsIHNwYW0uCg==?=
the pattern must match:
Se trata del spam.
Entering the pattern *iso-8859-1* would not match.
This option is not editable for predefined patterns.
Pattern weight Enter a number by which an email’s dictionary match score will be
incremented for each word or phrase it contains that matches this
pattern.
The dictionary match score may be used by content monitor profiles
and antispam profiles to determine whether or not to apply the
content action. For more information about antispam profiles, see
“Configuring dictionary options” on page 422.CS: Verify. For more
information about content monitor profiles, see “Configuring content
monitor and filtering” on page 442.
Pattern max Enter the maximum by which matches of this pattern can contribute
weight to an email’s dictionary match score. CS: Verify.
This option applies only if Enable pattern max weight limit is enabled.
Enable pattern Enable if the pattern must not increase an email’s dictionary match
max weight limit score more than the amount configured in Pattern max weight.
Create New Select the name of a protected domain from Select Domain, then click
Create New to add a dictionary for that protected domain.
Note: If you have not yet configured a protected domain, new
dictionary groups will by default be assigned to the system domain. For
more information on protected domains, see “Configuring protected
domains” on page 229.
Clone Click the row corresponding to the profile whose settings you want to
duplicate when creating the new profile, then click Clone. A single-field
(button)
dialog appears. Enter a name for the new profile. Click OK.
Group Name Displays the name of the dictionary group or dictionary group item.
Go to Profile > Security to create transport layer security (TLS) profiles and encryption profiles.
This section includes:
• Configuring TLS security profiles
• Configuring encryption profiles
Clone Click the row corresponding to the profile whose settings you want to
duplicate when creating the new profile, then click Clone. A single-field
(button)
dialog appears. Enter a name for the new profile. Click OK.
Encryption The bit size of the encryption key. Greater key size results in stronger
Strength encryption, but requires more processing resources.
This option does not apply and will be empty for profiles whose TLS Level
is None or Preferred.
CA Issuer The type of the match, and the text that the CA Issuer field of the server’s
certificate must match.
This text must correlate to a CA certificate that you have installed on the
FortiMail unit. For information on installing CA certificates, see “Managing
certificate authority certificates” on page 198.
The text is prefixed by a letter that indicates the type of the match that you
have configured in the profile:
• E: The text of the CA Issuer field must equal this value exactly.
• S: The text of the CA Issuer field must contain this value.
• W: The text of the CA Issuer field must be similar to this value in the
pattern indicated by wild cards.
This option does not apply and will be empty for profiles whose TLS Level
is not Secure. It may also be empty if you have not configured the TLS
profile to require a specific CA Issuer.
Action On Failure Indicates the action the FortiMail unit takes when a TLS connection cannot
be established, either:
• Temporarily Fail: Reply to the SMTP client with a code indicating
temporary failure. CS: SMTP error code.
• Fail: Reject the email and reply to the SMTP client with SMTP reply code
550. CS: Verify.
This option does not apply and will be empty for profiles whose TLS Level
is Preferred.
(Green dot in Indicates whether or not the entry is currently referred to by another item in
column heading) the configuration. If another item is using this entry, a red dot appears in
this column, and the entry cannot be deleted.
Check CA issuer Enable and enter a string on the CA issuer field. The
FortiMail unit will compare the string in the CA issuer field
with the field with that same name in the installed CA
certificates.
This option appears only if TLS level is Secure.
CA issuer Select the type of match required when the FortiMail unit
compares the string in the CA Issuer field and the same
field in the installed CA certificates. For more information
on CA certificates, see “Managing certificate authority
certificates” on page 287.
Check CA issuer must be enabled for CA issuer to have any
effect.
This option appears only if TLS level is Secure.
Check certificate subject Enable and enter a string in the Certificate subject field. The
FortiMail unit will compare the string in the Certificate
subject field with the field with that same name in the
installed CA certificates.
This option appears only if TLS level is Secure.
Certificate Select the type of match required when the FortiMail unit
subject compares the string in the Certificate subject and the same
field in the installed CA certificates.
Check certificate subject must be enabled for Certificate
subject to have any effect.
This option appears only if TLS level is Secure.
Minimum Enter the bit size of the encryption key. Greater key size
encryption results in stronger encryption, but requires more
strength processing resources.
Clone Click the row corresponding to the profile whose settings you
want to duplicate when creating the new profile, then click
(button)
Clone. A single-field dialog appears. Enter a name for the new
profile. Click OK.
Protocol Displays the protocol used for this profile, S/MIME or IBE.
Encryption Algorithm Displays the encryption algorithm that will be used to encrypt
the email ( AES 128, AES 192, AES 256, CAST5 128, or Triple
DES).
Action For S/MIME, the actions are Encrypt, Sign, or Encrypt and Sign.
For IBE, the action will be Encrypt only.
Action On Failure Indicates the action the FortiMail unit takes when S/MIME or IBE
cannot be used:
• Drop and send DSN: Send a delivery status notification (DSN)
email to the sender’s email address, indicating that the email
is permanently undeliverable.
• Send plain message: Deliver the email without encryption.
• Enforce TLS: If the TLS level in the TLS profile selected in the
message delivery rule is Encrypt or Secure, the FortiMail unit
will not do anything. If the message delivery rule has no TLS
profile or the TLS level in its profile is None or Preferred, the
FortiMail unit will enforce the Encrypt level. For more
information, see “Configuring delivery rules” on page 374
and “Configuring TLS security profiles” on page 495.
IBE Action Displays the action used by the mail recipients to retrieve IBE
messages.
• Push: A notification and a secure mail is delivered to the
recipient who needs to go to the FortiMail unit to open the
message. The FortiMail unit does not store the message.
• Pull: A notification is delivered to the recipient who needs to
go to the FortiMail unit to open the message. The FortiMail
unit stores the message.
Max Push Size (KB) Displays the settings of the maximum message size (KB) of the
secure mail delivered (or pushed) to the recipient.
If the message exceeds the size limit, it will be delivered with the
Pull method.
(Green dot in column Indicates whether or not the entry is currently referred to by
heading) another item in the configuration. If another item is using this
entry, a red dot appears in this column, and the entry cannot be
deleted.
If the email to be encrypted is matched both by the message delivery rule and the policy, the
email will be encrypted based on the content profile in the policy.
2. On FortiMail unit B:
• import the CA certificate. For details, see “Managing certificates” on page 279.
• create a certificate binding for the incoming email and import both FortiMail unit B’s
private key and certificate to decrypt the email encrypted by FortiMail unit A using
FortiMail unit B’s public key.
Configuring IP pools
The Profile > IP Pool tab displays the list of IP pool profiles.
IP pools define a range of IP addresses, and can be used in multiple ways:
• To define destination IP addresses of multiple protected SMTP servers if you want to load
balance incoming email between them (see “Relay type” on page 313)
• To define source IP addresses used by the FortiMail unit if you want outgoing email to
originate from a range of IP addresses (see “IP pool” on page 326)
• To define destination addresses used by the FortiMail unit if you want incoming email to
destine to the virtual host on a range of IP addresses (see “IP pool” on page 326)
• An IP pool in an IP policy will be used to deliver incoming emails from FortiMail to the
protected server. It will also be used to deliver outgoing emails if the sender domain doesn't
have a delivery IP pool or, although it has a delivery IP pool, Take precedence over recipient
based policy match is enabled in the IP-based policy.
• An IP pool (either in an IP policy or domain settings) will NOT be used to deliver emails to the
protected domain servers if the mail flow is from internal to internal domains.
• When an email message’s MAIL FROM is empty "<>", normally the email is a NDR or DSN
bounced message. FortiMail will check the IP address of the sender device against the IP list
of the protected domains. If the sender IP is found in the protected domain IP list, the email
flow is considered as from internal to internal and the above rule is applied (the IP pool will
be skipped). FortiMail will also skip the DNS query if servers of the protected domains are
configured as host names and MX record.
Pool name Enter a name. The name must contain only alphanumeric
characters, hyphens ( - ) and underscores ( _ ). Spaces are not
allowed.
SMTP Certificate If you want to bind a certificate to this IP pool profile for TLS
purpose, under SMTP Certificate, select a certificate and specify
if the certificate will be used for mail receiving, delivery, or both.
For example, if FortiMail protects several mail servers for several
customers, you may want to bind the customer’s own certificate
to the customer’s IP pool.
SMTP Session By default, FortiMail uses its system host name as the greeting
name in the SMTP sessions. In some cases, for example, when
different IP pools are bound to different domains, you may want
to use different host names for different IP pools. To to this,
under SMTP Session, select Use other name and specify the
host name to use. This setting is applicable when FortiMail is
connecting as a server or a client.
To apply the IP pool, select it when configuring a protected domain (you can use the IP pool
for delivering and/or receiving directions) or when configuring an IP-based policy. For details,
see “IP pool” on page 326, and/or “IP Pool” on page 380.
The Profile > Group tab displays the list of email and IP group profiles.
To access this part of the web UI, your administrator account’s:
• Domain must be System
• access profile must have Read or Read-Write permission to the Policy category.
For details, see “About administrator account permissions and domains” on page 179.
To remove a member’s email address, select the address in the Current members field and click
<-.
Configuring IP groups
IP groups include groups of IP addresses that can be used when configuring access control
rules and IP-based policies. For information about access control rules and polices, see
“Configuring access control rules” on page 366 and “Controlling email based on IP addresses”
on page 378.
To configure an IP group
1. Go to Profile > Group > IP Group.
2. Either click New to add a profile or double-click profile to modify it.
A dialog appears.
3. For a new group, enter a name in Group name.
The name must contain only alphanumeric characters. Spaces are not allowed.
4. Under IP Groups, click New.
A field appears under IP/Netmask or IP Range.
5. Enter the IP address and netmask of the group, or the IP range. Use the netmask, the portion
after the slash (/), to specify the matching subnet.
For example, enter 10.10.10.10/24 to match a 24-bit subnet, or all addresses starting
with 10.10.10. This will appear as 10.10.10.0/24 in the access control rule table, with the 0
indicating that any value is matched in that position of the address.
Similarly, 10.10.10.10/32 will appear as 10.10.10.10/32 and match only the 10.10.10.10
address.
To match any address, enter 0.0.0.0/0.
6. Click Create.
When FortiMail takes actions against email messages, you may wan to inform email senders,
recipients, or any other users of the actions, that is, what happened to the email.
To achieve this purpose, you need to create such kind of notification profiles and then use them
in antispam, antivirus, and content action profiles. For details, see “Configuring antispam action
profiles” on page 427, “Configuring antivirus action profiles” on page 433, and “Configuring
content action profiles” on page 446.
FortiMail comes with an authentication mechanism to block IP addresses if failed login attempts
from that IP address reach the threshold.
You can control access to FortiMail by access types:
• CLI: access via SSH
• Mail: mail access via SMTP(S), IMAP(S), POP3(S)
• Web: admin and webmail access via HTTP(S)
The blocking duration is based on the login history of the IP address. The more the IP address
has been blocked in the past, the longer the IP address will be blocked. The maximum time an
IP address can be blocked is 45 days. For example, if you set the initial block period to 10
minutes, depending on the user’s number of violations, the actual maximum block time can be
up to 2 hours. If you set it to 30 minutes, the actual block time can be up to 12 hours. If you set
it to more than 70 minutes, the actual block time can be up to 45 days. Therefore, to avoid false
positives, it is not recommended to use longer initial block time setting. The recommended
setting is less than 30 minutes. The default setting is 10 minutes.
If a user has consecutive successful logins within a peoriod of time, the user’s IP address will be
automatically added to an auto/dynamic exempt list.
You can also manually exempt IP addresses from failed login attempt tracking and blocking.
To monitor the blocked IP address information, go to Monitor > Reputation > Authentication
Reputation. See “Viewing authentication reputation statuses” on page 154.
Access Tracking Enable or disable what types of login access will be tracked: CLI, Mail
or Web.
Initial block period Specify how long the IP address will be blocked after its failed login
attempts reach the threshold for the first time. The actual block time
will be increased for repeated offenders. See above for more
descriptions.
The Quarantine submenu lets you configure quarantine settings, and to configure system-wide
settings for quarantine reports.
Using the email quarantine feature involves the following steps:
• First, enable email quarantine when you configure antispam action profiles (see “Configuring
antispam action profiles” on page 427) and content action profiles (see “Configuring content
action profiles” on page 446).
• Configure the system quarantine administrator account who can manage the system
quarantine. See “Configuring the system quarantine setting” on page 515.
• Configure the quarantine control accounts, so that email users can send email to the
accounts to release or delete email quarantines. See “Configuring the quarantine control
options” on page 516.
• Configure system-wide quarantine report settings, so that the FortiMail unit can send reports
to inform email users of the mail quarantines. Then the users can decide if they want to
For the quarantine report schedule to take effect, you must enable the quarantine action in the
antispam and/or content action profile first. For details, see “Configuring antispam action
profiles” on page 427 and “Configuring content action profiles” on page 446. For general steps
about how to use email quarantine, see “Configuring email quarantines and quarantine reports”
on page 507.
FortiMail units send quarantine reports to notify email users when email is quarantined to their
per-recipient quarantine. If no email messages have been quarantined to the per-recipient
quarantine folder in the period since the previous quarantine report, the FortiMail unit does not
send a quarantine report.
In addition to the system-wide quarantine report settings, you can configure some quarantine
report settings individually for each protected domain, including whether the FortiMail unit will
send either or both plain text and HTML format quarantine reports. For more information about
domain-wide quarantine report settings, see “Quarantine Report Setting” on page 319.
Starting from v4.1, domain-wide quarantine report settings are independent from the
system-wide quarantine report settings.
However, in older releases, domain-wide quarantine report settings are a subset of the
system-wide quarantine report settings. For example, if the system settings for schedule
include only Monday and Thursday, when you are setting the schedule for the quarantine
reports of the protected domain, you can only select Monday or Thursday.
For information on the contents of the plain text and HTML format quarantine report, see “About
the plain text formatted quarantine report” on page 510 and “About the HTML formatted
quarantine report” on page 512.
To access this part of the web UI, your administrator account’s:
• Domain must be System
• access profile must have Read or Read-Write permission to the Quarantine category.
For details, see “About administrator account permissions and domains” on page 179.
Schedule
These hours Select the hours of the day during which you want the
FortiMail unit to generate quarantine reports.
These days Select the days of the week during which you want the
FortiMail unit to generate quarantine reports.
Template
Webmail
Access Setting
Web release Enter a host name for the FortiMail unit that will be used
host name/IP for web release links in quarantine reports (but not
email release links). If this field is left blank:
• If the FortiMail unit is operating in gateway mode or
server mode, web release and delete links in the
quarantine report will use the fully qualified domain
name (FQDN) of the FortiMail unit.
• If the FortiMail unit is operating in transparent mode,
web release and delete links in the quarantine report
will use the FortiMail unit’s management IP address.
For more information, see “About the management
IP” on page 161.
Configuring an alternate host name for web release and
delete links can be useful if the local domain name or
management IP of the FortiMail unit is not resolvable
from everywhere that email users will use their
quarantine reports. In that case, you can override the
web release link to use a globally resolvable host name
or IP address.
3. In the Quarantine Report Recipient Setting section, double-click a domain name to modify
its related settings.
A dialog appears.
4. Configure the following and click OK.
The contents of quarantine reports are customizable. For more information, see “Customizing
GUI, replacement messages, email templates, and SSO” on page 220.
Report content
Instructions Actions:
for deleting
o) Release a message: Send an email to
or releasing
<[email protected]> with subject line set to
quarantined
"[email protected]:Message-Id".
email
o) Delete a message: Send an email to
<[email protected]> with subject line set to
"[email protected]:Message-Id".
o) Delete all messages: Send an email to
<[email protected]> with subject line set to
"delete_all:[email protected]:e4d46814:ac146004:05737c7c11
1d68d0111d68d0111d68d0".
The contents of quarantine reports are customizable. For more information, see “Customizing
GUI, replacement messages, email templates, and SSO” on page 220.
Web
release and
web delete
links
Email
release and
email delete
links, if
Report content
Email Actions:
Click on Release link to send an email to have the message
sent to your inbox.
Click on Delete link to send an email to delete the
message from your quarantine.
Click here to send an email to Delete all messages from
your quarantine.
Other:
To view your entire quarantine inbox or manage your
preferences, Click Here
Figure 41:Releasing an email from the per-recipient quarantine using email release
Release
quarantine
control account
Subject line
containing email
address of
original recipient
and
Message-Id:,
separated by a
colon (:)
Quarantine control email addresses are configurable. For information, see “Configuring the
quarantine control options” on page 516.
Web release links may be configured to expire after a period of time, and may or may not require
the recipient to log in to the FortiMail unit. For more information, see “Configuring global
quarantine report settings” on page 508.
For more information on the differences between plain text and HTML format quarantine
reports, see “About the plain text formatted quarantine report” on page 510 and “About the
HTML formatted quarantine report” on page 512.
Account Settings
Account Enter the user name of the system quarantine account. You can use
this account to view the system quarantine via an IMAP email client.
Forward to Enter an email address to which the FortiMail unit will forward a copy
of each email that is quarantined to the system quarantine.
Quarantine Folders
Enable folder Enable to rotate the folders according to the interval settings below.
rotation
Rotation interval Enter the maximum amount of time that the current system quarantine
(days) mailbox (Inbox) will be used. When the mailbox reaches this time, the
FortiMail unit renames the current mailbox based on its creation date
and rename date, and creates a new Inbox mailbox.
New Click to create a new folder. When creating a folder, also specify the
retention time (in days) and the administrators who are allowed to
access the quarantine folder. The retention time determines how long
the quarantined email will saved in the folder before it get deleted.
The Security > Block/Safe List submenu lets you reject, discard, or allow email messages based
on email addresses, domain names, and IP addresses. It also lets you back up and restore the
block lists and safe lists.
Multiple types of block lists and safe lists exist: system-wide, per-domain, per-user, and
per-session profile. There are several places in the web UI where you can configure these block
lists and safe lists.
• For system-wide, per-domain, and per-user block lists and safe lists, go to Security >
Block/Safe List. For details, see “Configuring the global block and safe list” on page 519,
“Configuring the per-domain block lists and safe lists” on page 521, and “Configuring the
personal block lists and safe lists” on page 523.
• For per-user block lists and safe lists, you can alternatively go to Domain & User > User >
User Preferences. For details, see “Configuring user preferences” on page 332.
• For session profile block lists and safe lists, go to Profile > Session > Session and modify the
session profile. For details, see “Configuring session profiles” on page 392.
In addition to FortiMail administrators being able to configure per-user block lists and safe lists,
email users can configure their own per-user block list and safe list by going to the Preferences
tab in FortiMail webmail. For more information, see the online help for FortiMail webmail.
For more information on order of execution, see “Order of execution of block lists and safe lists”
on page 517.
All block and safe list entries are automatically sorted into alphabetical order, where wildcard
characters (* and ?) and numbers sort before letters.
• Order of execution of block lists and safe lists
• About block list and safe list address formats
• Configuring the global block and safe list
• Configuring the per-domain block lists and safe lists
• Configuring the personal block lists and safe lists
• Configuring the block list action
2 System block list Sender address, Client Invoke block list action
IP
4 Domain block list Sender address, Client Invoke block list action
IP
7 Session sender safe list Sender address, Client Accept message for all recipients
IP
8 Session sender block Sender address, Client Invoke block list action
list IP
9 User safe list Sender address, Client Accept message for this recipient
IP
You can alternatively back up all system-wide, per-domain, and per-user block and safe lists
together. For details, see “Backup and restore” on page 299.
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Block/Safe List category. For details, see “About administrator
account permissions and domains” on page 179.
Domain administrators can access the global block list and global safe list, and therefore could
affect domains other than their own. If you do not want to permit this, do not provide
Read-Write permission to the Block/Safe List category in domain administrators’ access profile.
To view the global block list or safe list, go to Security > Block/Safe List > System. The page
displays two links:
• Block List
• Safe List
Back up the block list and safe list before beginning this procedure. Restoring the block list and
safe list overwrites any existing block or safe list.
You can alternatively back up all system-wide, per-domain, and per-user block lists and safe
lists together. For details, see “Backup and restore” on page 299.
Use block and safe lists with caution. They are simple and efficient tools for fighting spam and
enhancing performance, but can also cause false positives and false negatives if not used
carefully. For example, a safe list entry of *.edu would allow all email from the .edu top level
domain to bypass the FortiMail unit's other antispam scans.
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Block/Safe List category. For details, see “About administrator
account permissions and domains” on page 179.
Domain Displays the name of the protected domain to which the block list and
safe list belong.
For more information on protected domains, see “Configuring protected
domains” on page 310.
Block List Click the List icon to display, modify, back up, or restore the block list for
the protected domain.
Safe List Click the List icon to display, modify, back up, or restore the safe list for
the protected domain.
Back up the block list and safe list before beginning this procedure. Restoring the block list and
safe list overwrites any existing block list or safe list.
In addition to FortiMail administrators configuring per-user block lists and safe lists, email users
can configure their own per-user block list and safe list by going to the Preferences tab in
FortiMail webmail. For more information, see the online help for FortiMail webmail.
Use block and safe lists with caution. They are simple and efficient tools for fighting spam and
enhancing performance, but can also cause false positives and false negatives if not used
carefully. For example, a safe list entry of *.edu would allow all email from the .edu top level
domain to bypass the FortiMail unit's other antispam scans.
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Block/Safe List category. For details, see “About administrator
account permissions and domains” on page 179.
Add outgoing Click On to automatically add the recipient email addresses of outgoing
email addresses email messages to this email user’s per-user safe list.
to Safe list
Block/Safe lists Click Block to display, modify, back up, or restore the block list for this
email user.
Click Safe to display, modify, back up, or restore the safe list for this
email user.
If you add the user’s email address to the same user’s personal safe list, the FortiMail unit will
ignore this entry. This is a precautious measure taken to guard against spammers from sending
spam in disguise of that user’s email address as the sender address.
You can alternatively back up all system-wide, per-domain, and per-user block lists and safe
lists together. For details, see “Backup and restore” on page 299.
Back up the block list and safe list before beginning this procedure. Restoring the block list and
safe list overwrites any existing block list or safe list.
For the personal level block lists, the only option is to discard. For more information, see
“Configuring the personal block lists and safe lists” on page 523.
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Block/Safe List category. For details, see “About administrator
account permissions and domains” on page 179.
Domain administrators can configure the block list action, and therefore could affect domains
other than their own. If you do not want to permit this, do not provide Read-Write permission to
the Block/Safe List category in domain administrators’ access profile.
Configuring greylisting
About greylisting
Greylist scanning blocks spam based on the behavior of the sending server, rather than the
content of the messages. When receiving an email from an unknown server, the FortiMail unit
will temporarily reject the message. If the mail is legitimate, the originating server will try to send
it again later (RFC 2821), at which time the FortiMail unit will accept it. Spammers will typically
abandon further delivery attempts in order to maximize spam throughput.
Advantages of greylisting include:
• Greylisting is low-maintenance, and does not require you to manually maintain IP address
lists, block lists or safe lists, or word lists. The FortiMail unit automatically obtains and
maintains the required information.
• Spam blocked by greylisting never undergoes other antispam scans. This can save
significant amounts of processing and storage resources. For this reason, enabling
greylisting can improve FortiMail performance.
• Even if a spammer adapts to greylisting by retrying to send spam, the greylist delay period
can allow time for FortiGuard Antispam and DNSBL servers to discover and blocklist the
spam source. By the time that the spammer finally succeeds in sending the email, other
antispam scans are more likely to recognize it as spam.
Continue processing
the message
Reset TTL
End greylist routine of matching
greylist entry
Yes Yes
Yes Yes
Yes Yes
Yes Yes
Yes No
No
Greylisting is omitted if the matching access control rule’s Action is RELAY. For more
information on antispam features’ order of execution, see “Order of execution” on page 16.
When an SMTP client first attempts to deliver an email message through the FortiMail unit, the
greylist scanner examines the email message’s combination of:
• sender email address in the message envelope (MAIL FROM:)
• recipient email address in the message envelope (RCPT TO:)
• IP address of the SMTP client
The greylist scanner then compares the combination of those attributes to manual and
automatic greylist entries. The greylist scanner evaluates the email for matches in the following
order:
1. manual greylist entries, also known as exemptions (see “Manual greylist entries” on
page 530)
2. consolidated automatic greylist entries, also known as autoexempt entries (see “Automatic
greylist entries” on page 529)
For more information on the types of greylist entries, see “Automatic greylist entries” on
page 529 and “Automatic greylist entries” on page 529.
According to the match results, the greylist scanner performs one of the following:
• If a matching entry exists, the FortiMail unit continues with other configured antispam scans,
and will accept the email if no other antispam scan determines that the email is spam. For
automatic greylist entry matches, each accepted subsequent email also extends the expiry
date of the automatic greylist entry according to the configured time to live (TTL). (Automatic
greylist entries are discarded if no additional matching email messages are received by the
expiry date.)
• If no matching entry exists, the FortiMail unit creates a pending individual automatic greylist
entry (see “Viewing the pending and individual automatic greylist entries” on page 148) to
note that combination of sender, recipient, and client addresses, then replies to the SMTP
client with a temporary failure code. During the greylist delay period after the initial delivery
attempt, the FortiMail unit continues to reply to delivery attempts with a temporarily failure
code. To confirm the pending automatic greylist entry and successfully send the email
message, the SMTP client must retry delivery during the greylist window: after the delay
period, but before the expiry of the pending entry.
Subsequent email messages matching a greylist entry are accepted by the greylist scanner
without being subject to the greylisting delay.
For information on how the greylist scanner matches email messages, see “Matching greylist
entries” on page 528. For information on configuring the greylisting delay, window, and entry
expiry/TTL, see “Configuring the grey list TTL and initial delay” on page 530.
If an email message matches a manual greylist entry, it is not subject to automatic greylisting
and the FortiMail unit will not create an entry in the greylist or autoexempt list.
After a greylist entry is consolidated, both the consolidated entry and the original greylist entry
will coexist for the length of the greylist TTL. Because email messages are compared to the
autoexempt list before the greylist, subsequent matching email will reset only the expiry date of
the autoexempt list entry, but not the expiry date of the original greylist entry. Eventually, the
original greylist entry expires, leaving the automatic greylist entry.
TTL Enter the time to live (TTL) that determines the maximum amount of time
that unused automatic greylist entries will be retained.
Expiration dates of automatic greylist entries are determined by the
following two factors:
• Initial expiry period: After a greylist entry passes the greylist delay
period and its status is changed to PASSTHROUGH, the entry’s
initial expiry time is determined by the time you set with the CLI
command set greylist-init-expiry-period under config
antispam settings. The default initial expiry time is 4 hours. If the
initial expiry time elapses without an email message matching the
automatic greylist entry, the entry expires. But the entry will not be
removed.
• TTL: Between the entry’s PASSTHROUGH time and initial expiry
time, if the entry is hit again (the sender retries to send the message
again), the entry’s expiry time will be reset by adding the TTL value
(time to live) to the message’s “Received” time. Each time an email
message matches the entry, the life of the entry is prolonged; in this
way, entries that are in active use do not expire. If the TTL elapses
without an email message matching the automatic greylist entry, the
entry expires. But the entry will not be removed.
For more information on automatic greylist entries, see “Viewing the
greylist statuses” on page 147.
You can use the CLI to change the default 4 hour greylist window. For more information, see the
CLI command set greylist-init-expiry-period under config antispam
settings in the FortiMail CLI Reference.
Greylisting is omitted if the matching access control rule’s Action is RELAY. For more
information on antispam features’ order of execution, see “Order of execution” on page 16.
For more information on the automatic greylisting process, see “About greylisting” on page 526.
For more information on manual greylist entries, see “Manual greylist entries” on page 530.
To access this part of the web UI, your administrator account’s:
• Domain must be System
• access profile must have Read or Read-Write permission to the Policy category
For details, see “About administrator account permissions and domains” on page 179.
Sender Pattern Displays the pattern that defines a matching sender address in the
message envelope (MAIL FROM:).
The prefix to the pattern indicates whether or not the Regular
expression option is enabled for the entry.
• R/: Regular expressions are enabled.
• -/: Regular expressions are not enabled, but the pattern may use
wild cards (* or ?).
Recipient Pattern Displays the pattern that defines a matching recipient address in the
message envelope (RCPT TO:).
The prefix to the pattern indicates whether or not the Regular
expression option is enabled for the entry.
• R/: Regular expressions are enabled.
• -/: Regular expressions are not enabled, but the pattern may use
wild cards (* or ?).
Sender Displays the IP address and netmask that defines SMTP clients (the last
IP/Netmask hop address) that match this entry.
0.0.0.0/0 matches all SMTP client IP addresses.
Reverse DNS Displays the pattern that defines a matching result when the FortiMail
Pattern unit performs the reverse DNS lookup of the IP address of the SMTP
client.
The prefix to the pattern indicates whether or not the Regular
expression option is enabled for the entry.
• R/: Regular expressions are enabled.
• -/: Regular expressions are not enabled, but the pattern may use
wild cards (* or ?).
Sender pattern Enter the pattern that defines a matching sender email address in
the message envelope (MAIL FROM:). To match any sender email
address, enter either *, or, if Regular expression is enabled, .*.
You can create a pattern that matches multiple addresses either
by:
• including wild card characters (* or ?). An asterisk (*) matches
one or more characters; a question mark (?) matches any
single character.
• using regular expressions. You must also enable the Regular
expression option.
For example, entering the pattern ??@*.com will match messages
sent by any sender with a two-letter user name from any “.com”
domain.
Regular For any of the pattern options, select the accompanying Regular
expression expression check box if you entered a pattern using regular
expression syntax.
Recipient pattern Enter the pattern that defines a matching recipient address in the
message envelope (RCPT TO:). To match any recipient email
address, enter either *, or, if Regular expression is enabled, .*.
You can create a pattern that matches multiple addresses either
by:
• including wild card characters (* or ?). An asterisk (*) matches
one or more characters; a question mark (?) matches any
single character.
• using regular expressions. You must also enable the Regular
expression option.
For example, entering the pattern *@example.??? will match
email sent to any recipient at example.com, example.net,
example.org, or any other “example” top level domain.
Sender IP/Netmask Enter the IP address and netmask that defines SMTP clients that
match this entry.
To match any SMTP client IP address, enter 0.0.0.0/0.
You can create a pattern that matches multiple addresses by
entering any bit mask other than /32.
For example, entering 10.10.10.10/24 would match the 24-bit
subnet of IP addresses starting with 10.10.10, and would appear
in the list of manual greylist entries as 10.10.10.0/24.
Reverse DNS pattern Enter the pattern that defines valid host names for the IP address
of the SMTP client (the last hop address).
Since the SMTP client can use a fake self-reported host name in
its SMTP greeting (EHLO/HELO), you can use a reverse DNS
lookup of the SMTP client’s IP address to get the real host name of
the SMTP client. Then the FortiMail greylist scanner can compare
the host name resulting from the reverse DNS query with the
pattern that you specify. If the query result matches the specified
pattern, the greylist exempt rule will apply, Otherwise, the rule will
not apply.
You can create a pattern that matches multiple addresses either
by:
• including wild card characters (* or ?). An asterisk (*) matches
one or more characters; a question mark (?) matches any
single character.
• using regular expressions. You must also enable the Regular
expression option.
For example, entering the pattern mail*.com will match
messages delivered by an SMTP client whose host name starts
with “mail” and ending with “.com”.
No pattern can be left blank in a greylist exempt rule. To have the FortiMail unit ignore a
pattern, enter an asterisk (*) in the pattern field. For example, if you enter an asterisk in the
Recipient Pattern field and do not enable Regular Expression, the asterisk matches all
recipient addresses. This eliminates the recipient pattern as an item used to determine if the
rule matches an email message.
Rule 1
Example Corporation has a number of foreign offices. Email from these offices does not need to
be greylisted.The IP addresses of email servers in the foreign offices vary, though their host
names all begin with “mail” and end with “example.com”.
Rule 2
Example Corporation works closely with a partner organization, Example Org, whose email
domain is example.org. Email from the example.org email servers does not need to be
greylisted. The IP addresses of email servers for example.org are within the 172.20.120.0/24
subnet, and have a host name of mail.example.org.
Rule 2 uses the recipient pattern, sender IP/ netmask, and reverse DNS pattern to exempt from
the automatic greylisting process all email messages that are sent to recipients at example.com
by any email server whose IP address is between 172.20.120.1 and 172.20.120.255 and whose
host name is mail.example.org.
If you want to exempt URLs from FortiGuard URI and web filter (see “Configuring FortiGuard
options” on page 416), FortiGuard URI protection ( see “Configuring FortiGuard URI click
protection service” on page 296), FortiSandbox scanning (see “Using FortiSandbox antivirus
inspection” on page 289), you can add the URLs to the exempt list.
The Bounce Verification submenu lets you configure bounce address tagging and verification.
Spammers sometimes fraudulently use others’ email addresses as the sender email address in
the message envelope (MAIL FROM:) when delivering spam. When an email cannot be
delivered, email servers often return a a delivery status notification (DSN) message, sometimes
also known as a bounce message, to the sender email address located in the message
envelope.
While DSNs are normally useful in notifying email users when an email could not be delivered, in
this case, it could result in delivery of a DSN to an email user who never actually sent the
original message. Because the invalid bounce message is from a valid email server, it can be
difficult to detect as invalid.
You can combat this problem with bounce address tagging and verification. If the FortiMail unit
tags outgoing email, it can verify the tags of incoming bounce messages to guarantee that the
bounce message is truly in reply to a previous outgoing email.
Bounce address tagging is applied to the sender email address in the message envelope only; it
is not applied to the sender email address in the message header.
If the email server for the recipient email domain cannot deliver the email, it will send a bounce
message whose recipient is the tagged email address. When the bounce message arrives at the
FortiMail unit, it will use the private keys to verify the bounce address tag. Incoming email is
subject to bounce verification if all the following is true:
• bounce verification is enabled
• at least one bounce address key exists
• in the protected domain to which the recipient belongs, the Bypass Bounce Verification
option is disabled (see “Configuring protected domains” on page 310)
• in the session profile, the Bypass Bounce Verification check option is disabled (see
“Configuring session profiles” on page 392)
• the sender email address (MAIL FROM:) in the message envelope is empty
• the DSN sender is not in the verification example list
The sender email address is typically empty for bounce messages. The sender email address
may also be empty for some types of spam that are not bounce messages. Because the sender
email addresses of those types of spam will not have a proper tag, similar to bounce message
spam, these spam will fail the bounce verification process. Email sent from email clients or
webmail will not have an empty sender email address, and therefore will not be subject to the
bounce verification process.
If the tag is successfully verified, the bounce verification scan removes the tag, restoring the
recipient email address to one known by the protected domain, and allows the bounce
message.
If the tag is not successfully verified, the bounce verification scan will perform the action that
you have configured for invalid bounce messages.
Key Displays the string of text that is the private key. This can be any
arbitrary string of text, and will be used together with randomizing
data to generate each bounce address tag.
Last Used Displays the date and time when the key was generated or last
used to verify the bounce address tag of an incoming email,
whichever is later.
Enable bounce Mark this check box to enable verification of bounce address tags
verification for all incoming email.
If you want to make exceptions for email that does not require
bounce address tag verification, you can bypass bounce
verification in protected domains and session profiles. For more
information, see “Configuring protected domains” on page 310
and “Configuring session profiles” on page 392.
Bounce verification Enter the number of days after creation when bounce message
tag expires in (days) keys will expire and their resulting tags will fail verification.
Keys will be Displays the period of time after which unused, deactivated keys
automatically will be automatically removed.
removed
The activated key will not be automatically removed.
Bounce verification Select which action that a FortiMail unit will perform when an
action incoming email fails bounce address tagging verification, either:
• Reject: Reject delivery of the email and respond to the SMTP
client with SMTP reply code 550 (Relaying denied).
• Discard: Accept the email, but silently delete it and do not
deliver it. Do not inform the SMTP client.
• Use antispam profile setting: Use the actions configured in the
antispam profile that you selected in the policy that matches
the email message. For more information on actions, see
“Configuring antispam action profiles” on page 427.
Key name Enter the string of text that will be used together with randomizing
data in order to generate each bounce address tag. Keys must
not be identical.
This field cannot be modified after a key is created. Instead, you
must create a new key. If you are certain that no email has used a
key, and therefore no bounce messages can exist which would
require tag verification, you can safely delete that key.
Go to Security > Endpoint Reputation to manually blocklist carrier end points, to exempt them
from automatic blocklisting due to their reputation score, and to view the list of automatically
blocklisted carrier end points.
This section contains the following topics:
• About endpoint reputation
• Manually blocklisting endpoints
• Exempting endpoints from endpoint reputation
• Configuring the endpoint reputation score window
• Viewing endpoint reputation statuses
Mobile Phone
Computer
Remote Laptop
Protected Server
VPN
Remote Laptop
Unlike MTAs, computers in homes and small offices and mobile devices such as laptops and
cellular phones that send email may not have a static IP address. Cellular phones’ IP addresses
especially may change very frequently. After a device leaves the network or changes its IP
address, its dynamic IP address may be reused by another device. Because of this, a sender
reputation score that is directly associated with an SMTP client’s IP address may not function
well. A device sending spam could start again with a clean sender reputation score simply by
rejoining the network to get another IP address, and an innocent device could be accidentally
blocklisted when it receives an IP address that was previously used by a spammer.
To control spam from SMTP clients with dynamic IP addresses, you can use the endpoint
reputation score method instead.
The endpoint reputation score method does not directly use the IP address as the SMTP client’s
unique identifier. Instead, it uses the subscriber ID, login ID, MSISDN, or other identifier. (An
MSISDN is the number associated with a mobile device, such as a SIM card on a cellular phone
network.) The IP address is only temporarily associated with this identifier while the device is
joined to the network.
When a device joins the network of its service provider, such as a cellular phone carrier or DSL
provider, it may use a protocol such as PPPoE or PPPoA which supports authentication. The
network access server (NAS) queries the remote authentication dial-in user server (RADIUS) for
authentication and access authorization. If successful, the RADIUS server then creates a record
which associates the device’s MSISDN, subscriber ID, or other identifier with its current IP
address.
The server, next acting as a RADIUS client, sends an accounting request with the mapping to
the FortiMail unit. (The FortiMail unit acts as an auxiliary accounting server if the endpoint
reputation daemon is enabled.) The FortiMail unit then stores the mappings, and uses them for
the endpoint reputation feature.
When the device leaves the network or changes its IP address, the RADIUS server acting as a
client requests that the FortiMail unit stop accounting (that is, remove its local record of the
IP-to-MSISDN/subscriber ID mapping). The FortiMail unit keeps the reputation score
associated with the MSISDN or subscriber ID, which will be re-mapped to the new IP address
on the next time that the mobile device joins the network.
You can alternatively blocklist subscriber IDs or MSISDNs automatically, based on their
reputation score. For more information, see “Viewing endpoint reputation statuses” on
page 154.
To add an exemption
1. Go to Security > Endpoint Reputation > Exempt.
2. Click New to add an entry. (Entries cannot be edited, only deleted.)
A dialog appears.
3. In Endpoint ID, type the MSISDN, subscriber ID, or other identifier for the carrier end point
that you want to exempt.
4. Click Create.
To filter entries
1. Go to Security > Endpoint Reputation > Blocklist or AntiSpam > Endpoint Reputation >
Exempt.
2. Click the Search button.
A dialog appears.
3. In the Value field, enter the identifier of the carrier endpoint, such as the subscriber ID or
MSISDN, for the entry or entries that you want to display.
A blank field matches any value. Use an asterisk (*) to match multiple patterns, such as
typing 46* to match 46701123456, 46701123457, and so forth. Regular expressions are not
supported.
4. Select Case Sensitive if capitalization is part of the search requirement.
5. Under Operation, select Contain or Wildcard to set the search method.
Bayesian scanning uses databases to determine if an email is spam. For Bayesian scanning to
be effective, the databases must be trained with known-spam and known-good email
messages so the scanner can learn the differences between the two types of email. To maintain
its effectiveness, false positives and false negatives must be sent to the FortiMail unit so the
Bayesian scanner can learn from its mistakes.
Be aware that, without ongoing training, Bayesian scanning will become significantly less
effective over time and thus Fortinet does not recommend enabling the Bayesian scanning
feature.
The Security > Bayesian submenu lets you manage the databases used to store statistical
information for Bayesian antispam processing, and to configure the email addresses used for
remote control and training of the Bayesian databases.
Global
The global Bayesian database is a single database that contains Bayesian statistics that can be
used to detect spam for any email user.
Outgoing antispam profiles can use only the global Bayesian database. Incoming antispam
profiles can use global or domain Bayesian databases.
If all spam sent to all protected domains has similar characteristics and you do not require your
Bayesian scans to be tailored specifically to the email of a protected domain, using the global
database for all Bayesian scanning may be an ideal choice, because there is only one database
to train and maintain.
For email that does not require use of the global database, if you want to use the global
database, you must disable use of the per-domain Bayesian databases. For information on
configuring protected domains to use the global Bayesian database, see “Use global Bayesian
database” on page 327.
Group
Group Bayesian databases, also known as per-domain Bayesian databases, contain Bayesian
statistics that can be used to detect spam for email users in a specific protected domain.
FortiMail units can have multiple group Bayesian databases: one for each protected domain.
If you require Bayesian scans to be tailored specifically to the email received by each protected
domain, using per-domain Bayesian databases may provide greater accuracy and fewer false
positives.
For example, medical terms are a common characteristic of many spam messages. However,
those terms may be a poor indicator of spam if the protected domain belongs to a hospital. In
this case, you may want to train a separate, per-domain Bayesian database in which medical
terms are not statistically likely to indicate spam.
If you have configured the FortiMail unit for email archiving, you can make mailbox files from
archived email and spam. For details, see “Managing archived email” on page 156.
You can leave the global database untrained if both these conditions are true:
• no outgoing antispam profile has Bayesian scanning enabled
• no protected domain is configured to use the global Bayesian database
2. Train the per-domain databases by uploading mailbox (.mbox) files. For details, see
“Backing up, batch training, and monitoring the Bayesian databases” on page 549.
By uploading mailbox files, you can provide initial training more rapidly than through the
Bayesian control email addresses. Training per-domain databases ensures that incoming
antispam profiles for protected domains that you have configured to use the per-domain
database can recognize spam.
You can leave a per-domain database untrained if either of these conditions are true:
• the protected domain is configured to use the global Bayesian database
• no incoming antispam profiles exist for the protected domain
Before instructing email users to train the Bayesian databases, verify that you have enabled the
FortiMail unit to accept training messages. If you have not enabled the “Accept training
messages from users” option in the antispam profile for policies which match training
messages, the training messages will be discarded without notification to the sender, and no
training will occur.
FortiMail units apply training messages to either the global or per-domain Bayesian
database, whichever is enabled for the sender’s protected domain.
This procedure assumes the default Bayesian control email addresses. To configure the
Bayesian control email addresses, go to Security > Bayesian > Control Account.
All employees,
We have enabled a new email system feature that can be trained to
recognize the differences between spam and legitimate email. You can
help to train this feature. This message describes how to train our
email system.
If you have old email messages and spam...
• Forward the old spam to [email protected] from your
company email account.
• Forward any old email messages that are not spam to
[email protected] from your company email account.
If you receive any new spam, or if a legitimate email is mistakenly
classified as spam...
• Forward spam that was not recognized to [email protected] from
your company email account.
• Forward legitimate email that was incorrectly classified as spam
to [email protected] from your company email account.
You can alternatively train Bayesian databases by forwarding spam and non-spam email to
Bayesian control email addresses. For more information, see “Training the Bayesian databases”
on page 546.
You can alternatively back up, restore, and reset all Bayesian databases at once. For more
information, see “Backup and restore” on page 299.
To access this part of the web UI, your administrator account’s access profile must have Read
or Read-Write permission to the Policy category.
For details, see “About administrator account permissions and domains” on page 179.
If you have configured the FortiMail unit for email archiving, you can make mailbox files from
archived email and spam. For details, see “Managing archived email” on page 156.
Back up the Bayesian database before beginning this procedure. Restoring a Bayesian
database replaces all training data stored in the database. For more information on backing up
Bayesian database files, see “To back up a Bayesian database” on page 550 or “Backup and
restore” on page 299.
Back up the Bayesian database before beginning this procedure. Resetting a Bayesian
database deletes all training data stored in the database. For more information on backing up
Bayesian database files, see “To back up a Bayesian database” on page 550 or “Backup and
restore” on page 299.
"is really spam" Enter the user name portion of the email address, such as is-spam, to
user name which email users will forward spam false negatives.Forwarding false
negatives corrects the Bayesian database when it inaccurately
classifies spam as being legitimate email.
"is not really Enter the user name portion of the email address, such as
spam" user is-not-spam, to which email users will forward spam false
name positives.Forwarding false positives corrects the Bayesian database
when it inaccurately classifies legitimate email as being spam.
"learn is spam" Enter the user name portion of the email address, such as
user name learn-is-spam, to which email users will forward spam that the
Bayesian scanner has not previously scanned.
"learn is not Enter the user name portion of the email address, such as
spam" user learn-is-not-spam, to which email users will forward spam that the
name Bayesian scanner has not previously scanned.
training group Enter the user name portion of the email address, such as
default-grp, that FortiMail administrators can use as their sender
email address when forwarding email to the “learn is spam” email
address or “learn is not spam” email address. Training messages sent
from this sender email address will be used to train the global or
per-domain Bayesian database (whichever is selected in the protected
domain).
If you already have the SHA-1/SHA-256(Secure Hash Algorithm) hash values of some known
virus-infected files, you can add these values as file signatures and then, in the antivirus profile,
enable the actions against these files. See “Configuring antivirus profiles and antivirus action
profiles” on page 431.
You can manually add the SHA-1/256 checksums one by one. You can also import such a
checksum list in csv or txt format. The signatures can be exported as a csv file.
Because not all attachment files are virus carriers, FortiMail file signature check only supports
the following file types: .7z, .bat, .cab, .dll, .doc, .docm, .dotm, exe, .gz, .hta, .inf, .jar, .js, .jse,
.msi, .msp, pdf, .pif, .potm, .ppam, .ppsm, .ppt, .pptm, .pptx, .reg, .scr, .sldm, .swf, .tar, .vbe,
.ws, .wsc, .wsf, .wsh, .xlam, .xls, .xlsm, .xlsx, .xltm, .Z, and .zip files.
When you configure action profiles (see “Configuring antispam action profiles” on page 427,
“Configuring antivirus action profiles” on page 433, and “Configuring content action profiles” on
page 446), you may use the following actions:
• Deliver to alternate host
• Deliver to original host
• System quarantine
• Personal quarantine
For the above actions, you can choose to deliver or quarantine the original email or the modified
email.
• Modified copy means that the email message to be delivered or quarantined is not the
original one. It has been modified by the matching FortiMail actions.
• Unmodified copy means that the email message to be delivered or quarantined still contains
the original header and body. However, the envelope recipient or RCPT TO might have been
rewritten by the relevant action profile.
For example, when the HTML content is converted to text, if you choose to deliver the
unmodified copy, the HTML version will be delivered; if you choose to deliver the modified copy,
the plain text version will be delivered.
When you configure a content profile (see “Configuring scan options” on page 437), you can
choose to scan for adult images in the email body and attachments.
Adjust the rating sensitivity properly to avoid false positives and false negatives.
Enabling this feature affects the FortiMail performance. And by default, this feature is enabled.
Use the Encryption menu to configure IBE encryption settings and certificate binding for
S/MIME encryption.
This section includes:
• Configuring IBE encryption
• Configuring certificate bindings
The Encryption > IBE submenu lets you configure the Identity Based Encryption (IBE) service.
With IBE, you can send secured email through the FortiMail unit.
This section contains the following topics:
• About IBE
• About FortiMail IBE
• FortiMail IBE configuration workflow
• Configuring IBE services
About IBE
IBE is a type of public-key encryption. IBE uses identities (such as email addresses) to calculate
encryption keys that can be used for encrypting and decrypting electronic messages.
Compared with traditional public-key cryptography, IBE greatly simplifies the encryption
process for both users and administrators. Another advantage is that a message recipient does
not need any certificate or key pre-enrollment or specialized software to access the email.
Page 556
Figure 44:How FortiMail works with IBE
Enable IBE service Select to enable the IBE service you configured.
IBE service name Enter the name for the IBE service. This is the name the secure mail
recipients will see once they access the FortiMail unit to view the mail.
User registration Enter the number of days that the secure mail recipient has to register
expiry time (days) on the FortiMail unit to view the mail before the registration expires.
The starting date is the date when the FortiMail unit sends out the first
notification to a mail recipient.
User inactivity Enter the number of days the secure mail recipient can access the
expiry time (days) FortiMail unit without registration.
For example, if you set the value to 30 days and if the mail recipient
did not access the FortiMail unit for 30 days after the user registers on
the unit, the recipient will need to register again if another secure mail
is sent to the user. If the recipient accessed the FortiMail unit on the
15th days, the 30-day limit will be recalculated from the 15th day
onwards.
Encrypted email Enter the number of days that the secured mail will be saved on the
storage expiry time FortiMail unit.
(days)
Allow secure Select to allow the secure mail recipient to reply the email with
replying encryption.
Allow secure Select to allow the secure mail recipient to forward the email with
forwarding encryption.
Allow secure Select to allow the secure mail recipient to compose an email. The
composing FortiMail unit will use policies and mail delivery rules to determine if
this mail needs to be encrypted.
For encrypted email, the domain of the composed mail’s recipient
must be a protected one, otherwise an error message will appear and
the mail will not be delivered.
IBE base URL Enter the FortiMail unit URL, for example, https://192.168.100.20, on
which a mail recipient can register or authenticate to access the
secure mail.
"Help" content You can create a help file on how to access the FortiMail secure email
URL and enter the URL for the file. The mail recipient can click the “Help”
link from the secure mail notification to view the file.
If you leave this field empty, a default help file link will be added to the
secure mail notification.
"About" content You can create a file about the FortiMail IBE encryption and enter the
URL URL for the file. The mail recipient can click the “About” link from the
secure mail notification to view the file.
If you leave this field empty, a link for a default file about the FortiMail
IBE encryption will be added to the secure mail notification.
Allow custom user If your corporation has its own user authentication tools, enable this
control option and enter the URL.
“Custom user control” URL: This is the URL where you can check
for user existence.
“Custom forgot password” URL: This is the URL where users get
authenticated.
Notification You can choose to send notification to the sender or recipient when
Settings the secure email is read or remains unread for a specified period of
time.
Click the Edit link to modify the email template. For details, see
“Customizing email templates” on page 229.
Depending on the IBE email access method (either PUSH or PULL)
you defined in “Configuring encryption profiles” on page 498, the
notification settings behave differently.
• If the IBE message is stored on FortiMail PULL access method),
the “read” notification will only be sent the first time the message
is read.
• If the IBE message is not stored on FortiMail (PUSH access
method), the “read” notification will be sent every time the
message is read, that is, after the user pushes the message to
FortiMail and FortiMail decrypts the message.
• There is no “unread” notification for IBE PUSH messages.
Go to Encryption > S/MIME > Certificate Binding to create certificate binding profiles, which
establish the relationship between an email address and the certificate that:
• proves an individual’s identity
• provides their keys for use with encryption profiles
Use this relationship and that information for secure MIME (S/MIME) as per RFC 2634.
If an incoming email message is encrypted, FortiMail compares the recipient’s identity with the
list of certificate bindings to determine if it has a key that can decrypt the email. If it has a
matching private key, it will decrypt the email before delivering it. If it does not, it forwards the
still-encrypted email to the recipient.
If you have selected an encryption profile with encryption action in the message delivery rule
that applies to the session, the FortiMail unit compares the recipient’s identity with the list of
certificate bindings to determine if it has a certificate and public key. If it has a matching public
key, it will encrypt the email using the algorithm specified in the encryption profile (see
“Configuring encryption profiles” on page 498). If it does not, it performs the failure action
indicated in the encryption profile.
Address Pattern Displays the email address or domain associated with the
identity represented by the personal or server certificate.
Key Usage Displays if the key is for encryption, signing, or encryption and
signing.
Identity Displays the identity, often a first and last name, included in the
common name (CN) field of the Subject line of the personal or
server certificate.
Private Key Displays the private key associated with the identity, used to
decrypt and sign email from that identity.
Valid From Displays the beginning date of the period of time during which
the certificate and its keys are valid for use by signing and
encryption.
Valid To Displays the end date of the certificate’s period of validity. After
this date and time, the certificate expires, although the keys may
be retained for the purpose of decrypting and reading email that
was signed and encrypted previously.
Status Indicates whether the certificate is currently not yet valid, valid,
or expired, depending on the current system time and the
certificate’s validity period.
(Green dot in column Indicates whether or not the entry is currently referred to by
heading.) another item in the configuration. If another item is using this
entry, a red dot appears in this column, and the entry cannot be
deleted.
For best results, use 3DES with SHA1. RC2 is not supported.
7. Click Create.
Certificate bindings will be used automatically as needed for matching message delivery rules in
which you have selected an encryption profile. For details, see “Using S/MIME encryption” on
page 500, “Configuring encryption profiles” on page 498 and “Configuring delivery rules” on
The FortiMail data leak prevention (DLP) system allows you to prevent sensitive data from
leaving your network. After you define sensitive data patterns, you can take actions against the
email containing data matching these patterns. You configure the DLP system by creating
individual rules based on document fingerprint, file filters or sensitive information in a DLP
profile and assign the profile to a policy.
This section describes how to configure the DLP settings.
• DLP configuration workflow
• Defining the sensitive data
• Configuring DLP rules
• Configuring DLP profiles
Page 564
DLP document fingerprinting
One of the DLP techniques to detect sensitive data is fingerprinting (also called document
fingerprinting). Most DLP techniques rely on you providing a characteristic of the file you want
to detect, whether it’s the file type, the file name, or part of the file contents. Fingerprinting is
different in that you provide the file itself. The FortiMail unit then generates a checksum
fingerprint and stores it. The FortiMail unit generates a fingerprint for all email attachments, and
compares it to all of the fingerprints stored in its fingerprint database. If a match is found, the
configured action is taken.
Any type of file can be detected by DLP fingerprinting and fingerprints can be saved for each
revision of your files as they are updated.
The FortiMail unit must have access to the documents for which it generates fingerprints. There
are two methods to generate fingerprints:
• One method is to manually upload documents to be fingerprinted directly to the FortiMail
unit.
• The other is to allow the FortiMail unit to access a network share that contains the
documents to be fingerprinted.
If only a few documents are to be fingerprinted, a manual upload may be the easiest solution. If
many documents require fingerprinting, or if the fingerprinted documents are frequently revised,
using a network share makes user access easier to manage.
File list Click New to browse to the file and generate a fingerprint for it.
Server type This refers to the type of server share that is being accessed. The default
is Windows Share but this will also work on Samba shares.
User name Enter the user name of the account the FortiMail unit uses to access the
server network share.
Password Enter the password of the account the FortiMail unit uses to access the
server network share.
Configuring data loss prevention Page 565 FortiMail 6.2.0 Administration Guide
GUI item Description
File pattern You may enter a filename pattern to restrict fingerprinting to only those
files that match the pattern. To fingerprint all files, enter an asterisk (“*”).
Checking Check the files document source daily if the files are added or changed
period regularly.
Advanced
Scan By default, only the files in the specified path are fingerprinted. Files in
subdirectories subdirectories are ignored. Select this option to fingerprint files in
subdirectories of the specified path.
Remove Select this option to retain the fingerprints of files deleted from the
chunks document source. If this option is disabled, fingerprints for deleted files
will be removed when the document source is scanned next time.
Retain old Select this option to retain the fingerprints of previous revisions of
chunks updated files. If this option is disabled, fingerprints for previous version of
files will be deleted when a new fingerprint is generated.
DLP scan rules specify what to look for in what part of the email. For example, you can specify
to scan for some sensitive data in email bodies and attachments.
Exceptions Click New to add exceptions. Email matching the exceptions will not be
scanned.
After you configure the scan rules/conditions, you add them to the DLP profiles. In the profiles,
you also specify what actions to take (for details about action profiles, see “Configuring content
Configuring data loss prevention Page 566 FortiMail 6.2.0 Administration Guide
action profiles” on page 446). Then you apply the DLP profiles to the IP or recipient based
policies.
Action Select a default action to use when the specified scan rules match the
email. Click New to create a new action profile. See “Configuring content
action profiles” on page 446.
Configuring data loss prevention Page 567 FortiMail 6.2.0 Administration Guide
Office 365 threat remediation
Starting from 6.2.0 release, you can scan email messages already delivered to the user inboxes
on Microsoft Office 365. Once scanned, you can decide what to do with the infected or spam
email. You can also manually apply actions directly to the email messages you specify.
The Office 365 protection feature is license based. If you do not purchase the license, this
feature does not display on the GUI.
Note this is only the post-delivery on-demand scan. Real-time scanning will be added in future
releases.
Before you can scan email in Office 365 mailboxes, you must connect to Office 365. To be able
to access the user mailboxes on Office 365, you must have the domain administrator privilege.
To access this part of the web UI, your administrator account’s:
• Domain must be System
• access profile must have Read or Read-Write permission to the Others category
For details, see “About administrator account permissions and domains” on page 179.
Page 568
3. Enter the domain administrator’s logon credentials to log on to Office 365.
4. If successful, the account will appear in the account list and FortiMail is connected to Office
365.
Before you can scan the email on Office 365, you must configure the antivirus, antispam,
content, DLP, and action profiles to use.
The antivirus, antispam, content, and DLP profile configurations are almost identical to the
regular profile configurations, except for some settings that do not apply to this situation. For
details about these profiles, see the following sections:
• Managing antivirus profiles
• Managing antispam profiles
• Configuring content profiles
• Configuring DLP profiles
Replace Select to replace the email attachment with a custom message. For
attachment with more information about custom replacement message, see
message “Customizing replacement messages” on page 220.
Notify with profile Select to send out notifications to the recipients specified in the
notification profile. For more information about notification profiles, see
“Configuring notification profiles” on page 505.
Office 365 threat remediation Page 569 FortiMail 6.2.0 Administration Guide
Searching and scanning email (6.2 release)
After you connect to Office 365 and create profiles, you can scan certain email on Office 365
according to the criteria you specify.
Scan type • Scan with Profile: Use the antivirus, antispam, content, and DLP
profiles to scan the email. Actions will be taken against the infected
email with the actions you specified in the profiles.
• Scan with Action: Use the action profiles (see “Configuring action
profiles (6.2 release)” on page 569) to scan the email. The email
meeting the search criteria will be discarded, personal quarantined,
or system quarantined according to the action you specify in the
action profile.
4. Click Scan.
5. The scanning status of all the scan tasks will be displayed: either Running or Done.
6. After the scan process is done, you can double click on the scan task to view the details.
In addition to automatic scanning, you can also search for specific email on Office 365 and
manual apply actions.
4. Click Search.
5. The search status of all the search tasks will be displayed: either Running or Done.
6. After the search process is done, you can double click on the search task to view the details.
7. To take any action towards a specific email, from the search result list, select the email and
from the Apply Action dropdown list, select the action. For action definitions, see
“Configuring action profiles (6.2 release)” on page 569.
Office 365 threat remediation Page 570 FortiMail 6.2.0 Administration Guide
Viewing log messages (6.2 release)
The Office 365 > Log submenu includes the following tabs, one for each log type:
• History: Where you can view the log of scanned and searched email messages.
• AntiVirus: Where you can view the log of email messages detected as infected by a virus.
• AntiSpam: Where you can view the log of email messages detected as spam.
The log lists are sorted by the time range of the log messages contained in the log file, with the
most recent log files appearing near the top of the list.
For example, the current log file would appear at the top of the list, above a rolled log file whose
time might range from 2008-05-08 11:59:36 Thu to 2008-05-29 10:44:02 Thu.
For more information about how to use FortiMail logs, see “Viewing log messages” on
page 131.
Office 365 threat remediation Page 571 FortiMail 6.2.0 Administration Guide
Archiving email
You can archive email messages according to various criteria and reasons. For example, you
may want to archive email sent by certain senders or email contains certain words.
This section contains the following topics:
• Email archiving workflow
• Configuring email archiving accounts
• Configuring email archiving policies
• Configuring email archiving exemptions
Before you can archive email, you need to set up and enable email archiving accounts, as
described below. The archived emails will be stored in the archiving accounts. You can create
multiple archive accounts and send different categories of email to different accounts. For the
maximum number of archive accounts you can create, see “Appendix B: Maximum Values” on
page 639.
When email is archived, you can view and manage the archived email messages. For more
information, see “Managing archived email” on page 156. You can also access the email archive
remotely through IMAP.
Page 572
To access this part of the web UI, your administrator account’s:
• Domain must be System
• access profile must have Read or Read-Write permission to the Others category
For details, see “About administrator account permissions and domains” on page 179.
Status Select to enable an email archiving account. Clear the check box to
disable it.
Index Type Indicates if archive indexing is in use and how much is indexed. Indexing
speeds up content searches. The choices are:
• None: email is not indexed.
• Header: email headers are indexed.
• Full: the entire message is indexed.
(Green dot in Indicates whether the archive is currently referred to by an archive policy.
column If so, a red dot appears in this column and the entry cannot be deleted.
heading)
You cannot manually delete specific archived email messages. The only way to delete all of the
email archives is to format the mail data disk.
Protocol Select the protocol that the FortiMail unit will use to connect to the remote
storage server, either SFTP or FTP.
User name Enter the user name of an account the FortiMail unit will use to access the
remote storage server, such as Fortimail.
Password Enter the password for the user name of the account on the remote storage
server.
Remote Enter the directory path on the remote storage server where the FortiMail
directory unit will store archived email, such as
/home/fortimail/email-archives.
Remote Enter the FortiMail cache quota that is allowed to be used for remote host
cache quota archiving. The above statement regarding the local disk quota also applied
to the cache quota.
Sender Enter the archive email sender address. Note that this is not the sender
address in the email messages being archived. It is the email account that
sends out the journaling email on the Exchange server.
Recipient Enter the email account that receives journaling email on the FortiMail
server. On the Exchange server, you must also specify this receiving
account. Note that this is not the recipient address in the email messages
being archived.
You do not need to archive all email. Use the Archive Policy tab to specify the types of email to
archive. The criteria you specify are called policies. You can also create exemptions to these
policies (see “Configuring email archiving exemptions” on page 577).
To access this part of the web UI, your administrator account’s:
• Domain must be System
• access profile must have Read or Read-Write permission to the Others category
For details, see “About administrator account permissions and domains” on page 179.
Clone Click the row corresponding to the policy whose settings you want to
duplicate when creating the new profile, then click Clone. A single-field
(button)
dialog appears. Enter a name for the new policy. Click OK.
Move Click a policy to select it, click Move, then select either:
(button)
• Up or Down, or
• After or Before, which opens a dialog, then in Move right after or Move
right before indicate the policy’s new location by entering the ID of
another policy
FortiMail units match the policies in sequence, from the top of the list
downwards.
Account Select All to see policy for every account on the FortiMail unit, or select an
account name to see policy for that account. See “Configuring email
(drop-down list)
archiving accounts” on page 572.
Type Displays the policy type. The five types are pre-defined. See step 4.
Pattern Displays the pattern that the FortiMail unit will use when evaluating email
for a match with the policy.
After setting up email archiving policies, use the Exempt Policy tab to prevent the FortiMail unit
from archiving certain email.
To access this part of the web UI, your administrator account’s:
• Domain must be System
• access profile must have Read or Read-Write permission to the Others category
For details, see “About administrator account permissions and domains” on page 179.
Clone Click the row corresponding to the policy whose settings you want to
duplicate when creating the new profile, then click Clone. A single-field
(button)
dialog appears. Enter a name for the new policy. Click OK.
Move Click a policy to select it, click Move, then select either:
(button)
• Up or Down, or
• After or Before, which opens a dialog, then in Move right after or Move
right before indicate the policy’s new location by entering the ID of
another policy
FortiMail units match the policies in sequence, from the top of the list
downwards.
Account Select All to see policy for every account on the FortiMail unit, or select an
account name to see policy for that account. See “Configuring email
(drop-down list)
archiving accounts” on page 572.
Status To enable an email archiving exemption policy, mark its check box.
ID Displays the identification numbers of the policy. IDs are generated by the
FortiMail unit.
Type Displays the policy type. The three types are pre-defined. See step 4 of
“Click New to add an entry or double-click an entry to modify it.” on
page 578.
Pattern Displays the pattern that the FortiMail unit will use when evaluating email
for a match with the policy.
The Log and Report menu lets you configure logging, reports, and alert email.
FortiMail units provide extensive logging capabilities for virus incidents, spam incidents and
system events. Detailed log information and reports provide analysis of network activity to help
you identify security issues and reduce network misuse and abuse.
Logs are useful when diagnosing problems or when you want to track actions the FortiMail unit
performs as it receives and processes traffic.
This section includes:
• About FortiMail logging
• Configuring logging
• Configuring report profiles and generating reports
• Configuring alert email
• Viewing generated reports
FortiMail units can log many different email activities and traffic including:
• system-related events, such as system restarts and HA activity
• virus detections
• spam filtering results
• POP3, SMTP, IMAP and webmail events
You can select which severity level an activity or event must meet in order to be recorded in the
logs. For more information, see “Log message severity levels” on page 582.
A FortiMail unit can save log messages to its hard disk or a remote location, such as a Syslog
server or a Fortinet FortiAnalyzer unit. For more information, see “Configuring logging” on
page 586. It can also use log messages as the basis for reports. For more information, see
“Configuring report profiles and generating reports” on page 589.
Page 579
Log message syntax
All FortiMail log messages are comprised of a log header and a log body.
• Header — Contains the time and date the log originated, a log identifier, the type of log, the
severity level (priority) and where the log message originated.
• Body — Describes the reason why the log was created, plus any actions that the FortiMail
appliance took to respond to it. These fields may vary by log type.
For example, in the following event log, the bold section is the header and the italic section is
the body.
date=2012-08-17 time=12:26:41 device_id=FE100C3909600504 log_id=0001001623
type=event subtype=admin pri=information user=admin ui=GUI(172.20.120.26) action=login
status=success reason=none msg="User admin login successfully from GUI(172.20.120.26)"
Device ID field
Depending on where you view log messages, log formats may vary slightly. For example, if you
view logs on the FortiMail web UI or download them to your local PC, the log messages do not
contain the device ID field. If you send the logs to FortiAnalyzer or other Syslog servers, the
device ID field will be added.
Policy ID and domain fields
Starting from v5.0 release, two new fields -- policy ID and domain -- have been added to history
logs.
The policy ID is in the format of x:y:z, where:
• x is the ID of the global access control policy.
• y is the ID of the IP-based policy.
• z is the ID of the recipient-based policy.
If the value of x, y, and z is 0, it means that no policy is matched.
If the matched recipient-based policy is incoming, the protected domain will be logged in the
domain field.
If the matched recipient-based policy is outgoing, the domain field will be empty.
Endpoint field
Starting from 4.0 MR3, a field called endpoint was added to the history and antispam logs.
This field displays the endpoint’s subscriber ID, MSISDN, login ID, or other identifiers. This field
is empty if the sender IP is not matched to any endpoint identifier or if the endpoint reputation is
not enabled in the session profiles.
Logs, reports and alerts Page 580 FortiMail 6.2.0 Administration Guide
Log_part field
For FortiMail 3.0 MR3 and up, the log header of some log messages may include an extra field,
log_part, which provides numbered identification (such as 00, 01, and 02) when a log
message has been split. Log splitting occurs in FortiMail 3.0 MR3 and up because the log
message length was reduced.
Hex numbers in history logs
If you view the log messages on the FortiMail web UI or send the logs to a Syslog server, the
dispositions and classifiers are displayed in English terms. However, if you download log files
from FortiMail web UI to your PC and open them, the dispositions and classifiers are displayed
in hex numbers. For explanation of these numbers, see the “Classifiers and dispositions in
history logs” on page 582.
statistics (no subtype) Includes all email handled by the FortiMail unit’s build-in
(history) MTA or proxies, no matter the email that was successfully or
unsuccessfully delivered.
Logs, reports and alerts Page 581 FortiMail 6.2.0 Administration Guide
Avoid recording highly frequent log types to the local hard disk for an extended period of time.
Excessive logging frequency can cause undue wear on the hard disk and may cause premature
failure.
Levels Description
For each location where the FortiMail unit can store log files, you can define the severity
threshold of the log messages to be stored there.
Avoid recording log messages using low severity thresholds such as Information or Notification
to the local hard disk for an extended period of time. A low log severity threshold is one
possible cause of frequent logging. Excessive logging frequency can cause undue wear on the
hard disk and may cause premature failure.
The FortiMail unit stores all log messages equal to or exceeding the severity level you select.
For example, if you select Error, the FortiMail unit stores log messages whose severity level is
Error, Critical, Alert, or Emergency.
Logs, reports and alerts Page 582 FortiMail 6.2.0 Administration Guide
The Classifier field displays which FortiMail scanner applies to the email message. For example,
“Banned Word” means the email messages was detected by the FortiMail banned word
scanner. The Disposition field specifies the action taken by the FortiMail unit.
If you view the log messages on the FortiMail web UI or send the logs to a Syslog server, the
dispositions and classifiers are displayed in English terms. However, if you download log files
from FortiMail web UI to your PC and open them, the dispositions and classifiers are displayed
in hex numbers.
The following tables map the hex numbers with English terms.
Logs, reports and alerts Page 583 FortiMail 6.2.0 Administration Guide
Table 56:Classifiers
0x0E Forged IP (before v5.2 release) 0x38 Access Control List Discard
Logs, reports and alerts Page 584 FortiMail 6.2.0 Administration Guide
0x1D Image Spam 0x47 DLP Filter
0x1F Access Control List Relay Denied 0x49 DLP Requires Encryption
When the classifier is “Attachment Filter”, a new field “atype” (attachment type) is also
displayed. This field is for debug purpose only.
Logs, reports and alerts Page 585 FortiMail 6.2.0 Administration Guide
Table 57:Dispositions
The disposition field in a log message may contain one or more dispositions/actions. For
example, “accept” and “defer” dispositions may appear in the same message. Defer
disposition is added when an email message is deferred for either of the following two reasons:
FortiGuard antispam outbreak and FortiSandbox scan.
Configuring logging
The Log Settings submenu includes two tabs, Local and Remote, that let you:
• set the severity level
• configure which types of log messages to record
• specify where to store the logs
You can configure the FortiMail unit to store log messages locally (that is, in RAM or to the hard
disk), remotely (that is, on a Syslog server or FortiAnalyzer unit), or at both locations.
Logs, reports and alerts Page 586 FortiMail 6.2.0 Administration Guide
Your choice of storage location may be affected by several factors, including the following:
• Local logging by itself may not satisfy your requirements for off-site log storage.
• Very frequent logging may cause undue wear when stored on the local hard drive. A low
severity threshold is one possible cause of frequent logging. For more information on
severity levels, see “Log message severity levels” on page 582.
For information on viewing locally stored log messages, see “Viewing log messages” on
page 131.
6. From Log level, select the severity level that a log message must equal or exceed in order to
be recorded to this storage location.
Avoid recording log messages using low severity thresholds such as Information or Notification
to the local hard disk for an extended period of time. A low log severity threshold is one
possible cause of frequent logging. Excessive logging frequency can cause undue wear on the
hard disk and may cause premature failure.
Logs, reports and alerts Page 587 FortiMail 6.2.0 Administration Guide
For information about severity levels, see “Log message severity levels” on page 582.
7. For Log retention period, specify how long (in days) the logs will be kept. Valid range is 0 to
1461 days. 0 means no limit.
8. From Log options when disk is full, select what the FortiMail unit will do when the local disk
is full and a new log message is caused, either:
• Do not log: Discard all new log messages.
• Overwrite: Delete the oldest log file in order to free disk space, and store the new log
message.
9. In Logging Policy Configuration, enable the types of logs that you want to record to this
storage location. Click the arrow to review the options.
10.Click Apply.
Logs stored remotely cannot be viewed from the web UI of the FortiMail unit. If you require the
ability to view logs from the web UI, also enable local storage. For details, see “Configuring
logging to the hard disk” on page 587.
Before you can log to a remote location, you must first enable logging. For logging accuracy,
you should also verify that the FortiMail unit’s system time is accurate. For details, see
“Configuring the time and date” on page 185.
To access this part of the web UI, your administrator account’s:
• Domain must be System
• access profile must have Read or Read-Write permission to the Others category
For details, see “About administrator account permissions and domains” on page 179.
Logs, reports and alerts Page 588 FortiMail 6.2.0 Administration Guide
8. From Facility, select the facility identifier that the FortiMail unit will use to identify itself when
sending log messages.
To easily identify log messages from the FortiMail unit when they are stored on a remote
logging server, enter a unique facility identifier, and verify that no other network devices use
the same facility identifier.
9. Enable CSV format if you want to send log messages in comma-separated value (CSV)
format.
Do not enable this option if the remote host is a FortiAnalyzer unit. FortiAnalyzer units do not
support CSV-formatted log messages.
10.From Log protocol, select Syslog if you want send logs to a Syslog server (including
FortiAnalyzer). Select OFTPS if you want to use this secure protocol to send logs to
FortiAnalyzer. Also specify the Hash algorithm for OFTPS. Note that FortiAnalyzer supports
both Syslog and OFTPS.
11.If you enabled advanced MTA control (see “Configuring advanced MTA control settings” on
page 409), the Matched session only option appears. Select this option if you want to send
only the matched session logs to the remote server. Otherwise, all logs will be sent.
12.In Logging Policy Configuration, enable the types of logs you want to record to this storage
location. Click the arrow to review the options.
13.Click Create.
14.If the remote host is a FortiAnalyzer unit, confirm with the FortiAnalyzer administrator that the
FortiMail unit was added to the FortiAnalyzer unit’s device list, allocated sufficient disk space
quota, and assigned permission to transmit logs to the FortiAnalyzer unit. For details, see
the FortiAnalyzer Administration Guide.
15.To verify logging connectivity, from the FortiMail unit, trigger a log message that matches the
types and severity levels that you have chosen to store on the remote host. Then, on the
remote host, confirm that it has received that log message.
For example, if you have chosen to record event log messages to the remote host if they are
more severe than information, you could log in to the web UI or download a backup copy of
the FortiMail unit’s configuration file in order to trigger an event log message.
If the remote host does not receive the log messages, verify the FortiMail unit’s network
interfaces (see “Configuring the network interfaces” on page 163 and “About the
management IP” on page 161) and static routes (see “Configuring static routes” on
page 173), and the policies on any intermediary firewalls or routers. If ICMP ECHO (ping) is
enabled on the remote host, you can use the execute traceroute command to
determine the point where connectivity fails. For details, see the FortiMail CLI Reference.
The Log and Report > Report Settings > Configuration tab displays a list of report profiles.
A report profile is a group of settings that contains the report name, its subject matter, its
schedule, and other aspects that the FortiMail unit considers when generating reports from log
data. The FortiMail unit presents the information in tabular and graphical format.
Logs, reports and alerts Page 589 FortiMail 6.2.0 Administration Guide
You can create one report profile for each type of report that you will generate on demand or on
a schedule.
Generating reports can be resource intensive. To avoid email processing performance impacts,
you may want to generate reports during times with low traffic volume, such as at night. For
more information on scheduling the generation of reports, see “Configuring the report
schedule” on page 592.
Generate Select a report and click this button to generate a report immediately.
See “Generating a report manually” on page 593.
(button)
Domain Displays the name of the protected domain that is the source of the
report.
Schedule Displays the frequency with which the FortiMail unit generates a
scheduled report. If the report is designed for manual generation, Not
Scheduled appears in this column.
Logs, reports and alerts Page 590 FortiMail 6.2.0 Administration Guide
1. Select the arrow next to Time Period to expand the section, if closed.
2. Select the time span option you want. This sets the range of log data to include in the report.
• If you select “User Defined” or “The Last N hours”, another field appears that requires
more inform ai ton.
Mail Fitlering Select to include high-level categories, such as mail, spam, non-spam,
Statistics and virus.
Mail High Level Select to include all top level and summary information for all queries,
such as Top Client IP By Date.
Mail Statistics Select to include information on daily, hourly or weekly email message
statistics, such as Mail Stat Messages By Day.
Mail by Recipient Select to include information on email messages by each recipient, such
as Top Recipient By Date.
Mail by Sender Select to include information on email messages by each sender, such as
Top Sender By Date.
Spam by Sender Select to include information on spam by each sender, such as Top Spam
Sender By Date.
Total Summary Select to include summary information, such as Total Sent And Received.
Virus by Sender Select to include information on infected email messages by each sender,
such as Top Virus Sender By Date.
Logs, reports and alerts Page 591 FortiMail 6.2.0 Administration Guide
Configuring the report schedule
This is part of the procedures for report generation. For information about the entire procedures,
see “Configuring report profiles and generating reports” on page 589.
When configuring a report profile, you can select when the report will generate. Or, you can
leave it unscheduled and generate it on demand. See “Generating a report manually” on
page 593.
Not Scheduled Select if you do not want the FortiMail unit to generate the report
automatically according to a schedule. If you select this option, the report
can only be generated on demand. See “Generating a report manually” on
page 593.
Daily Select to generate the report each day. Also configure At hour.
These days Select to generate the report on specific days of each week, then select
those days. Also configure At hour.
These dates Select to generate the report on specific date of each month, then enter
those date numbers. Separate multiple date numbers with a comma. For
example, to generate a report on the first and 30th day of every month, enter
1,30.
Also configure At hour.
Logs, reports and alerts Page 592 FortiMail 6.2.0 Administration Guide
Configuring report email notification
This is part of the procedures for report generation. For information about the entire procedures,
see “Configuring report profiles and generating reports” on page 589.
When configuring a report profile, you can have the FortiMail unit email an attached copy of the
generated report, in either HTML or PDF file format, to designated recipients.
1. In Report format, select the format of the generated attachment, either html or pdf.
2. In the Email address field, enter the email address of a recipient. Click -> to add the email
address to the list of recipients.
3. The All notification Email address text box displays the list of recipients to whom the
FortiMail unit will send a copy of reports generated using this report profile. To remove a
recipient address, select it and click <-.
The Alert Email submenu lets you configure the FortiMail unit to notify selected users (including
administrators) by email when specific types of events occur and are logged. For example, if
you require notification about virus detections, you can have the FortiMail unit send an alert
email message whenever the FortiMail unit detects a virus.
To set up alerts, you must configure both the alert email recipients (see “Configuring alert
recipients” on page 593) and which event categories will trigger an alert email message (see
“Configuring alert categories” on page 594).
Alert email messages also require that you supply the FortiMail unit with the IP address of at
least one DNS server. The FortiMail unit uses the domain name of the SMTP server to send alert
email messages. To resolve this domain name into an IP address, the FortiMail unit must be
able to query a DNS server. For information on DNS, see “Configuring DNS” on page 174.
• Configuring alert recipients
• Configuring alert categories
Logs, reports and alerts Page 593 FortiMail 6.2.0 Administration Guide
To configure recipients of alert email messages
1. Go to Log and Report > Alert Email > Configuration.
Test Clicking on the button will send a test alert email to all configured
recipients in the list.
(button)
Alert Email Displays the names of email accounts receiving email alerts.
Account
System events Send an alert email message when an important system event occurs.
These include system reboot/reload, firmware upgrade/downgrade,
and log disk/mail disk formatting.
Disk is full Send an alert email message when the hard disk of the FortiMail unit is
full.
Remote Send an alert email message when the remote archiving feature
archiving/NAS encounters one or more failures.See “Configuring email archiving
failures accounts” on page 572.
Logs, reports and alerts Page 594 FortiMail 6.2.0 Administration Guide
GUI item Description
HA events Send an alert email message when any high availability (HA) event
occurs.
When a FortiMail unit is operating in HA mode, the subject line of the
alert email includes the host name of the cluster member. If you have
configured a different host name for each member of the cluster, this
lets you identify which FortiMail unit in the HA cluster sent the alert
email message. For more information, see “About logging, alert email
and SNMP in HA” on page 247.
Disk quota of an Send an alert email message when an email user’s account exceeds its
account is quota of hard disk space.
exceeded
This option is available only if the FortiMail unit is in server mode.
Email Archive Send an alert email message when any email archiving account
quota is exceeded reaches its quota of hard disk space. For information about email
archiving account quota, see “Configuring rotation settings” on
page 574.
Deferred emails Send an alert email message if the deferred email queue contains
greater than this number of email messages. Enter a number between
1 and 10 000 to define the alert threshold, then enter the interval of
time between each alert email message that the FortiMail unit will send
while the number of email messages in the deferred email queue
remains over this limit.
FortiGuard license Send an alert email when the FortiGuard license is to expire in the
expiry time number of days entered. Enter a number between 1 and 100.
Virus events Send an alert email message when the FortiMail unit detects a virus.
Logs, reports and alerts Page 595 FortiMail 6.2.0 Administration Guide
Installing firmware
Fortinet periodically releases FortiMail firmware updates to include enhancements and address
issues. After you have registered your FortiMail unit, FortiMail firmware is available for download
at http://support.fortinet.com.
Installing new firmware can overwrite antivirus and antispam packages using the versions of the
packages that were current at the time that the firmware image was built. To avoid repeat
updates, update the firmware before updating your FortiGuard packages.
New firmware can also introduce new features which you must configure for the first time.
For information specific to the firmware release version, see the Release Notes available
with that release.
In addition to major releases that contain new features, Fortinet releases patch releases that
resolve specific issues without containing new features and/or changes to existing features. It is
recommended to download and install patch releases as soon as they are available.
Before you can download firmware updates for your FortiMail unit, you must first register your
FortiMail unit with Fortinet Technical Support. For details, go to http://support.fortinet.com/ or
contact Fortinet Technical Support.
You can test a new firmware image by temporarily running it from memory, without saving it to
disk. By keeping your existing firmware on disk, if the evaluation fails, you do not have to
re-install your previous firmware. Instead, you can quickly revert to your existing firmware by
simply rebooting the FortiMail unit.
Page 596
5. Verify that the TFTP server is currently running, and that the FortiMail unit can reach the
TFTP server.
To use the FortiMail CLI to verify connectivity, enter the following command:
execute ping 192.168.1.168
where 192.168.1.168 is the IP address of the TFTP server.
6. Enter the following command to restart the FortiMail unit:
execute reboot
7. As the FortiMail units starts, a series of system startup messages are displayed.
Press any key to display configuration menu........
8. Immediately press a key to interrupt the system startup.
You have only 3 seconds to press a key. If you do not press a key soon enough, the FortiMail
unit reboots and you must log in and repeat the execute reboot command.
If you successfully interrupt the startup process, the following messages appears:
[G]: Get firmware image from TFTP server.
[F]: Format boot device.
[B]: Boot with backup firmware and set as default.
[I]: Configuration and information.
[Q]: Quit menu and continue to boot with default firmware.
[H]: Display this list of options.
Enter G,F,B,I,Q,or H:
9. Type G to get the firmware image from the TFTP server.
The following message appears:
Enter TFTP server address [192.168.1.168]:
10.Type the IP address of the TFTP server and press Enter.
The following message appears:
Enter Local Address [192.168.1.188]:
11.Type a temporary IP address that can be used by the FortiMail unit to connect to the TFTP
server.
The following message appears:
Enter File Name [image.out]:
12.Type the firmware image file name and press Enter.
The FortiMail unit downloads the firmware image file from the TFTP server and displays a
message similar to the following:
Save as Default firmware/Backup firmware/Run image without
saving:[D/B/R]
13.Type R.
The FortiMail image is loaded into memory and uses the current configuration, without
saving the new firmware image to disk.
14.To verify that the new firmware image has been loaded, log in to the CLI and type:
get system status
Installing firmware
You can use either the web UI or the CLI to upgrade or downgrade the firmware of the FortiMail
unit.
Administrators whose Domain is System and whose access profile contains Read-Write access
in the Others category, such as the admin administrator, can change the FortiMail firmware.
Firmware changes are either:
• an upgrade to a newer version
• a reversion to an earlier version
To determine if you are upgrading or reverting your firmware image, examine the firmware
version number. For example, if your current firmware version is FortiMail-400
3.00,build288,080327, changing to FortiMail-400 3.00,build266,071209, an
earlier build number and date, indicates that you are reverting.
Reverting to an earlier version may cause the FortiMail unit to remove parts of the configuration
that are not valid for that earlier version. In some cases, you may lose all mail data and
configurations.
When upgrading, there may also be additional considerations. For details, see “Upgrading the
firmware” on page 603.
Therefore, no matter you are upgrading or downgrading, it is always a good practice to back up
the configuration and mail data.
Installing firmware replaces the current antivirus definitions with those included with the
firmware release that you are installing. After you install the new firmware, make sure that your
FortiGuard Antivirus definitions are up-to-date.
14.After upgrading to FortiMail v3.0 from any older version, create new LDAP profiles. LDAP
profiles cannot be automatically converted from the FortiMail v3.0 configuration format. For
details, see “Configuring LDAP profiles” on page 461.
If your FortiMail unit has not been reset to its default configuration, but you cannot connect to
the web UI or CLI, you can restore the firmware, resetting the FortiMail unit to its default
configuration in order to reconnect using the default network interface IP address. For more
information, see “Clean installing firmware” on page 603.
This procedure requires a FortiMail model whose hardware includes a front LCD panel.
Data bits 8
Parity None
Stop bits 1
The following procedure restores only the core configuration file, which does not include items
such as the Bayesian databases, dictionary database, and other items. To restore backups of
those items, use the web UI.
1. Initiate a connection from your management computer to the CLI of the FortiMail unit, and
log in as the admin administrator, or an administrator account that has system configuration
read and write privileges.
2. Connect a network interface of the FortiMail unit directly or to the same subnet as a TFTP
server.
3. Copy the new firmware image file to the root directory of the TFTP server.
4. Verify that the TFTP server is currently running, and that the FortiMail unit can reach the
TFTP server.
To use the FortiMail CLI to verify connectivity, enter the following command:
execute ping 192.168.1.168
where 192.168.1.168 is the IP address of the TFTP server.
5. Enter the following command:
execute restore config tftp <file_name> <tftp_ipv4>
The following message appears:
This operation will overwrite the current settings!
(The current admin password will be preserved.)
Do you want to continue? (y/n)
6. Enter y.
The FortiMail unit restores the configuration file and reboots. Time required varies by the size
of the file and the speed of your network connection.
7. After restoring the configuration file, verify that the settings have been successfully loaded.
For details on verifying the configuration restoration, see “Verifying the configuration” on
page 602.
Back up your configuration before beginning this procedure, if possible. A clean install resets
the configuration, including the IP addresses of network interfaces. For information on
reconnecting to a FortiMail unit whose network interface configuration has been reset, see
“Reconnecting to the FortiMail unit” on page 600.
If you are reverting to a previous FortiMail version (for example, reverting from v3.0 to v2.80),
you might not be able to restore your previous configuration from the backup configuration file.
You have only 3 seconds to press a key. If you do not press a key soon enough, the FortiMail
unit reboots and you must log in and repeat the execute reboot command.
If you successfully interrupt the startup process, the following messages appears:
[G]: Get firmware image from TFTP server.
[F]: Format boot device.
[B]: Boot with backup firmware and set as default.
[I]: Configuration and information.
[Q]: Quit menu and continue to boot with default firmware.
[H]: Display this list of options.
Enter G,F,B,I,Q,or H:
10.If the firmware version requires that you first format the boot device before installing
firmware, type F. (Format boot device) before continuing.
11.Type G to get the firmware image from the TFTP server.
The following message appears:
Enter TFTP server address [192.168.1.168]:
12.Type the IP address of the TFTP server and press Enter.
The following message appears:
Enter Local Address [192.168.1.188]:
Installing firmware replaces the current FortiGuard Antivirus definitions with the definitions
included with the firmware release you are installing. After you install new firmware, update the
antivirus definitions.
If you are installing or upgrading firmware to a high availability (HA) group, install firmware on the
slave unit/units before installing firmware on the master unit.
Similar to upgrading the firmware of a standalone FortiMail unit, normal email processing is
temporarily interrupted while firmware is being installed on the master unit, but, if the HA group
is active-passive, it is not interrupted while firmware is being installed on slave units.
Installing firmware on an active-passive HA group does not necessarily trigger a failover. Before
a firmware installation, the master unit signals the slave unit that a firmware upgrade is taking
place. This causes the HA daemon operating on the slave unit to pause its monitoring of the
master unit for a short time. When the firmware installation is complete, the master unit signals
the slave unit to resume HA heartbeat monitoring. If the slave unit has not received this signal
after a few minutes, the slave unit resumes HA heartbeat monitoring anyway, and, if the master
unit has failed during the firmware installation, the HA group fails over to the slave unit, which
becomes the new master unit.
This section is a collection of guidelines to ensure the most secure and reliable operation of
FortiMail units.
These same guidelines can be found alongside their related setting throughout this
Administration Guide. To provide a convenient checklist, these guidelines are also listed here.
This section includes:
• System security tuning
• Network topology tuning
• High availability (HA) tuning
• SMTP connectivity tuning
• Antispam tuning
• Policy tuning
• System maintenance tips
• Performance tuning
The following is a general list of techniques and strategies to improve the security of your
FortiMail device.
• Install the FortiMail unit in a secure location, such as a locked room with restricted access.
Prohibiting access to the unit will increase the security of the device since unauthorized
users can disrupt your entire network through unintentional and intentional interventions
• Always remember to upgrade the firmware to the latest version.
• Avoid generic administrator account names such as “admin”. If an attacker can guess your
admin name they will only need to determine your password.
• Do not allow administration access on the external interface and use internal access
methods such as IPsec VPN or SSL VPN. If you have to have remote access and cannot use
IPsec or SSL VPN, only allow HTTPS and SSH and use secure access methods such as
trusted hosts and Two-factor authentication.
• Make sure to establish trusted hosts for administrators to limit what computers an
administrator can log in to the unit from. Identifying a trusted house will make the unit only
accept the administrator’s login from the configured IP address or subnet.
• Change the default administrative port to a non-standard port.
• Register with support services to activate the warranty on your device.
• To avoid the possibility of an administrator walking away from the management computer
and leaving it exposed, you can add an automatic idle time-out. If the web-based manager is
not used for a specified amount of time, the unit automatically logs the administrator out.
• Enable automatic clock synchronization to facilitate auditing and consistency between
expiry dates used in expiration of certificates and security protocols.
• Brute force password software can launch more than just dictionary attacks. It can discover
common passwords where a letter is replaced by a number. For example, if “p4ssw0rd” is
Page 607
used as a password, it can be cracked. Create a safer password policy that administrators
must follow to facilitate a safer connection.
• Set a lockout duration for when an administrator enters an incorrect password a specified
number of times, using the CLI command “set admin-lockout-duration” and “set
admin-lockout-threshold” under “config system global”.
• Enable administrative access only to the network interfaces (located in System > Network >
Interface) through which legitimate FortiMail administrators will connect.
• Restrict administrative access to trusted hosts/networks (located in System >
Administrator > Administrator) from which legitimate FortiMail administrators will connect.
Domain restriction
Secure password
Trusted hosts
Access level
• Create additional system- and domain-level administrators with limited permissions for
less-demanding management tasks.
• Administrator passwords should be at least six characters long, use both numbers and
letters, and be changed regularly. Administrator passwords can be changed by going to
System > Administrator > Administrator and selecting the Edit icon for the login to be
modified.
• If your FortiMail unit has an LCD panel, restrict access to the control buttons and LCD by
requiring a personal identification number (PIN, located in System > Configuration > Option).
• Do not increase the administrator idle time-out (located in System > Configuration > Option)
from the default of five minutes.
• Verify that the system time and time zone (located in System > Configuration > Time) are
correct. Many features, including FortiGuard updates, SSL connections, log timestamps and
scheduled reports, rely on a correct system time.
The FortiMail unit can be bypassed in a complex network environment if the network is not
carefully planned and deployed.
Best practices and fine tuning Page 608 FortiMail 6.2.0 Administration Guide
To ensure maximum safety:
• Configure routers and firewalls to send all SMTP traffic to or through the FortiMail unit for
scanning.
• If the FortiMail unit will operate in gateway mode, on public DNS servers, modify the MX
records for each protected domain to contain only a single MX record entry that refers to the
FortiMail unit. Spammers can easily determine the lowest priority mail server (highest
preference number in MX record) and deliver spam to it, instead of the FortiMail unit, in an
attempt to avoid spam defenses.
• If the FortiMail unit will operate in transparent mode, deploy it directly in front of your
protected email servers so that all email can be scanned.
• If the FortiMail unit will operate in transparent mode, do not connect two ports to the same
VLAN on a switch or to the same hub. Some Layer 2 switches become unstable when they
detect the same media access control (MAC) address originating on more than one switch
interface or from more than one VLAN.
• Isolate HA interface connections from your overall network. Heartbeat and synchronization
packets contain sensitive configuration information and can consume considerable network
bandwidth. For an active-passive or a config-only HA group consisting of only two FortiMail
units, directly connect the HA interfaces using a crossover cable. For a config-only HA group
consisting of more than two FortiMail units, connect the HA interfaces to a switch and do not
connect this switch to your overall network.
• Use FortiMail active-passive HA to provide failover protection so that if your primary
FortiMail unit fails, the backup FortiMail unit can continue processing email with only a minor
interruption to your email traffic.
• Use config-only HA if you want to create a mail server farm for a large organization. You can
also install a FortiMail config-only HA group behind a load balancer. The load balancer can
balance the mail processing load to all FortiMail units in the config-only HA group, improving
mail processing capacity.
• Maintain the HA heartbeat connection between HA members. If HA heartbeat
communication is interrupted and no remote services are detected, HA synchronization is
disrupted and, for active-passive HA groups, the backup unit will assume that the primary
unit has failed and become the new primary unit.
• License all FortiMail units in the HA group for the FortiGuard Antispam and FortiGuard
Antivirus services. If you only license the primary unit in an active-passive HA group, after a
failover the backup unit cannot connect to the FortiGuard Antispam service. Also, antivirus
engine and antivirus definition versions are not synchronized between the primary and
backup units.
• Configure HA to synchronize the system mail directory and the user home directory so that
no email messages in these directories are lost when a failover occurs.
• Do not synchronize/back up the MTA spool directories. Because the content of the MTA
spool directories is very dynamic, synchronizing MTA spool directories between FortiMail
units may not be effective and may use a lot of bandwidth. In addition, it is usually not
necessary because, if the former primary unit can restart, the MTA spool directories will
synchronize after a failover. For details, see “Using high availability (HA)” on page 240.
• Store mail data on a NAS server while operating an HA group. For example, backing up your
NAS server regularly can help prevent loss of FortiMail mail data. Also, if your FortiMail unit
experiences a temporary failure you can still access the mail data on the NAS server.
• If you are using a NAS server, disable mail data synchronization. If mail data synchronization
is enabled for a FortiMail active-passive HA group that is using a NAS server for remote
Best practices and fine tuning Page 609 FortiMail 6.2.0 Administration Guide
storage of mail data, both the primary and backup units store the mail data to the NAS
server, resulting in duplicate traffic. Disable mail data synchronization to conserve system
resources and network bandwidth.
• Use SNMP, syslog, or email alerts to monitor a cluster for failover messages. These alert
messages may aid in quick discovery and diagnosis of network problems. SNMP can be
configured in System > Configuration > SNMP v1/v2c. Syslog output can be configured in
Log and Report > Log Settings > Remote. Email alerts can be configured in
Log and Report > Alert Email.
• If you configure an HA virtual IP in active-passive mode, configure one IP address but both
host names in your DNS records.
• Configure a fully qualified domain name (FQDN) that is different than that of your protected
email server (gateway mode and transparent mode). The FortiMail unit’s domain name will
be used by many FortiMail features such as quarantine, spam reports, Bayesian database
training, alerts, and DSN email. The FQDN is formed by prepending the host name to the
local domain name, both of which are configured in System > Mail Settings > Mail
Server Settings.
• Use a different host name for each FortiMail unit when managing multiple FortiMail units of
the same model or when configuring an HA cluster. The host name is set in System > Mail
Settings > Mail Server Settings.
• If the FortiMail unit is used as an outbound relay (gateway mode and server mode only) or if
remote email users will view their per-recipient quarantines, the FortiMail unit’s FQDN must
be globally DNS-resolvable. External SMTP servers require that A records and reverse DNS
records be configured on public DNS servers for both forward and reverse lookup of the
FQDN and its IP address.
• Configure the public DNS records for each of your protected domains with only one MX
record that routes incoming email through the FortiMail unit (gateway mode). With only one
MX record, spammers cannot bypass the FortiMail unit by using lower-priority mail
gateways.
• If the FortiMail unit is operating in transparent mode, SMTP clients are configured for
authentication, and you have disabled the Use client-specified SMTP Server to send email
option for SMTP proxies (located in System > Mail Settings > Proxies), you must configure
and apply an authentication profile (such as Profile > Authentication). Without the
authentication profile, authentication with the FortiMail unit will fail. Additionally, you must
configure an access control rule (located in Policy > Access Control > Receiving) to allow
relay to external domains.
Antispam tuning
• If the spam catch rate is low, see “Troubleshoot antispam issues” on page 623 for fine
tuning instructions.
• Use block and safe lists with caution. They are simple and efficient tools for fighting spam
and enhancing performance. They can also cause false positives and false negatives if not
Best practices and fine tuning Page 610 FortiMail 6.2.0 Administration Guide
used properly, however. For example, a safe list entry *.edu would allow all mail from the .edu
top level domain to bypass the FortiMail unit's antispam scans.
• Do not safelist protected domains. Because safe lists bypass antispam scans, email with
spoofed sender addresses in the protected domains could bypass antispam features.
• To prevent directory harvest attacks (DHA), use a combination of recipient verification and
sender reputation.
DHA is one a common method used by spammers. It utilizes recipient verification in an
attempt to determine an email server’s valid email addresses so that they can be added to a
spam database.
If Recipient address Verification (accessed through Domain & User > Domain > Domain) is
enabled, each recipient address will be verified with the protected email server. For email
destined for invalid recipient addresses, the FortiMail unit will return User Unknown
messages to the SMTP client. However, spammers will utilize this response to guess and
learn valid recipient addresses.
To prevent this, enable Enable sender reputation checking in session profiles (located in
Profile > Session > Session). Sender reputation weighs each SMTP client’s IP address and
assigns them a score. If the SMTP client sends several email messages to unknown
recipients, the sender’s reputation score is increased significantly. When the sender
reputation score exceeds the threshold, the SMTP client’s SMTP sessions are terminated at
connection level.
• To prevent delivery status notification (DSN) spam, enable bounce verification.
Spammers may sometimes use the DSN mechanism to bypass antispam measures. In this
attack, sometimes called “backscatter”, the spammer spoofs the email address of a
legitimate sender and intentionally sends spam to an undeliverable recipient, expecting that
the recipient’s email server will send a DSN back to the sender to notify him/her of the
delivery failure. Because this attack utilizes innocent email servers and a standard
notification mechanism, many antispam mechanisms may be unable to detect the difference
between legitimate and spoofed DSN.
To prevent this, enable bounce address tagging and verification (located in Security >
Bounce Verification > Settings) and configure it with an active key. In addition, disable both
the Bypass bounce verification option (located in Domain & User > Domain > Domain) and
the Bypass bounce verification check option (located in Profile > Session > Session). It is
also recommended to select Use antispam profile settings for the Bounce verification action
option (located in Security > Bounce Verification > Settings). Finally, verify that all email, both
incoming and outgoing, is routed through the FortiMail unit. The FortiMail unit cannot tag
email, or recognize legitimate DSN for previously sent email, if all email does not pass
through it.
Policy tuning
• Disable or delete policies and policy settings with care. Any changes made to policies take
effect immediately.
• Arrange policies in the policy list from most specific at the top to more general at the bottom.
Policy matches are checked from the top of the list, downward. For example, a very general
policy matches all connection attempts. When you create exceptions to a general policy, you
must add them to the policy list above the general policy.
• Verify all SMTP traffic has a matching policy. If traffic does not match a policy, it is
allowed. If you’re certain all desired traffic is allowed by existing policies, add an IP policy to
the bottom of the IP policy list to reject all remaining connections and thereby tighten
security.
To do this, create a new IP policy. Enter 0.0.0.0/0 as the IP address to match, and select
Reject connections with this match. Finally, move this policy to the bottom of the IP policy
Best practices and fine tuning Page 611 FortiMail 6.2.0 Administration Guide
list. With this policy in place, the FortiMail unit’s default behavior of allowing traffic with no
policy matches is effectively reversed. Traffic with no other matches will now be denied by
this final policy.
• Users can authenticate with the FortiMail unit using SMTP, POP3, IMAP, LDAP, or RADIUS
servers. For users to authenticate successfully, you must create and apply an authentication
profile (accessed from Profile > LDAP > LDAP, or Profile > Authentication or
Profile > Authentication > RADIUS).
• Addresses specified in an IP-based policy should be as specific as possible. Use subnets or
specific IP addresses for more granular control. Use a 32-bit subnet mask (that is,
255.255.255.255) when creating a single host address. The IP setting 0.0.0.0/0 matches
all hosts.
Performance tuning
• Configure Recipient Address Verification (located in Domain & User > Domain > Domain)
with an SMTP or LDAP server. This is especially important when quarantining is enabled
because of the potentially large amount of quarantined mail for invalid recipients.
Best practices and fine tuning Page 612 FortiMail 6.2.0 Administration Guide
Alternatively, enable Automatic Removal of Invalid Quarantine Accounts (located in Domain &
User > Domain > Domain) to delete invalid user quarantine directories daily at a configured
time.
If quarantining is enabled and neither of these features are enabled, performance will suffer
and could potentially cause the FortiMail unit to refuse SMTP connections if subject to
extremely heavy mail traffic.
• Enable greylisting (located in Profile > AntiSpam > AntiSpam) to reject many spam delivery
attempts before more resource-intensive antispam scans are used to identify spam.
• Apply spam throttling features by creating an IP-based policy (located in Policy > IP Policy >
IP Policy) with a session profile (located in Profile > Session > Session). Sender reputation,
session limiting, and error handling are particularly useful.
• To reduce latency associated with DNS queries, use a DNS server on your local network.
• If logs are stored on the FortiMail unit, set logging rotation size (located in Log and Report >
Log Settings > Local) to between 10 MB and 20 MB, and set the event logging level to
warning or greater. Delete or back up old logs regularly to free storage space.
• Regularly delete or backup old reports to reduce the number of reports on the local disk.
• Regularly delete old and unwanted mail queue entries and quarantined mail.
• Schedule resource-intensive and non-time-critical tasks, such as report generation and
delivery of deferred oversize messages, to low-traffic periods.
• Disable resource-intensive scans, such as the heuristic scan (located in Profile > AntiSpam >
AntiSpam), when spam capture rate is otherwise satisfactory.
• Consider enabling the Max message size to scan and Bypass scan on SMTP authentication
in the Scan Conditions section of antispam profiles (located in Profile > AntiSpam >
AntiSpam).
• If possible, format the mail and log disks regularly to improve disk performance.
Back up logs and mail before formatting the hard disks. Formatting log disks deletes all log
entries. Formatting mail disks with the execute formatmaildisk CLI command will result in
the loss of all locally stored mail; execute formatmaildisk_backup will preserve it. These
operations require a reboot when complete. For more information, see the FortiMail CLI
Reference.
Best practices and fine tuning Page 613 FortiMail 6.2.0 Administration Guide
Troubleshooting
This section provides guidelines to help you determine why your FortiMail unit is behaving
unexpectedly. It includes general troubleshooting methods and specific troubleshooting tips
using both the command line interface (CLI) and the web UI. Each troubleshooting item
describes both the problem and the solution.
Some CLI commands provide troubleshooting information not available through the web UI.
The web UI is better suited for viewing large amounts of information on screen, reading logs and
archives, and viewing status through the dashboard.
For additional information, see “Best practices and fine tuning” on page 607.
This section contains the following topics:
• Establish a system baseline
• Define the problem
• Search for a known solution
• Create a troubleshooting plan
• Gather system information
• Troubleshoot hardware issues
• Troubleshoot GUI and CLI connection issues
• Troubleshoot FortiGuard connection issues
• Troubleshoot MTA issues
• Troubleshoot antispam issues
• Troubleshoot HA issues
• Troubleshoot resource issues
• Troubleshoot bootup issues
• Troubleshoot installation issues
• Contact Fortinet customer support for assistance
Before you can clearly define an abnormal operation, you need to know what the normal
operating status is. You can create a repository of this baseline information by keeping logs, and
by regularly running information gathering commands and saving the output. When there is a
problem, this regular operation data helps you determine what has changed.
It is a good idea to back up the FortiMail unit's configuration regularly. If you accidently change
something, the backup can help you restore normal operation quickly and easily. Backups also
can aid in troubleshooting.
Page 614
Define the problem
Before you can solve a problem, you need to understand it. Often this step can be the longest in
this process. Before starting to troubleshoot a problem, answer these questions:
• Where and when did the problem occur?
• Has it ever worked before?
If the unit never worked properly, you may not want to spend time troubleshooting
something that could well be defective.
• Where does the problem lie?
Be specific. Do not assume the problem being experienced is the actual problem. First
determine if the FortiMail unit's problem lies elsewhere before starting to troubleshoot the
unit.
• Is it a connectivity issue? Can your FortiMail unit communicate with your network and the
Internet? Is there connection to a DNS server?
• Is there more than one thing not working?
Make a list.
• Is it partly working? If so, what parts are working?
Make a list.
• Can the problem be reproduced at will or is it intermittent?
An intermittent problem can be difficult to troubleshoot due to the difficulty reproducing the
issue.
• Are the servers covered by the policy working? Has a policy been disabled?
Check the status of the protected servers.
• Is your system overloaded?
View the System Resource on the dashboard.
• What has changed?
Do not assume that nothing has changed in the network. Use the FortiMail event log to see if
something changed in the configuration. If something did change, see what the effect is
when you roll back the change.
• After determining the scope of the problem and isolating it, what servers does if affect?
Once the problem is defined, you can search for a solution and then create a troubleshooting
plan to solve it.
You can save time and effort during the troubleshooting process by checking if other FortiMail
administrators experienced a similar problem before. First check within your organization. Next,
access the Fortinet online resources that provide valuable information about FortiMail technical
issues.
Technical documentation
FortiMail administration guides, quickstart guides, and other technical documents are available
online at:
http://docs.fortinet.com
Also check the release notes for your FortiMail unit.
Once you fully define the problem or problems, begin creating a troubleshooting plan. The plan
should list all possible causes of the problems that you can think of, and how to test for each
cause.
The plan will act as a checklist so that you know what you have tried and what is left to check.
The checklist is helpful if more than one person will be troubleshooting: without a written plan,
people can become easily confused and steps skipped. Also, if you have to pass the
problem-solving to someone else, providing a detailed list of what data you gathered and what
solutions you tried demonstrates professionalism.
Be ready to add steps to your plan as needed. After you are part way through, you may discover
that you forgot some tests, or a test you performed discovered new information. This is normal.
Your FortiMail unit provides many features to aid in troubleshooting and performance
monitoring.
Use the web UI's dashboard and the CLI commands to define the scope and details of your
problem. Keep track of the information you gather. Fortinet customer support may request it if
you contact them for assistance.
In the advanced management mode of the web UI, go to Monitor to view the system information
and all other mail delivery information. For details, see “Monitoring the system” on page 131.
You can also use the CLI diagnose commands to troubleshoot both the hardware and firmware
issues. For details, see the diagnose command chapter in the FortiMail CLI Reference.
Problem
Event log shows RAID errors regarding a degraded array event on multiple HD dev.
(ref./dev/md2 and /dev/md3)
Solution
You may have a hard drive device problem. For example, one of the RAID disks may not be
functioning properly. Check the RAID status (see “Configuring RAID” on page 234).
Problem
An administrator account can connect to the advanced mode of the web UI, but not to the basic
mode nor to the CLI.
Solution
Set the administrator account’s Domain to System. Domain administrators, also known as tiered
administrators, cannot access the CLI or the basic mode of the GUI. For more information, see
“FortiMail operation modes” on page 24.
If you require the ability to restrict the account to specific areas of the GUI, consider using
access profiles instead. For details, see “Configuring admin profiles” on page 184.
Problem
Administrators cannot log in to the web UI or the CLI.
Problem
The FortiMail unit cannot connect to the FDN servers to use FortiGuard Antivirus and/or
FortiGuard Antispam services.
scheduled updates • Configure the system time of the FortiMail unit, including its time zone. For
(FortiGuard more information, see “Configuring the time and date” on page 185.
Antivirus/FortiGuard • Intermediary firewall devices must allow the FortiMail unit to use HTTPS on
Antispam) TCP port 443 to connect to the FDN.
• If your FortiMail unit connects to the Internet through a proxy, use the CLI
command set system autoupdate tunneling to enable the
FortiMail unit to connect to the FDN through the proxy. For more information,
see the FortiMail CLI Reference.
• You might need to override the FortiGuard server to which the FortiMail unit is
connecting, and connect to one other than the default server for your time
zone.
rating queries • Intermediary firewall devices must allow the FortiMail unit to use UDP port 53
(FortiGuard to connect to the FDN.
Antispam)
If you suspect that a device on your network is interfering with connectivity, you can analyze
traffic and verify that the FortiMail unit is sending and receiving traffic on the required port
Problem
SMTP clients receive the message 550 5.7.1 Relay access denied.
Solution
This indicates rejection due to lack of relay permission.
• For incoming connections, relay will be allowed automatically unless explicitly rejected
through the access control list (see “Configuring access control rules” on page 366).
• For outgoing connections, relay will be allowed only if explicitly granted by authentication
(see “Controlling email based on IP addresses” on page 378) or by the access control list
(see “Configuring access control rules” on page 366). If authentication is required, verify that
the SMTP client is configured to authenticate.
If you receive a 5.7.1 error message that does not mention relay access, and sender reputation
or endpoint reputation is enabled, verify that the SMTP client has not exceeded the reputation
score threshold for rejection.
Problem
The FortiMail unit is bypassed.
Solution
FortiMail units can be physically bypassed in a complex network environment if the network is
not carefully planned and deployed. Bypassing can occur if SMTP traffic is not correctly routed
by intermediary NAT devices such as routers and firewalls.
If your FortiMail unit will be performing antispam scans on outgoing email, all outgoing email
must be routed through the FortiMail unit. If your email users and protected servers are
configured to relay outgoing mail through another MTA such as that of your ISP, the FortiMail
unit will be bypassed for outgoing email.
Spammers can easily determine the lowest priority mail server (highest preference number in
the DNS MX record) and deliver spam through that lower-priority MX in an attempt to avoid
more effective spam defenses.
Solution
If email is not physically bypassing the FortiMail unit, but is not undergoing both antispam and
antivirus scans, verify that access control rules are not too permissive. Also verify that a policy
exists to match those connections, and that you have selected antispam and antivirus profiles
in the policy. Scans will not be performed if no policy exists to match the connection.
Problem
Antispam scans are bypassed, but antivirus scans are not.
Solution
If antivirus scans occur, but antispam scans do not, verify that safe lists are not too permissive
and that you have not safelisted senders in the protected domains. Safelist entries cause the
FortiMail unit to omit antispam scans.
Additionally, verify that either the Bypass scan on SMTP authentication option is disabled, or
confirm that authenticated SMTP clients have not been compromised and are not a source of
spam.
Problem
Recipient verification through SMTP fails.
Solution
If you have enabled the Recipient Address Verification option with a protected domain’s SMTP
server, but recipient verification fails, possible causes include:
• The SMTP server is not available.
• The network connection is not reliable between the FortiMail unit and the SMTP server.
• The server is a Microsoft Exchange server and SMTP recipient verification is not enabled
and configured.
When the SMTP server is unavailable for recipient verification, the FortiMail unit returns the 451
SMTP reply code. The email would remain in the sending queue of the sending MTA for the next
retry.
Problem
SMTP clients receive the message 451 Try again later.
Solution
There are several situations in which the FortiMail unit could return the 451 Try again later
SMTP reply code to an SMTP client. Below are some common causes.
• The greylist routine has encountered an unknown sender or the greylist entry has expired for
the existing sender and recipient pair. This is an expected behavior, and, for legitimate email,
will resolve itself when the SMTP client retries its delivery later during the greylist window.
• Recipient verification is enabled and the FortiMail unit is unable to connect to the recipient
verification server. There should be some related entries in the antispam log, such as
Problem
The FortiMail unit replies with a temporary failure SMTP reply code, and the event log shows
Milter (fas_milter): timeout before data read.
Solution
The timeout is caused by the FortiMail unit not responding within 4 minutes.
Slow or unresponsive DNS server response for DNSBL and SURBL scans can cause the
FortiMail unit’s antispam scans to be unable to complete before the timeout. When this occurs,
the FortiMail unit will report a temporary failure. In most cases, the sending MTA will retry
delivery later. If this problem is persistent, verify connectivity with your DNSBL and SURBL
servers, and consider providing private DNSBL/SURBL servers on your local network.
Problem
The event log shows Milter (mailfilterd): timeout before data read,
where=eom.
Solution
This may be caused by the following reason:
If an email message contains a shortened URI that redirects to another URI, the FortiMail unit is
able to send a request to the shortened URI to get the redirected URI and scan it against the
FortiGuard AntiSpam database. By default, this function is enabled. To use it, you need to open
your HTTP port to allow the FortiMail unit to send requests for scanning the redirected URI.
This also means, if the upstreaming device (firewall, router, etc.) does not allow HTTP traffic
from the FortiMail unit, FortiMail’s HTTP request to FortiGuard servers will get timeout.
Problem
When recipient verification is enabled on the Microsoft Exchange server, all email is rejected.
Solution
By default, Microsoft Exchange servers will not verify the recipient. With an Microsoft Exchange
server as the MTA, it is recommended to configure the FortiMail to use LDAP to do recipient
verification using the Microsoft Active Directory service. Alternatively, you can configure
Microsoft Exchange to enable SMTP recipient verification.
Problem
The spam detection rate is low.
Solution
• Confirm that no SMTP traffic is bypassing the FortiMail unit due to an incorrect routing
policy. Configure routers and firewalls to direct all SMTP traffic to or through the FortiMail
unit to be scanned. If the FortiMail unit is operating in gateway mode, for each protected
domain, modify public DNS records to keep only a single MX record entry that points to the
FortiMail unit.
• Use safe lists with caution. For example, a safe list entry *.edu would allow all email from all
domains in the .edu top level domain to bypass antispam scans.
• Do not safelist protected domains. Because safe lists bypass antispam scans, email with
spoofed sender addresses in the protected domains could bypass antispam features.
• Verify that all protected domains have matching policies and proper protection profiles.
• Consider enabling adaptive antispam features such as greylisting and sender reputation.
Enable additional antispam features gradually, and do not enable additional antispam features
after you have achieved a satisfactory spam detection rate. Excessive antispam scans can
unnecessarily decrease the performance of the FortiMail unit.
Problem
Email users are spammed by DSN for email they did not actually send.
Solution
Spammers may sometimes use the delivery status notification (DSN) mechanism to bypass
antispam measures. In this attack, sometimes called “backscatter”, the spammer spoofs the
email address of a legitimate sender and intentionally sends spam to an undeliverable recipient,
expecting that the recipient’s email server will send a DSN back to the sender to notify him/her
of the delivery failure. Because this attack utilizes innocent email servers and a standard
To detect backscatter
1. Enable bounce address tagging and configure an active key (see “Configuring bounce
verification and tagging” on page 536).
2. Next, disable both the Bypass bounce verification option (see “Configuring protected
domains” on page 310) and the Bypass bounce verification check option (see “Configuring
session profiles” on page 392).
3. In addition, verify that all outgoing and incoming email passes through the FortiMail unit. The
FortiMail unit cannot tag email, or recognize legitimate DSN for previously sent email, if all
email does not pass through it. For details, see “Configuring bounce verification and
tagging” on page 536.
Problem
Email users cannot release and delete quarantined messages by email.
Solution
Two common reasons are:
• The domain name portion of the recipient email address (for example, fortimail.example.com
in [email protected]) could not be resolved by the DNS server into the
FortiMail unit's IP address.
• The sender’s email address in the release message was not the same as the intended
recipient of the email that was quarantined. If you have configured your mail client to handle
multiple email accounts, verify that the release/delete message is being sent by the email
address corresponding to that per-recipient quarantine. For example, if an email for
[email protected] is quarantined, to release that email, you must send a release message
from [email protected].
Problem
Attachments less than the 10 MB configured limit are not deliverable
Solution
The message limit is a total maximum for the entire transmitted email: the message body,
message headers, all attachments, and encoding, which in some cases can expand the size of
the email. For example, depending on the encoding and the content of the email, an email with
an 8 MB attachment could easily exceed the transmitted message size limit of 10 MB.
Therefore, attachments should be significantly smaller than the configured limit.
Problem
The exported email archive is an empty file.
Solution
Make sure you select the check boxes of archived email (see “Configuring email archiving
accounts” on page 572) that you want to export. Only email whose Status column contains a
check mark will be exported.
Solution
Log messages such as:
RblServer::check 20.4.90.202.zen.spamhaus.org error=2 : 'Host name
lookup failure'
could mean that the query is being refused because it exceeds pre-defined service limitations
by the DNSBL service provider. If you have very high volumes of email traffic, consider providing
a DNSBL server on your local network by synchronizing the DNSBL database to it. For details,
consult your service provider.
Problem
Antispam quarantine reports are delayed.
Solution
In most cases, this is caused by an excessive number of quarantine accounts.
When an email is accepted for a recipient and identified as spam, a quarantine account is
automatically created in FortiMail.
Check that these quarantine accounts are valid, as netbots and spam harvest scans can cause
the creation of a large number of false accounts.
There are options to manage quarantine accounts in FortiMail. These options are available
under Domain & User > Domain > Domain (not in server mode).
• Enable Recipient Address Verification to stop invalid account creation with SMTP or LDAP
authentication (Note that LDAP cache should be enabled).
• Remove invalid accounts by enabling Automatic Removal of Invalid Quarantine Accounts.
Recipient validation is a clean solution with a performance cost on SMTP or LDAP services. Its
another disadvantage is that it also results in informing the outside whether the accounts are
valid or not.
The automatic clearance of accounts is started once per day at 4:00 AM by default, but can be
modified by the following CLI command:
config antispam settings
set system option backend_verify <hh:mm:ss>
end
where hh is the hour according to a 24-hour clock, mm is the minute, and ss is the second.
Troubleshoot HA issues
Problem
Active-passive HA cluster does not switch to the backup unit after a failure.
Solution
If an individual service has failed that does not disrupt the HA heartbeat, an active-passive HA
cluster may not fail over. For example, it is possible that one or more services (such as SMTP,
Problem
Mail queues do not appear on the HA backup unit.
Solution
In order to display queue content in the backup unit, mail data must be synchronized from the
primary unit. If the Backup MTA queue directories option is disabled, mail queues will not be
synchronized. You can enable MTA spool synchronization to view the mail queues from either
the backup unit or the primary unit.
Synchronization of MTA spool directories can result in decreased performance, and may not let
you to view all email in the mail queues, as mail queue content can change more rapidly than
synchronization occurs.
Problem
The FortiMail unit is suffering from sluggish or stalled performance.
Solution
Use the CLI to view a list of the most system-intensive processes. This may show processes
that are hogging resources. For example:
diagnose system top 10
The above command generates a report of processes every 10 seconds. The report provides
the process names, their process ID (pid), status, CPU usage, and memory usage.
The report continues to refresh and display in the CLI window until you enter q (quit).
This section addresses problems you may experience in rare cases when powering on your
FortiMail unit. If you continue to have problems, please contact customer support for
assistance.
It is rare that units experience any of the symptoms listed here. Fortinet hardware is reliable with
a long expected operation life.
For troubleshooting tips and tools related to FortiMail installation and setup, see “Testing the
installation” on page 114.
After you define your problem, researched a solution, created a plan, and executed that plan,
and if you have not solved the problem, it is time to contact Fortinet customer support for
assistance.
To receive technical support and service updates, your Fortinet product must be registered.
Registration, support programs, assistance, and regional phone contacts are available at the
following URL:
https://support.fortinet.com
When you are registered and ready to contact support:
This section contains information that you may need to inform or assist your email users so that
they can use FortiMail features.
This information is not the same as what is included in the help for FortiMail webmail. It is
included in the Administration Guide because:
• Email users may require some setup before they can access the help for FortiMail webmail.
• Some information may be too technical for some email users.
• Email users may not be aware that their email has been scanned by a FortiMail unit, much
less where to get documentation for it.
• Email users may not know which operation mode you have configured.
• Email users may be confused if they try to access a feature, but you have not enabled it
(such as Bayesian scanning or their personal quarantine).
• You may need to tailor some information to your network or email users.
This section includes:
• Training Bayesian databases
• Managing tagged spam
• Accessing the personal quarantine and webmail
• Sending email from an email client (gateway and transparent mode)
Bayesian scanning can be used by antispam profiles to filter email for spam. In order to be
accurate, the Bayesian databases that are at the core of this scan must be trained. This is
especially important when the databases are empty.
Administrators can provide initial training. For details, see “Training the Bayesian databases” on
page 546. If you have enabled it (see “Configuring the Bayesian training control accounts” on
page 552 and “Accept training messages from users” on page 424), email users can also
contribute to training the Bayesian databases.
To help to improve the accuracy of the database, email users selectively forward email to the
FortiMail unit. These email are used as models of what is or is not spam. When it has seen
enough examples to become more accurate at catching spam, a Bayesian database is said to
be well-trained.
For example, if the local domain is example.com, and the Bayesian control email addresses are
the default ones, an administrator might provide the following instructions to his or her email
users.
Page 630
To train your antispam filters
1. Initially, forward a sample set of spam and non-spam messages.
• If you have collected spam, such as in a junk mail folder, and want to train your personal
antispam filters, forward them to [email protected] from your email
account. Similar email will be recognized as spam.
• If you have collected non-spam email, such as your inbox or archives, and want to train
your personal spam filters, forward them to [email protected] from
your email account. Similar email will be recognized as legitimate email.
2. On an ongoing basis, to fine-tune your antispam filters, forward any corrections — spam that
was mistaken for legitimate email, or email that was mistaken for spam.
• Forward undetected spam to [email protected] from your email account.
• Forward legitimate email that was mistaken for spam to [email protected]
from your email account.
• If you belong to an alias and receive spam that was sent to the alias address, forward it to
[email protected] to train the alias’s database. Remember to enter the alias,
instead of your own email address, in the From: field.
This helps your antispam filters to properly distinguish similar email/spam in the future.
Instead of detaining an email in the system or personal quarantine, the administrator can
configure the FortiMail unit to tag the subject line or header of an email that is detected as
spam. For details, see “Configuring antispam action profiles” on page 427.
Once spam is tagged, the administrator notifies email users of the text that comprises the tag.
Email users can then set up a rule-based folder in their email clients to automatically collect the
spam based on tags.
For example, if spam subject lines are tagged with “SPAM”, email users can make a spam
folder in their email client, then make filter rules in their email clients to redirect all email with this
tag from their inbox into the spam folder.
Methods to create mailbox folders and filter rules vary by email client. For instructions, see your
email client’s documentation.
Each email user has a personal quarantine, also known as the Bulk mailbox folder. If you
selected that action in the antispam action profiles, spam for an email user is redirected to their
personal quarantine.
Email users should monitor their personal quarantines to ensure that legitimate email is not
accidentally quarantined. To do this, you can enable quarantine reports (see “Configuring global
quarantine report settings” on page 508, “Configuring protected domains” on page 310, and
“Using quarantine reports” on page 633). You can also enable email users to view their Bulk
folder through FortiMail webmail.
In addition to personal quarantine access, in server mode, FortiMail webmail also provides
access to the Inbox, address book, and other features.
Setup for email users Page 631 FortiMail 6.2.0 Administration Guide
Available access methods vary by the operation mode of the FortiMail unit:
• Accessing personal quarantines through FortiMail webmail (gateway and transparent mode)
• Accessing FortiMail webmail (server mode)
• Accessing mailboxes through POP3 or IMAPv4 (server mode)
Email users cannot access their personal quarantines through POP3 or IMAP.
Setup for email users Page 632 FortiMail 6.2.0 Administration Guide
Methods vary by the email client. For details, see the email client’s documentation.
Setup for email users Page 633 FortiMail 6.2.0 Administration Guide
Table 59: Sample quarantine report in plain text format
To: [email protected]
From: [email protected]
Subject: Quarantine Summary: [3 message(s) quarantined from Wed, 11
Jul 2007 11:00:01 to Wed, 11 Jul 2007 12:00:01]
Date: Wed, 11 Jul 2007 12:00:01 -0400
Actions:
o) Release a message:
Send an email to <[email protected]> with subject line set
to "[email protected]:Message-Id".
o) Delete a message:
Send an email to <[email protected]> with subject line set
to "[email protected]:Message-Id".
To enable email users to send email through the FortiMail unit using an email client, the
administrator must:
• Create an access control rule that permits valid email clients to connect. For details, see
“Configuring access control rules” on page 366.
• Create an authentication profile to authenticate the users. For details, see “Configuring
authentication profiles” on page 452.
• Enable SMTP authentication in the incoming recipient-based policy. For details, see
“Controlling email based on sender and recipient addresses” on page 384.
Setup for email users Page 634 FortiMail 6.2.0 Administration Guide
The email user must configure their email client with:
• outgoing SMTP email server that is either the FortiMail unit (gateway mode) or the protected
SMTP server (transparent mode)
• enabled SMTP authentication
• user name and password (provided by the administrator; these credentials must mast the
ones retrieved by the authentication profile)
• authentication that includes the domain name, such as [email protected] instead of
user1
Setup for email users Page 635 FortiMail 6.2.0 Administration Guide
Appendix A: Supported RFCs
SMTP RFCs:
• RFC 1213 (Obsoletes: 1158) (Management Information Base for Network Management of
TCP/IP-based Internets: MIB-II)
• RFC 1918 (Obsoletes: 1627, 1597) (Address Allocation for Private Internets)
• RFC 1985 (SMTP Service Extension for Remote Message Queue Starting)
• RFC 2034 (SMTP Service Extension for Returning Enhanced Error Codes)
• RFC 2045 (Obsoletes: 1590, 1522, 1521, 1342, 1341) (Multipurpose Internet Mail
Extensions (MIME) Part One: Format of Internet Message Bodies)
• RFC 2505 (Anti-Spam Recommendations for SMTP MTAs)
• RFC 2634 (Enhanced Security Services for S/MIME)
• RFC 2920 (Obsoletes: 2197, 1854) (SMTP Service Extension for Command Pipelining)
• RFC 3207 (Obsoletes: 2487) (SMTP Service Extension for Secure SMTP over TLS)
• RFC 3461 (Obsoletes: 1891) (SMTP Service Extension for Delivery Status Notifications
(DSNs))
• RFC 3463 (Obsoletes: 1893) (Enhanced Mail System Status Codes)
• RFC 3464 (Obsoletes: 1894) (Extensible Message Format for Delivery Status Notifications)
• RFC 3635 (Obsoletes: 2665, 2358, 1650) (Definitions of Managed Objects for the
Ethernet-like Interface Types)
• RFC 4954 (Obsoletes: 2554) (SMTP Service Extension for Authentication)
• RFC 5321 (Obsoletes: 2821, 1869, 1651, 1425, 974, 821) (SMTP)
• RFC 5322 (Obsoletes: 2822, 822) (Internet Message Format)
• RFC 5751 (Obsoletes: 3851 (Secure/Multipurpose Internet Mail Extentsion (S/MIME)
Version 3.2)
• RFC 6376 (Obsoletes: 5672, 4871, 4870) (DomainKeys Identified Mail (DKIM) Signatures)
• RFC 6522 (Obsoletes: 3462, 1892) (Multipart/Report Content Type for the Reporting of Mail
System Administrative Messages)
• RFC 6409 (Obsoletes: 4409, 2476) (Message Submission)
• RFC 7208 (Obsoletes: 4408) (Sender Policy Framework (SPF) for Authorizing Use of
Domains in E-Mail) Note: This RFC is partially supported. Macros and EXISTS modifiers are
currently treated as neutral.
Page 636
IMAP RFCs
POP3 RFCs
• RFC 1155 (Obsoletes: 1065) (Structure and Identification of Management Information for
TCP/IP-based Interface)
• RFC 1157 (Obsoletes: 1098, 1067) (SNMP v1)
• RFC 1213 (Obsoletes: 1158) (MIB 2)
• RFC 2578 (Obsoletes: 1902, 1442) (Structure of Management Information Version 2)
• RFC 2579 (Obsoletes: 1903, 1443) (Textual Conventions for SMIv2)
• RFC 2595 (Using TLS with IMAP, POP3 and ACAP)
• RFC 3410 (Obsoletes: 2570) (SNMP v3)
• RFC 3416 (Obsoletes: 1905, 1448) (SNMP v2)
Each FortiMail platform, inlcuding the VM versions, has hard-coded maximum values for
various features and functionalities. As such, they may not be practical limits for every situation
and are not a promise of performance.
Starting from 5.2.0, a new mechanism (warning limit/soft limit and hard limit) was introduced to
the following three settings: number of protected domains, number of domain associations, and
number of mailboxes/mail users in server mode. When the warning limit is reached, FortiMail
will display a warning message; when the hard limit is reached, FortiMail will not allow you to
add more.
Starting from 6.0.0, the warning/soft limit is removed.
To view the maximum values of all FortiMail models, see the FortiMail Maximum Values
document on docs.fortinet.com.
Page 639
Appendix C: Port Numbers
By default, FortiMail opens many outbound ports and listening ports to communicate with other
devices.
For a detailed list of open ports, see the Fortinet Communication Ports and Protocols on
http://docs.fortinet.com.
Page 640
Appendix D: Regular expressions
Some FortiMail features support the use of wild card characters (* or ?) or Perl-style regular
expressions in order to create patterns that match multiple IP addresses, email addresses, or
other data.
For detailed information on using regular expressions, see http://perldoc.perl.org/perlretut.html.
A wild card character is a special character that represents one or more other characters. The
most commonly used wild card characters are the asterisk (*), which typically represents zero
or more characters, and the question mark (?), which typically represents any one character.
In Perl-style regular expressions, the period (.) character refers to any single character. It is
similar to the question mark (?) character in wild card match pattern. As a result, example.com
not only matches example.com but also exampleacom, examplebcom, exampleccom, and so
forth.
To match a special character such as “.” and “*” use the backslash ( \ )escape character. For
example, to match example.com, the regular expression should be: example\.com
In Perl regular expressions, an asterisk (*) matches the character before it 0 or more times, not
0 or more times of any character. For example, example*.com matches exampleeeeee.com
but does not match example.com.
To match any character 0 or more times, use “.*” where “.” means any character and the “*”
means 0 or more times. For example, the wild card match pattern exampl*.com should
therefore be exampl.*\.com.
Case sensitivity
Regular expression pattern matching in FortiMail is case insensitive. For example, bad
language blocks bad language, Bad LAnguaGe, etc.Therefore, the regular expression /i,
which may be used to make a word or phrase case insensitive in other products, should not be
used in the FortiMail configuration.
Modifiers
/m Treat the string as multiple lines. For example, m/^b.*.d.w.o.r.d$/m will match
the string spread into multiple lines.
/x Ignore the white spaces in the expression. For example, m/a b c/x will also match
abc.
Page 641
Word boundary
In Perl-style regular expressions, the pattern does not have an implicit word boundary. For
example, the regular expression test not only matches the word “test” but also any word that
contains “test”, such as attest”, “mytest”, “testimony”, “atestb”. The notation \b specifies the
word boundary. To match exactly the word “test”, the expression should be \btest\b.
Syntax
Table 60 lists some example regular expressions, and describes matches for each expression.
Regular expressions on FortiMail units use Perl-style syntax.
Expression Matches
abc abc (the exact character sequence, but anywhere in the string)
a|b Either a or b
ab?c a followed by an optional “b” followed by a” c”; that is, either “abc” or “ac”
a\.c a.c
[^abc]+ Any combination of one or more characters that does not contain an a, b, and/or c (such
as defg)
100\s*mk 100 and mk separated by zero or more white space characters (spaces, tabs, newlines)
abc\b abc when followed by a word boundary (for example, abc! but not abcd)
start\B start when not followed by a word boundary (for example, starting but not
start time)
\x Ignores white space that is neither preceded by a backslash character nor within a
character class. Use this to break up a regular expression into (slightly) more readable
parts.
/x Used to add regular expressions within other text. If the first character in a pattern is
forward slash (/), the / is treated as the delimiter. The pattern must contain a second /.
The pattern between / will be taken as a regular expression, and anything after the
second / will be parsed as a list of regular expression options (i, x, etc). An error occurs
If the second / is missing. In regular expressions, the leading and trailing space is
treated as part of the regular expression.
Examples
pproved
special[\+\-\*=<>\.\,;!\?%&~#§@\^°\$£€\{\}()\[\]\|\\_1]offer
This appendix describes how to use the Transport Layer Security (TLS)/Secure Sockets Layer
(SSL) protocols on the FortiMail unit, including information on how TLS/SSL works, how it is
supported on the FortiMail unit, and some troubleshooting tips.
This section contains the following topics:
• About TLS/SSL
• How TLS/SSL works
• FortiMail support of TLS/SSL
• Troubleshooting FortiMail TLS issues
About TLS/SSL
TLS and its predecessor SSL are cryptographic protocols that provide communication security
over the Internet. They secure network connections above the Transport Layer by using
symmetric cryptography for privacy and a keyed message authentication code for message
integrity.
TLS/SSL uses asymmetric encryption algorithm for authentication and deriving the session key
and symmetric algorithm to encrypt the data for its speed. For the user data to go through the
encryption tunnel, a TLS handshake must take place to authenticate the peer and generate the
common session key for data encryption. The diagram below describes how TLS negotiation
works at the high level:
Page 644
Figure 49:Client-server TLS negotiation workflow
Client Server
Client Hello
Client Hello
Client Hello is the first message sent by the client to the server in the TLS/SSL session setup
sequence. It typically contains the ciphers and extensions supported by the client.
Server Hello, Server Certificate, [Client Certificate Request] and Server Hello
Done
In response to Client Hello, the server sends back the following messages:
• Server Hello: contains the cipher the server picked from the list provided by the client based
on its preference.
• Server Certificate: contains the server’s certificate and its CA if configured so.
• [Client Certificate Request]: optionally, the server can request the client certificate for
authentication, which usually is not used.
• Server Hello Done: concludes the server-client handshake.
Appendix E: Working with TLS/SSL Page 645 FortiMail 6.2.0 Administration Guide
Change Cipher Spec, Finished
In response to [Client Certificate], Client Key Exchange, [Certificate Verify], Change Cipher
Spec, Finished, the server sends back a Change Cipher Spec to confirm the start of data
authentication and encryption. The server also sends its own Finished message encrypted
using the common session key. If the client can read this message then the negotiation is
successfully completed.
From now on, all the communication between the client and server is encrypted.
The "client" and "server" described above are roles in a specific session. The same device may
change roles in different sessions. For example, when the FortiMail unit receives email from
either a client or another sending MTA, the FortiMail unit acts as the TLS server. When the
FortiMail unit relays email to the next hop receiving MTA, it acts as a TLS client. Nonetheless,
some applications always act as a TLS client or server, but not both. For example, a web
browser always acts as a TLS client and a web server always acts as a TLS server.
By default, the FortiMail unit supports TLS/SSL in two slightly different ways:
• SMTPS
SMTPS is also called SMTP over SSL. It runs on a different port than the regular email port
(465 by default). To connect with SMTPS, the client needs to start the TLS handshake
directly at the very beginning.
• STARTTLS
STARTTLS is a command that runs on a regular email service port, 25 by default. If the
server supports STARTTLS, this command shows up in the welcome banner and the client
runs it to establish a TLS session to protect all subsequent communication. If the server
does not support this feature, it will not advertise the STARTTLS command and the client will
use clear text communication. The STARTTLS command is more flexible than SMTPS.
Although this document mainly covers STARTTLS, most is applicable to SMTPS.
Appendix E: Working with TLS/SSL Page 646 FortiMail 6.2.0 Administration Guide
sending MTA. The TLS support can be turned on or off globally by going to System > Mail
Settings > Mail Server Settings.
• If you uncheck the SMTP over SSL/TLS option, STARTTLS will not be advertised to the client
and the SMTPS port (465) will not be listening. As a result, the FortiMail unit will not accept
emails through TLS/SSL.
• Mail delivering
There is no global setting to control how TLS is used when the FortiMail unit delivers emails
to the next hop receiving MTA. By default, it uses STARTTLS "preferred" option which
means:
• If the receiving MTA supports STARTTLS, the FortiMail unit will use TLS and transmit
emails in the protected session.
• If the receiving MTA does not advertise STARTTLS, the FortiMail unit will use clear text
SMTP session to transmit emails.
• If the receiving MTA supports STARTTLS, but the TLS session does not succeed, the
FortiMail unit will fall back to the clear text SMTP session to retransmit emails after the
first failed attempt.
TLS profile
The default behavior of FortiMail TLS/SSL support may not meet your specific requirements. In
order to add more flexibility to the TLS/SSL support, the FortiMail unit supports TLS profiles.
This document uses FortiMail v4.1 as an example.
TLS profiles allow you to selectively disable or enable TLS for specific email recipient patterns,
IP subnets, and so on. A common use of TLS profiles is to enforce TLS transport to a specific
domain and verify the certificate of the receiving servers.
To configure a TLS profile, go to Profile > Security > TLS.
The TLS level option has four choices that you need to understand to configure this feature.
None Disables TLS and the FortiMail unit does not accept STARTTLS command
from the client in receiving direction or does not start TLS in the delivering
direction (even if STARTTLS is advertised by the receiving MTA),
depending on which direction the TLS profile is applied.
Preferred This is the default behavior. Whether TLS is used depends on the other
party of the session.
Encrypt Enforces TLS encryption. Failure of server certificate validation will not fail
the delivery of the email in encryption. In other words, this option only cares
about the encryption of the message.
Secure Enforces both TLS encryption and certificate validation. Failure of server
certificate validation will fail mail delivery.
The Action on failure option has two choices: Temporarily Fail and Fail.
Temporarily Fail If a TLS session cannot be established, the FortiMail unit will fail
temporarily and retry later. No DSN will be bounced back.
Fail If a TLS session cannot be established, the FortiMail unit will fail the mail
delivery immediately and a DSN will be bounced back to notify the sender
about the failure.
Appendix E: Working with TLS/SSL Page 647 FortiMail 6.2.0 Administration Guide
Example
This example shows how to enforce TLS on a specific domain and verify the validity of the
receiving server certificate.
Scenario
All emails to example.mil have to be encrypted with TLS and the FortiMail unit needs to verify
the certificate of the receiving server to defend against email server spoofing or
man-in-the-middle attack. If the certificate validation fails, the FortiMail unit will not deliver
emails to that server, example.mil.
To verify the certificate of the receiving server and apply the TLS profile
1. Import the server CA certificate.
Add the certificate of the CA that issued the server certificate to the FortiMail unit. If more
than one level of CAs was used, import all intermediate and root CA certificates to the
FortiMail unit. Any missing CA certificate will break the chain of trust and fail the validation of
the certificate.
2. Create a TLS profile.
Select Secure for TLS level. Find the CA from the drop down list after enabling Check CA
issuer. If the certificate subject also needs to be verified, select Check certificate subject and
configure the substring that is contained in the server certificate. Minimum encryption
strength can be configured if needed. A failure of any checks enabled in the profile will fail
the TLS session and email delivery to the destination domain.
3. Create delivery policy and apply the profile.
Apply the newly created TLS profile in the delivery policy by going to Policy > Access Control
> Delivery.
From now on, all emails from the FortiMail unit to example.mil will be delivered through TLS
and the server certificate will be verified. If the certificate validation does not succeed, the
FortiMail unit will not deliver emails to example.mil.
This section describes some FortiMail TLS issues and their solutions and contains the following
topics:
• Common error messages
• Useful tools
verify=CAFail
This error message appears when the remote certificate is not issued by a trusted CA or the CA
certificate is not available for verification. Usually this error is not fatal and the encryption can be
applied without any problems. The only issue is that the communication is susceptible to
man-in-the-middle or server-spoofing attacks. However, if there is a TLS profile with Secure
level enabled in a delivery rule, the connection will fail if the remote certificate is validated by the
FortiMail unit.
Appendix E: Working with TLS/SSL Page 648 FortiMail 6.2.0 Administration Guide
If you are not concerned with email server-spoofing or man-in-the-middle attacks, you can just
ignore this error message.
CAFail
This error message may appear on the external email server talking to the FortiMail unit. This is
because that the FortiMail CA certificate is not available to external server for verification. In
early versions of the FortiMail firmware, the system does not send out all CA certificates even
though they are imported onto the FortiMail unit. This issue was fixed in release 4.1.1 (build
232).
Useful tools
Openssl is useful for troubleshooting and testing TLS/SSL related issues. You can use Openssl
to get the certificate of the CA that issued the remote server certificate by typing the following
syntax at a command-line prompt:
Openssl s_client -connect server-ip:port -starttls smtp -showcerts
The following is an example of the Openssl tool output:
Appendix E: Working with TLS/SSL Page 649 FortiMail 6.2.0 Administration Guide
Figure 50:Sample Openssl tool output
Note that the certificate is displayed in Base64 format (PEM) in the output. If the server CA
certificate is also displayed in the output, the FortiMail unit should be able to validate the server
certificate. However, in many cases the CA certificate is not sent by the remote server. You can
just copy the certificate from the command output starting from "----Begin certificate----" and
ending with "----end certificate-----" and store it in a file such as server-cert.pem. Then the
certificate can be read with Openssl using the following command:
Openssl x509 -in server-cert.pem -text
The following is a sample output of this command:
Appendix E: Working with TLS/SSL Page 650 FortiMail 6.2.0 Administration Guide
Figure 51:Sample Openssl command output
Within the certificate, there is a section called Authority Information Access (AIA) that
contains a URL to the CA certificate. Download the certificate from the URL identified and
import it into the FortiMail unit. If there is more than one level of CA, you can repeat the process
until you get the root CA certificate. Then import all the intermediate CA and root CA certificates
into the FortiMail unit.
The FortiMail unit only supports certificates in PEM format. If the CA certificates you
downloaded are in DER (binary) format, you need to convert them with Openssl using the
following command:
Openssl x509 -in my-ca.crt -inform DER -out myca.pem -outform PEM
Appendix E: Working with TLS/SSL Page 651 FortiMail 6.2.0 Administration Guide
Appendix F: PKI Authentication
The information in this appendix is intended only as an example. Local operating procedure
might vary. For generic FortiMail PKI configuration procedures, see “Configuring PKI
authentication” on page 335.
Public key infrastructure (PKI) authentication is the methodology used to verify the identity of a
user by checking the validity of a certificate that is bound to a specific user identity.
PKI authentication is an alternative to traditional password based authentication. The traditional
method is based on "what you know" - a password used for authentication. PKI authentication
is based on "what you have" - a private key related to the certificate bound to the user.
A common weakness of traditional password based authentication is the vulnerability to
password guessing or brute force attack. PKI authentication is more resilient to this type of
attack, hence PKI provides a stronger authentication mechanism.
In cryptography, PKI is an arrangement that binds public keys with respective user identities by
means of a certificate authority (CA). PKI authentication relies on two factors:
• Chain of trust. If the Root CA is trusted, then all certificates issued by the Root CA are
trusted, as are all certificates issued by any intermediate CA that is trusted by the Root CA.
• Public key encryption algorithm. The data encrypted by public key can only be decrypted by
private key. This is the basis for asymmetric data encryption. Similarly, the data encrypted by
private key can be decrypted by the public key. This is usually used for digital signature. The
private key is only available to a specific individual, while its related public key is embedded
in the certificate signed by a CA.
PKI authentication can be implemented on FortiMail for administrators and email users. The
FortiMail operation mode determines what these users can access using PKI authentication.
Table 61 on page 653 describes the impact of operation mode on each FortiMail user type.
Page 652
s
The FortiMail PKI architecture ensures that users present the necessary certificates before
communication between the user and FortiMail starts. The two parties exchange certificates
and verify the following:
• the certificate is issued by a trusted CA
• the claimed identity matches the one in the certificate
• the certificate has not expired
• the certificate type/usage matches the intended usage in the certificate
Figure 53 on page 654 illustrates a typical FortiMail PKI architecture.
PKI supports standards for Certificate Revocation List (CRL) and Online Certificate Status
Protocol (OCSP). Those standards are beyond the scope of this document. For more
information on those standards, see RFC 5280, Internet X.509 Public Key Infrastructure
Certificate and Certificate Revocation List (CRL) Profile.
FortiMail CA Server
3. CA certificate
5. A
6. C
cce
ate
R)
ic
ss
ert
rtif
CS
ific
req
t ce
st (
7. U
ate
ues
lien
ue
8. A
ser
req
eq
dc
cce
nr
cer
ues
ne
sig
t
ss
Sig
t
i fica
te
gra
2.
t
ica
e
nte
rtif
d
Ce
End-user/Administrator 1.
This section provides an example process for configuring PKI authentication on FortiMail.
The process described in this section is an example of one specific method for configuring PKI
authentication on FortiMail. This process is not intended to replace the generic FortiMail PKI
configuration procedures provided in other parts of this Administration Guide, or local operating
practices.
The procedures in this document are intended for FortiMail administrators responsible for
requesting, generating and delivering signed certificates on behalf of all end-users to enable PKI
authentication on FortiMail.
Prerequisites
Ensure that you have completed the following before performing any PKI configuration tasks:
• Read “Before you begin” on page 654.
• Installed Windows Server 2003, Enterprise Edition.
• Configured a Windows Server 2003 server as a stand-alone certification authority (CA).
• Have access to Microsoft Internet Explorer version 7 or higher.
• Installed Microsoft Certificate Services (MSCS) with web enrollment on the CA server.
Downloading a CA
certificate for
START FortiMail
Configure
FortiMail Server Creating email
Configure a FortiMail accounts on
client or operation FortiMail for PKI
FortiMail? mode? users
Transparent
Configure
or Gateway
client
Configuring PKI
access for
Enabling PKI
authentication
globally with CLI
Testing PKI
END
authentication
3. Select the Certificate Templates snap-in from the Console Root folder.
4. In the right pane, right-click User in the Template Display Name column and select Duplicate
Template from the drop-down menu.
The Properties of New Template window appears.
5. On the General tab, fill in the template name, validity period and renewal period according to
your specific requirements.
The new custom template is now installed on the local certificate authority (CA).
This document assumes all certificates are requested by the administrator on behalf of
end-users. Certificate creation by individual end-users is beyond the scope of this document. If
end users are permitted to create their own certificates, refer to the documentation
accompanying the tools used by the end-user to create their own certificates.
6. In the Certificate Template drop-down list, select the new template created in “Creating a
custom certificate request template using MMC” on page 657.
7. Fill in the Name field with the email address of the end-user (subject) on behalf of which the
client certificate request is being made.
For the purposes of FortiMail, the Name field must exactly match the email address of the
end-user recorded in the FortiMail unit. For more information, see “Creating email accounts on
FortiMail for PKI users” on page 667.
If desired, the full name of the user can be entered in the Friendly Name field.
8. Click Submit to send a certificate signature request (CSR) to the CA server on behalf of the
end-user.
10.Click the Install this certificate link to load the certificate into the certificate store on your
browser.
11.If a message appears, warning you that the web site is adding one or more certificates to
your computer, click Yes to proceed.
The Certificate Installed window appears.
The client certificate is now stored in certificate store on your browser. The certificate is
stored with the name specified in steps 7.
12.Return to the Microsoft Certificate Services (MSCS) home page for your local CA and repeat
steps 3 through 11 for each end-user that will communicate with FortiMail using PKI
authentication.
13.Proceed to “Exporting a client certificate” on page 662 to export and transmit the client
certificate to the end-user.
3. Select a client certificate from the list and click Export to export the certificate.
The Certificate Export Wizard welcome page appears.
4. Click Next to continue from the Certificate Export welcome page.
The Export Private Key window appears.
You must export the private key at the same time as the certificate. The private key is
associated with a specific end-user, and contains information used by the certification authority
to authenticate the end-user. Private keys must be password protected, and must be securely
transmitted to end-users.
8. Enter and confirm a password for the certificate and select Next.
The File name window appears.
9. Enter a unique file name for the certificate and browse to the location where you want to
save the exported certificate and private key.
For clarity, a consistent naming convention should be used for client certificate names, email
account names, PKI user names and recipient base policy names. This will help associate
specific users with the various components of PKI authentication.
10.When Completing Certificate Export Wizard appears, click Finish to export the certificate and
private key to the location specified in step 9.
The certificate and private key are exported to the specified location as a single file with a
.pfx extension.
11.Transmit the certificate .pfx file to the end-user, along with instructions on what the user has
to do to install the certificate on their web browser.
12.Proceed to “Importing a client certificate to an end-user browser” on page 664 to import the
certificate .pfx file on the end-user browser.
The following is a generic procedure for importing a certificate into a browser. You must provide
the end-user with specific instructions for importing the certificate according to browser
type/version and local operating procedures.
To download a CA certificate
1. Open your web browser and enter the following in the address bar:
http://<ip_of_your_ms_ca_server>/certsrv/
Where <ip_of_your_ms_ca_server> is the IP address of the Windows 2003 Server that
hosts the local Certification Authority (CA).
2. Log in to the CA server as administrator.
The Microsoft Certificate Services (MSCS) home page for your local CA appears.
Caution:
If PKI authentication is used for email users and for FortiMail administrators, ensure that unique
PKI users are created for the administrator accounts, and those PKI users are associated with
the appropriate administrator accounts. For more information, see “Configuring PKI access for
administrators” on page 669.
Failure to create unique PKI users for administrators could result in email user access to
administrator functions.
Once the PKI user is created on FortiMail, proceed to “Configuring policy for PKI access to
webmail (server mode)” on page 667.
Ensure the PKI user is appropriate for the selected recipient. Choosing the wrong PKI user
could result in email user access to administrator functions. For more information, see
“Configuring PKI authentication” on page 335.
• Ensure Certificate validation is mandatory is enabled. This will enforce PKI authentication
for the specified PKI user.
5. Repeat steps 3 and 4 for each webmail PKI user.
6. If there are quarantine email PKI users to add, proceed to “Configuring policies for PKI
access to email quarantine (transparent and gateway mode)” on page 668. Otherwise,
proceed to “Configuring PKI access for administrators” on page 669.
Configuring policies for PKI access to email quarantine (transparent and gateway
mode)
Use this procedure to configure a recipient-based policy for quarantine (spam) email access
using PKI authentication.
This procedure applies only if the FortiMail unit is operating in gateway or transparent modes.
In gateway or transparent mode, the FortiMail unit can be configured to store regular email on
an SMTP server and quarantine email in a bulk folder on the FortiMail unit. From the end-user
perspective, connection to the regular email folders and bulk (quarantine) email folder is
seamless, but the folders actually reside on two separate servers.
For more information on storing quarantine email on FortiMail, see “Managing the quarantines”
on page 137.
Ensure the PKI user is appropriate for the selected recipient. Choosing the wrong PKI user
could result in email user access to administrator functions.
• Ensure Certificate validation is mandatory is enabled. This will enforce PKI authentication
for the specified PKI user.
5. Repeat steps 3 and 4 for each PKI user that requires access to quarantine email.
6. Proceed to “Configuring PKI access for administrators” on page 669
This confirms that the certificate bound to the end-user browser is valid, and that PKI
authentication is working properly.
All users and administrators configured for PKI authentication can now log in to FortiMail
without password.
Page 672
backscatter 611, 623 bypass
backup unit 242 antispam scan 371, 425, 621
banned word scan 421, 422, 425 antispam scans 520
Base64 285 antivirus scan 621
baseline 126 bounce message verification 399
basic mode 39 content profile 438
greylist 148
batch edit 413
physical 620
Bayesian control account using safe lists 408
configuring 552
Bayesian database C
back up carriage return and line feed (CRLF) 402
global or group 550 carrier 540
global 327 end point 151, 154, 155, 156, 540, 542, 543
per protected domain 327
cellular phone 540
reset
global or group 551 centralized quarantine 207
restore certificate
global or group 551 backup 286
scan 412, 544 binding profile 560
training 198, 550 default 27
example 547 local 451
from archived email 157 mismatch 27
types 545 options 282
Bayesian database training 40 personal 391, 451
server 280
bind DN 463, 467, 468
certificate authority (CA)
bits per second (bps) 29
27, 281, 282, 284, 285, 287, 288, 336, 451, 561
blind carbon copy (BCC) 429, 434, 448
certificate request
block 171 downloading and submitting 284
block/safe list 517 certificate revocation list (CRL) 287, 288, 336
action 525
certificate, security 27
backing up
domain 522 class C 528
system 520, 524 clean install firmware 603
order 517 clear
restoring Bayesian database
domain 522 global or group 551
system 521, 524 CLI 167, 169
blocklisted by DNSBL 367 not available 25
Boolean 481 cluster 24, 242
boot interrupt 28, 603 column view
bounce address 537 logs 133
tag key 537 command line interface (CLI) 26
tagging 536 backup via the 301
verification 536, 537 comma-separated value (CSV) 329, 350, 353, 589
verification failure 537, 539 common name (CN) field 27
bounce message 536 compact 142
verification confidential 13
bypass 399 config master 255
disable 327 config slave 255
bridge 161, 164, 165, 169, 172, 215, 262 config-only HA 240, 248, 249, 254
browser 26 configuration example
warnings 27 HA 271
Buffalo TeraStation 207 configuration, verifying the 602
configured operating mode 250
connecting
CLI 28
connecting to the FortiMail CLI using SSH 32
connecting to the FortiMail CLI using Telnet 33
console port 28