免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
12345下一页
最近访问板块 发新帖
查看: 17857 | 回复: 42
打印 上一主题 下一主题

[Mail] postfix smtp欢迎信息延时 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-11-15 10:39 |只看该作者 |倒序浏览
telnet 到mx.xxx.com.cn 25 需要20秒后才会出现
mx.xxx.com .cn ESMTP Postfix 的欢迎信息
但telnet 到mx.xxx.com.cn 110则很快就出现
+OK Hello there 信息

而且网络速度也很快,上面的测试起码说明不是网速问题
最后查找相关资料如下:
//***********************************************************
对拒绝服务攻击的处理
postfix对每一个SMTP会话都设置一个错误计数器,当该客户端的请求未
被接受或违反那UCE规则时,该计数器就增1。随着计数器的增加,postfix将采取不同的措施来防止恶意用户的拒绝服务攻击。
smtpd_error_sleep_time:当该错误计数器的值还很小时,postfix将暂停
smtpd_error_sleep_time指定的时间,然后向客户端报告一个错误。该参数的缺省值为5秒。
smtpd_soft_error_limit:当错误计数器的值超过该参数指定的值时,postfix在响应该客户端请求前将沉睡一段时间。缺省值为10。
smtpd_hard_error_limit:当错误计数器的值超过该参数指定的值时,postfix
中断同该客户端的连接。缺省值为100。
//************************************************************

以上的几项值都改过,但还是出现上述情况,不知道哪位高手遇到类似问题

经过排查都不是以上问题

日志里有这样一条错误
mx postfix/smtpd[2906]: warning: 58.61.255.3: hostname 3.255.61.58.broad.gz.gd.dynamic.163data.com.cn verification failed: hostname nor servna

且在不同的IP连接,只要该IP没有解析出这样的错误反向解析地址
如:3.255.61.58.broad.gz.gd.dynamic.163data.com.cn
就不存在延时问题

论坛徽章:
7
荣誉版主
日期:2011-11-23 16:44:17子鼠
日期:2014-07-24 15:38:07狮子座
日期:2014-07-24 11:00:54巨蟹座
日期:2014-07-21 19:03:10双子座
日期:2014-05-22 12:00:09卯兔
日期:2014-05-08 19:43:17卯兔
日期:2014-08-22 13:39:09
2 [报告]
发表于 2007-11-15 10:58 |只看该作者
都是电信惹得祸,似乎最近搞了个域名反解工程,一夜之间所有电信的动态ip都堂而皇之的拥有了一个反解域名。
如楼主提供的这条
58.61.255.3: hostname 3.255.61.58.broad.gz.gd.dynamic.163data.com.cn
但是这个域名的服务器不存在。
http://www.dnsstuff.com/tools/dnsreport.ch?domain=163data.com.cn
如果邮件的smtp守护进程设置了反解验证的功能,就会造成通过电信线路连接的用户感觉到非常严重的延迟,甚至无法连接。

论坛徽章:
0
3 [报告]
发表于 2007-11-15 11:07 |只看该作者
原帖由 r2007 于 2007-11-15 10:58 发表
都是电信惹得祸,似乎最近搞了个域名反解工程,一夜之间所有电信的动态ip都堂而皇之的拥有了一个反解域名。
如楼主提供的这条
58.61.255.3: hostname 3.255.61.58.broad.gz.gd.dynamic.163data.com.cn
但是这 ...

请教楼上的老大,如何取消反解验证。

论坛徽章:
7
荣誉版主
日期:2011-11-23 16:44:17子鼠
日期:2014-07-24 15:38:07狮子座
日期:2014-07-24 11:00:54巨蟹座
日期:2014-07-21 19:03:10双子座
日期:2014-05-22 12:00:09卯兔
日期:2014-05-08 19:43:17卯兔
日期:2014-08-22 13:39:09
4 [报告]
发表于 2007-11-15 12:04 |只看该作者
我没有用过postfix,如果方便可以把配置丢上来分析一下。

论坛徽章:
0
5 [报告]
发表于 2007-11-15 12:28 |只看该作者
原帖由 r2007 于 2007-11-15 12:04 发表
我没有用过postfix,如果方便可以把配置丢上来分析一下。

