環境:
exchange 2010:
ip:192.168.101.18
域:gz.newp.local
用戶賬戶:[email protected]
smtp地址:mail.gz.newp.local
linux:
rhel 6.3
軟件:mailx
linux配置:
# vim /etc/mail.rc
添加如下行:
set smtp=mail.gz.newp.local
set smtp-auth=login
set smtp-auth-password=’123456a!’
windows:
爲認證用戶添加sendas權限,否則linux端會報錯哦
“錯誤信息550 5.7 1 client does not have permissions to send as this sender”
測試:
# mail -v -s “Test” [email protected] < /etc/hosts
-v:顯示發送過程
-s:subject,即主題
< /etc/hosts:郵件正文由/etc/hosts文件導入