免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
楼主: peijun.jiang
打印 上一主题 下一主题

[Mail] Qmail SMTP认证信息随意输入也能发邮件解决方法! [复制链接]

论坛徽章:
0
1 [报告]
发表于 2003-05-09 11:53 |显示全部楼层

Qmail SMTP认证信息随意输入也能发邮件解决方法!

SMTP认证
使用SMTP认证:
1:下载软件并且解开http://qmail.org/qmail-auth-20010105.tar.gz
2:cp README.auth base64.c base64.h ../qmail-1.03
   patch -d ../qmail-1.03 < auth.patch
3:安装QMAIL
relay的意思是:服务器接受客户端的smtp请求,将客户端发往第三方的邮件进行转发。 qmail下控制relay很简单,只要客户端接入的smtp进程的环境变量里包含(RELAYCLIENT=""就允许relay ,否则拒收。实现方法是在/etc/tcp.smtp 里对需要relay的IP逐条设置(RELAYCLIENT="",然后用tcprules 生成规则表。因为本文要实现SMTP认证后的relay ,不需要对任何IP进行预先设定,所以默认规则设置成“只对本服务器relay”。/etc/tcp.smtp内容应该为:

    127.0.0.1:allow,RELAYCLIENT=""
    :allow

    重新生成新的tcp.smtp.cdb文件:

    /usr/local/bin/tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp  < /etc/tcp.smtp
4:设置qmail-smtp的run:
#!/bin/sh
QMAILDUID=`id -u qmaild`
NOFILESGID=`id -g vpopmail`
QMAILQUEUE="/var/qmail/bin/qmail-scanner-queue.pl" export QMAILQUEUE
MAXSMTPD=`cat /var/qmail/control/concurrencyincoming`
exec /usr/local/bin/softlimit -m 6000000 \
/usr/local/bin/tcpserver -v -R -l 0 -x /etc/tcp.smtp.cdb -c "$MAXSMTPD" \
-u "$QMAILDUID" -g "$NOFILESGID" 0 smtp /var/qmail/bin/qmail-smtpd bossard.com.cn /home/vpopmail/bin/vchkpw /usr/bin/true 2>;&1
5: chmod 6755 /usr/vpopmail/bin/vchkpw
With smtpd-auth, you should NOT have --enable-roaming-users=y (enabled). If this is enabled, the the first session with smtp relaying will be OK. If you then connecting again, your tcpserver enviroment will be :allow,RELAYCLIENT="" and nothing more. If you for instance is running a virus-scanner or anything else based on the QMAILQUEUE-patch, this will not occoure for this session or the rest until clearance of the relaying info.
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP