FortiGate
FortiGate Next Generation Firewall utilizes purpose-built security processors and threat intelligence security services from FortiGuard labs to deliver top-rated protection and high performance, including encrypted traffic.
odahy
Staff
Staff
Article Id 191458

Description

 
This article describes how to configure email alerts because sometimes FortiGate cannot access the account to send the email alert.
 
Scope
 
FortiGate.

Solution

This is an example of the configuration in FortiGate:

Configure the Gmail account in the FortiGate.
 
config system email-server
    set server "smtp.gmail.com"
    set port 587
    set authenticate enable
    set username "test"
    set password SGKSDHFK
    set security starttls
end
 

Configure the destination of the email alert.

 

config alertemail setting
    set username "test@gmail.com"
    set mailto1 "test@fortinet.com"
end


Configure the Gmail account to use an App Password:

 

An App Password is a 16-digit passcode that gives a less secure app or device permission to access the Google Account.

App Passwords can only be used with accounts that have 2-Step Verification turned on.

 

App1.png

 

Give a name for the app-specific.

 

Password.png

 

Copy the password and paste it into the email server password.

 

config system email-server
    set server "smtp.gmail.com"
    set port 587
    set authenticate enable
    set username "test"
    set password SGKSDHFK <-------
    set security starttls
end

Note:

App Password may generate a password with a space, and it is necessary to put the password inside brackets to avoid a command syntax error.

 

For more information on how to set up an App Password on the Google account, refer to the document below:

Sign in with app passwords


Following this, it will be possible to send alert emails.

Test this with the following command:

 

diagnose log alertmail test