我的 vps 最近开始遇到 sendmail 非常慢的问题。这对于使用带有 mail 功能的 PHP 发送的电子邮件或使用 mail 命令从命令行发送的电子邮件是相同的。我知道这可能没有足够的信息,但这里是开始的日志:
#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)
我的问题是,PHP 的邮件功能似乎在返回前等待了整整 30 秒true
,这导致我的一些联系表单似乎没有响应。有谁知道我可以做些什么来加快速度,或者下一步在哪里寻找更多信息?