Category Archives: Administration Guides

Managing The Deferred Mail Queue

Managing the deferred mail queue

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.

Delivery failure can be caused by temporary reasons such as interruptions to network connectivity. FortiMail units will periodically retry delivery. (Administrators can also manually initiate a retry.) If the email is subsequently sent successfully, the FortiMail unit simply removes the email from the queue. It does not notify the sender. But if delivery continues to be deferred, the FortiMail unit eventually sends an initial delivery status notification (DSN) email message to notify the sender that delivery has not yet succeeded. Finally, if the FortiMail unit cannot send the email message by the end of the time limit for delivery retries, the FortiMail unit sends a final DSN to notify the sender about the delivery failure and deletes the email message from the deferred queue. If the sender cannot receive this notification, such as if the sender’s SMTP server is unreachable or if the sender address is invalid or empty, the FortiMail unit will save a copy of the email in the dead mail folder. For more information, see “Managing undeliverable mail” on page 181.

For information on configuring the delivery retry interval, maximum amount of time that an email message can spend in a queue, and DSN timing, see “Configuring mail server settings” on page 366.

When you delete a deferred email, the FortiMail unit sends an email message, with the deleted email attached to it, to notify the sender.

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 Policy category

For details, see “About administrator account permissions and domains” on page 290.

To view, delete, or resend an email in the deferred mail queue, go to Monitor > Mail Queue > Mail Queue.

Table 14:Managing the deferred mail queue

GUI item           Description

View (button)    Select a message and click View to see its contents.

Delete (button) Click to deleted the selected item.

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.

Table 14:Managing the deferred mail queue

GUI item Description
Type Select the directionality and priority level of email to filter the mail queue display. For details about email directionality, see “Incoming versus outgoing email messages” on page 454.

•      Default: Displays all email in the regular mail queue.

•      Incoming: Only displays the incoming email in the regular mail queue.

•      Outgoing: Only displays the outgoing email in the regular mail queue.

•      IBE: Only displays the IBE email in the regular mail queue. For information about IBE email, see “Configuring IBE encryption” on page 357.

•      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.

Search

(button)

Select to filter the mail queue display by entering criteria that email must match in order to be visible.
Session ID Lists the Session-Id: message header of the email.
Envelope

From

Lists the sender (MAIL FROM:) of the email.
Envelope To Lists the recipient (RCPT TO:) of the email.
Reason Lists the reasons why the email has been deferred, such as DNS lookup failure or refused connections.
First

Processed

Lists the date and time that the FortiMail unit first tried to send the email.
Last

Processed

Lists the date and time that the FortiMail unit last tried to send the email.
Tries Lists the number of times that the FortiMail unit has tried to send the email.

Managing undeliverable mail

The Dead Mail tab displays the list of email messages in the dead mail folder.

Unlike the deferred mail queue, the dead mail folder contains copies of delivery status notification (DSN) email messages, also called non-delivery reports (NDR).

DSN messages are sent from the FortiMail unit (“postmaster”) to an email’s sender when the email is considered to be more permanently undeliverable because all previous retry attempts of the deferred email message have failed. These email messages from “postmaster” include a copy of the original email message for which the DSN was generated.

If an email cannot be sent nor a DSN returned to the sender, it is usually because both the recipient and sender addresses are invalid. Such email messages are often sent by spammers who know the domain name of an SMTP server but not the names of its email users, and are attempting to send spam by guessing at valid recipient email addresses.

The FortiMail unit can automatically delete old dead mail. For details, see “Configuring mail queue setting” on page 370.

Alternatively, you can:

  • To prevent dead mail to invalid recipients, enable recipient address verification to reject email with invalid recipients. Rejecting email with invalid recipients also prevents quarantine mailboxes for invalid recipients from consuming hard disk space. For details, see “Configuring recipient address verification” on page 387.

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 Policy category

For details, see “About administrator account permissions and domains” on page 290.

To view or delete undeliverable email, go to Monitor > Mail Queue > Dead Mail.

 


Having trouble configuring your Fortinet hardware or have some questions you need answered? Check Out The Fortinet Guru Youtube Channel! Want someone else to deal with it for you? Get some consulting from Fortinet GURU!

Monitoring The System

Monitoring the system

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 overall system statuses
  • Managing the deferred mail queue
  • Managing the quarantines
  • Viewing the greylist statuses
  • Viewing the sender reputation statuses
  • Viewing the endpoint reputation statuses
  • Managing archived email
  • Viewing log messages
  • Viewing generated reports

Viewing overall system statuses

Monitor > System Status displays system statuses, most of which pertain to the entire system, such as CPU usage and current IP sessions. It also displays items that span multiple features, such as email statistics.

This section includes:

  • Viewing the dashboard
  • Viewing the email statistics
  • Viewing the list of current IP sessions

Viewing the dashboard

Monitor > System Status > 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 290.

To view the dashboard, go to Monitor > System Status > Status.

Page 173

Hiding, showing and moving widgets

The dashboard is customizable. You can select which widgets to display, where they are located on the tab, and whether they are minimized or maximized.

To move a widget, position your mouse cursor on the widget’s title bar, then click and drag the widget to its new location.

To show or hide a widget, in the upper left-hand corner, click Add Content, then mark the check boxes of widgets that you want to show.

Options vary slightly from widget to widget, but always include options to close or minimize/maximize the widget.

System Information widget

The System Information widget displays the serial number and basic system statuses such as the firmware version, system time, and up time and high availability (HA) status.

In addition to displaying basic system information, the System Information widget lets you configure the operation mode and to change the firmware.

To view the widget, go to Monitor > System Status > Status. If the widget is not currently shown, click Add Content, and mark the check box for the widget.

Figure 65:System Information widget

Table 12:System Information widget features

GUI item Description
Serial number Lists the serial number of the FortiMail unit. The serial number is unique to the FortiMail unit and does not change with firmware upgrades.
Up time Lists the time in days, hours, and minutes since the FortiMail unit was started or rebooted.
System time Lists the current time according to the FortiMail unit’s internal clock.
Firmware version Lists the version of the firmware installed on the FortiMail unit. Click Update to change the firmware. For more information, see “Installing firmware” on page 688.

Table 12:System Information widget features

GUI item Description
Operation mode Select one of the following operation modes of the FortiMail unit:

•      Gateway: Use when you do not want your email server to be visible to email users for security reasons. You will need to modify the email clients of your email users, the MX records on DNS servers for your protected domains, and policies on NAT devices such as routers and firewalls to route incoming email through the FortiMail unit for it to be scanned.

•      Server: Use if you need an SMTP server with integrated advanced antispam and antivirus capabilities.

•      Transparent: Use when a network is complex and you do not want to change the IP address scheme.

Administrators whose Domain is System and whose access profile contains Read-Write permission in the Others category can change the FortiMail unit from one operation mode to another.

Caution: Operation modes reflect the nature of the network topology in which you deploy the FortiMail unit, and other considerations. A significantly different deployment may be required, especially for transparent mode.

Caution: Back up the configuration before beginning this procedure. This procedure may reset many of the configuration file changes that you have made to the FortiMail unit, including settings that do not apply to the new operation mode. For more information on creating a backup, see “Backup and restore” on page 218.

Note: 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.

HA mode Lists the configured and effective (that is, current) HA operation mode.

For more information, see “Monitoring the HA status” on page 313.

Log disk Lists the capacity and usage level of the hard disk that the FortiMail unit uses to store log messages.

For more information on logging, see “About FortiMail logging” on page 665.

Mailbox disk Lists the capacity and usage level of the hard disk that the FortiMail unit uses to store archived email and quarantined spam.

For more information on quarantining and email archiving, see “Configuring antispam action profiles” on page 516 and “Configuring email archiving policies” on page 660.

For information on using the advanced mode of the web UI to configure the

RAID level of the mailbox disk, see “Configuring RAID” on page 298.

