测试使用不同的Envelope地址发送邮件,Google了一下发现有好多种方案,不过网上说的-S及-a开关在我的CentOS5版上好像没有。最后找到了一种可用的方案

mail [email protected] -- -f [email protected]

这样就可以使用[email protected]作为From:字段的地址了。

参考:http://stackoverflow.com/questions/54725/change-the-from-address-in-unix-mail