smtpd_recipient_limit = 15
bounce_queue_lifetime = 12h
maximal_queue_lifetime = 24h


myhostname = postfix.cn
smtp_helo_name = $myhostname

local_transport = maildrop
mailbox_transport = maildrop
#disable_dns_lookups = yes
smtpd_error_sleep_time = 0
smtpd_soft_error_limit = 10
smtpd_hard_error_limit = 20
default_process_limit = 100

mydestination = mysql:/usr/local/etc/postfix/mysql/mysql-mydest.cf
virtual_transport_maps = mysql:/usr/local/etc/postfix/mysql/mysql-transport.cf
#virtual_alias_maps = mysql:/usr/local/etc/postfix/mysql/mysql-virtual.cf
#virtual_alias_maps = mysql:/usr/local/etc/postfix/mysql/mysql-alias.cf
recipient_bcc_maps = mysql:/usr/local/etc/postfix/mysql/mysql-autobbc-in.cf
sender_bcc_maps = mysql:/usr/local/etc/postfix/mysql/mysql-autobbc-out.cf
local_recipient_maps = $virtual_mailbox_maps $virtual_maps

virtual_mailbox_base  = /var/mail

virtual_mailbox_maps  = mysql:/usr/local/etc/postfix/mysql/mysql-virtual-maps.cf
virtual_create_maildirsize = yes
virtual_mailbox_extended = yes
virtual_maildir_suffix = Maildir/
virtual_mailbox_limit_maps = mysql:/usr/local/etc/postfix/mysql/mysql-virtual-quota.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = Sorry, the user's maildir has overdrawn his diskspace quota, please try again later.
virtual_overquota_bounce = yes
virtual_uid_maps      = mysql:/usr/local/etc/postfix/mysql/mysql-virtual-uid.cf
virtual_gid_maps      = mysql:/usr/local/etc/postfix/mysql/mysql-virtual-gid.cf

broken_sasl_auth_clients    = yes
smtpd_sasl_auth_enable      = yes
smtpd_sasl_security_options = noanonymous

smtpd_client_restrictions =
        permit_mynetworks,
        permit_sasl_authenticated,
        check_client_access mysql:/usr/local/etc/postfix/mysql/mysql-access.cf,
        permit_auth_destination,
        reject  

smtpd_sender_login_maps = mysql:/usr/local/etc/postfix/mysql/mysql-smtpd-login.cf
smtpd_reject_unlisted_sender = yes

smtpd_sender_restrictions =
        reject_non_fqdn_sender,
        reject_unknown_sender_domain,
#       reject_unknown_client,
        check_sender_access mysql:/usr/local/etc/postfix/mysql/mysql-access.cf,
        reject_sender_login_mismatch,
        reject_authenticated_sender_login_mismatch,
        reject_unauthenticated_sender_login_mismatch,
        permit

smtpd_recipient_restrictions =
        permit_mynetworks,
        check_client_access mysql:/usr/local/etc/postfix/mysql/mysql-access.cf,
        permit_sasl_authenticated,
        reject_unknown_hostname,
        reject_unknown_sender_domain,
        reject_non_fqdn_sender,
        reject_non_fqdn_recipient,
        reject_unknown_recipient_domain,
        reject_unauth_pipelining,
        reject_unauth_destination,
        permit


default_destination_recipient_limit  = 1
local_destination_concurrency_limit  = 1
maildrop_destination_recipient_limit = 1

message_size_limit = 104857600

smtpd_milters = unix:/var/run/milter/milter-limit.socket
smtpd_recipient_limit = 10
bounce_queue_lifetime = 12h
maximal_queue_lifetime = 24h


smtpd_delay_reject = yes
smtpd_proxy_timeout = 180s
#smtpd_helo_required = yes
strict_rfc821_envelopes = yes

论坛徽章:
7
荣誉版主
日期:2011-11-23 16:44:17子鼠
日期:2014-07-24 15:38:07狮子座
日期:2014-07-24 11:00:54巨蟹座
日期:2014-07-21 19:03:10双子座
日期:2014-05-22 12:00:09卯兔
日期:2014-05-08 19:43:17卯兔
日期:2014-08-22 13:39:09
6 [报告]
发表于 2007-11-15 13:14 |只看该作者
注释掉这个试试
reject_unknown_hostname,