Email throughput Lists the total number of email messages processed per minute, as an average over the last 60-minute period.

License Information widget

The License Information widget displays the last queried license statuses for FortiGuard Antispam and FortiGuard Antivirus.

If you do not want to allow the FortiMail unit to automatically download antivirus definition updates from the FortiGuard Distribution Network (FDN), you can also use the

License Information widget to manually upload an antivirus definitions update file. To upload the file, first download the antivirus definition file to your management computer from the Fortinet Technical Support web site, https://support.fortinet.com, then click Update.

If your update is a downgrade to a lower antivirus definition, you need to enable this function in the CLI. For more information, see the diag debug autoupdate command in the FortiMail CLI Reference.

Updating FortiGuard Antivirus definitions can cause a short disruption in the 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.

To view the widget, go to Monitor > System Status > Status. If the widget is not currently shown, click Add Content, and mark the check box for the widget.

 


Having trouble configuring your Fortinet hardware or have some questions you need answered? Check Out The Fortinet Guru Youtube Channel! Want someone else to deal with it for you? Get some consulting from Fortinet GURU!

Backing Up the Configuration

Backing up the configuration

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 black/white lists, dictionaries, and the Bayesian databases, you should back them up as well. For information on how to back up other configuration settings and databases, see “Backup and restore” on page 218.

To back up the configuration file via the web UI

  1. Log in to the web UI as the admin

Other administrator accounts do not have the required permissions.

  1. Go to Maintenance > System > Configuraton in the advanced mode.
  2. In the Backup Configuration area, select Local PC.
  3. Select System Configuration (and User Configuration if you have already configured user preferences).
  4. Click Backup.

If your browser prompts you, navigate to the folder where you want to save the configuration file. Click Save.

Your browser downloads the configuration file. Time required varies by the size of the configuration and the specifications of the appliance’s hardware as well as the speed of your network connection.

To back up the configuration file via the CLI

  1. Log in to the CLI as the admin administrator using either the local serial console, the CLI Console widget in the web UI, or an SSH or Telnet connection.

Other administrator accounts do not have the required permissions.

  1. Enter the following command:

execute backup full-config tftp <file-name_str> <server_ipv4> [<backup-password_str>]

where the variables and options are as follows:

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.


Having trouble configuring your Fortinet hardware or have some questions you need answered? Check Out The Fortinet Guru Youtube Channel! Want someone else to deal with it for you? Get some consulting from Fortinet GURU!

Testing The Installation

Testing the installation

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.

Figure 59:Connection test paths (gateway mode)

Private                                                                                                       Public DNS Server

Gateway Mode

DNS Server

Figure 60:Connection test paths (transparent mode)

Figure 61:Connection test paths (server mode)

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
  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
  3. Send an email from an external sender to an internal
  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
  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

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 161.


Having trouble configuring your Fortinet hardware or have some questions you need answered? Check Out The Fortinet Guru Youtube Channel! Want someone else to deal with it for you? Get some consulting from Fortinet GURU!

Initial Configuration in Basic Mode

Initial configuration in basic mode

FortiMail Web UI has two configuration mode: Basic mode and Advanced mode. This section describes how to use the FortiMail unit’s web UI in basic configuration mode to adjust or enhance your FortiMail configuration or to examine email information. Basic mode offers fewer menu selections than advanced mode but basic mode’s simplicity can make it easier for a new administrator to get started.

This section assumes you have already configured your FortiMail unit using the Quick Start Wizard and have set up the correct deployment for your operation mode.

To access the web UI, enter its URL in a supported browser. See “Connecting to the Web UI or CLI” on page 25.

If you see Monitor instead of Management at the top of the web UI’s left-hand menu, it means the web UI is in advanced mode. Click Basic on the top button bar to switch modes.

Click the Help button on the web UI at any time to get information on currently displayed features.

This section includes:

  • Managing mail queues and quarantines
  • Configuring basic system and mail settings
  • Configuring logs, reports and email alerts

Managing mail queues and quarantines

