linux mailx使用外部smtp发送邮件

环境:

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 [email protected]

set smtp=mail.gz.newp.local

set smtp-auth=login

set [email protected]

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,即主题

[email protected]:收件人

< /etc/hosts:邮件正文由/etc/hosts文件导入


你可能感兴趣的:(linux,Exchange,Mailx,外部邮件服务器,外部smtp)