论坛徽章:
0
7 [报告]
发表于 2007-11-15 13:22 |只看该作者
原帖由 r2007 于 2007-11-15 13:14 发表
注释掉这个试试
reject_unknown_hostname,



还是不行,我都快晕了。

论坛徽章:
7
荣誉版主
日期:2011-11-23 16:44:17子鼠
日期:2014-07-24 15:38:07狮子座
日期:2014-07-24 11:00:54巨蟹座
日期:2014-07-21 19:03:10双子座
日期:2014-05-22 12:00:09卯兔
日期:2014-05-08 19:43:17卯兔
日期:2014-08-22 13:39:09
8 [报告]
发表于 2007-11-15 13:28 |只看该作者
能否看看master.cf ?

论坛徽章:
0
9 [报告]
发表于 2007-11-15 13:32 |只看该作者
原帖由 r2007 于 2007-11-15 13:28 发表
能否看看master.cf ?


#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master".
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -        1000       smtpd
# -o disable_dns_lookups=yes
# -o content_filter=filter
# -o content_filter=filter
#submission inet n       -       n       -       -       smtpd
#  -o smtpd_enforce_tls=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps     inet  n       -       n       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#628      inet  n       -       n       -       -       qmqpd
pickup    fifo  n       -       n       60      1       pickup
cleanup   unix  n       -       n       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       n       300     1       oqmgr
tlsmgr    unix  -       -       n       1000?   1       tlsmgr
rewrite   unix  -       -       n       -       -       trivial-rewrite
bounce    unix  -       -       n       -       0       bounce
defer     unix  -       -       n       -       0       bounce
trace     unix  -       -       n       -       0       bounce
verify    unix  -       -       n       -       1       verify
flush     unix  n       -       n       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       n       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       n       -       -       smtp
        -o fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     unix  -       -       n       -       -       error
discard   unix  -       -       n       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       n       -       -       lmtp
anvil     unix  -       -       n       -       1       anvil
scache    unix  -       -       n       -       1       scache
#dbmail-lmtp     unix    -       -       n       -       -       lmtp
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe( delivery
# agent.  See the pipe( man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/local/bin/maildrop -w 90 -d ${user}@${nexthop} ${extension} ${recipient} ${user} ${nexthop} ${sender}
#
# ====================================================================
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
#old-cyrus unix  -       n       n       -       -       pipe
#  flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ====================================================================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus     unix  -       n       n       -       -       pipe
#  user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ====================================================================
#
# See the Postfix UUCP_README file for configuration details.
#
#uucp      unix  -       n       n       -       -       pipe
#  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# ====================================================================
#
# Other external delivery methods.
#
#ifmail    unix  -       n       n       -       -       pipe
#  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
#
#bsmtp     unix  -       n       n       -       -       pipe
#  flags=Fq. user=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop $recipient
#
#scalemail-backend unix -       n       n       -       2       pipe
#  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
#  ${nexthop} ${user} ${extension}
#
#mailman   unix  -       n       n       -       -       pipe
#  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
#  ${nexthop} ${user}

#dbmail-smtp    unix  -       n       n       -       -       pipe
#        flags= user=postfix argv=/usr/local/sbin/dbmail-smtp -d ${recipient}

#filter unix    -       n       n       -       -       pipe
#       flags=R user=vmail argv=/usr/local/bin/clamfilter -F jacky@thismail.org  -f ${sender} -- ${recipient}

论坛徽章:
7
荣誉版主
日期:2011-11-23 16:44:17子鼠
日期:2014-07-24 15:38:07狮子座
日期:2014-07-24 11:00:54巨蟹座
日期:2014-07-21 19:03:10双子座
日期:2014-05-22 12:00:09卯兔
日期:2014-05-08 19:43:17卯兔
日期:2014-08-22 13:39:09
10 [报告]
发表于 2007-11-15 13:40 |只看该作者
没找到问题。
有几个基本建议。
check一下用户填写的smtp服务器是不是这台?
配置改变后是否重启了postfix

另送一个外点子,自架一个dns服务器,建一个 163data.com.cn 的zone。然后让postfix的机器的resolv.conf记录指向这个dns服务器。
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP