我们想要部署一个高容量的SMTP服务器(双select列表),但是发现我们的两台Ubuntu服务器需要大约1秒才能发送一条消息。
当手工发送电子邮件时,延迟发生在closures消息的数据部分之后(在L#3和L#4之间,参见下文),并且对我们来说就好像Postfix在将项目添加到活动队列中时一样缓慢。
DATA 354 End data with <CR><LF>.<CR><LF> Message goes here . 250 2.0.0 Ok: queued as 0DB032015E
我不熟悉Postfix,并会很感激任何帮助。 我们的服务器是新安装的一对Ubuntu 9.10机箱,带有RAID1硬盘,用hdparam报告大约60mb /秒。 我们用像in_flow_delay这样的设置来欺骗,但没有多less运气。
感谢您的提示。 看起来磁盘速度是其他人的限制因素,所以我想先介绍一下。
至于DNS,服务器设置了一个正确的FQDN并且反向。 没有DNS服务器开始,绑定设置作为本地caching服务器并没有太多改善。 作为一个说明,我注意到日志中的一行:delay = 0.79,如果这给了任何人的任何想法。
alias_database = hash:/etc/aliases alias_maps = hash:/etc/aliases append_dot_mydomain = no biff = no config_directory = /etc/postfix debug_peer_list = octane.to inet_interfaces = all inet_protocols = ipv4 mailbox_command = procmail -a "$EXTENSION" mailbox_size_limit = 0 mydestination = inferno.octane.to.local, octane.to.local, localhost myhostname = inferno.octane.to mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 myorigin = /etc/mailname readme_directory = no recipient_delimiter = + relayhost = smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu) smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache smtpd_use_tls = yes
smtpd[3413]: improper command pipelining after HELO from localhost[127.0.0.1] smtpd[3413]: 3CFEB20160: client=localhost[127.0.0.1] cleanup[3417]: 3CFEB20160: message-id=<[email protected]> qmgr[3392]: 3CFEB20160: from=<[email protected]>, size=360, nrcpt=1 (queue active) smtpd[3413]: disconnect from localhost[127.0.0.1] smtp[3418]: < mail.octane.to[76.74.234.28]:25: 220 hotrod.octane.to ESMTP Sendmail 8.13.8/8.13.8; Wed, 18 Nov 2009 18:15:05 -0500 smtp[3418]: > mail.octane.to[76.74.234.28]:25: EHLO inferno.octane.to smtp[3418]: < mail.octane.to[76.74.234.28]:25: 250-hotrod.octane.to Hello inferno.octane.to [76.74.234.11], pleased to meet you smtp[3418]: < mail.octane.to[76.74.234.28]:25: 250-ENHANCEDSTATUSCODES smtp[3418]: < mail.octane.to[76.74.234.28]:25: 250-PIPELINING smtp[3418]: < mail.octane.to[76.74.234.28]:25: 250-8BITMIME smtp[3418]: < mail.octane.to[76.74.234.28]:25: 250-SIZE smtp[3418]: < mail.octane.to[76.74.234.28]:25: 250-DSN smtp[3418]: < mail.octane.to[76.74.234.28]:25: 250-ETRN smtp[3418]: < mail.octane.to[76.74.234.28]:25: 250-DELIVERBY smtp[3418]: < mail.octane.to[76.74.234.28]:25: 250 HELP smtp[3418]: server features: 0x900f size 0 smtp[3418]: Using ESMTP PIPELINING, TCP send buffer size is 4096 smtp[3418]: > mail.octane.to[76.74.234.28]:25: MAIL FROM:<[email protected]> SIZE=360 smtp[3418]: > mail.octane.to[76.74.234.28]:25: RCPT TO:<[email protected]> ORCPT=rfc822;[email protected] smtp[3418]: > mail.octane.to[76.74.234.28]:25: DATA smtp[3418]: < mail.octane.to[76.74.234.28]:25: 250 2.1.0 <[email protected]>... Sender ok smtp[3418]: < mail.octane.to[76.74.234.28]:25: 250 2.1.5 <[email protected]>... Recipient ok smtp[3418]: < mail.octane.to[76.74.234.28]:25: 354 Enter mail, end with "." on a line by itself smtp[3418]: > mail.octane.to[76.74.234.28]:25: . smtp[3418]: > mail.octane.to[76.74.234.28]:25: QUIT smtp[3418]: < mail.octane.to[76.74.234.28]:25: 250 2.0.0 nAINF5wx003171 Message accepted for delivery smtp[3418]: 3CFEB20160: to=<[email protected]>, relay=mail.octane.to[76.74.234.28]:25, delay=0.79, delays=0.45/0/0.04/0.3, dsn=2.0.0, status=sent (250 2.0.0 nAINF5wx003171 Message accepted for delivery) smtp[3418]: name_mask: resource smtp[3418]: name_mask: software qmgr[3392]: 3CFEB20160: removed
我有两台机器几乎完全相同的configuration。 设置Ironhide,Inferno的克隆(这是给我的问题的机器)。 这里有一个截屏直播,批量部署,日志和一些基本的configuration。
截屏((链接已删除))
除非有问题的盒子上的其他症状指向IO,我不知道为什么你检查硬盘驱动器和相关的configuration。
我的第一个猜测是DNS相关的,因为一切后缀做为一个MTA绑定到DNS。 但是,猜测并不是非常有效 – 也许向我们展示您当前的设置将会有所帮助。 运行以下命令:
# postconf -n
并将这些问题的输出粘贴到这个问题 – 显然是必要的卫生,互联网就是这样。 仅供参考,通过postconf手册页,-n标志打印“ 参数设置不保留在其内置默认值,因为它们在main.cf中明确指定 ”
@womble:“双select”也是营销发言。
UPDATE
从截屏中,我只注意到了日志中的“delay =”位。 根据发行说明:
Postfix logs additional delay information as "delays=a/b/c/d" where a=time before queue manager, including message transmission; b=time in queue manager; c=connection setup time including DNS, HELO and TLS; d=message transmission time.
似乎从地狱的消息有一个在他们的延迟最大的一部分,而来自铁皮的消息有他们的d …根据上面的注释转化为地狱的消息花费大部分时间在队列pipe理器之前 (包括消息传输) ,以及大部分时间都在消息传递中的铁皮信息。
不知道这是什么意思,但希望它有助于您的search。 🙂