2025-12-12

Configure IIS SMTP Service to receive mail over TLS and forward to a non-TLS SMTP service on one Windows Server

Scenario

  1. An older custom SMTP service only accepts unencrypted SMTP connections and does not support TLS.
  2. A solution is required to receive emails over TLS using IIS SMTP Service and relay them to the custom SMTP service without encryption.
  3. The goal must be achieved on a single virtual machine.

Environment Setup

Install two network interfaces on a single Windows Server with the following IP addresses:

  • Network Interface 1: 10.11.11.11 (physical NIC)
  • Network Interface 2: 10.22.22.22 (Description: Microsoft KM-TEST Loopback Adapter)

2025-12-05

批次建立 win-acme 用 DNS Record 取得憑證的任務

批次建立 win-acme 用 DNS Record 取得憑證的任務

$RecordNames = @();
$RecordNames += "www";

$Domain = "contoso.com";

foreach ($RecordName in $RecordNames) {
    
    $FQDN = ($RecordName + '.' + $Domain);
    write-host ('Request Certificate for ' + $FQDN);

在 Azure DNS Zone 用 DNS Record 來驗證 Let's Encrypt 的 PowerShell Script

前情提要: 在 Microsoft DNS Server 上用 DNS Record 來驗證 Let's Encrypt 的 PowerShell Script

AzureDNSZoneVerification.ps1


# -Step "create" -Identifier "{Identifier}" -RecordName "{RecordName}" -Token "{Token}"
# -Step "delete" -Identifier "{Identifier}" -RecordName "{RecordName}" -Token "{Token}"

param (
[string]$Step,
[string]$Identifier,
[string]$RecordName,
[string]$Token
);

[string]$AzureResourceGroupName = "Infra_Network"
[string]$ZoneName = "contoso.com"
[int]$TTL = 3600

write-host ('Step: ' + $Step);
write-host ('Identifier: ' + $Identifier);
write-host ('RecordName: ' + $RecordName);
write-host ('Token: ' + $Token);