Monday, July 29, 2013

Set Postfix with SSL Port 465, 587

แก้ไข #vi /etc/postfix/master.cf

เพิ่มเข้าไปในไฟล์ดังกล่าว

## Enable SMTP on port 587 only for authenticated/TLS clients
submission inet n       -       n       -       -       smtpd
  -o smtpd_enforce_tls=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject

## Enable SMTP on port 465 only for authenticated/SSL clients
smtps     inet  n       -       n       -       -       smtpd
  -o smtpd_tls_wrappermode=yes
  -o smtpd_sasl_auth_enable=yes
  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
   
Restart Service postfix 
 
Ref.
www.brandonchecketts.com 

new link: PostfixAndSASL




Command to test smtps -Linux
#openssl s_client -connect mymailserver:myport
#openssl s_client -connect mailserver:465
Command to test smtps -Windows (Powershell)

 C:\Program Files\OpenSSL-Win64\bin> .\openssl.exe s_client -connect mail.server.org:465
Ref. testing-smtps-certificate

 
ถ้าเจอ Err. SASL authentication failure: cannot connect to saslauthd server: No such file or directory 

ให้แก้ไขดังนี้
--------------------------------------------------- 
rm -r /var/run/saslauthd/
mkdir -p /var/spool/postfix/var/run/saslauthd
ln -s /var/spool/postfix/var/run/saslauthd /var/run
chgrp sasl /var/spool/postfix/var/run/saslauthd
adduser postfix sasl
---------------------------------------------------
อ้างอิง www.jimmy.co.at 
 
 

No comments: