Technical Note FORTIMAIL Configuration For Enterprise Deployment Rev 2.1
Technical Note FORTIMAIL Configuration For Enterprise Deployment Rev 2.1
FORTIMAIL Configuration
For Enterprise Deployment
Rev 2.1
April 7, 2009
Fortinet Inc. Technical Note - FortiMail Configuration for Enterprise
Table of Contents
1
Introduction ................................................................................................................... 3
1.1
Objective .................................................................................................................. 3
1.2
Network deployment ................................................................................................ 3
1.3
Convention............................................................................................................... 3
2
System settings .............................................................................................................. 4
2.1
DNS settings............................................................................................................. 4
2.2
SMTP access control ................................................................................................. 4
2.2.1
Inbound traffic .................................................................................................. 4
2.2.2
Outbound traffic ............................................................................................... 4
2.2.3
Enforcing authentication for roaming users....................................................... 4
2.3
FortiGuard queries.................................................................................................... 4
2.4
Log settings ............................................................................................................. 5
3
Domain settings ............................................................................................................. 6
3.1
Domain creation ....................................................................................................... 6
3.2
Recipient verification ................................................................................................ 6
4
Protection profile settings............................................................................................... 7
4.1
Session profile settings ............................................................................................ 7
4.1.1
Session profile for inbound traffic ..................................................................... 7
4.1.2
Session profile for outbound traffic ................................................................... 7
4.2
Antispam profile settings ......................................................................................... 8
4.2.1
Antispam profile for inbound traffic .................................................................. 8
4.2.2
Antispam profile for outbound traffic................................................................ 9
4.3
Antivirus profile...................................................................................................... 10
5
Policies ......................................................................................................................... 11
5.1
IP based policies..................................................................................................... 11
5.2
Recipient based policies ......................................................................................... 11
5.3
Authentication policies (Webmail & SMTP)............................................................... 11
Change Log
Revision Description
1.0 2009/03/05 Initial Draft Release
1.5 2009/03/09
1.6 2009/03/10
2.0 2009/03/18 General Availability
2.1 2009/04/07 FortiMail 3.0 MR3 Patch 5
Comments
Nathalie Rivat
[email protected]
Trademarks
Products mentioned in this document are trademarks or registered trademarks of their
respective holders.
April 7, 2009 2
Fortinet Inc. Technical Note - FortiMail Configuration for Enterprise
1 Introduction
1.1 Objective
The purpose of this document is to provide recommendation for FortiMail antispam settings
in enterprise environment.
The intention is not to explain filtering techniques. Please refer to the Administration Guide
for that.
We recommend to use FortiMail as an outgoing relay for the backend mailserver in order to
policy and filter outbound traffic.
1.3 Convention
For an easy description FortiMail configuration is presented with command lines, based on
the recommended release as of today: FortiMail Release 3.0 Minor Release 4 Patch 5.
Parameters that are written in red should be modified to fit the local network and system
environment.
April 7, 2009 3
Fortinet Inc. Technical Note - FortiMail Configuration for Enterprise
2 System settings
2.1 DNS settings
FortiMail should to be configured with two local DNS servers. Fast answers from DNS servers
is critical to maximize FortiMail performances.
There is no need to define any additional access list to relay inbound traffic.
April 7, 2009 4
Fortinet Inc. Technical Note - FortiMail Configuration for Enterprise
set log policy destination local event status enable category system smtp ha update
set log policy destination local virus status enable category infected
set log policy destination local history status enable
set log policy destination local spam status enable category detected
April 7, 2009 5
Fortinet Inc. Technical Note - FortiMail Configuration for Enterprise
3 Domain settings
3.1 Domain creation
Define internal domains that should be protected by FortiMail:
The best option to implement this check is to use the corporate LDAP directory as FortiMail:
• is able to cache LDAP answers
• and supports redundant LDAP configuration for automatic failover.
If LDAP is not available, it is possible to use the backend SMTP server to validate the
recipient addresses. FortiMail sends a RCPT TO command and expects in return a message
validating the user address.
Verify that the backend mail server is configured to provide a valid status. It sometimes
requires an additional option configuration on the mail server.
set ldap_profile profile ldap_server server 192.168.2.100 port 636 secure none
set ldap_profile profile ldap_server user schema inetorgperson basedn
dc=mycompany.com,dc=com binddn cn=Manager,dc=mycompany,dc=com bindpw fortinet deref never
scope sub query '(& (objectClass=inetOrgPerson) (mail=$m))'
set ldap_profile profile ldap_server auth authstate enable upnstatus disable upnsuffix ''
cnidstatus disable cnidname uid searchstatus enable
set ldap_profile profile ldap_server option timelimit 10 version ver3 unauthbind disable
cachestate enable cachettl 1440
April 7, 2009 6
Fortinet Inc. Technical Note - FortiMail Configuration for Enterprise
Two different profiles are defined, one for incoming traffic, one for outgoing traffic.
set ip_profile inbound sendervalidation dkim disable signing disable authenticated disable
domainkey disable spf enable bypassbounceverify disable
April 7, 2009 7
Fortinet Inc. Technical Note - FortiMail Configuration for Enterprise
set as profile inbound modify actions discard dis reject dis summary en
set as profile inbound modify auto-release dis webrelease en autowhitelist dis
April 7, 2009 8
Fortinet Inc. Technical Note - FortiMail Configuration for Enterprise
• Adapt the expiry period to the environment. It may be necessary to increase this
timer if there are too many MTAs trying again too late - after the 4 hours window.
• You may want to increase the table size of greylist entries according to your
hardware and the max value matrix:
http://kc.forticare.com/default.asp?id=3756&Lang=1&SID=
Adjust the deepheader confidence degre to 96 (95 being the default value). If needed, you
can later increase the filter aggressiveness by gradually reducing the confidence degree to
95.
set spam deepheader confidence 96
The following profile detects and stores spam into the system quarantine for later review by
the administrator.
• Adapt the maximum mail size for scanning as desired.
• Note that IP reputation check have been disabled (FortiGuard IP, DNSBL, and deep
header IP scan)
set out_profile profile outbound modify actions discard dis reject dis review en
April 7, 2009 9
Fortinet Inc. Technical Note - FortiMail Configuration for Enterprise
April 7, 2009 10
Fortinet Inc. Technical Note - FortiMail Configuration for Enterprise
5 Policies
5.1 IP based policies
Two IP policies should be set:
• A default policy to enforce an inbound session profile for all incoming traffic.
• A second specific policy to identify outgoing traffic from the backend mail server and
apply the dedicated outbound session profile and the outbound antispam profile.
Rules are ordered so that the more specific rules are listed at the top.
set ip_policy 0
set ip_policy 0 match 192.168.2.100/32
set ip_policy 0 action SCAN
set ip_policy 0 ip outbound
set ip_policy 0 as outbound
set ip_policy 1
set ip_policy 1 match 0.0.0.0/0
set ip_policy 1 action SCAN
set ip_policy 1 ip inbound
set policy mydomain.com modify user * modify groupmode user as inbound av antivirus
content content_def
If roaming users can send mail from the Internet using FortiMail as an outgoing SMTP server,
sessions should be authenticated to avoid spammers relaying mail by spoofing sender mail
addresses. The LDAP server is used to process this authentication, or the backend SMTP
server if LDAP is not available.
set spam retrieval policy mydomain.com user *@mydomain.com auth LDAP ldap_server
senddomain enable allowaccess http smtpauth
April 7, 2009 11