免费注册 查看新帖 |

Chinaunix

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

[Mail] 配置postfix邮局服务器。 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2006-07-13 16:52 |只看该作者 |倒序浏览
遇到一个很大的问题。也不知道是啥回事。。。
我用RH as4.0+postfix+cyrus imapd+squirrelmail构建邮局服务器。

在本机上直接用telnet localhost 25正常。。。如下:
[root@RHEL4 ~]# telnet localhost 25
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
220 mail.example.com ESMTP Postfix
EHLO 163.com
250-mail.example.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-AUTH CRAM-MD5 LOGIN PLAIN DIGEST-MD5
250-AUTH=CRAM-MD5 LOGIN PLAIN DIGEST-MD5
250 8BITMIME
quit
221 Bye
Connection closed by foreign host.

但如果用telnet IP地址 25就不行了。
我用的是telnet 192.168.1.254 25,结果提示:
[root@RHEL4 ~]# telnet 192.168.1.254 25
Trying 192.168.1.254...
telnet: connect to address 192.168.1.254: Connection refused
telnet: Unable to connect to remote host: Connection refused

用了域名也不行,我在本机开通了DNS域名服务器,作了www.example.com与mail.example.com等的解析,经检查,全部正常。也就是说解析没问题。如下:
[root@RHEL4 ~]# ping www.example.com
PING www.example.com (192.168.1.254) 56(84) bytes of data.
64 bytes from ftp.example.com (192.168.1.254): icmp_seq=0 ttl=64 time=1.64 ms
64 bytes from ftp.example.com (192.168.1.254): icmp_seq=1 ttl=64 time=0.143 ms

--- www.example.com ping statistics ---
2 packets transmitted, 2 received, 0% packet loss, time 1001ms
rtt min/avg/max/mdev = 0.143/0.894/1.645/0.751 ms, pipe 2

[root@RHEL4 ~]# ping mail.example.com
PING mail.example.com (192.168.1.254) 56(84) bytes of data.
64 bytes from www.example.com (192.168.1.254): icmp_seq=0 ttl=64 time=0.139 ms
64 bytes from www.example.com (192.168.1.254): icmp_seq=1 ttl=64 time=0.141 ms
64 bytes from www.example.com (192.168.1.254): icmp_seq=2 ttl=64 time=0.138 ms

--- mail.example.com ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 2003ms
rtt min/avg/max/mdev = 0.138/0.139/0.141/0.009 ms, pipe 2

[root@RHEL4 ~]# nslookup
> set type=mx
> example.com
Server:         192.168.1.254
Address:        192.168.1.254#53

example.com     mail exchanger = 11 mail2.example.com.
example.com     mail exchanger = 12 mail3.example.com.
example.com     mail exchanger = 15 mail.example.com.
example.com     mail exchanger = 10 mail1.example.com.


但用telnet mail.example.com 25时,也是提示错误,错误信息一样的:
[root@RHEL4 ~]# telnet mail.example.com 25
Trying 192.168.1.254...
telnet: connect to address 192.168.1.254: Connection refused
telnet: Unable to connect to remote host: Connection refused

我也不清楚是啥回事。。。也找不到相关的文档,希望能有人帮帮忙一下。谢谢各位了。

论坛徽章:
0
2 [报告]
发表于 2006-07-14 10:50 |只看该作者
郁闷。。。我还是搞不到原因。。。有没有人帮帮我呢?
帮我看一下这是什么问题呢?

[ 本帖最后由 limits 于 2006-7-14 15:46 编辑 ]

论坛徽章:
0
3 [报告]
发表于 2006-07-14 11:52 |只看该作者
netstat -an|grep 25 |grep LIST
把这个命令的结果贴出来你就知道啥原因了

论坛徽章:
0
4 [报告]
发表于 2006-07-14 13:33 |只看该作者
运行后,出现如下的信息。请帮忙看一下是啥回事?谢谢。。。
[root@RHEL4 firefox]# netstat -an|grep 25 |grep LIST
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN      
unix  2      [ ACC ]     STREAM     LISTENING     8526   /tmp/orbit-root/linc-c38-0-308ace252c574
unix  2      [ ACC ]     STREAM     LISTENING     5625   private/lmtp

论坛徽章:
0
5 [报告]
发表于 2006-07-14 13:38 |只看该作者
还有。telnet后的信息提示:
[root@RHEL4 firefox]# telnet mail.example.com 25
Trying 192.168.1.110...
telnet: connect to address 192.168.1.110: Connection refused
telnet: Unable to connect to remote host: Connection refused

查看到的maillog里的信息为:
[root@RHEL4 firefox]# tail -f /var/log/maillog
Jul 14 14:06:08 RHEL4 imap[3357]: seen_db: user root opened /var/lib/imap/user/r/root.seen
Jul 14 14:06:08 RHEL4 imap[3357]: open: user root opened INBOX.Trash
Jul 14 14:07:08 RHEL4 master[2181]: process 3357 exited, status 0
Jul 14 14:11:34 RHEL4 imap[3358]: accepted connection
Jul 14 14:11:34 RHEL4 master[3369]: about to exec /usr/lib/cyrus-imapd/imapd
Jul 14 14:11:34 RHEL4 imap[3358]: login: RHEL4 [127.0.0.1] root plaintext User logged in
Jul 14 14:11:34 RHEL4 imap[3369]: executed
Jul 14 14:11:34 RHEL4 imap[3358]: seen_db: user root opened /var/lib/imap/user/r/root.seen
Jul 14 14:11:34 RHEL4 imap[3358]: open: user root opened INBOX.Trash
Jul 14 14:12:35 RHEL4 master[2181]: process 3358 exited, status 0

论坛徽章:
0
6 [报告]
发表于 2006-07-14 13:39 |只看该作者
原先以为是IP问题。。。
改了IP也是这个问题。。。郁闷哪。。。


但可以正常收发信。。。所以更奇怪了。。。

[ 本帖最后由 limits 于 2006-7-14 13:41 编辑 ]

论坛徽章:
0
7 [报告]
发表于 2006-07-14 14:08 |只看该作者
原帖由 limits 于 2006-7-14 13:33 发表
运行后,出现如下的信息。请帮忙看一下是啥回事?谢谢。。。
[root@RHEL4 firefox]# netstat -an|grep 25 |grep LIST
tcp        0      0 127.0.0.1:25                0.0.0.0:*                   LISTEN    ...

你的25服务的监听网络是127.0.0.1,也就是说,只能通过127.0.0.1访问25端口,其他网络地址是不能访问的。
我的服务器的结果是:
tcp        0      0 0.0.0.0:25                  0.0.0.0:*                   LISTEN
这应该就是原因,至于怎么修改监听的地址,你再google以下,我也找找。

论坛徽章:
0
8 [报告]
发表于 2006-07-14 14:39 |只看该作者
inet_interfaces 你看看这个变量的值是多少
  postconf inet_interfaces
default应该是all

论坛徽章:
0
9 [报告]
发表于 2006-07-14 15:34 |只看该作者
原帖由 galaxy1975 于 2006-7-14 14:39 发表
inet_interfaces 你看看这个变量的值是多少
  postconf inet_interfaces
default应该是all



可以了。呵呵。。。真的是监听的问题。。。
谢谢你。。。
如你所说的。是inet_interfaces这边的问题,我开放是localhost
而不是all现在改过来就可以了。谢谢你。。。
太感谢你。。。

[ 本帖最后由 limits 于 2006-7-14 15:47 编辑 ]
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP