เว็บนี้มีลิงก์ affiliate — หากสมัครผ่านลิงก์ เราได้รับค่าคอมมิชชัน · Affiliate links.

MTA-STS และ TLS-RPT คืออะไร วิธีตรวจสอบด้วย Analyze.in.th 2026

What is MTA-STS and TLS-RPT — how to check your email transport security policy using the free checker at Analyze.in.th

MTA-STS และ TLS-RPT คืออะไร วิธีตรวจสอบด้วย Analyze.in.th 2026

MTA-STS คืออะไร

MTA-STS (Mail Transfer Agent Strict Transport Security) คือ RFC 8461 ที่กำหนดให้ Mail Server ที่ส่งอีเมลไปหาโดเมนของคุณ ต้องใช้ TLS ที่ผ่านการตรวจสอบ Certificate แล้วเท่านั้น ป้องกันการโจมตีแบบ SMTP Downgrade ที่แฮกเกอร์บังคับให้ Mail Server ส่งผ่าน Plaintext หรือ TLS ที่ไม่ผ่านการตรวจสอบ

MTA-STS (RFC 8461) is a security standard that tells sending mail servers they must deliver email to your domain using verified TLS — not plaintext, not self-signed certificates. Before MTA-STS, an attacker performing a man-in-the-middle attack on the SMTP path could force servers to downgrade from TLS to plaintext, intercepting email content entirely.

ทำไม MTA-STS ถึงจำเป็น

ก่อน MTA-STS อีเมลที่ส่งระหว่างเซิร์ฟเวอร์อาจ Downgrade เป็น Plaintext ได้ถ้าแฮกเกอร์ขัดขวาง STARTTLS Negotiation ปัญหานี้เรียกว่า STARTTLS Stripping ซึ่ง MTA-STS ป้องกันได้โดยกำหนดไว้ล่วงหน้า (Out-of-Band) ว่าต้องใช้ TLS เสมอ

STARTTLS, the most common email encryption mechanism, is vulnerable to downgrade attacks. An attacker with network access between two mail servers can strip the STARTTLS capability advertisement, forcing servers to communicate in plaintext. MTA-STS prevents this by publishing the TLS requirement as an HTTPS-fetched policy, separate from the mail delivery path that an attacker might manipulate.

Policy File: mode, mx, max_age

Policy File คือไฟล์ Text ธรรมดาที่ต้องอยู่ที่ https://mta-sts.yourdomain.com/.well-known/mta-sts.txt Subdomain mta-sts ต้องมี Valid SSL Certificate เพราะ Sending Server จะ Fetch Policy ผ่าน HTTPS

The MTA-STS policy is a plain-text file served over HTTPS at a specific path on a subdomain. The subdomain must have a valid TLS certificate because sending servers verify it during the policy fetch. The policy specifies three key fields: the enforcement mode, the list of authorised MX hosts, and how long servers may cache the policy.

ตัวอย่าง Policy File สำหรับโหมด enforce:
version: STSv1
mode: enforce
mx: mail.example.com
mx: mail2.example.com
max_age: 604800

_mta-sts TXT Record

TXT Record ที่ _mta-sts.yourdomain.com บอก Sending Server ว่าโดเมนนี้มี MTA-STS Policy และอยู่ที่ Version ใด ค่า id= ต้องเปลี่ยนทุกครั้งที่แก้ Policy File เพื่อให้ Server ที่ Cache ไว้รู้ว่า Policy เปลี่ยนแล้ว

The _mta-sts TXT record signals to sending servers that an MTA-STS policy exists for this domain. The id= field acts as a version identifier — it must change every time the policy file changes so that mail servers that have cached the old policy know to fetch the new one.

ตัวอย่าง TXT Record:
_mta-sts.example.com. 300 IN TXT "v=STSv1; id=20260627T000000Z;"

TLS-RPT: Email Security Reporting

TLS-RPT (TLS Reporting, RFC 8460) เป็นส่วนเสริมของ MTA-STS ที่ให้ Mail Server รายงานปัญหา TLS Connection กลับมาหาคุณ เพื่อให้รู้ว่ามี Server ใดที่ไม่สามารถส่งอีเมลได้เพราะ Policy ของคุณ

TLS-RPT (RFC 8460) complements MTA-STS by giving you visibility into TLS connection failures. Sending servers submit aggregate reports to the address you specify in the _smtp._tls TXT record, telling you how many sessions succeeded and failed, and why. This is invaluable when you first switch to enforce mode.

TLS-RPT TXT Record ตัวอย่าง:
_smtp._tls.example.com. 300 IN TXT "v=TLSRPTv1; rua=mailto:[email protected];"

วิธีใช้ MTA-STS Checker ที่ Analyze.in.th

เครื่องมือ MTA-STS Checker ที่ Analyze.in.th ตรวจสอบทุกส่วนของ MTA-STS ในครั้งเดียว: TXT Record, Policy File, Mode และ TLS-RPT

