How FortiMail processes email
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. For information about profiles, see Configuring profiles.
In addition to policies and profiles, other configured items, such as email domains, may affect how your FortiMail unit processes email.
See also:
- Email domains
- Access control rules
- Recipient address verification
- Disclaimer messages and customized appearance
- Advanced delivery features
- Antispam techniques
- Order of execution
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 incoming and outgoing email.
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.
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. This “masquerade” hides the existence of the FortiMail unit. For information on configuring the SMTP greeting, see Configuring protected domains.
Access control rules
The access control rules allow you to control how email messages move to, from, and through the FortiMail unit. Using access control rules the FortiMail unit can analyze email messages and take action based on the result. Messages can be examined according to the sender email address, recipient email address, and the IP address or host name of the system delivering the email message.
Each access control rule specifies an action to be taken for matching email.
For information about configuring access control rules, see Configuring access control receiving policies.
Recipient address verification
Recipient address verification ensures that the FortiMail unit rejects email with invalid recipients and does not scan or send them to the protected email server. This verification can reduce the load on the FortiMail unit when a spammer tries to send messages to every possible recipient name on the email server.
If you want to use recipient address verification, you need to verify email recipient addresses by using either the email server or an LDAP server.
Usually you can use the email server to perform address verification. This works with most email servers that provide a User unknown
response to invalid addresses.
For instructions on configuring recipient address verification, see Configuring protected domains.
Disclaimer messages and customized appearance
You can customize both the disclaimer and replacement messages, as well as the appearance of the FortiMail unit interface.
The disclaimer message is attached to all email, generally warning the recipient the contents may be confidential.
Replacement messages are messages recipients receive instead of their email. These can include warnings about messages sent and incoming messages that are spam or infected with a virus. See Configuring custom messages.
You can customize the appearance of the FortiMail unit web pages visible to mail administrators to better match a company look and feel. See Customizing the GUI appearance.
Advanced delivery features
Processing email takes time. Processing delays can cause clients and servers to time out. To reduce this problem, you can:
- defer delivery to process oversized email at a time when traffic is expected to be light
- send delivery status notifications (DSN)
For full configuration and procedural details regarding oversized emails, see Downloading oversized email attachments.
Antispam techniques
Spam detection is a key feature of the FortiMail unit. The feature is based on two tiers of spam defense:
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 and Configuring security settings.
FortiMail antispam techniques
The following table highlights some of the FortiMail antispam techniques. For information about how these techniques are executed, see Order of execution.
FortiMail antispam technique highlights
Greylist scanning |
|
DNSBL scanning |
In addition to supporting Fortinet’s FortiGuard Antispam DNSBL service, the FortiMail unit supports third-party DNS Blocklist servers. See DNSBL section. |
SURBL scanning |
In addition to supporting Fortinet’s FortiGuard Antispam SURBL service, the FortiMail unit supports third-party Spam URL Realtime Block Lists servers. See SURBL section. |
Bayesian scanning |
|
Heuristic scanning |
See Heuristic section. |
Image spam scanning |
See Image spam section. |
PDF scanning |
See Scan PDF attachment. |
Block/safe lists |
|
Banned word scanning |
See Banned word section. |
Safe list word scanning |
|
Sender reputation |
FortiGuard Antispam service
The FortiGuard Antispam service is a Fortinet-managed service that provides a three-element approach to screening email messages.
The first element is a DNS Block List (DNSBL) which is a “living” list of known spam origins.
The second element is in-depth email screening based on a Uniform Resource Identifier (URL) contained in the message body – commonly known as Spam URL Realtime Block Lists (SURBLs).
The third element is the FortiGuard Antispam Spam Checksum Blocklist (SHASH) feature. Using SHASH, the FortiMail unit sends a hash of an email to the FortiGuard Antispam server which compares the hash to hashes of known spam messages stored in the FortiGuard Antispam database. If the hash results match, the email is flagged as spam.
FortiGuard query results can be cached in memory to save network bandwidth.
FortiGuard Antispam DNSBL
To achieve up-to-date real-time identification, the FortiGuard Antispam service uses globally distributed spam probes that receive over one million spam messages per day. The FortiGuard Antispam service uses multiple layers of identification processes to produce an up-to-date list of spam origins. To further enhance the service and streamline performance, the FortiGuard Antispam service continuously retests each of the “known” identities in the list to determine the state of the origin (active or inactive). If a known spam origin has been decommissioned, the FortiGuard Antispam service removes the origin from the list, thus providing customers with both accuracy and performance.
The FortiMail FortiGuard Antispam DNSBL scanning process works this way:
-
Incoming email (SMTP) connections are directed to the FortiMail unit.
-
Upon receiving the inbound SMTP connection request, the FortiMail unit extracts the source information (sending server’s domain name and IP address).
-
The FortiMail unit transmits the extracted source information to Fortinet’s FortiGuard Antispam service using a secure communication method.
-
The FortiGuard Antispam service checks the sender’s source information against its DNSBL database of known spam sources and sends the results back to the FortiMail unit.
-
The results are cached on the FortiMail unit.
Additional connection requests from the same source do not need to be submitted to the FortiGuard Antispam service again because the classification is stored in the system cache.
-
If the results identify the source as a known spam source, the FortiMail unit acts according to its configured policy.
Once the incoming connection has passed the first pass scan (DNSBL), and has not been classified as spam, it will then go through a second pass scan (SURBL) if the administrator has configured the service.
FortiGuard Antispam SURBL
To detect spam based on the message body URLs (usually web sites), Fortinet uses FortiGuard Antispam SURBL technology. Complementing the DNSBL component, which blocks messages based on spam origin, SURBL technology blocks messages that have spam hosts mentioned in message bodies. By scanning the message body, SURBL is able to determine if the message is a known spam message regardless of origin. This augments the DNSBL technology by detecting spam messages from a spam source that may be dynamic, or a spam source that is yet unknown to the DNSBL service. The combination of both technologies provides a superior managed service with higher detection rates than traditional DNSBLs or SURBLs alone.
The FortiMail FortiGuard Antispam SURBL scanning process works this way:
-
After accepting an incoming SMTP connection (passed first-pass scan), the email is received.
-
After an incoming SMTP connection has passed the DNSBL scan, the FortiMail unit accepts delivery of email.
-
The FortiMail unit generates a signature (URL) based on the contents of the received email.
-
The FortiMail unit transmits the signature to the FortiGuard Antispam service.
-
The FortiGuard Antispam service checks the email signature against its SURBL database of known signatures and sends the results back to the FortiMail unit.
-
The results are cached on the FortiMail unit.
Additional email with the same signature do not need to be submitted to the FortiGuard Antispam service again because the signature classification is stored in the system cache.
-
If the results identify the signature as known spam, the FortiMail unit acts according to its configured policy.
Once the message has passed both elements (DNSBL and SURBL), it goes to the next layer of defense; the FortiMail unit that includes additional spam classification technologies.
Order of execution
The following table shows the sequential order of FortiMail antispam scans during an SMTP connection. You can use the table to design a configuration to achieve intended results, and to optimize performance.
Only antispam techniques are shown. Other features may occur in parallel. Disabled scans are skipped. Some features also cause later antispam scans to be skipped. Sort order of rows is by when scans end and action occurs, not by when scans start (which could be earlier for complex scans).
Order of execution is configurable for safe lists and block lists. See the FortiMail CLI Reference. In this table, default order is shown. By default, safe lists cause sender authentication (DKIM, SPF, DMARC) to be skipped, even though sender email addresses could be fake. This is configurable. See the FortiMail CLI Reference. |
Actions are usually configurable, either in the profile's general Default action, or in each scan. Actions can be complex and determined by many factors, not only by antispam.
Categories include:
-
Final actions: Reject, discard, rewrite, personal quarantine, and system quarantine. If a final action occurs, skip remaining scans.
-
Non-final actions: Tag, add header, replace, archive, notify, BCC, and encrypt. If a non-final action occurs, more scans and actions can still occur.
-
Delivery actions: After scans occur, delivery can be to the original host, alternate host, and BCC.
Factors include:
-
If an antivirus and antispam scan ends with non-final actions, attachment scans still occur but skip content monitoring.
-
If a FortiSandbox scan occurs, content monitoring still occurs.
-
If FortiGuard Antispam and IP Reputation detects spam, skip remaining antispam scans, even though the actions are not final.
Check Name |
Inspects |
Action If Positive (Math Found) |
Action If Negative |
---|---|---|---|
Client initiates SMTP session with the FortiMail unit |
|||
Sender reputation |
If the score is bad, perform the action. Else continue. |
Add the IP address to the sender reputation database. Keep a reputation score based on the email. Continue. |
|
FortiGuard block IP |
|
Reject the email. |
Continue. |
Endpoint reputation |
|
If the score is bad, perform the action. Else continue. |
Add the IP address to the endpoint reputation database. Keep a reputation score based on the email. Continue. |
Sender rate control per connection |
|
Apply limitations in the session profile. |
Continue. |
HELO/EHLO |
If invalid characters are in the domain name, reject the |
Continue. |
|
Sender rate control per message |
|
Apply limitations in the session profile. |
Continue. |
Sender domain check (in the session profile's Unauthenticated Session Settingssection) |
Return an error to the SMTP client. The error depends on which check failed. |
Continue. |
|
Recipient verification |
Reject the email. |
Continue. |
|
System safe list (Phase I) |
Skip remaining antispam checks (but not antivirus and content checks). |
Continue. |
|
Greylist |
Continue. Note: Skip this scan if the access control rule’s action is Relay. |
Return a temporary failure code to the SMTP client. |
|
Session sender safe list (Phase I) |
Skip remaining antispam checks (but not the antivirus and content checks). |
Continue. |
|
Authentication difference |
Reject the email. |
Continue. |
|
Bounce verification |
Perform the action. |
Continue. |
|
Perform the action. See also Configuring access control receiving policies. |
|
||
Return an error to the SMTP client. The error depends on which check failed. |
Continue. |
||
Session recipient safe list |
Skip remaining antispam checks (but not the antivirus and content checks). Note: If there are multiple recipients, the action only applies to safelisted recipients. |
Continue. |
|
Session recipient block list |
Reject the email. |
Continue. |
|
System safe list (Phase II) |
|
Skip remaining antispam checks (but not the antivirus and content checks). |
Continue. |
System block list |
Perform the action. |
Continue. |
|
Domain safe list |
Skip remaining antispam checks (but not the antivirus and content checks). |
Continue.
|
|
Domain block list |
Perform the action. |
Continue.
|
|
Session sender safe list (Phase II) |
|
Skip remaining antispam checks (but not the antivirus and content checks). |
Continue. |
Session sender block list |
Perform the action. |
Continue. |
|
Personal safe list |
Skip remaining antispam checks (but not the antivirus and content checks). |
Continue. |
|
Personal block list |
Discard the email. |
Continue. |
|
Antivirus |
|
If the antispam profile is configured to treat viruses as spam, perform the action in Default action. |
Continue. |
Safe list word |
|
Skip remaining antispam checks. |
Continue. |
FortiGuard Antispam |
|
Perform the action. Skip remaining antispam checks. |
Continue. |
DMARC |
|
Perform the action. Note: If ARC override is enabled for DMARC, then the ARC result determines the action instead. |
Continue. |
SPF |
|
Perform the action. Note: If ARC override is enabled for SPF, then the ARC result determines the action instead. |
Continue. |
DKIM |
|
Perform the action. Note: If ARC override is enabled for DKIM, then the ARC result determines the action instead. |
Continue. |
ARC |
|
Perform the action. |
Continue. |
Spam outbreak protection |
|
Perform the action. |
Continue. |
Behavior analysis |
|
Perform the action. |
Continue. |
Impersonation |
|
Perform the action. |
Continue. |
Banned word |
|
Perform the action. |
Continue. |
Dictionary |
|
Perform the action. |
Continue. |
DNSBL |
|
Perform the action. |
Continue. |
SURBL |
|
Perform the action. |
Continue. |
Heuristic |
|
Perform the action. |
Continue. |
Image spam |
|
Perform the action. |
Continue. |
Header analysis |
|
Perform the action. |
Continue. |
Bayesian |
|
Perform the action. |
Continue. |
Suspicious newsletter |
|
Perform the action. |
Continue. |
Content |
|
Perform the action. |
Continue. |
DLP |
|
Perform the action in Action. |
Continue. |