---
title: FAQ - SSL/TLS Certificate Name Mismatch Errors | Nodinite Documentation
description: Troubleshoot SSL/TLS certificate name mismatch errors when Nodinite sends e-mail through SMTP servers, including intermittent errors caused by DNS round-robin and load balancers. Read the host name and certificate names from the Alarm Queue error, inspect SAN lists, and fix the SMTP Server so the next retry sends the queued alerts.
---

# <i class="fal fa-shield-halved" aria-hidden="true"></i> SSL/TLS Certificate Name Mismatch Errors

<aside aria-label="Note" class="nodinite-note nodinite-note--note">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-note"></i> Note</p>
<div class="nodinite-note__content"><p><strong>Quick Navigation:</strong> <a href="https://docs.nodinite.com/administration/settings/alarm-plugins/troubleshooting/overview/">Overview</a> | <a href="https://docs.nodinite.com/administration/settings/alarm-plugins/troubleshooting/faq-ssl-tls-certificate-revocation/">SSL/TLS Certificate Revocation Errors</a> | <a href="https://docs.nodinite.com/administration/settings/alarm-plugins/troubleshooting/faq-office365-email-issues/">Office365 Email Issues</a></p></div>
</aside>

This FAQ addresses SSL/TLS certificate **hostname mismatch** errors when <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> attempts to send emails through SMTP servers. These errors occur when the hostname you connect to does not match any of the names listed in the server's SSL/TLS certificate, even when the **"Ignore certificate revocation errors"** option is enabled. The [Monitoring Service][] sends the emails, so run the checks on the server that hosts it; failed emails wait in the [Alarm Queue][].

