LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 1049|回复: 6

心急如焚,sendmailde问题

[复制链接]
发表于 2007-1-1 17:50:02 | 显示全部楼层 |阅读模式
网络内部服务器的ip为192.168.0.249,安装的RHEL AS 3 U6,同时配置了named、vsftpd和sendmail,DNS和vsftpd都正常,就是sendmail配置完,只能在服务器上可以收发邮件,可是在客户端用outlook 就不行

outlook提示如下:

您的服务器意外终止了连接。其可能原因包括服务器出错、网络出错或长时间处于非活动状态。 帐户: '192.168.0.249', 服务器: '192.168.0.249', 协议: POP3, 端口: 110, 安全(SSL): 否, 错误号: 0x800CCC0F


[root@server root]# host -t MX yjs.com
yjs.com mail is handled by 10 mail.yjs.com.

[root@server root]# host mail.yjs.com
mail.yjs.com has address 192.168.0.249

可以在服务上收发邮件:

[root@server root]# telnet mail.yjs.com 25
Trying 192.168.0.249...
telnet: Unable to connect to remote host: Connection refused
[root@server root]#

[root@server named]# netstat -tnl |grep :25
tcp 0 0 127.0.0.1:25 0.0.0.0:* LISTEN

[root@server root]# telnet localhost 25
Trying 127.0.0.1...
Connected to server (127.0.0.1).
Escape character is '^]'.
220 localhost.localdomain ESMTP Sendmail 8.12.11/8.12.11; Mon, 1 Jan 2007 14:15:16 +0800
(这里的 localhost.localdomain 应该是内部域名mai.yjs.com才对吧?)

mail from:admin@yjs.com
250 2.1.0 admin@yjs.com... Sender ok
rcpt to:redhat@yjs.com
250 2.1.5 redhat@yjs.com... Recipient ok
data
354 Enter mail, end with "." on a line by itself
hello.
quit

[root@server root]# tail /var/log/maillog
Jan 1 13:56:28 server ipop3d[3905]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Jan 1 13:56:38 server ipop3d[3905]: Login user=admin host=[192.168.0.200] nmsgs=1/1
Jan 1 13:56:39 server ipop3d[3905]: Mailbox vulnerable - directory /var/spool/mail must have 1777 protection
Jan 1 13:56:39 server ipop3d[3905]: Logout user=admin host=[192.168.0.200] nmsgs=0 ndele=1
Jan 1 14:14:45 server sendmail[4115]: l016EUl0004115: Authentication-Warning: localhost.localdomain: server [127.0.0.1] didn't use HELO protocol
Jan 1 14:14:55 server sendmail[4115]: l016EUl0004115: Syntax error in parameters scanning "to;admin@yjs.com"
Jan 1 14:15:14 server sendmail[4115]: l016EUl0004115: from=redhat@yjs.com, size=0, class=0, nrcpts=0, proto=SMTP, daemon=MTA, relay=server [127.0.0.1]
Jan 1 14:15:35 server sendmail[4117]: l016FGHM004117: Authentication-Warning: localhost.localdomain: server [127.0.0.1] didn't use HELO protocol
Jan 1 14:16:47 server sendmail[4117]: l016FGHM004117: from=admin@yjs.com, size=25, class=0, nrcpts=1, msgid=<200701010615.l016FGHM004117@localhost.localdomain>, proto=SMTP, daemon=MTA, relay=server [127.0.0.1]
Jan 1 14:16:47 server sendmail[4118]: l016FGHM004117: to=redhat@yjs.com, ctladdr=admin@yjs.com (530/534), delay=00:01:00, xdelay=00:00:00, mailer=local, pri=30422, dsn=2.0.0, stat=Sent
[root@server root]#


用户查看自己收到的邮件:
[root@server root]# su - redhat
[redhat@server redhat]$ mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/spool/mail/redhat": 1 message 1 new
>N 1 admin@yjs.com Mon Jan 1 14:16 19/482
&
Message 1:
From admin@yjs.com Mon Jan 1 14:16:47 2007
Date: Mon, 1 Jan 2007 14:15:16 +0800
From: admin@yjs.com
X-Authentication-Warning: localhost.localdomain: server [127.0.0.1] didn't use HELO protocol

hello.

&

named和sendmail都已经启动了:
[root@server named]# ps aux |grep named
named 3749 0.0 0.5 36292 3048 ? S 13:50 0:00 /usr/sbin/named -u named
root 4256 0.0 0.1 4936 680 pts/0 S 14:47 0:00 grep named
[root@server named]# ps aux |grep sendmail
root 3818 0.0 0.4 6104 2496 ? S 13:50 0:00 sendmail: accepting connections
smmsp 3827 0.0 0.4 5992 2196 ? S 13:50 0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue
root 4258 0.0 0.1 4932 680 pts/0 S 14:47 0:00 grep sendmail


这个问题困扰的实在是搞不明白了,请朋友们帮帮我,十分感谢。
发表于 2007-1-1 19:47:55 | 显示全部楼层
sendmail只是一个MTA,负责邮件的转发和投递到本地,端口是25.

你要使用POP3 远程收取, 使用的是110端口,而POP3服务是由dovecot来提供的,在dovecot没开之前,连110端口怎么可能成功
回复 支持 反对

使用道具 举报

发表于 2007-1-1 19:52:51 | 显示全部楼层
另外你这一句
[root@server root]# telnet mail.yjs.com 25
Trying 192.168.0.249...
telnet: Unable to connect to remote host: Connection refused

说明你的sendmail.mc中的配置,只监听了127.0.0.1的loopback, 而没有在其他ip或网段上进行监听,当然也不能向外界提供正常的smtp服务,而只能进行本机收发,这是redhat的默认配置

建议你找redhat的RHEL system admin guide来看看
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-1-2 09:54:53 | 显示全部楼层
那我只需要改您提到的这两个地方就应该可以了么?您说的有道理,我回头一定要好好看看资料,不过现在燃眉之急得解啊:mad:
回复 支持 反对

使用道具 举报

发表于 2007-1-2 10:31:33 | 显示全部楼层
基本上是的
在sendmail.mc中注释掉这一句
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
就可以在所有网络接口上监听

另外你需要编辑/etc/mail/local-host-names ,在里面添加和你的BIND的zone文件中MX条目相匹配的主机名称

这样就搭建了一个基本的smtp服务器

至于dovecot,直接启动服务就可以了
回复 支持 反对

使用道具 举报

 楼主| 发表于 2007-1-4 14:17:32 | 显示全部楼层
谢谢您,我的问题已经解决,和你说的一模一样。
回复 支持 反对

使用道具 举报

发表于 2007-1-15 13:17:48 | 显示全部楼层

怎么我的也不行拉

Post by fusecat
基本上是的
在sendmail.mc中注释掉这一句
DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl
就可以在所有网络接口上监听

另外你需要编辑/etc/mail/local-host-names ,在里面添加和你的BIND的zone文件中MX条目相匹配的主机名称

这样就搭建了一个基本的smtp服务器

至于dovecot,直接启动服务就可以了



********************************
我的情况和他的一样,只是没有设置DNS服务器.telnet 到pop3 server ,什么都没有.
不知道是咋回事
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表