Linux mail命令详解

1.邮件服务

服务端: qmail   sendmail  postfix(CentOS 6 自带)

协议 :SMTP

端口 :25

客户端:mail,mutt

2.服务文件

1. /etc/init.d/postfix status

2. lsof -i:25

3.发邮件命令

1.mail

mail -s "标题" 邮件地址 < 要发送的文件

mail -s "hello world" 623799533@qq.com </etc/hosts

echo "正文|mail -s "hello world" 623799533@qq.com

mailq   查看发邮件的队列

2.mutt   -->同mail

mutt -s ""

4.企业mail启服务2种方式

1.直接启动postfix服务

2.借助第三方的smtp服务

1.vi /etc/mail.rc

send mail from qq.com
set  from=62379@163.com   smtp=smtp.163.com
set  smtp-auth-user=62379 smtp-auth-password=qq@123 smtp-auth=login

原文地址:https://www.cnblogs.com/ftl1012/p/mail.html