[xxx@xx-xx-1-36 operation]$ vi ~/.mailrc
set from=xxxx@xxxx-inc.com
set from=xxxx@xxxx-inc.com
set smtp=smtp.xxx-inc.com:25
设置端口号就可以正常发送邮件了。
发送方法:
echo "hello" | mail -s "test" xcxvc@dfdf-inc.com