將本地郵件服務器配置充當爲控客戶端,已將全部郵件都轉發到中央服務器以進行發送服務器
1.postconf -e "relayhost=[mail.example.com]" 郵件被路由到的服務器。
2.postconf -e "inet_interfaces=loopback-omly" 郵件服務器只偵聽迴環街口上的郵件
3.postconf -e "mynetworks=127.0.0.0/8 [::1]/128"空客戶端未來自於mynetworks=127.0.0.0/8和 [::1]/128的郵件發送到中繼主機
4.postconf -e "myorigin=example.com" 地址重寫
5.postconf -e "mydestination=" 不發送到本地,而空客戶端將全部郵件發送到中繼器
6.postconf -e "local_transport=error: local delivery disabled" 空客戶端拒絕接收任何郵件oop
7.systemctl enable postfix && systemctl restart postfix
8.mail -s "test" harry@example.com
test ok!
.post
EOTrest