简体   繁体   English

Sendmail在Centos VPS上非常慢

[英]Sendmail very slow on Centos VPS

My vps has recently started having issues with sendmail being very slow. 我的vps最近开始出现sendmail速度很慢的问题。 This is the same for email sent using PHP with the mail function or from the command line using the mail command. 对于使用PHP的带邮件功能的PHP或使用mail命令从命令行发送的电子邮件,这是相同的。 I know this probably isn't enough information but here is the logs to start: 我知道这可能还不够,但是这里是开始的日志:

#Appears about 8 seconds after the mail command is run
Mar 29 11:09:12 vps-1006136-254 sendmail[23362]: r2TF9732023362: from=apache, size=203, class=0, nrcpts=1, msgid=<201303291509.r2TF9732023362@vps-1006136-254.manage.myhosting.co
m>, relay=apache@localhost

#PHP mail command was run at 11:09:19
Mar 29 11:09:27 vps-1006136-254 sendmail[23366]: r2TF9CIU023366: from=<apache@vps-1006136-254.manage.myhosting.com>, size=470, class=0, nrcpts=1, msgid=<201303291509.r2TF9732023
362@vps-1006136-254.manage.myhosting.com>, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Mar 29 11:09:27 vps-1006136-254 sendmail[23362]: r2TF9732023362: to=jeremy.m.fry@gmail.com, ctladdr=apache (48/48), delay=00:00:20, xdelay=00:00:15, mailer=relay, pri=30203, rel
ay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (r2TF9CIU023366 Message accepted for delivery)

#email finally sends 
Mar 29 11:09:57 vps-1006136-254 sendmail[23376]: STARTTLS=client, relay=smtp.vps.myhosting.com., field=cn_subject, status=failed to extract CN
Mar 29 11:09:57 vps-1006136-254 sendmail[23376]: STARTTLS=client, relay=smtp.vps.myhosting.com., field=cn_issuer, status=failed to extract CN
Mar 29 11:09:57 vps-1006136-254 sendmail[23376]: STARTTLS=client, relay=smtp.vps.myhosting.com., version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Mar 29 11:09:58 vps-1006136-254 sendmail[23376]: r2TF9CIU023366: to=<jeremy.m.fry@gmail.com>, ctladdr=<apache@vps-1006136-254.manage.myhosting.com> (48/48), delay=00:00:31, xdel
ay=00:00:31, mailer=relay, pri=120470, relay=smtp.vps.myhosting.com. [168.144.1.236], dsn=2.0.0, stat=Sent (OK id=1ULawH-0002KK-BM)

My issue is that it seems that PHP's mail function seems to wait the full 30+ seconds before returning true and it causes some of my contact forms to seem unresponsive. 我的问题是,PHP的邮件功能似乎要等待整整30秒钟以上才能返回true ,这会使我的某些联系表似乎没有响应。 Does anyone know what I can do to speed this up, or where to look next for more info? 有谁知道我可以做些什么来加快它的速度,或者下一步去寻找更多信息?

Okay I submitted a ticket to my VPS host and they "could not replicate" the issue. 好吧,我向VPS主机提交了票证,他们“无法复制”该问题。 However I do have a new nameserver in my /etc/resolve.conf file pointing to Google DNS server (8.8.8.8). 但是,我的/etc/resolve.conf文件中确实有一个指向Google DNS服务器(8.8.8.8)的新名称服务器。

Looks like it was a DNS resolution issue, the new nameserver has fixed the problem. 看起来这是DNS解析问题,新的名称服务器已解决了该问题。 Also yum is much faster now since it can find mirrors without delay too. yum现在也快得多,因为它也可以毫不延迟地找到镜像。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM