我在ubuntu虚拟服务器上。 Sendmail通过php的mail()函数工作,但每次都需要80秒才能完成。
我检查了mail.log,这些是条目:
Aug 5 14:52:36 sendmail [13818]:p75DpuVo013818:from = www-data,size = 109,class = 0,nrcpts = 1,msgid =< 201108051351.p75DpuVo013818@server.com> ;, relay = WWW的数据@本地
Aug 5 14:53:16 ve sm-mta [13826]:p75DqarZ013826:from =,size = 345,class = 0,nrcpts = 1,msgid =< 201108051351.p75DpuVo013818@server.com>,proto = ESMTP,守护程序= MTA-v4,relay = localhost.localdomain [127.0.0.1]
Aug 5 14:53:16 sendmail [13818]:p75DpuVo013818:to = email-address,ctladdr = www-data(33/33), delay = 00:01:20,xdelay = 00: 00:40 ,mailer = relay,pri = 30109,relay = [127.0.0.1] [127.0.0.1],dsn = 2.0.0,stat =已发送(p75DqarZ013826消息接受发送)
Aug 5 14:53:17 ve sm-mta [13837]:STARTTLS = client,relay = address。,version = TLSv1 / SSLv3,verify = FAIL,cipher = AES128-SHA,bits = 128/128
Aug 5 14:53:17 ve sm-mta [13837]:p75DqarZ013826:to =,ctladdr =(33/33),delay = 00:00:01,xdelay = 00:00:01,mailer = esmtp ,pri = 120345,relay = server.com。 [65.55.88.22],dsn = 2.0.0,stat =已发送(< 201108051351.p75DpuVo013818@server.com> [InternalId = 17901549]已发送的已排队邮件)
延迟是00:01:20 ..任何人都可以帮我理解原因吗?
答案 0 :(得分:2)
似乎targt服务器可能有一些垃圾邮件保护。
它限制您发送邮件,例如40秒,并在第二次尝试时接受您的电子邮件。
那可能是你的“问题”
答案 1 :(得分:2)
您的服务器是否具有完全限定的域名?显然是Sendmail injects a delay when the sending host doesn't have a FQDN:
- 首先,在/ etc / hostname中,将您的主机名从
whatever
更改为FQDN,如whatever.one-of-your-hosted-domain-names.com
然后,在/ etc / hosts中,添加一个主机条目,如:
99.123.45.67 whatever.mysite.com重新启动并尝试再次向自己发送邮件。 Sendmail根本不会拖延。