错误日志:

 
  
  1. Apr 28 11:31:02 sTest sendmail[24389]: r3S3V2GS024389: to=root@localhost, ctladdr=root (0/0), delay=00:00:00, xdelay=00:00:00, mailer=relaypri=34890relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (r3S3V2Ig024459 Message accepted for delivery) 

 

并且重启的时候特别慢,在搜索域,解决方法如下:

 vim /etc/hosts

 

 
  
  1. 127.0.0.1       localhost localhost.localdomain loopback me sTest  
  2. 127.0.0.1       MyServer myserver.mydomain.com  

 

 

vim /etc/nsswitch.conf 加入如下:

 

 
  
  1. domain myserver.mydomain.com 

重启:

 

 
  
  1. /etc/init.d/sendmail restart 

 

测试:

 

 
  
  1. cat /etc/sysconfig/network-scripts/ifcfg-eth0  |mail -s "testTitle" 135**@139.com 

 

收到了了吗?哈哈!OK~~