免费注册 查看新帖 |

Chinaunix

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

[Mail] [QMAIL]文件.qmail-default不起作用, 日志显示message_is_looping [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-07-08 01:09 |只看该作者 |倒序浏览
50可用积分
我是qmail的新手,参照life with qmail, 最近安装了qmail和vpopmail. 能够正常地收发邮件,看上去没有任何问题。但是如果我尝试向一个不存在的用户发邮件的时候,马上就有问题了。最近问题困扰了我将尽2个星期,还是没找到答案,所以期望各位达人给与指点,在下感激不尽。  
    我现在有一个需求,当用户邮件不存在的时候,我会自动创建用户帐号,并且把新到来的邮件发送到这个邮件帐号中。基本原理就是利用文件.qmail-default. 在该文件中调用我写好的脚本创建帐号,然后再转发这个邮件到这个帐号。如果我不用vpopmail,而用系统真实的帐号,我这个脚本就没有任何问题。
     下面我列出我的一些信息,我尽量把它写的详细一些。
1.我的域名是test.com(内网,我自己设置的好了DNS,MX都已经设置好,可以确定没有问题)
2.文件 /var/qmail/user/assign的内容
+test.com-:test.com:89:89:/home/vpopmail/domains/test.com:-::
.
3. 文件/home/vpopmail/domains/test.com/.qmail-default 的内容(我的vpopmail安装在/home/vpopmail下)
| /home/webmail/add-qmail-account.sh "$DEFAULT" "$SENDER"  && qmail-inject "$DEFAULT"
add-qmail-account.sh 是一个用来添加用户邮件帐号的脚本
从maillog 来看, 这个脚本从来都没有给调用过
4. 安装vpopmail 以后, 我用 /home/vpopmail/bin/vqmaillocal 换掉了文件 /var/qmail/bin/qmail-local with
如果我不换掉的话文件.qmail-default 会起作用,但是却收不到任何邮件
安装vpopmail以后,我尝试向一个不存在的用户发送邮件
echo "req and to do list" | mail no_such_user@test.com -s "requirements and todo list"
然后 qmail  抱怨 "message_is_looping_/mail_is_looping"
下面是详细的日志:(附件里面有详细的日志)
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.428087 new msg 957104
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.428172 info msg
957104: bytes 240 from <root@test.com> qp 9808 uid 0
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.432902 starting
delivery 1: msg 957104 to local [email=test.com-no_such_user@test.com]test.com-no_such_user@test.com[/email]
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.433078 status: local
1/10 remote 0/20
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.683124 new msg 957105
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.683208 info msg
957105: bytes 329 from <anonymous@test.com> qp 9812 uid 89
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.688239 starting
delivery 2: msg 957105 to local test.com-@test.com
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.688291 status: local
2/10 remote 0/20
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.688332 delivery 1:
success: /home/vpopmail/domains/test.com,no_such_user,test.com/
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.688367 status: local
1/10 remote 0/20
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.688401 end msg 957104
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.721400 delivery 2:
failure: /home/vpopmail/domains/test.com,,test.com/message_is_looping_/mail_is_looping/
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.721475 status: local
0/10 remote 0/20
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.726975 bounce msg
957105 qp 9815
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.727036 end msg 957105
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.727466 new msg 957106
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.727516 info msg
957106: bytes 874 from <> qp 9815 uid 853
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.731858 starting
delivery 3: msg 957106 to local [email=test.com-anonymous@test.com]test.com-anonymous@test.com[/email]
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.732013 status: local
1/10 remote 0/20
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.770251 new msg 957107
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.770335 info msg
957107: bytes 1012 from <anonymous@test.com> qp 9819 uid 89
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.775153 starting
delivery 4: msg 957107 to local test.com-@test.com
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.775206 status: local
2/10 remote 0/20
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.775247 delivery 3:
success: /home/vpopmail/domains/test.com,anonymous,test.com/

-------------------------------------------------------------------
I am a newbie in qmail. I install qmail and vpopmail.I can send
and recevice mails. it looks work fine. but if I try to send a mail to
a nonexistent mail account, the problem comes.  this problem bother me
about 2 weeks. if you know the root cause, would you please tell me
what is problem. your suggestion a great favor to me. thanks very
much.
   I need to create a new account if the mail account does not exist.
that is the special requirements for me, if the mail account do not
exist, I will use .qmail-default to create an email account, and then
inject the mail to the new account. it work well if I do not use
vpopmail. but I want to use virtual account.
some information about my software envionment:
1.My domain name is test.com(in internal network)
2.the content of file /var/qmail/user/assign
+test.com-:test.com:89:89:/home/vpopmail/domains/test.com:-::
.
3. then content of file /home/vpopmail/domains/test.com/.qmail-default
| /home/webmail/add-qmail-account.sh "$DEFAULT" "$SENDER"  &&
qmail-inject "$DEFAULT"
add-qmail-account.sh is a script to add a mail account
I know it never be called from the maillog.
4. I replace /var/qmail/bin/qmail-local with
/home/vpopmail/bin/vqmaillocal(by following the installation docs)
if I do not replace, .qmail-default can work, but I can not recevie any mail.
after I install vpopmail, I try to send a mail to an nonexist account like this
echo "req and to do list" | mail no_such_user@test.com -s
"requirements and todo list"
then qmail complains  "message_is_looping_/mail_is_looping"
the following is the detail of the maillog.
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.428087 new msg 957104
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.428172 info msg
957104: bytes 240 from <root@test.com> qp 9808 uid 0
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.432902 starting
delivery 1: msg 957104 to local [email=test.com-no_such_user@test.com]test.com-no_such_user@test.com[/email]
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.433078 status: local
1/10 remote 0/20
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.683124 new msg 957105
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.683208 info msg
957105: bytes 329 from <anonymous@test.com> qp 9812 uid 89
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.688239 starting
delivery 2: msg 957105 to local test.com-@test.com
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.688291 status: local
2/10 remote 0/20
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.688332 delivery 1:
success: /home/vpopmail/domains/test.com,no_such_user,test.com/
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.688367 status: local
1/10 remote 0/20
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.688401 end msg 957104
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.721400 delivery 2:
failure: /home/vpopmail/domains/test.com,,test.com/message_is_looping_/mail_is_looping/
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.721475 status: local
0/10 remote 0/20
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.726975 bounce msg
957105 qp 9815
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.727036 end msg 957105
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.727466 new msg 957106
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.727516 info msg
957106: bytes 874 from <> qp 9815 uid 853
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.731858 starting
delivery 3: msg 957106 to local [email=test.com-anonymous@test.com]test.com-anonymous@test.com[/email]
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.732013 status: local
1/10 remote 0/20
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.770251 new msg 957107
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.770335 info msg
957107: bytes 1012 from <anonymous@test.com> qp 9819 uid 89
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.775153 starting
delivery 4: msg 957107 to local test.com-@test.com
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.775206 status: local
2/10 remote 0/20
Jul  7 21:54:14 shaohui-laptop qmail: 1183816454.775247 delivery 3:
success: /home/vpopmail/domains/test.com,anonymous,test.com/

maillog.zip

30.75 KB, 下载次数: 56

mail log

论坛徽章:
0
2 [报告]
发表于 2007-07-08 08:52 |只看该作者

急呀,咋没有回复了,自己顶一下

论坛徽章:
1
白银圣斗士
日期:2015-11-23 08:33:04
3 [报告]
发表于 2007-07-08 09:21 |只看该作者


为什么要这样做尼?如果是发垃圾邮件人试探帐号,那你的server不就死定了?

[ 本帖最后由 枫影谁用了 于 2007-7-8 09:24 编辑 ]

论坛徽章:
0
4 [报告]
发表于 2007-07-08 10:09 |只看该作者
不用感到奇怪,现在客户的需求是千奇百怪的,人家有这个需求我们就得这样做。

论坛徽章:
0
5 [报告]
发表于 2007-07-09 09:33 |只看该作者
我觉得应该是.qmail-default的问题
这个是邮件来到这个域的时候
如果用户不存在的情况下
vpopmail会根据.qmail-default来投递
但我不知你的 add-qmail-account.sh 是什么内容
一般来说.qmail-default里面的内容应该是
  1. | /deke/vpopmail/bin/vdelivermail '' bounce-no-mailbox
复制代码

就行了

论坛徽章:
0
6 [报告]
发表于 2007-07-09 18:05 |只看该作者

问题已经解决了

问题已经解决了,感谢各位。最后到vpopmail的maillist里面去问了一把,他们的developer发现了问题的所在,不过依然要谢谢各位。

问题出在第4步
4. 安装vpopmail 以后, 我用 /home/vpopmail/bin/vqmaillocal 换掉了文件 /var/qmail/bin/qmail-local
现在新版本的vpopmail已经支持了,不用在换掉 qmail-local了

论坛徽章:
0
7 [报告]
发表于 2007-07-09 18:46 |只看该作者
请问如何结帖,找了半天都没有找到这个功能

论坛徽章:
0
8 [报告]
发表于 2007-07-09 21:29 |只看该作者
晚了,50分沒掙到啊
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP