QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2372|回复: 1

求助:我的sendmail客户端能发不能收! 急!!!

[复制链接]
发表于 2005-1-13 16:16:15 | 显示全部楼层 |阅读模式
我作sendmail实验,一台服务器,一台客户机,服务器能发也能收,客户机能发信给服务器,服务器也能收到,但客户机不能收信,自己发给自己也收不到,发完后客户机用mailq检查为空,就是说发出去了,但收不到.服务器用mailq出现提示:deferred:connection refused by station1.example1.com(station1为客户机)

服务器(server1):

/etc/sysconfig/network-scripts/ifcfg-eth0
device=eth0
bootproto=none
onboot=yes
ipaddr=192.168.100.10
netmask=255.255.255.0

/etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.100.10 server1.example1.com

/etc/resolv.conf
nameserver 192.168.100.10

/etc/sysconfig/network
networking=yes
hostnames=server1.example1.com

/etc/mail/local-host-names
server1.example1.com

/etc/mail/sendmail.cf
......
O DaemonPortOptions=Port=smtp,addr=192.168.100.10,Name=MTA
.......

/etc/mail/access
localhost.localdomain relay
localhost relay
127.0.0.1 relay
example1.com relay
station1.example1.com relay

DNS设置:

$TTL 86400
@ IN SOA server1.example1.com. root.server1.example1.com. (
2004121801 1H 1M 1W 1D )
IN NS server1.example1.com.
IN A 192.168.100.10
server1 IN A 192.168.100.10
station1 IN A 192.168.100.20
www IN A 192.168.100.10
ftp IN A 192.168.100.10
www1 IN CNAME server1.example1.com.
ftp1 IN CNAME server1.example1.com.
@ IN MX 10 server1.example1.com.
server1.example1.com IN MX 10 server1.example1.com.

$TTL 86400
@ IN SOA server1.example1.com. root.server1.example1.com. (
2004121801 1H 1M 1W 1D )
IN NS server1.example1.com.
10 IN PTR server1.example1.com.
20 IN PTR station1.example1.com.


客户机(station1):
/etc/sysconfig/network-scripts/ifcfg-eth0
device=eth0
bootproto=none
onboot=yes
ipaddr=192.168.100.20
netmask=255.255.255.0

/etc/hosts
127.0.0.1 localhost.localdomain localhost
192.168.100.20 station1.example1.com

/etc/resolv.conf
nameserver 192.168.100.10

/etc/sysconfig/network
networking=yes
hostnames=station1.example1.com

/etc/mail/local-host-names
station1.example1.com

客户机的sendmail.cf,access没有改动(会不会有问题?)

配置后,服务器能发也能收信,但客户机只能发不能收:

用客户机给服务器发信:

telnet 192.168.100.10 25
.......
mail from:[email protected]
rcpt to:[email protected]
data
hello
........
在服务器收信:
more /var/mail/root
.....
hello
......
能收到

用客户机给自己发信
telnet 192.168.100.10 25
.......
mail from:[email protected]
rcpt to:[email protected]
data
hello
........
在客户机收信:
more /var/mail/root
.......
From: [email protected] (Anacron)
To: [email protected]
Subject: Anacron job 'cron.daily'
Status: RO

/etc/cron.daily/tripwire-check:

**** Error: Tripwire database for test.linux.net not found. ****
**** Run /etc/tripwire/twinstall.sh and/or tripwire --init. ****

.......

出现错误!收不到信,从服务器发信到客户机也是如此。另配一个客户机也一样。
DNS正常,iptables也关闭了,我怀疑我的配置漏掉了某个地方,尤其是客户机是不是还有什么地方没有配置?

请大家指点,谢谢!
发表于 2005-2-17 13:01:57 | 显示全部楼层
你这个不存在客户机和服务器,是两个域的sendmail在相互发邮件
也就是说"客户机"的域是station1.example1.com
"服务器"的域是server1.example1.com
由于你的“客户机”(station1.example1.com)上的sendmail.mc没有更改所以“客户机”的监听端口还是127.0.0.1
把sendmail.mc里的DAEMON_OPTIONS(`Port=smtp,Addr=127.0.0.1, Name=MTA')dnl注释掉。然后用m4重新生成sendmail.cf
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-3-29 22:06 , Processed in 0.566367 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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