Skip to main content
esalija
Staff
Staff
March 6, 2025

Troubleshooting Tip: After v7.4.6, the FortiToken Mobile Activation emails have the same sender and receiver

  • March 6, 2025
  • 3 replies
  • 1204 views
Description

This article describes an issue where, after FortiOS v7.4.6, users who use their email addresses for activation of the FortiToken Mobile receive the same email address as both the sender and receiver.

Scope FortiGate.
Solution
  • When using the Custom Email server for the 2FA MobileToken, the sender and receiver are the same. For example, 'smtp.fortinet.com Sender:test1@fortinet.com', Receiver 'test2@fortinet.com'.
  • A custom Email Server configuration.

 

config system email-server

    (email-server) # show full-configuration
        config system email-server
            set type custom
            set server "smtp.fortinet.com"     <-----
            set port 25
            set source-ip 0.0.0.0
            set source-ip6 ::
            set authenticate disable
            set security none
            set interface-select-method auto
        end

 

  • Test local user configuration.

 

config user local
    edit "Test1"
        Configure local user settings
        edit "test1"
            set type password
            set two-factor fortitoken
            set fortitoken "FTKMOB136B201789"
            set email-to "test1@fortinet.com" <<<<<<<<<<<<<<<
            set passwd-time 2025-01-30 01:03:11
            set passwd ENC 97tHpR63WIQ8a1RzU8wD0xEuhPQA3nz3x7J
        next
    end

 

  • The email address that the user receives when the sender and receiver email addresses are the same.


-----Original Message-----
From: Test1 < test1@fortinet.com> <<<
Sent: Tuesday, January 21, 2025 1:55 PM
To:  Test1 < test1@fortinet.com> <<<
Subject: [Ext] FTM Activation on FortiGate

 

  • Run the mail alert commands:


diagnose test application dnsproxy 2                        <-----Make sure that the firewall can reach the DNS server.

diagnose debug reset
diagnose debug console timestamp enable
diagnose debug application fnbamd -1
diagnose debug application alertmail -1
diagnose debug enable

 

2025-01-30 01:34:35 mail_info:
from:smtp.fortinet.com user:test1@fortinet.com
2025-01-30 01:34:35 mail_info:
reverse path:test1@fortinet.com
user name:test1
2025-01-30 01:34:35 to[0]:test1@fortinet.com
2025-01-30 01:34:35 <==_init_mail_info
2025-01-30 01:34:35 create session
2025-01-30 01:34:35 resolve smtp.fortinet.com to 1 IP
2025-01-30 01:34:35 ==> send mail
2025-01-30 01:34:35 connecting to 64.233.166.27 port 25
2025-01-30 01:34:35 send mail 0x10253d40 session 0x10254970
2025-01-30 01:35:44 failed to connect
2025-01-30 01:35:44 failed to connect
2025-01-30 01:35:44 session_io_event: creating ssl structure for session 0x10208950
2025-01-30 01:35:44 create_ssl: 0x7ff4c1d70000
2025-01-30 01:35:44 error in SSL_connect (null)
2025-01-30 01:35:44 _session_on_destroy
2025-01-30 01:35:44 <== send mail failed, m = 0x10268a70 s = 0x10208950

 

  •  The expected behavior is:
  1. In default email server settings, the 'MAIL FROM' is 'DoNotReply@fortinet-notifications.com'.
  2. If a Username is configured in the Custom Email Server, MAIL FROM is the 'username' that is specified at the Email Server.
  3. If the Username is not specified at the Custom Email Server, MAIL FROM is the value configured in 'mail to', which is specified at the Local User level.

 

Note:

Authentication should be enabled to specify the username.


config system email-server
    set server "snmp.fortinet.com"
    set authenticate enable
    set username "test2"
    set password ENC kINOPpLFGd0zVJj4ivB0woPvvCi
    set security smtps
end

 

  • Output after the changes to the Email Server

 

from:smtp.fortinet.com user:test2@fortinet.com
2025-01-30 01:34:35 mail_info:
reverse path:test1@fortinet.com
user name:test2
2025-01-30 01:34:35 to[0]:test1@fortinet.com
2025-01-30 01:34:35 <==_init_mail_info

3 replies

rete
Explorer III
July 14, 2026

Setting the sender email address equal to destination violates every modern email security standard such as SPF, and emails are dropped at destination or tagged as SPAM at the best.

How could such a faulty default behaviour be conceived in year 2026 is a real mistery...

New Member
August 7, 2026

I agree, with nearly every modern SMTP server this is a safe way to disable email completely!!! We need to set a “Mail from” address.

rete
Explorer III
August 12, 2026

It sorted out that if your smtp username is the same as your email and you have authentication, the sender field will be set correctly.

 

If you have a different email username for smtp, like in our case, you are screwed.

 

We had to setup a passwordless smtp server and luckily in the firewall page you can fill only username without any password, and this is just ignored by Postfix…

 

But anyway a really bad and incomprensible choice not having an explicit sender or reply-to field in year 2026!

 

Thought Leadership Security Summit. Outpace New Threats with AI - enhanced defense. Tuesday, Septmeber 15, 8:30 AM - 2:30 PM PT. The Golf Club at Newcastle, WA.
Virtual event | September 2026. SASE summit. The age of autonomous trust. Register here!