发新话题
打印

[求助] 请帮忙看看qmail的relay control问题

请帮忙看看qmail的relay control问题

我想让qmail接受来自1.1.1.1的任何邮件,根据以下教程设置了 2.2.2.2 是qmail服务器的ip
http://www.palomine.net/qmail/selectiverelay.html

1.加入语句
[root@mail control]# more /usr/foxmail/mailserver/control/smtp_connect_security
1.1.1.1:allow,RELAYCLIENT=""
124.226.69.5:deny
124.226.71.161:deny
124.226.74.66:deny


2.生成cdb文件(/usr/foxmail/mailserver/control/文件夹只是/home/foxmail/control/的link)

/usr/foxmail/mailserver/bin/tcprules    /home/foxmail/control/smtp.cdb   /home/foxmail/control/smtp.tmp < /home/foxmail/control/smtp_connect_security




3.重启qmail
注释掉/etc/inittab中的
SV:123456:respawn:env - PATH=/usr/foxmail/mailserver/bin:/usr/local/bin:/usr/sbin:/usr/bin:/bin svscan /usr/foxmail/mailserver/supervise

然后kill -HUP 1

再取消注释
再kill -HUP 1




4.监控25端口的进程
tcp        0      0 0.0.0.0:25              0.0.0.0:*               LISTEN      31064/tcpserver

[root@mail mailserver]# ps -aux | grep -i 31064
foxmaild 31064  0.0  0.0  1508  508 ?        S    09:40   0:00 /usr/foxmail/mailserver/bin/tcpserver -f /usr/foxmail/mailserver/control/friend -i 8 -c100 -x /usr/foxmail/mailserver/control/smtp.cdb -HR -lhaha.com -v -u 8888 -g 8888 0 smtp /usr/foxmail/mailserver/bin/foxmail-smtpd haha.com checkpassword true



5.查看cdb文件
我使用strings命令查看/home/foxmail/control/smtp.cdb  文件有以下结果:
[root@mail mailserver]# strings  /home/foxmail/control/smtp.cdb  
1.1.1.1+RELAYCLIENT=
124.226.69.5D
124.226.71.161D
124.226.74.66D


6.测试
但是我在1.1.1.1上测试的时候,提示以下

ASSP:~# telnet 2.2.2.2 25
Trying 2.2.2.2 ...
Connected to 2.2.2.2.
Escape character is '^]'.
220 haha.com ESMTP
helo ttt.com
250 haha.com
mail from:fsdfsdF@fefeff.com
250 ok
rcpt to:fdsf@fedff.com
503 AUTH first, or mail to local user only (#5.5.1)


哪位帮忙看下  为什么relay不成功?

xiexie

TOP

热烈推荐《海峡传情》

提示: 作者被禁止或删除 内容自动屏蔽

TOP

webmin插件里好像有。。忘了改哪里了。。。

TOP

直接把 /home/foxmail/control/smtp.cdb 拷贝到  /usr/foxmail/mailserver/control/smtp.cdb
是不是权限问题造成?

TOP

引用:
原帖由 ExtMailer 于 2008-10-30 15:30 发表
webmin插件里好像有。。忘了改哪里了。。。
。。。。。。。。。。。。。。想起来没?我也需要啊

TOP

你们什么时候解决??哈哈

TOP

发新话题