The Management menu provides information on your FortiMail system including its overall health and resource usage, mail statistics, email queues, and quarantine lists.

Viewing system status and statistics

The dashboard always appears when you first start the web UI. To access it otherwise, go to Management > System Status > Status.

The dashboard displays information in specialized widgets. The widgets provide system information (such as the operation mode and firmware version) and the state of system resources, plus statistics on spam and virus detection. Take time to review the dashboard for obvious problems.

Buttons on the top-right side of each widget’s title bar let you expand/collapse it, refresh its contents, or close it. To open a closed widget, select it from the Add Content list.

Figure 19:Basic mode dashboard

You can change a widget’s position. Select its title bar and drag it to the new position. Other widgets adjust their position automatically to accommodate the change.

 


Having trouble configuring your Fortinet hardware or have some questions you need answered? Check Out The Fortinet Guru Youtube Channel! Want someone else to deal with it for you? Get some consulting from Fortinet GURU!

Server Mode Deployment

Server mode deployment

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

Configuring DNS records

You must configure public DNS records for the protected domains and for the FortiMail unit itself.

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

Configuring DNS records for protected domains

Regardless of your private network topology, in order for external MTAs to deliver email to the FortiMail unit, you must configure the public MX record for each protected domain to indicate that the FortiMail unit is its email server.

For example, if the fully qualified domain name (FQDN) of the FortiMail unit is fortimail.example.com, and example.com is a protected domain, the MX record for example.com would be:

example.com IN MX 10 fortimail.example.com

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 23.

An A record must also exist to resolve the domain 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.

Configuring DNS records for the FortiMail unit itself

In addition to that of protected domains, the FortiMail unit must be able to receive web connections, and send and receive email, for its own domain name. Dependent features include:

  • delivery status notification (DSN) email
  • spam reports
  • email users’ access to their per-recipient quarantines
  • FortiMail administrators’ access to the web UI by domain name
  • alert email
  • report generation notification email

For this reason, you should also configure public DNS records for the FortiMail unit itself.

Appropriate records vary by whether or not Web release host name/IP (located in AntiSpam > Quarantine > Quarantine Report in the advanced mode of the web UI) is configured:

  • Case 1: Web Release Host Name/IP is empty/default
  • Case 2: Web Release Host Name/IP is configured

Having trouble configuring your Fortinet hardware or have some questions you need answered? Check Out The Fortinet Guru Youtube Channel! Want someone else to deal with it for you? Get some consulting from Fortinet GURU!

Transparent Mode Deployment

Transparent mode deployment

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

Configuring DNS records

If the FortiMail unit is operating in transparent mode, in most cases, configuring DNS records for protected domain names is not required. Proper DNS records for your protected domain names are usually already in place. However, you usually must configure public DNS records for the FortiMail unit itself.

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

Configuring DNS records for the FortiMail unit itself

In addition to that of protected domains, the FortiMail unit must be able to receive web connections, and send and receive email, for its own domain name. Dependent features include:

  • delivery status notification (DSN) email
  • spam reports
  • email users’ access to their per-recipient quarantined mail
  • FortiMail administrators’ access to the web UI by domain name
  • alert email
  • report generation notification email

For this reason, you should also configure public DNS records for the FortiMail unit itself.

Appropriate records vary by whether or not Web release host name/IP (located in AntiSpam > Quarantine > Quarantine Report in the advanced mode of the web UI) is configured:

  • Case 1: Web Release Host Name/IP is empty/default
  • Case 2: Web Release Host Name/IP is configured

Unless you have enabled both Hide the transparent box in each protected domain and Hide this box from the mail server in each session profile, the FortiMail unit is not fully transparent in SMTP sessions: the domain name and IP address of the FortiMail unit may be visible to SMTP servers, and they might perform reverse lookups. For this reason, public DNS records for the FortiMail unit usually should include reverse DNS (RDNS) records.

Case 1: Web Release Host Name/IP is empty/default

When Web release host name/IP is not configured (the default), the web release/delete links that appear in spam reports use the fully qualified domain name (FQDN) of the FortiMail unit. For example, if the FortiMail unit’s host name is fortimail, and its local domain name is example.net, resulting in the FQDN fortimail.example.net, a spam report’s default web release link might look like (FQDN highlighted in bold):

https://fortimail.example.net/releasecontrol?release=0%3Auser2%40examp le.com%3AMTIyMDUzOTQzOC43NDJfNjc0MzE1LkZvcnRpTWFpbC00MDAsI0YjUyM2N TkjRSxVMzoyLA%3D%3D%3Abf3db63dab53a291ab53a291ab53a291

In the DNS configuration to support this and the other DNS-dependent features, you would configure the following three records:

example.net IN MX 10 fortimail.example.net fortimail IN A 10.10.10.1 1 IN PTR fortimail.example.net.

where:

  • net is the local domain name to which the FortiMail unit belongs; in the MX record, it is the local domain for which the FortiMail is the mail gateway
  • example.net is the FQDN of the FortiMail unit
  • fortimail is the host name of the FortiMail unit; in the A record of the zone file for example.net, it resolves to the IP address of the FortiMail unit for the purpose of administrators’ access to the web UI, email users’ access to their per-recipient quarantines, to resolve the FQDN referenced in the MX record when email users send Bayesian and quarantine control email to the FortiMail unit, and to resolve to the IP address of the FortiMail unit for the purpose of the web release/delete hyperlinks in the spam report
  • 10.10.1 is the public IP address of the FortiMail unit

Case 2: Web Release Host Name/IP is configured

You could configure Web release host name/IP to use an alternative fully qualified domain name (FQDN) such as webrelease.example.info instead of the configured FQDN, resulting in the following web release link (web release FQDN highlighted in bold):

https://webrelease.example.info/releasecontrol?release=0%3Auser2%40exa mple.com%3AMTIyMDUzOTQzOC43NDJfNjc0MzE1LkZvcnRpTWFpbC00MDAsI0YjUyM 2NTkjRSxVMzoyLA%3D%3D%3Abf3db63dab53a291ab53a291ab53a291

Then, in the DNS configuration to support this and the other DNS-dependent features, you would configure the following MX record, A records, and PTR record (unlike “Case 1: Web Release Host Name/IP is empty/default” on page 52, in this case, two A records are required; the difference is highlighted in bold):

example.net IN MX 10 fortimail.example.net fortimail IN A 10.10.10.1 webrelease IN A 10.10.10.1 1 IN PTR fortimail.example.net.

where:

  • net is the local domain name to which the FortiMail unit belongs; in the MX record, it is the local domain for which the FortiMail is the mail gateway
  • example.net is the FQDN of the FortiMail unit
  • fortimail is the host name of the FortiMail unit; in the A record of the zone file for example.net, it resolves to the IP address of the FortiMail unit for the purpose of administrators’ access to the web UI and to resolve the FQDN referenced in the MX record when email users send Bayesian and quarantine control email to the FortiMail unit
  • webrelease is the web release host name; in the A record of the zone file for example.info, it resolves to the IP address of the FortiMail unit for the purpose of the web release/delete hyperlinks in the spam report
  • 10.10.1 is the public IP address of the FortiMail unit

Configuring a private DNS server

Consider providing a private DNS server on your local network to improve performance with features that use DNS queries.

Figure 11:Public and private DNS servers (transparent mode)

172.16.1.10                                       Private DNS Server Public DNS Server

Email Domain: example.com IN MX 10 mail.example.com example.com IN MX 10 mail.example.com

@example.com mail IN A 172.16.1.10 mail IN A 10.10.10.1

In some situations, a private DNS server may be required. If:

  • you configure the FortiMail unit to use a private DNS server, and
  • both the FortiMail unit and the protected SMTP server reside on the internal network, with private network IP addresses, and • you enable the Use MX record option you should configure the A records on the private DNS server and public DNS server differently: the private DNS server must resolve to the domain names of the SMTP servers into private IP addresses, while the public DNS server must resolve them into public IP addresses.

