RHEL(Oracle Linxu/CentOS)系统下,如果使用sendmail发送邮件,如果不特殊设置,一般发件箱地址为user@hostname,例如,hostname为DB-Server.localdomain,在root用户下使用下面命令发送一封邮件:
[root@DB-Server ~]# hostname -f
DB-Server.localdomain
[root@DB-Server ~]# echo "hello,it is a test email from kerry" | mail -s "Hello,Welcome your test email" konglb@xxx.com