![An Email options entry that reaches its SMTP relay by an address that isn't in the relay's certificate: the alert waits in the Alarm Queue with the name mismatch error, the SMTP Server is changed to a name in the certificate, and the next retry delivers the alert, animated walkthrough (7.13)][1]  
*Animated walkthrough: the error lists the names the certificate holds; one of them fixes the entry. The steps are under [Step 3](#step-3-update-nodinite-email-alarm-plugin-configuration).*  

## Problem

When an Email [Alarm Plugin][Alarm Plugins - Overview] entry sends an alert, the **Last Exception** of the queued entry reads, in <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> 7.12:

```text
Failed to send all e-mail alarms, To: "operations@contoso.com", Subject: "Contoso integration team: alert from Nodinite - [IBSS | DEV] - With Error", Errors:"An error occurred while attempting to establish an SSL or TLS connection.
The host name (127.0.0.2) did not match any of the names given in the server's SSL certificate:
• *.dev.internal
• *.dev.localhost
• host.containers.internal
• host.docker.internal
• localhost
, Inner Exception: The remote certificate was rejected by the provided RemoteCertificateValidationCallback.,"
```

The first line names the host you connect to, and the list is the certificate's names: pick the **SMTP Server** from it (Step 2). **Execute Alarm test** shows the same text in its own layout.

### Key Indicators

* This error persists **even after** enabling the **"Ignore certificate revocation errors"** checkbox in <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> v7.2+
* ⚠️ **Intermittent errors:** The **"Execute Alarm test"** button succeeds, but **live alarms fail sporadically** → See [⚠️ Intermittent Errors](#fa-triangle-exclamation-intermittent-errors-test-succeeds-live-alarms-fail) for DNS round-robin scenarios

## Root Cause

The SSL/TLS certificate presented by your SMTP server does **not** include the hostname you specified in the **Server** field in its **Subject Alternative Name (SAN)** list.

<div class="mermaid">
flowchart LR
    Alert["fa:fa-bell Alert from a Monitor View"] --> MS["fa:fa-watch-fitness Monitoring Service"]
    MS -->|"TLS handshake with the SMTP Server name"| SMTP["fa:fa-envelope SMTP server<br/>presents its certificate"]
    SMTP -->|"name not in the SAN list"| Queue["fa:fa-list Alarm Queue<br/>Last Exception"]
    Queue -->|"retry with the entry as stored now"| MS
    SMTP -->|"name matches"| Sent["fa:fa-paper-plane Alert sent"]
    style MS fill:#2678BD
    style Queue fill:#c33d34
    style Sent fill:#93d16d
</div>

*Blue: the [Monitoring Service][] checks the **SMTP Server** name against the certificate's SAN list. Red: a name that isn't listed fails the handshake, and the alert waits in the [Alarm Queue][]. Green: once the SMTP Server is a name the certificate holds, the next retry sends it.*

### Example Scenario (Anonymized)

* You configure <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> to connect to `smtp.example.com`
* The server at `smtp.example.com` presents a certificate whose SAN list only contains `mail1.example.com` and `mail2.example.com`
* Result: **Hostname mismatch** → TLS handshake fails

<aside aria-label="Important" class="nodinite-note nodinite-note--important">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
<div class="nodinite-note__content"><p>The <strong>"Ignore certificate revocation errors"</strong> option in <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> v7.2+ <strong>only bypasses revocation validation errors</strong> (CRL/OCSP checks). It does <strong>NOT</strong> bypass other SSL policy errors such as:</p><ul>
<li><code>RemoteCertificateNameMismatch</code> (hostname mismatch)</li>
<li><code>RemoteCertificateChainErrors</code> (untrusted certificate authority)</li>
<li><code>RemoteCertificateNotAvailable</code> (no certificate presented)</li>
</ul><p>This is intentional for security reasons. Hostname verification prevents man-in-the-middle attacks and ensures you are connecting to the intended server.</p></div>
</aside>

<aside aria-label="Note" class="nodinite-note nodinite-note--note">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-note"></i> Note</p>
<div class="nodinite-note__content"><p><strong>Port 25 and SSL/TLS:</strong> Many modern SMTP servers automatically enforce STARTTLS on port 25, even when the "SSL is required" checkbox is unchecked in <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>. This means certificate validation occurs regardless of the port or SSL setting, and you may encounter certificate name mismatch errors on port 25 just as you would on ports 465 or 587.</p></div>
</aside>

## <i class="fal fa-triangle-exclamation" aria-hidden="true"></i> Intermittent Errors (Test Succeeds, Live Alarms Fail)

<aside aria-label="Warning" class="nodinite-note nodinite-note--warning">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-triangle-exclamation"></i> Warning</p>
<div class="nodinite-note__content"><p><strong>Common Symptom:</strong> The <strong>"Execute Alarm test"</strong> button succeeds, but emails in the <strong>live alarm queue fail intermittently</strong> with the host name mismatch error.</p></div>
</aside>

### Root Cause: DNS Round-Robin with Inconsistent Backend Certificates

The "Execute Alarm test" button and the live alarm queue use the same email sending logic, but there's a critical timing difference: **the test sends immediately**, while **queued alarms retry in the background** over time. This means they may hit different SMTP backend servers as DNS round-robin rotates through available IPs.

#### What's Happening

1. **DNS Alias:** `smtp.example.com` (and possibly `smtp5.example.com`) are **DNS aliases** in front of multiple SMTP nodes
2. **Multiple Backend IPs:** When you press the test button, DNS resolves to one IP and connects immediately
3. **Round-Robin/Load Balancing:** When the background service retries later, DNS may return a **different IP** whose certificate does **NOT** contain the alias you configured
4. **Inconsistent Certificates:** Some backend servers have certificates with `smtp.example.com` in the SAN list, while others only have `mail.example.com` or `mail1.example.com`

<aside aria-label="Important" class="nodinite-note nodinite-note--important">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-message-exclamation"></i> Important</p>
<div class="nodinite-note__content"><p><sup><span class="nodinite-new-badge">New 7.12</span></sup> <strong>Queued alarms use the current settings:</strong> a retry sends with the Alarm Plugin entry as it is stored now. After you correct the SMTP server hostname on the entry, the queued alarms in the <a href="https://docs.nodinite.com/administration/settings/alarm-queue/overview/">Alarm Queue</a> use the new hostname at their next retry; you don't need to purge the queue. Delete or purge only alarms you no longer want sent.</p></div>
</aside>

#### Example Diagnostic Approach

```powershell
Resolve-DnsName smtp.example.com | ForEach-Object {
    openssl s_client -connect "$($_. IPAddress):587" –starttls smtp –servername smtp.example.com
}
```

You will very likely find that only **some nodes** present a cert containing `smtp.example.com`, while others present a cert for `mail.example.com` or similar. When the queue lands on the latter, the handshake fails and the item stays queued.

### How to Diagnose Intermittent Errors

Run this PowerShell script to check **all backend servers**:

```powershell
<#
.SYNOPSIS
    Tests all backend servers behind a DNS alias for certificate consistency.
#>

param(
    [Parameter(Mandatory = $true)]
    [string]$HostName,  # The DNS alias (e.g., smtp.example.com)
    
    [Parameter(Mandatory = $false)]
    [int]$Port = 587
)

Write-Host "Resolving all IP addresses for $HostName..." -ForegroundColor Cyan
$ips = (Resolve-DnsName $HostName -Type A).IPAddress | Select-Object -Unique

Write-Host "Found $($ips.Count) unique IP address(es):`n" -ForegroundColor Yellow

$results = @()

foreach ($ip in $ips) {
    Write-Host "Checking certificate on $ip..." -ForegroundColor Cyan
    
    try {
        $tcp = New-Object System.Net.Sockets.TcpClient($ip, $Port)
        $ssl = New-Object System.Net.Security.SslStream(
            $tcp.GetStream(), 
            $false, 
            ({ param($sender, $certificate, $chain, $sslPolicyErrors) return $true })
        )
        
        # Authenticate using the ALIAS hostname (not the IP)
        $ssl.AuthenticateAsClient($HostName)
        
        $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($ssl.RemoteCertificate)
        
        # Extract SAN list
        $san = $cert.Extensions | Where-Object { $_.Oid.FriendlyName -eq 'Subject Alternative Name' }
        $sanList = @()
        
        if ($san) {
            $sanList = $san.Format($true) -split "`n" | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne "" }
        }
        
        # Check if the alias hostname is in the SAN
        $hostInSAN = $sanList | Where-Object { $_ -match [regex]::Escape($HostName) }
        
        $results += [PSCustomObject]@{
            IPAddress = $ip
            Subject = $cert.Subject
            ContainsAlias = ($hostInSAN -ne $null)
            SANList = ($sanList -join ", ")
        }
        
        if ($hostInSAN) {
            Write-Host "  [OK] $ip - Certificate contains '$HostName'" -ForegroundColor Green
        } else {
            Write-Host "  [FAIL] $ip - Certificate does NOT contain '$HostName'" -ForegroundColor Red
        }
        
        $ssl.Dispose()
        $tcp.Dispose()
        
    } catch {
        Write-Host "  [FAIL] $ip - Error: $($_.Exception.Message)" -ForegroundColor Red
        $results += [PSCustomObject]@{
            IPAddress = $ip
            Subject = "ERROR"
            ContainsAlias = $false
            SANList = $_.Exception.Message
        }
    }
}

Write-Host "`n========================================" -ForegroundColor Yellow
Write-Host "Summary" -ForegroundColor Yellow
Write-Host "========================================" -ForegroundColor Yellow

$results | Format-Table -AutoSize

$mismatchCount = ($results | Where-Object { -not $_.ContainsAlias }).Count

if ($mismatchCount -gt 0) {
    Write-Host "`n⚠ WARNING: $mismatchCount of $($results.Count) backend server(s) do NOT have '$HostName' in their certificate." -ForegroundColor Red
    Write-Host "This will cause INTERMITTENT errors as DNS round-robin sends you to different backends.`n" -ForegroundColor Red
    Write-Host "Fix options:" -ForegroundColor Yellow
    Write-Host "  1. Ask mail admins to reissue certificates on ALL backends to include '$HostName' in SAN" -ForegroundColor White
    Write-Host "  2. Change Nodinite to use a hostname that exists in ALL backend certificates" -ForegroundColor White
} else {
    Write-Host "`n[OK] All backend servers have '$HostName' in their certificates." -ForegroundColor Green
}
```

### Fix Intermittent Errors

You have **two options**:

#### Option 1: Ask Mail Admins to Install Certificate on ALL Backends (Recommended)

Request that **every SMTP backend server** has a certificate containing the published DNS alias (e.g., `smtp.example.com`) in its SAN list.

##### Example Request to IT Security

> *"Our SMTP service uses DNS round-robin with `smtp.example.com` pointing to multiple backend servers. Currently, only some backends have certificates containing `smtp.example.com` in the SAN list, causing intermittent TLS handshake failures. Please reissue certificates for ALL SMTP backend servers to include `smtp.example.com` in the Subject Alternative Name list."*

#### Option 2: Point Nodinite to a Hostname That Exists Everywhere

Identify a hostname that **exists in the certificates of ALL backend servers** and use that instead.

##### Example

```powershell
# Run the diagnostic script above
.\Test-SMTPBackendCerts.ps1 -HostName smtp.example.com

# Output shows:
#   192.168.1.10 - Contains: mail.example.com, smtp.example.com
#   192.168.1.11 - Contains: mail.example.com              (missing smtp.example.com)
#   192.168.1.12 - Contains: mail.example.com              (missing smtp.example.com)

# Solution: Use mail.example.com (present on ALL backends)
```

Update <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> configuration:

<table role="table" aria-label="Fixing Intermittent Errors by Using Consistent Hostname">
<thead>
<tr>
<th scope="col">Setting</th>
<th scope="col">Old Value (Intermittent)</th>
<th scope="col">New Value (Reliable)</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Server</strong></td>
<td><code>smtp.example.com</code></td>
<td><code>mail.example.com</code></td>
</tr>
</tbody>
</table>

#### After Updating the Configuration

1. **Test with "Execute Alarm test"** button to confirm the new hostname works
2. **Let the queue resend** - the queued alarms are resent with the new hostname at the next retry; purge only alarms you no longer want
3. **Monitor the live alarm queue** to verify new alarms send successfully  

## Common Scenarios

Hostname mismatches typically occur in these situations:

* **Load balancers/DNS aliases** - See [⚠️ Intermittent Errors](#fa-triangle-exclamation-intermittent-errors-test-succeeds-live-alarms-fail) for DNS round-robin scenarios
* **Internal vs external hostnames** - Using `smtp.internal.example.com` when certificate only contains `smtp.example.com`
* **Legacy configurations** - Old hostname still configured after certificate migration to new hostname
* **Wildcard certificate scope** - Using multi-level subdomain (e.g., `smtp.sub.example.com`) with single-level wildcard (`*.example.com`)

## Step 1: Inspect the Server's SSL/TLS Certificate

Before attempting fixes, you must **identify which hostnames are actually in the certificate's SAN list**.

### PowerShell Script: Inspect SMTP Certificate

Save this script as `Get-SMTPCertificate.ps1`:

```powershell
<#
.SYNOPSIS
    Retrieves and displays the SSL/TLS certificate from an SMTP server.

.DESCRIPTION
    Connects to an SMTP server on the specified port, performs a TLS handshake,
    and displays the certificate's Subject, Issuer, Thumbprint, and Subject 
    Alternative Name (SAN) list. Optionally exports the certificate to a file.

.PARAMETER HostName
    The SMTP server hostname to connect to (e.g., smtp.example.com).

.PARAMETER Port
    The SMTP port to connect to. Default is 587 (STARTTLS).

.PARAMETER ExportPath
    Optional path to export the certificate file (.cer format).

.EXAMPLE
    .\Get-SMTPCertificate.ps1 -HostName smtp.example.com -Port 587
    
.EXAMPLE
    .\Get-SMTPCertificate.ps1 -HostName mail.example.com -Port 465 -ExportPath ".\mail.example.com.cer"
#>

param(
    [Parameter(Mandatory = $true)]
    [string]$HostName,
    
    [Parameter(Mandatory = $false)]
    [int]$Port = 587,
    
    [Parameter(Mandatory = $false)]
    [string]$ExportPath = ""
)

Write-Host "Connecting to $HostName`:$Port to retrieve SSL/TLS certificate..." -ForegroundColor Cyan

try {
    # Establish TCP connection
    $tcp = New-Object System.Net.Sockets.TcpClient($HostName, $Port)
    
    # Create SSL stream (accept all certificates for inspection)
    $ssl = New-Object System.Net.Security.SslStream(
        $tcp.GetStream(), 
        $false, 
        ({ param($sender, $certificate, $chain, $sslPolicyErrors) return $true })
    )
    
    # Perform TLS handshake
    $ssl.AuthenticateAsClient($HostName)
    
    # Get certificate
    $cert = New-Object System.Security.Cryptography.X509Certificates.X509Certificate2($ssl.RemoteCertificate)
    
    # Display certificate information
    Write-Host "`n========================================" -ForegroundColor Green
    Write-Host "Certificate Information" -ForegroundColor Green
    Write-Host "========================================" -ForegroundColor Green
    
    Write-Host "`nSubject   : " -NoNewline -ForegroundColor Yellow
    Write-Host $cert.Subject -ForegroundColor White
    
    Write-Host "Issuer    : " -NoNewline -ForegroundColor Yellow
    Write-Host $cert.Issuer -ForegroundColor White
    
    Write-Host "Thumbprint: " -NoNewline -ForegroundColor Yellow
    Write-Host $cert.Thumbprint -ForegroundColor White
    
    Write-Host "Valid From: " -NoNewline -ForegroundColor Yellow
    Write-Host $cert.NotBefore -ForegroundColor White
    
    Write-Host "Valid To  : " -NoNewline -ForegroundColor Yellow
    Write-Host $cert.NotAfter -ForegroundColor White
    
    # Extract and display Subject Alternative Names (SAN)
    Write-Host "`n========================================" -ForegroundColor Cyan
    Write-Host "Subject Alternative Names (SAN)" -ForegroundColor Cyan
    Write-Host "========================================" -ForegroundColor Cyan
    
    $san = $cert.Extensions | Where-Object { $_.Oid.FriendlyName -eq 'Subject Alternative Name' }
    
    if ($san) {
        $sanList = $san.Format($true) -split "`n" | ForEach-Object { $_.Trim() } | Where-Object { $_ -ne "" }
        
        Write-Host "`nThe certificate is valid for the following hostnames:" -ForegroundColor Yellow
        foreach ($name in $sanList) {
            Write-Host "  • $name" -ForegroundColor White
        }
        
        # Check if the hostname you connected to is in the SAN list
        $hostInSAN = $sanList | Where-Object { $_ -match [regex]::Escape($HostName) }
        
        Write-Host "`n========================================" -ForegroundColor Magenta
        Write-Host "Hostname Verification" -ForegroundColor Magenta
        Write-Host "========================================" -ForegroundColor Magenta
        
        Write-Host "`nYou connected to: " -NoNewline -ForegroundColor Yellow
        Write-Host $HostName -ForegroundColor White
        
        if ($hostInSAN) {
            Write-Host "`n[OK] MATCH: " -NoNewline -ForegroundColor Green
            Write-Host "The hostname '$HostName' is present in the certificate's SAN list." -ForegroundColor Green
        } else {
            Write-Host "`n[FAIL] MISMATCH: " -NoNewline -ForegroundColor Red
            Write-Host "The hostname '$HostName' is NOT in the certificate's SAN list." -ForegroundColor Red
            Write-Host "`nTo fix this error, configure Nodinite to use one of the hostnames listed above." -ForegroundColor Yellow
        }
    } else {
        Write-Host "`nNo Subject Alternative Names found in certificate." -ForegroundColor Red
        Write-Host "This certificate may only be valid for: $($cert.Subject)" -ForegroundColor Yellow
    }
    
    # Export certificate if path specified
    if ($ExportPath) {
        $bytes = $cert.Export([System.Security.Cryptography.X509Certificates.X509ContentType]::Cert)
        [IO.File]::WriteAllBytes($ExportPath, $bytes)
        Write-Host "`n========================================" -ForegroundColor Green
        Write-Host "[OK] Saved certificate to: $ExportPath" -ForegroundColor Green
        Write-Host "========================================" -ForegroundColor Green
    }
    
} catch {
    Write-Error "Failed to retrieve certificate: $_"
} finally {
    if ($ssl) { $ssl.Dispose() }
    if ($tcp) { $tcp.Dispose() }
}

Write-Host ""
```

### Run the Script

```powershell
# Inspect the certificate from your SMTP server
.\Get-SMTPCertificate.ps1 -HostName smtp.example.com -Port 587

# Export certificate to file for further inspection
.\Get-SMTPCertificate.ps1 -HostName smtp.example.com -Port 587 -ExportPath ".\smtp.example.com.cer"

# For SMTPS (implicit TLS on port 465)
.\Get-SMTPCertificate.ps1 -HostName smtp.example.com -Port 465
```

### Example Output

```text
Connecting to smtp.example.com:587 to retrieve SSL/TLS certificate...

========================================
Certificate Information
========================================

Subject   : CN=mail1.example.com
Issuer    : CN=DigiCert TLS RSA SHA256 2020 CA1, O=DigiCert Inc, C=US
Thumbprint: A1B2C3D4E5F6071829384A5B6C7D8E9F0A1B2C3D
Valid From: 1/15/2025 12:00:00 AM
Valid To  : 1/15/2027 11:59:59 PM

========================================
Subject Alternative Names (SAN)
========================================

The certificate is valid for the following hostnames:
  • DNS Name=mail1.example.com
  • DNS Name=mail2.example.com
  • DNS Name=mail.example.com

========================================
Hostname Verification
========================================

You connected to: smtp.example.com

[FAIL] MISMATCH: The hostname 'smtp.example.com' is NOT in the certificate's SAN list.

To fix this error, configure Nodinite to use one of the hostnames listed above.
```

<aside aria-label="Tip" class="nodinite-note nodinite-note--tip">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-lightbulb"></i> Tip</p>
<div class="nodinite-note__content"><p>The script output clearly shows which hostnames are <strong>valid</strong> for the certificate. You must use one of these hostnames in your <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> Email Alarm Plugin configuration.</p></div>
</aside>

## Step 2: Identify the Correct Hostname

Based on the certificate inspection output, identify a hostname from the **SAN list** that you can use.

### Option A: Use a Hostname from the SAN List

If the certificate contains hostnames like `mail.example.com`, `mail1.example.com`, or `mail2.example.com`, update your <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> Email Alarm Plugin configuration to use one of these instead.

#### Example

* **Before (Mismatch):** `smtp.example.com` (not in SAN)
* **After (Match):** `mail.example.com` (present in SAN)

### Option B: Use a Wildcard-Matched Hostname

If the certificate contains a wildcard entry like `*.example.com`, you can use any **single-level** subdomain:

* ✅ **Valid:** `smtp.example.com` (matches `*.example.com`)
* ✅ **Valid:** `mail.example.com` (matches `*.example.com`)
* ❌ **Invalid:** `smtp.internal.example.com` (two levels - does NOT match `*.example.com`)

<aside aria-label="Warning" class="nodinite-note nodinite-note--warning">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-triangle-exclamation"></i> Warning</p>
<div class="nodinite-note__content"><p>Wildcard certificates only match <strong>one level</strong> of subdomain. See <a href="#issue-san-list-contains-wildcard-but-still-fails">Wildcard troubleshooting</a> if you have a multi-level hostname.</p></div>
</aside>

## Step 3: Update Nodinite Email Alarm Plugin Configuration

### Update the SMTP Server Hostname

1. In the [Alarm Queue][], click the name in the **Alarm Plugin** column of the failed entry. It opens the entry: the default [Email options][Email with Options] entry, or an entry that overrides the SMTP options ([Add or manage Alarm Plugin][]).
2. Open **Configuration** > **SMTP options**, and change **SMTP Server** to a hostname from the certificate's SAN list
3. Click **Save**
4. Test email delivery using the **Execute Alarm test** button
5. Wait for the next retry: the queued alarms are resent with the new hostname, and the queue empties. Purge only alarms you no longer want sent.

#### Example Configuration

<table role="table" aria-label="SMTP Configuration Update Example">
<thead>
<tr>
<th scope="col">Setting</th>
<th scope="col">Old Value (Mismatch)</th>
<th scope="col">New Value (Match)</th>
</tr>
</thead>
<tbody>
<tr>
<td><strong>Server</strong></td>
<td><code>smtp.example.com</code></td>
<td><code>mail.example.com</code></td>
</tr>
<tr>
<td><strong>Port</strong></td>
<td><code>587</code></td>
<td><code>587</code></td>
</tr>
<tr>
<td><strong>SSL is required</strong></td>
<td>✅ Checked</td>
<td>✅ Checked</td>
</tr>
<tr>
<td><strong>Username</strong></td>
<td><code>user@example.com</code></td>
<td><code>user@example.com</code></td>
</tr>
<tr>
<td><strong>Password</strong></td>
<td><code>********</code></td>
<td><code>********</code></td>
</tr>
</tbody>
</table>  

### Verify Configuration

```powershell
# Test DNS resolution for the new hostname
Resolve-DnsName mail.example.com

# Test SMTP connectivity
Test-NetConnection -ComputerName mail.example.com -Port 587
```

## What If No Valid Hostname Exists in the Certificate?

If the certificate's SAN list contains **no hostnames** that are accessible to you (e.g., only contains internal hostnames like `mail-internal.corp.local` but you need external access), you have two options:

### Option A: Request Certificate Reissuance (Recommended)

Work with your **IT Security** or **Infrastructure team** to reissue the certificate to include the hostname you need.

#### Example Request

> *"Please reissue the SSL/TLS certificate for our SMTP server to include `smtp.example.com` in the Subject Alternative Name (SAN) list. The current certificate only contains `mail1.example.com` and `mail2.example.com`, but our monitoring system connects via `smtp.example.com`."*

### Option B: Connect Directly to a Backend Server

If the SMTP service uses multiple servers behind a load balancer, you can configure <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> to connect directly to one of the backend servers whose hostname IS in the certificate.

#### Example

* Load Balancer hostname: `smtp.example.com` (not in SAN)
* Backend servers: `mail1.example.com`, `mail2.example.com` (both in SAN)
* **Solution:** Update Nodinite to use `mail1.example.com`

<aside aria-label="Warning" class="nodinite-note nodinite-note--warning">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-triangle-exclamation"></i> Warning</p>
<div class="nodinite-note__content"><p>Bypassing load balancers may reduce redundancy and failover capabilities. Discuss with your infrastructure team.</p></div>
</aside>

After obtaining a valid hostname, return to [Step 3](#step-3-update-nodinite-email-alarm-plugin-configuration) to update <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>.

## Troubleshooting Common Issues

<aside aria-label="Note" class="nodinite-note nodinite-note--note">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-note"></i> Note</p>
<div class="nodinite-note__content"><p>If you cannot connect to the SMTP server <strong>at all</strong> (before certificate validation), see <a href="https://docs.nodinite.com/administration/settings/alarm-plugins/troubleshooting/faq-dns-resolution-errors/">FAQ - DNS Resolution Errors</a> for DNS lookup and network connectivity troubleshooting.</p></div>
</aside>

### Issue: "Certificate is valid, but hostname still mismatches"

**Cause:** You may be connecting to the wrong server in a load-balanced environment.

#### Solution: Trace the Actual Server

```powershell
# Identify which server you are actually connecting to
$hostname = "smtp.example.com"
$ip = (Resolve-DnsName $hostname).IPAddress

Write-Host "Resolves to: $ip"

# Get certificate from that specific IP
.\Get-SMTPCertificate.ps1 -HostName $ip -Port 587
```

### Issue: "SAN list contains wildcard, but still fails"

**Cause:** Wildcard certificates only match **one subdomain level**.

#### Solution: Verify Subdomain Depth and Request Proper Certificate

* ✅ `*.example.com` matches `smtp.example.com` (one level)
* ❌ `*.example.com` does NOT match `smtp.internal.example.com` (two levels)

For multi-level subdomains, request a certificate with:

1. The full hostname in the SAN (e.g., `smtp.internal.example.com`), OR
2. A wildcard at the appropriate level (e.g., `*.internal.example.com`)

### Issue: "Certificate contains the hostname, but IP address is used"

**Cause:** You configured <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> with an IP address instead of a hostname.

#### Solution: Use Hostname Instead of IP

Even if the certificate contains `smtp.example.com`, connecting via **IP address** (e.g., `192.168.1.10`) will fail hostname verification.

```text
❌ Server: 192.168.1.10          (IP address - fails)
✅ Server: smtp.example.com      (Hostname - succeeds)
```

### Issue: "Multiple certificates in the chain, which one matters?"

**Cause:** Only the **leaf certificate** (the server's certificate) is checked for hostname matching.

#### Solution: Inspect the Leaf Certificate Only

`Get-SMTPCertificate.ps1` retrieves the leaf certificate; intermediate and root certificates are **not** checked for the hostname.

## Security Implications

<aside aria-label="Caution" class="nodinite-note nodinite-note--caution">
<p class="nodinite-note__label" aria-hidden="true"><i class="far fa-fw fa-octagon-exclamation"></i> Caution</p>
<div class="nodinite-note__content"><p>Hostname verification stops man-in-the-middle attacks, connections to the wrong server, and valid certificates used on servers they weren't issued for. <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> has <strong>no</strong> option to disable it: the certificate must match the hostname you configure.</p></div>
</aside>

## Summary Checklist

Before contacting support, verify:

* ✅ Ran `Get-SMTPCertificate.ps1` to inspect the server's certificate SAN list
* ✅ **For intermittent errors:** Ran `Test-SMTPBackendCerts.ps1` to check all backend servers behind DNS alias
* ✅ Identified at least one hostname from the SAN list that is accessible **on all backend servers**
* ✅ Updated <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span> Email Alarm Plugin **Server** field to use SAN-listed hostname
* ✅ Waited for the next retry of the queued alarms (Administration → Settings → [Alarm Queue][]); purged only alarms no longer wanted
* ✅ Verified DNS resolution for the new hostname
* ✅ Tested SMTP connectivity with `Test-NetConnection`
* ✅ Confirmed the hostname is **not** an IP address
* ✅ If using wildcard certificates, verified subdomain depth matches wildcard scope
* ✅ Tested email delivery with **Execute Alarm test** button in <span class="nodinite-product-name" title="The node that unites different systems. Or as we call it Nodinite">Nodinite</span>
* ✅ **For intermittent errors:** Monitored live alarm queue to confirm errors no longer occur

## <i class="fal fa-hand-point-right" aria-hidden="true"></i> Next Steps

* <i class="fal fa-question-circle" aria-hidden="true"></i> [Back to Troubleshooting Overview][Overview]  
* <i class="fal fa-shield-halved" aria-hidden="true"></i> [SSL/TLS Certificate Revocation Errors][]  
* <i class="fal fa-envelope" aria-hidden="true"></i> [Email with Options Alarm Plugin Configuration][Email with Options]  
* <i class="fal fa-code" aria-hidden="true"></i> [Variables and JSON Path examples for Alerts][AlertVariables]  

## <i class="fal fa-link-horizontal" aria-hidden="true"></i> Related Topics

* <i class="fal fa-server" aria-hidden="true"></i> [DNS Resolution Errors][]  
* <i class="fal fa-cloud" aria-hidden="true"></i> [Office365 Email Issues][]  
* <i class="fal fa-plug-circle-bolt" aria-hidden="true"></i> [Add or manage Alarm Plugin][]  
* <i class="fal fa-plug-circle-bolt" aria-hidden="true"></i> [Alarm Plugins - Overview][]  
* <i class="fal fa-bell" aria-hidden="true"></i> [Alarm Queue][]  
* <i class="fal fa-watch-fitness" aria-hidden="true"></i> [Monitoring Service][]  
* <i class="fal fa-life-ring" aria-hidden="true"></i> [Support][]  

[1]:https://docs.nodinite.com/media/Documentation%20Pictures/IM/WebClient/Admin/Settings/AlarmPlugins/AlarmPlugin_CertificateNameMismatch.gif

[Add or manage Alarm Plugin]:https://docs.nodinite.com/administration/settings/alarm-plugins/features/add-or-manage-alarm-plugin/
[Alarm Plugins - Overview]:https://docs.nodinite.com/administration/settings/alarm-plugins/overview/
[Alarm Queue]:https://docs.nodinite.com/administration/settings/alarm-queue/overview/
[AlertVariables]:https://docs.nodinite.com/administration/settings/alarm-plugins/troubleshooting/variables-and-json-path-examples-for-alerts/
[DNS Resolution Errors]:https://docs.nodinite.com/administration/settings/alarm-plugins/troubleshooting/faq-dns-resolution-errors/
[Email with Options]:https://docs.nodinite.com/administration/settings/alarm-plugins/features/email-with-options/
[FAQ - DNS Resolution Errors]:https://docs.nodinite.com/administration/settings/alarm-plugins/troubleshooting/faq-dns-resolution-errors/
[Monitoring Service]:https://docs.nodinite.com/core-services/monitoring-service/overview/
[Office365 Email Issues]:https://docs.nodinite.com/administration/settings/alarm-plugins/troubleshooting/faq-office365-email-issues/
[Overview]:https://docs.nodinite.com/administration/settings/alarm-plugins/troubleshooting/overview/
[SSL/TLS Certificate Revocation Errors]:https://docs.nodinite.com/administration/settings/alarm-plugins/troubleshooting/faq-ssl-tls-certificate-revocation/
[Support]:https://support.nodinite.com