Skip to main content
gcortes1
Staff
Staff
November 24, 2025

Technical Tip: How to validate the authentication between FortiMail and an email server

  • November 24, 2025
  • 0 replies
  • 180 views
Description

This article describes how to validate the authentication between a FortiMail and an email server.
Note: This procedure is not valid for Office365.

Scope

FortiMail.

Solution

 

  1. Validate the type of encoding used by the Email server: in this procedure, Base64 will be used.


To validate it, make a connection to the email server:

 

 

execute telnettest <x.x.x.x>:25
ehlo <local_domain>
auth login

 

If the answer is '334 VXNlcm5hbWU6', the authentication is Base64.

 

Ima_1.PNG

 

  1. Once the encoding value is confirmed, it is necessary to convert the username and password to Base64.

In this example, Microsoft PowerShell is used:
For the user, the short name (without domain) is used:

 

# User

$user = "<username>"

$userBase64 = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($user))

$userBase64

 

For the password:

 

# Password

$pass = "<Password>"

$passBase64 = [Convert]::ToBase64String([Text.Encoding]::ASCII.GetBytes($pass))

$passBase64

 

Ima_2.PNG

 

  1. Once the values are obtained in Base64, the authentication is tested:

  

execute telnettest <x.x.x.x>:25
ehlo <local_domain>
auth login

<Value_For_the_user>

<Value_For_the_PWD>


Ima_3.PNG

 

Ima_4.PNG