SSH登录或在Web控制面板点击>_Shell
输入:
apt-get install -y libsasl2-modules
修改 /etc/postfix/main.cf
尾部添加:
relayhost = smtp.exmail.qq.com:465
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sender_dependent_authentication = yes
smtp_generic_maps = hash:/etc/postfix/generic
smtp_use_tls = yes
smtp_tls_wrappermode = yes
smtp_tls_security_level = encrypt
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
relayhost
需要改为自己的SMTP
服务和SSL
端口号
注意 /etc/postfix/main.cf
文件应该还有一个内容为空的 relayhost
默认配置请删掉或者注释