免费注册 查看新帖 |

Chinaunix

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

[Mail] Postfix 下面 relay=none status=deferred问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2005-10-20 13:50 |只看该作者 |倒序浏览
[root@mail ~]# /usr/sbin/postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
disable_dns_lookups = yes
html_directory = no
inet_interfaces = $myhostname, localhost
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
myhostname = mail.XXXX.cn
mynetworks = 192.168.0.0/16, 127.0.0.0/8
mynetworks_style = class
myorigin = XXXX.cn
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.1.5/README_FILES
relay_domains = $mydestination
sample_directory = /usr/share/doc/postfix-2.1.5/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_banner = Exchange Server
smtpd_recipient_restrictions = permit_sasl_authenticated permit_auth_destination permit_mynetworks reject
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = mail.XXXX.cn
smtpd_sasl_security_options = noanonymous
unknown_local_recipient_reject_code = 550

Oct 20 10:49:09 mail postfix/smtp[4989]: 1032693C49: to=<chinaedu@sohu.com>;, relay=none, delay=69522, status=deferred (connect to sohu.com[61.135.133.103]: Connection refused)
Oct 20 10:49:09 mail postfix/smtp[4990]: 8FA5793CA9: to=<chinaedu@sohu.com>;, relay=none, delay=74527, status=deferred (connect to sohu.com[61.135.133.104]: Connection refused)
Oct 20 10:49:09 mail postfix/smtp[4999]: connect to sohu.com[61.135.133.103]: Connection refused (port 25)
Oct 20 10:49:09 mail postfix/smtp[4999]: 0279A93C8A: to=<carpent326@sohu.com>;, relay=none, delay=162287, status=deferred (connect to sohu.com[61.135.133.103]: Connection refused)
Oct 20 10:49:09 mail postfix/smtp[4992]: connect to sohu.com[61.135.133.103]: Connection refused (port 25)
Oct 20 10:49:09 mail postfix/smtp[4992]: 5457093C80: to=<alf99@sohu.com>;, relay=none, delay=241856, status=deferred (connect to sohu.com[61.135.133.103]: Connection refused)
Oct 20 10:49:39 mail postfix/smtp[4991]: connect to hotmail.com[64.4.32.7]: Connection timed out (port 25)
Oct 20 10:49:39 mail postfix/smtp[4993]: connect to sina.com[71.5.7.138]: Connection timed out (port 25)
Oct 20 10:49:39 mail postfix/smtp[4993]: 5E9CD93C47: to=<superyancp@sina.com>;, relay=none, delay=134942, status=deferred (connect to sina.com[71.5.7.138]: Connection timed out)
Oct 20 10:49:39 mail postfix/smtp[4998]: connect to sina.com[71.5.7.138]: Connection timed out (port 25)
Oct 20 10:49:39 mail postfix/smtp[4998]: 6B6AB93C4B: to=<superyancp@sina.com>;, relay=none, delay=134942, status=deferred (connect to sina.com[71.5.7.138]: Connection timed out)
Oct 20 10:49:39 mail postfix/smtp[4997]: connect to sina.com[71.5.7.138]: Connection timed out (port 25)
Oct 20 10:49:39 mail postfix/smtp[4997]: 644C493BDB: to=<weikai55@sina.com>;, relay=none, delay=135661, status=deferred (connect to sina.com[71.5.7.138]: Connection timed out)
Oct 20 10:49:39 mail postfix/smtp[4986]: connect to chinacircle.com[61.28.28.89]: Connection timed out (port 25)
Oct 20 10:49:39 mail postfix/smtp[4986]: 942C893C87: to=<care@chinacircle.com>;, relay=none, delay=174505, status=deferred (connect to chinacircle.com[61.28.28.89]: Connection timed out)
Oct 20 10:49:39 mail postfix/smtp[4988]: connect to benq.com[66.161.92.167]: Connection timed out (port 25)
Oct 20 10:49:39 mail postfix/smtp[4988]: A2BA793C7F: to=<sylviacai@benq.com>;, relay=none, delay=220072, status=deferred (connect to benq.com[66.161.92.167]: Connection timed out)
Oct 20 10:49:39 mail postfix/smtp[4984]: connect to yahoo.com.cn[202.43.216.42]: Connection timed out (port 25)
Oct 20 10:49:39 mail postfix/smtp[4984]: D77EA93C43: to=<bdxuejinglan920@yahoo.com.cn>;, relay=none, delay=178451, status=deferred (connect to yahoo.com.cn[202.43.216.42]: Connection timed out)
Oct 20 10:49:39 mail postfix/smtp[4987]: connect to gmail.com[64.233.161.107]: Connection timed out (port 25)
Oct 20 10:49:39 mail postfix/smtp[4985]: connect to zju.edu.cn[210.32.5.61]: Connection timed out (port 25)
Oct 20 10:49:39 mail postfix/smtp[4985]: E447693C4D: to=<chenwq@zju.edu.cn>;, relay=none, delay=134176, status=deferred (connect to zju.edu.cn[210.32.5.61]: Connection timed out)
Oct 20 10:50:09 mail postfix/smtp[4991]: connect to hotmail.com[64.4.33.7]: Connection timed out (port 25)
Oct 20 10:50:09 mail postfix/smtp[4991]: 8578E93C7D: to=<ellen.angel@hotmail.com>;, relay=none, delay=243443, status=deferred (connect to hotmail.com[64.4.33.7]: Connection timed out)


前段时间刚刚由sendmail转为Postfix,以前正常的。

[root@mail ~]# cat /etc/resolv.conf
nameserver 61.177.7.1

论坛徽章:
0
2 [报告]
发表于 2005-10-20 16:13 |只看该作者

Postfix 下面 relay=none status=deferred问题

发现连接被拒绝的好象都是relay=none.

如何能正确relay?

论坛徽章:
1
荣誉会员
日期:2011-11-23 16:44:17
3 [报告]
发表于 2005-10-20 16:57 |只看该作者

Postfix 下面 relay=none status=deferred问题

nsloolup 或 dig 你的 dns 能否解析出來這些域名

论坛徽章:
0
4 [报告]
发表于 2005-10-20 17:36 |只看该作者

Postfix 下面 relay=none status=deferred问题

[root@mail ~]# nslookup sina.com
Server:         221.228.255.1
Address:        221.228.255.1#53

Non-authoritative answer:
Name:   sina.com
Address: 71.5.7.138
[root@mail ~]# nslookup sohu.com
Server:         221.228.255.1
Address:        221.228.255.1#53

Non-authoritative answer:
Name:   sohu.com
Address: 61.135.133.103
Name:   sohu.com
Address: 61.135.133.104

[root@mail ~]#

论坛徽章:
0
5 [报告]
发表于 2005-10-20 17:41 |只看该作者

Postfix 下面 relay=none status=deferred问题

[root@mail ~]# dig sohu.com mx

; <<>;>; DiG 9.2.4 <<>;>; sohu.com mx
;; global options:  printcmd
;; Got answer:
;; ->;>;HEADER<<- opcode: QUERY, status: NOERROR, id: 11880
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 4

;; QUESTION SECTION:
;sohu.com.                      IN      MX

;; ANSWER SECTION:
sohu.com.               133     IN      MX      10 sohumx.sohu.com.

;; AUTHORITY SECTION:
sohu.com.               20100   IN      NS      dns.sohu.com.
sohu.com.               20100   IN      NS      ns1.sohu.com.
sohu.com.               20100   IN      NS      ns2.sohu.com.

;; ADDITIONAL SECTION:
sohumx.sohu.com.        71      IN      A       61.135.132.100
dns.sohu.com.           78405   IN      A       61.135.131.86
ns1.sohu.com.           91246   IN      A       61.135.131.1
ns2.sohu.com.           136816  IN      A       61.135.132.1

;; Query time: 26 msec
;; SERVER: 221.228.255.1#53(221.228.255.1)
;; WHEN: Thu Oct 20 18:02:12 2005
;; MSG SIZE  rcvd: 167

[root@mail ~]# dig sina.com mx

; <<>;>; DiG 9.2.4 <<>;>; sina.com mx
;; global options:  printcmd
;; Got answer:
;; ->;>;HEADER<<- opcode: QUERY, status: NOERROR, id: 12567
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 3, ADDITIONAL: 6

;; QUESTION SECTION:
;sina.com.                      IN      MX

;; ANSWER SECTION:
sina.com.               847     IN      MX      20 sinamx.sina.com.cn.

;; AUTHORITY SECTION:
sina.com.               1709    IN      NS      ns2.sina.com.cn.
sina.com.               1709    IN      NS      ns3.sina.com.cn.
sina.com.               1709    IN      NS      ns1.sina.com.cn.

;; ADDITIONAL SECTION:
sinamx.sina.com.cn.     60      IN      A       202.108.3.188
sinamx.sina.com.cn.     60      IN      A       202.108.3.186
sinamx.sina.com.cn.     60      IN      A       202.108.3.187
ns1.sina.com.cn.        15408   IN      A       202.106.184.166
ns2.sina.com.cn.        52474   IN      A       61.172.201.254
ns3.sina.com.cn.        29928   IN      A       202.108.44.55

;; Query time: 8 msec
;; SERVER: 221.228.255.1#53(221.228.255.1)
;; WHEN: Thu Oct 20 18:02:25 2005
;; MSG SIZE  rcvd: 210

[root@mail ~]#

论坛徽章:
0
6 [报告]
发表于 2005-10-20 18:46 |只看该作者

Postfix 下面 relay=none status=deferred问题

从网上查找资料得知:
 发信给远端服务器上的用户,出现:
   Jul 14 12:45:38 myhostname postfix/qmgr[2246]: 74FBF30501:from= size=309 (queue active)
        Jul 14 12:45:39 myhostname postfix/smtp[2349]: 74FBF30501:to= relay=none, delay=3944, status=deferred (Name service error for domain recip.domain: Host not found, try again)
  但是用nslookup又能解析这个主机名。
  
  postfix会首先进行MX记录查找,所以你执行nslookup的时候也应该首先查找MX记录。有些DNS服务器没有MX记录,那么就会出现这个错误

似乎说原因就是DNS的问题,可是我问了电信部门说DNS最近没有做过变化,我想会不会是relayhost和relay_domain的设置问题?如何设置比较合适?
现在设置为:
relay_domains = $mydestination
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
myhostname = mail.XXXX.cn

relayhost被注释掉了

论坛徽章:
0
7 [报告]
发表于 2005-10-20 19:52 |只看该作者

Postfix 下面 relay=none status=deferred问题

我把Postfix换成Sendmail后就可以了

Oct 20 20:11:59 mail sendmail[17562]: j9KCBwjq017562: from=<lsg@mail.XXXX.cn>;, size=323, class=0, nrcpts=1, msgid=<20051020121149.M4949@mail.XXXX.cn>;, proto=ESMTP, daemon=MTA, relay=localhost.localdomain [127.0.0.1]
Oct 20 20:12:02 mail sendmail[17564]: j9KCBwjq017562: to=<chinaedu@sohu.com>;, ctladdr=<lsg@mail.XXXX.cn>; (500/100), delay=00:00:03, xdelay=00:00:03, mailer=esmtp, pri=120323, relay=sohumx.sohu.com. [61.135.132.100], dsn=2.0.0, stat=Sent (Ok: queued as 0dca5f4b5e27edb61acb0d103141e889)


看来还是配置的问题,就是不知道哪里有问题……

论坛徽章:
0
8 [报告]
发表于 2005-10-20 21:11 |只看该作者

Postfix 下面 relay=none status=deferred问题

找到答案了:

disable_dns_lookups = yes

把这个去掉就可以了,呵呵
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP