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.
ssanga
Staff & Editor
Staff & Editor
Article Id 355291
Description This article addresses an issue where the FortiToken activation code email is not received when attempting to send the code by navigating to User Definition -> 'Right-click' on User -> Send Activation Code.
Scope FortiGate v7.4.4, v7.6.0.
Solution

When sending the FortiToken activation code via User Definition -> 'Right-click' on User -> Send Activation Code, the email fails to send to the configured email address.
The debug logs show 'email-to' in the 'to' field instead of the actual email address, as shown below:

diagnose debug application alertmail -1
diagnose debug enable

mail_info:
from:fortinet-notifications.com user:DoNotReply@fortinet-notifications.com
mail_info:
reverse path:DoNotReply@fortinet-notifications.com
user name:DoNotReply
to[0]:email-to<-----
<==_init_mail_info
create session
resolve fortinet-notifications.com to 1 IP
==> send mail
connecting to 208.91.114.151 port 465
send mail 0x7ff27479d640 session 0x7ff27476d0f0
session_io_event: creating ssl structure for session 0x7ff27476d0f0
ssl_init
create_ssl_ctx
create_ssl: 0x7ff263581000
sessionn 0x7ff27476d0f0, SSL connected
session: 0x7ff27476d0f0, rsp_state: greeting, code: 220
session: 0x7ff27476d0f0, rsp_state: ehlo, code: 250
session: 0x7ff27476d0f0, rsp_state: mail, code: 250
session: 0x7ff27476d0f0, rsp_state: rcpt, code: 550
session: 0x7ff27476d0f0, rsp_state: data, code: 503
session: 0x7ff27476d0f0, rsp_state: quit, code: 221
session finined
_session_on_destroy
<== send mail success, m = 0x7ff27479d640 s = 0x7ff27476d0f0

However, when using the Send Activation Code Email option within the User Definition, the activation email is sent successfully, showing the correct recipient email address in the debug logs.

 

mail_info:
from:fortinet-notifications.com user:DoNotReply@fortinet-notifications.com
mail_info:
reverse path:DoNotReply@fortinet-notifications.com
user name:DoNotReply
to[0]:fortigate_user@fortinet.com <-----
<==_init_mail_info
create session
resolve fortinet-notifications.com to 1 IP
==> send mail
connecting to 208.91.114.151 port 465
send mail 0x7ff27479d640 session 0x7ff27477f0a0
session_io_event: creating ssl structure for session 0x7ff27477f0a0
create_ssl: 0x7ff263581000
sessionn 0x7ff27477f0a0, SSL connected
session: 0x7ff27477f0a0, rsp_state: greeting, code: 220
session: 0x7ff27477f0a0, rsp_state: ehlo, code: 250
session: 0x7ff27477f0a0, rsp_state: mail, code: 250
session: 0x7ff27477f0a0, rsp_state: rcpt, code: 250
session: 0x7ff27477f0a0, rsp_state: data, code: 354
session: 0x7ff27477f0a0, rsp_state: data2, code: 250
session: 0x7ff27477f0a0, rsp_state: quit, code: 221
session finined
_session_on_destroy
<== send mail success, m = 0x7ff27479d640 s = 0x7ff27477f0a0


This issue has been resolved in v7.4.8 and v7.6.1. Logs required by FortiGate TAC for investigation.

 

  1. Debugs:

 

diagnose debug application alertmail -1
diagnose debug enable
<send activation code>
diagnose debug reset

 

  1. TAC Report:

 

execute tac report

 

  1. Configuration file of the FortiGate.
  2. System Events.