The Analyze.in.th MTA-STS Checker verifies every component of your MTA-STS setup in one step: the _mta-sts TXT record, the HTTPS policy file reachability and content, the enforcement mode, MX host list, and the _smtp._tls TLS-RPT record.

  1. เปิด https://dnsxray.com/mta-sts.php
  2. พิมพ์ชื่อโดเมนในช่องค้นหา เช่น gmail.com
  3. กด Check MTA-STS
  4. ผลลัพธ์แสดง: TXT Record, Policy File Content, Mode, max_age, MX List, TLS-RPT

Results include: _mta-sts TXT record status; policy file reachability and full content (version, mode, MX hosts, max_age); policy ID match between TXT and file; and _smtp._tls TLS-RPT record with reporting URI.

วิธีตั้งค่า MTA-STS บน Hosting

การตั้งค่า MTA-STS ต้องสร้าง Subdomain, ทำ Policy File, และเพิ่ม TXT Record 2 อัน ทำตามลำดับนี้เพื่อหลีกเลี่ยงปัญหา

MTA-STS setup requires three steps: create the mta-sts subdomain with HTTPS, publish the policy file at the correct path, and add two TXT records. Do this in order — publishing the TXT record before the policy file is reachable can cause sending servers to report failures.

  1. สร้าง Subdomain: mta-sts.yourdomain.com พร้อม Valid SSL (Let's Encrypt)
  2. สร้าง Policy File: /.well-known/mta-sts.txt เนื้อหา mode: testing ก่อน
  3. เพิ่ม TXT Record: _mta-sts.yourdomain.com = v=STSv1; id=20260627T000000Z;
  4. เพิ่ม TLS-RPT: _smtp._tls.yourdomain.com = v=TLSRPTv1; rua=mailto:[email protected];
  5. Monitor Report: รอรับ Report 7 วัน ตรวจว่าไม่มี Failure
  6. เปลี่ยนเป็น enforce: เปลี่ยน mode: enforce และเปลี่ยน id= ใน TXT

ปัญหาที่พบบ่อยและการแก้ไข

ปัญหาที่พบบ่อยที่สุดใน MTA-STS Setup คือ SSL Certificate ของ mta-sts Subdomain หมดอายุ หรือ Policy File ไม่ถูก Serve ด้วย Content-Type ถูกต้อง

The most common MTA-STS problems are: the mta-sts subdomain SSL certificate expiring (this immediately breaks policy delivery for sending servers); the policy file served with the wrong Content-Type header; the MX host list in the policy not matching actual MX records; and forgetting to update the id= field after changing the policy.

Email Hosting ที่รองรับ MTA-STS

MTA-STS ตั้งค่าได้บน Hosting ทุกเจ้าที่ให้คุณสร้าง Subdomain และติดตั้ง SSL ได้ ไม่ต้องพึ่ง Hosting ที่ Support MTA-STS โดยเฉพาะ เพราะ Policy File คือ Static Text File ธรรมดา

MTA-STS can be configured on any hosting that lets you create a subdomain and install a TLS certificate — no special server software is required because the policy file is just a plain text file served over HTTPS. What matters is that your email routing uses MX hosts you control, and that those hosts support valid TLS. AsiaGB.com provides hosting with SSD storage, DirectAdmin, and 24-hour Thai-language support.

แนะนำAsiaGB.com — Web Hosting & VPS ที่เราใช้และแนะนำ เซิร์ฟเวอร์ในไทยและสิงคโปร์ สตอเรจ SSD จัดการผ่าน DirectAdmin พร้อมทีม Support ภาษาไทย 24 ชั่วโมง uptime 99%

AsiaGB.com — hosting & VPS we use and recommend: TH/SG servers, SSD storage, DirectAdmin, 24h Thai support, 99% uptime.

เยี่ยมชม AsiaGB →

คำถามที่พบบ่อย (FAQ)

MTA-STS แตกต่างจาก DANE อย่างไร
DANE (DNS-based Authentication of Named Entities) ใช้ DNSSEC เป็น Transport ในการ Authenticate TLS Certificate ต้องการ DNSSEC บนโดเมน MTA-STS ใช้ HTTPS Fetch แทน ไม่ต้องการ DNSSEC จึง Deploy ง่ายกว่าสำหรับโดเมนทั่วไป
ต้องเปิด MTA-STS บน mode enforce เลยไหม
ไม่แนะนำ เริ่มจาก mode: testing ก่อนและรับ TLS-RPT Report อย่างน้อย 7 วัน เพื่อให้แน่ใจว่าไม่มี MX Server ที่ใช้ Self-Signed Cert อยู่ ก่อนเปลี่ยนเป็น enforce
MTA-STS ป้องกันสแปมได้ไหม
ไม่ MTA-STS ป้องกัน SMTP Downgrade Attack ระหว่าง Server-to-Server ไม่ได้ป้องกันสแปม การป้องกันสแปมทำผ่าน SPF, DKIM, DMARC ซึ่งเป็นคนละชั้น
Policy File ต้องอัปเดตทุกกี่วัน
ไม่ต้องอัปเดตตามกำหนด ต้องอัปเดตเมื่อ MX Server เปลี่ยน หรือเมื่อต้องการเปลี่ยน Mode อย่าลืมเปลี่ยน id= ใน TXT Record ทุกครั้งที่แก้ Policy