For example, if both a FortiMail unit (fortimail.example.com) operating in transparent mode and the SMTP server reside on your private network behind a router or firewall as illustrated in Figure 7 on page 53, and the Use MX record option is enabled, Table 9 on page 81 illustrates differences between the public and private DNS servers for the authoritative DNS records of example.com.

Table 9: Public versus private DNS records when “Use MX Record” is enabled

Private DNS server Public DNS server
example.com IN MX 10 mail.example.com example.com IN MX 10 mail.example.com
mail IN A 172.16.1.10 mail IN A 10.10.10.1
10 IN PTR 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.


Having trouble configuring your Fortinet hardware or have some questions you need answered? Check Out The Fortinet Guru Youtube Channel! Want someone else to deal with it for you? Get some consulting from Fortinet GURU!

Gateway Mode Deployment

Gateway mode deployment

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

Configuring DNS records

You must configure public DNS records for the protected domains and for the FortiMail unit itself.

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

Configuring DNS records for the protected domains

Regardless of your private network topology, in order for external MTAs to deliver email through the FortiMail unit, you must configure the public MX record for each protected domain to indicate that the FortiMail unit is its email gateway.

For example, if the fully qualified domain name (FQDN) of the FortiMail unit is fortimail.example.com, and example.com is a protected domain, the MX record for example.com would be:

example.com IN MX 10 fortimail.example.com

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 23.

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.

Configuring DNS records for the FortiMail unit itself

In addition to that of protected domains, the FortiMail unit must be able to receive web connections, and send and receive email, for its own domain name. Dependent features include:

  • delivery status notification (DSN) email
  • spam reports
  • email users’ access to their per-recipient quarantined mail
  • FortiMail administrators’ access to the web UI by domain name
  • alert email
  • report generation notification email

For this reason, you should also configure public DNS records for the FortiMail unit itself.

Appropriate records vary by whether or not you configured Web release host name/IP (located in AntiSpam > Quarantine > Quarantine Report in the advanced mode of the web UI).

See the following:

  • Case 1: Web Release Host Name/IP is empty/default
  • Case 2: Web Release Host Name/IP is configured

Case 1: Web Release Host Name/IP is empty/default

When Web release host name/IP is not configured (the default), the web release/delete links that appear in spam reports use the fully qualified domain name (FQDN) of the FortiMail unit. For example, if the FortiMail unit’s host name is fortimail, and its local domain name is example.net, resulting in the FQDN fortimail.example.net, a spam report’s default web release link might look like (FQDN highlighted in bold):

https://fortimail.example.net/releasecontrol?release=0%3Auser2%40examp le.com%3AMTIyMDUzOTQzOC43NDJfNjc0MzE1LkZvcnRpTWFpbC00MDAsI0YjUyM2N TkjRSxVMzoyLA%3D%3D%3Abf3db63dab53a291ab53a291ab53a291

In the DNS configuration to support this and the other DNS-dependent features, you would configure the following three records:

example.net IN MX 10 fortimail.example.net fortimail IN A 10.10.10.1 1 IN PTR fortimail.example.net.

where:

  • net is the local domain name to which the FortiMail unit belongs; in the MX record, it is the local domain for which the FortiMail is the mail gateway
  • example.net is the FQDN of the FortiMail unit
  • fortimail is the host name of the FortiMail unit; in the A record of the zone file for example.net, it resolves to the IP address of the FortiMail unit for the purpose of administrators’ access to the web UI, email users’ access to their per-recipient quarantines, to resolve the FQDN referenced in the MX record when email users send Bayesian and quarantine control email to the FortiMail unit, and to resolve to the IP address of the FortiMail unit for the purpose of the web release/delete hyperlinks in the spam report
  • 10.10.1 is the public IP address of the FortiMail unit

Having trouble configuring your Fortinet hardware or have some questions you need answered? Check Out The Fortinet Guru Youtube Channel! Want someone else to deal with it for you? Get some consulting from Fortinet GURU!