CnetOS 安裝 Postfix、Dovecot、MySQL 搭配 Let’s Encrypt 與 Rainloop、觸發器的一些紀錄

Wake Liu
Wake Liu
Jan 15, 2018 · 6 min read

Postfix / Dovecot 搭配 Let’s Encrypt

# Postfix
#
# 編輯 /etc/postfix/main.cf
#
smtpd_tls_cert_file = /etc/acmephp/certs/domain.com/cert.pem
smtpd_tls_key_file = /etc/acmephp/private/domain.com/private.pem
smtpd_tls_CAfile = /etc/acmephp/certs/domain.com/chain.pem

# Dovecot
#
# 編輯 /etc/dovecot/conf.d/10-ssl.conf
# 或直接加在 /etc/dovecot/dove.conf 裡
#
ssl_cert = </etc/acmephp/certs/domain.com/cert.pem
ssl_key = </etc/acmephp/private/domain.com/private.pem
ssl_ca = </etc/acmephp/certs/domain.com/chain.pem

安裝 Rainloop

Postfix 過濾器(觸發器)

hook-script unix - n n - - pipe flags=F user=nginx argv=/path/to/filter.php ${sender} ${size} ${recipient}
smtp   inet n - - - - smtpd
-o content_filter=hook-script:dummy
user+filter+yes@domain.com FILTER hook-script:dummy
$ postmap /etc/postfix/access
smtpd_recipient_restrictions = check_recipient_access
hash:/etc/postfix/access,
permit_mynetworks,
reject_unauth_destination

如果遇到 454 4.7.0 TLS not available due to local problem

如果遇到 Dovecot postmaster_address fatal

如果寄信到 Gmail 遇到以下錯誤

如果 Dovecot 遇到連線錯誤

$ yum install dovecot-mysql

興趣使然的程式猿

紀錄各種因愛而行的人生道路

Wake Liu

Written by

Wake Liu

興趣使然的程式猿

興趣使然的程式猿

紀錄各種因愛而行的人生道路