sendmail发邮件由www-data代发 google邮箱当作垃圾邮件 发邮件速度慢

Delivered-To:*****
Received: by 10.194.166.130 with SMTP id zg2csp3430wjb;
        Sat, 11 Jan 2014 01:02:12 -0800 (PST)
X-Received: by 10.68.108.130 with SMTP id hk2mr17360580pbb.16.1389430931370;
        Sat, 11 Jan 2014 01:02:11 -0800 (PST)
Return-Path: <[email protected]>
Received: from weibo.yqting.com ([42.121.34.216])
        by mx.google.com with ESMTPS id e8si9658190pac.343.2014.01.11.01.02.00
        for 
        (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128);
        Sat, 11 Jan 2014 01:02:05 -0800 (PST)
Received-SPF: neutral (google.com: 42.121.34.216 is neither permitted nor denied by best guess record for domain of [email protected]) client-ip=42.121.34.216;
Authentication-Results: mx.google.com;
       spf=neutral (google.com: 42.121.34.216 is neither permitted nor denied by best guess record for domain of [email protected]) [email protected]
Received: from weibo.yqting.com (localhost [127.0.0.1])
	by weibo.yqting.com (8.14.4/8.14.4/Debian-2ubuntu2) with ESMTP id s0B91swR020798
	for ; Sat, 11 Jan 2014 17:01:54 +0800
Received: (from www-data@localhost)
	by weibo.yqting.com (8.14.4/8.14.4/Submit) id s0B91sWh020797;
	Sat, 11 Jan 2014 17:01:54 +0800
 
  
1.解决由www-data代发的问题
	修改/etc/php5/apachea/php.ini文件
	SMTP = weibo.yqting.com
	smtp_port = 25
	from = [email protected]
	sendmail_from = [email protected]
	sendmail_path = /usr/sbin/sendmail -t -i -f [email protected]
	修改完以后一定要重启apache。输入命令:service apache2 restart

2.解决当作垃圾邮件和发邮件速度慢的问题
	原来/etc/hosts是	
	127.0.0.1 localhost
	127.0.1.1   ubuntu
	因为sendmail监听的是127.0.0.1,但却无法确认主机名AY121122020321dce8544 (因为在服务器上HOSTNAME是AY121122020321dce8544),所以发送邮件就非常慢了。那么我就把这个主机名同时也加到localhost后面,变成:
 
  
	修改/etc/hosts
	weibo.yqting.com localhost
	127.0.0.1 weibo.yqting.com localhost AY121122020321dce8544  (ubuntu把主机名添加到这行localhost后面,centos系统添加到上面一行localhost后面)   
	然后重启sendmail服务:service sendmail restart
	
	

你可能感兴趣的:(p,h,p)