upstream mail { server smtp.exmail.qq.com:465; } server { access_log /tmp/c.log mains; listen 84; proxy_connect_timeout 10s; proxy_timeout 30s; #後端連接超時時間 proxy_pass mail; }
nginx代理騰訊企業郵箱
/sbin/iptables -t filter -A OUTPUT -p tcp --dport 84 -d 192.168.10.247 -m comment --comment "#騰訊企業郵箱#" -j ACCEPT #郵件協議
ACCEPT tcp -- 0.0.0.0/0 192.168.10.247 tcp dpt:84 /* #騰訊企業郵箱# */
然後用 /etc/hosts