您的位置:首页 > 运维架构 > Linux

Linux下mail命令使用总结

2009-10-29 17:34 721 查看
 查看一下mail命令的帮助: man mail

      mail [-iInv] [-s subject] [-c cc-addr] [-b bcc-addr] to-addr... [-- sendmail-options...]

参数说明:
(1)-s subject  指定要发送邮件的主题
(2)-c recient抄送
(3)-b recipients 秘密抄送(收件人间用逗号隔开)
(4)-- sendmail-options  sendmail的一些选项,如
 -F full_name 发件人全名
 -f sender  设置信封上发件人的地址
举例如下:
mail -s "this is a test" -c test@hust.com -b test@test.com test@zy.com < eicar.txt -- -f test@test2.com -F zhangyang
 
向test@zy.com 发送一封邮件,主题为”This is a test”,发信人地址是test@test2.com,显示名为zhangyang,并抄送给test@hust.com,秘密抄送给test@test.com
 
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  linux