我有一个Perl邮件发送邮件列表的脚本。
在我的旧专用服务器上,它运行良好,基本上每秒发送一封电子邮件。 我最近换了一个新的专用服务器,大概有相同的规格,而且速度非常慢,每30秒就有一封邮件。 我build立了一个testing脚本来观察哪个部分最长:
open(MAIL,"| /usr/sbin/sendmail -tv -d8.7 $recipient_email"); print MAIL <<EOF; From:Test Sender <$sender> To:$recipient_email Subject:Testing Justw ant to see how long this takes EOF close(MAIL);
-d8.7有一个debugging选项,可以让我观看脚本的输出。 我将在这里粘贴,有3个点都挂了太久,我会在这里标记他们:
dns_getcanonname(receiving_server.com, trymx=1) dns_getcanonname: trying receiving_server.com. (A)
这里5秒延迟是
dns_getcanonname: receiving_server.com getmxrr([127.0.0.1], droplocalhost=1) andrew@receiving_server.com... Connecting to [127.0.0.1] via relay... 220 my_server.com ESMTP Sendmail 8.13.8/8.13.8; Fri, 18 May 2012 06:55:04 +0200 >>> EHLO localhost.localdomain 250-my_server.com Hello localhost.localdomain [127.0.0.1], pleased to meet you 250-ENHANCEDSTATUSCODES 250-PIPELINING 250-8BITMIME 250-SIZE 250-DSN 250-ETRN 250-DELIVERBY 250 HELP >>> MAIL From:<[email protected]> SIZE=115
这里延迟了10秒
250 2.1.0 <[email protected]>... Sender ok >>> RCPT To:<andrew@receiving_server.com> >>> DATA
这里5秒延迟
250 2.1.5 <andrew@receiving_server.com>... Recipient ok 354 Enter mail, end with "." on a line by itself >>> . 250 2.0.0 q4I4t4Lu014501 Message accepted for delivery andrew@receiving_server.com... Sent (q4I4t4Lu014501 Message accepted for delivery) Closing connection to [127.0.0.1] >>> QUIT 221 2.0.0 my_server.com closing connection
据我所知,我的/ etc / hosts和/etc/resolv.conf似乎很好,而这些是Googlebuild议可能会被破坏的唯一的东西,任何人有任何想法?
看起来像
远程服务器是否与以前一样? 你有这个服务器的任何可见性?
你在那个接口上运行tcpdump来查看在缺口期间是否有任何协议活动? 试试这个(作为根) –
# tcpdump -vvv -w output.pcap -i eth0 'port not 22'
这将捕获除SSH会话stream量之外的所有stream量并输出到文件output.pcap。
我不认为你有任何机会转移到黑名单上的某个IP吗? 类似以下的网站可以帮助您找出 –