ThaiVeeam

Software and OSes => Proxmox Mail Gateway => Topic started by: New User on July 25, 2026, 03:33:52 PM

Title: วิธีการใช้ TLS บน PMG 9
Post by: New User on July 25, 2026, 03:33:52 PM
1. เข้าไปที่ command line
2. ดาวน์โหลด acme.sh ที่ https://github.com/acmesh-official/get.acme.sh (https://github.com/acmesh-official/get.acme.sh)
3. พิมพ์ เพื่อทำการใช้ dns ในการ gen cert
acme.sh --issue -d mgw.mydom.com --dns --yes-I-know-dns-manual-mode-enough-go-ahead-please
ระบบจะบอกว่า ให้ท่านไปใส่ txt record เพื่อแสดงความเป็นเจ้าของโดเมน
4. ทำการติดตั้ง โดยพิมพ์
acme.sh --renew -d mgw.mydom.com --yes-I-know-dns-manual-mode-enough-go-ahead-please
5. ทำการสำรองpmg-api.pem ที่อยู่ใน folder /etc/pmg ก่อนด้วยคำสั่ง
mv pmg-api.pem pmg-api.pem.bak
6. หลังจาก เราจะได้ไฟล์ /root/.acme.sh/<domain>
ให้เอาไฟล์ที่ชื่อ fullchain.cer ไปรวมกับชื่อ mgw.mydom.com.key
ด้วยคำสั่ง
cat fullchain.cert mgw.mydom.com.key > /etc/pmg/pmg-api.pem

เรียบร้อย เพียงเท่านี้ก็สั่ง restart service
pmgdaemon pmgproxy ก็จะได้ใช้ TLS over SMTP แล้ว