歡迎您光臨本站 註冊首頁

[QMAIL]文件.qmail-default不起作用, 日誌顯示message_is_looping

←手機掃碼閱讀     火星人 @ 2014-03-04 , reply:0

[QMAIL]文件.qmail-default不起作用, 日誌顯示message_is_looping

我是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 no_such_user@test.com]test.com-no_such_user@test.com
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 anonymous@test.com]test.com-anonymous@test.com
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 no_such_user@test.com]test.com-no_such_user@test.com
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 anonymous@test.com]test.com-anonymous@test.com
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/
《解決方案》

急呀,咋沒有回復了,自己頂一下
《解決方案》

:em03: :em03: :em03:

為什麼要這樣做尼?如果是發垃圾郵件人試探帳號,那你的server不就死定了?

[ 本帖最後由 楓影誰用了 於 2007-7-8 09:24 編輯 ]
《解決方案》

不用感到奇怪,現在客戶的需求是千奇百怪的,人家有這個需求我們就得這樣做。
《解決方案》

我覺得應該是.qmail-default的問題
這個是郵件來到這個域的時候
如果用戶不存在的情況下
vpopmail會根據.qmail-default來投遞
但我不知你的 add-qmail-account.sh 是什麼內容
一般來說.qmail-default裡面的內容應該是
| /deke/vpopmail/bin/vdelivermail '' bounce-no-mailbox
就行了
《解決方案》

問題已經解決了

問題已經解決了,感謝各位。最後到vpopmail的maillist裡面去問了一把,他們的developer發現了問題的所在,不過依然要謝謝各位。

問題出在第4步
4. 安裝vpopmail 以後, 我用 /home/vpopmail/bin/vqmaillocal 換掉了文件 /var/qmail/bin/qmail-local
現在新版本的vpopmail已經支持了,不用在換掉 qmail-local了
《解決方案》

請問如何結帖,找了半天都沒有找到這個功能
《解決方案》

晚了,50分沒掙到啊

[火星人 ] [QMAIL]文件.qmail-default不起作用, 日誌顯示message_is_looping已經有710次圍觀

http://coctec.com/docs/service/show-post-37616.html