歡迎您光臨本站 註冊首頁

個人認為關於ezmlm的較有深度的問題。[已解決]

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

個人認為關於ezmlm的較有深度的問題。[已解決]

環境如下:
伺服器上有個allstaff@mydomain.com的郵件列表,包含公司內所有用戶,約2k個帳號。平時使用一切正常。

5.14號,我在伺服器上處理一個突發事件時,伺服器磁碟空間被我佔滿,持續時長約5分鐘。
此時正好有人往allstaff@mydomain.com發通知郵件,經過檢查,大概有1k個帳號沒有收到這封郵件。郵件日誌內留下了類似如下的錯誤記錄,約1k多條:


May 14 10:12:24 mail qmail: 1179108744.924445 delivery 4674831: failure: failed_to_write_delivered_to_line_errno=28/


因為這封郵件不是特別重要,我就沒有再讓發件人重發。
原以為事情就這樣就過了,沒想到昨天,某個兄弟轉了一封郵件給我:

內容如下:


-----郵件原件-----
發件人: allstaff-help@mydomain.com
發送時間: 2007年5月26日 9:38
收件人: zhangxiaohua01@mydomain.com
主題: warning from allstaff@mydomain.com

Hi! This is the ezmlm program. I'm managing the allstaff@mydomain.com mailing list.

I'm working for my owner, who can be reached at allstaff-owner@mydomain.com.


Messages to you from the sdstaff mailing list seem to have been bouncing. I've attached a copy of the first bounce message I received.

If this message bounces too, I will send you a probe. If the probe bounces, I will remove your address from the allstaff mailing list, without further notice.


I've kept a list of which messages from the allstaff mailing list have bounced from your address.

Here are the message numbers:

   2170

--- Enclosed is a copy of the bounce message I received.

Return-Path: <>
Received: (qmail 26646 invoked for bounce); 14 May 2007 02:16:15 -0000
Date: 14 May 2007 02:16:15 -0000
From: MAILER-DAEMON@mydomain.com
To: allstaff-return-2170-@mydomain.com
Subject: failure notice

Hi. This is the qmail-send program at mydomain.com.
I'm afraid I wasn't able to deliver your message to the following addresses.
This is a permanent error; I've given up. Sorry it didn't work out.

<zhangxiaohua01@mydomain.com>:
failed to write delivered to line errno=28



而且公司裡面有N多人都收到類似的郵件了。

問題:
1、ezmlm在no such user 和 out of disk space,投遞失敗時,採取的措施是否一樣?因為我的其它個別郵件列表內存在no such user的情況。但是他不會發送這種郵件(或者是發送了但收不到),


If this message bounces too, I will send you a probe. If the probe bounces, I will remove your address from the allstaff mailing list, without further notice.

這裡說會 remove your address ,但是在no such user的那些地址也並沒有被remove掉。
2、看起來這封郵件是發送給用戶,以確認他的地址是否的確在allstaff列表內。但為什麼這封郵件會在事隔2個星期後才發出來呢?

請各位兄弟指教!

[ 本帖最後由 busyant 於 2007-5-28 14:58 編輯 ]
《解決方案》

好好看了看郵件內容
我的理解是:
ezmlm負責維護郵件列表以及成員,當有人往allstaff發郵件的時候,會被轉換成一個個的實際mail地址來投遞,
1、若其中有一封郵件被反彈(have been bouncing),他會記下這個地址,然後:
2、在某個時間發送一封確認郵件給這個地址,如上面提到的zhangxiaohua01@mydomain.com,若這封郵件再被反彈,
3、會再次發送一個探針(If this message bounces too, I will send you a probe)
4、如果這個探針再次被反彈,那麼ezmlm會將地址從郵件列表內刪除(If the probe bounces, I will remove your address from the allstaff mailing list, without further notice)

我的伺服器為了防止垃圾郵件,關掉了無主郵件的反彈功能,這就導致了no such user的郵件不會被bounce,所以我的第一個問題內no such user的情況就講得通了。而allstaff這封郵件是在磁碟空間滿時發生的,ezmlm自然會收到投遞失敗的結果(failed_to_write_delivered_to_line_errno=28),郵件被bounced。所以ezmlm會發送這麼一封郵件出來。

——————————————————————————————————————————
這些只是我的推斷,不能確認為真實情況。


但是我的問題二還是沒有得到解決:

為什麼這封郵件會在事隔2個星期後才發出來呢?
《解決方案》

我認為可能與你的郵件隊列生存時間有關係,/var/qmail/control/queuelifetime 的值是多少?
《解決方案》

原帖由 大麻 於 2007-5-28 11:49 發表
我認為可能與你的郵件隊列生存時間有關係,/var/qmail/control/queuelifetime 的值是多少?
不是的,我設置的是1個小時而已


# cat /var/qmail/control/queuelifetime
3600

《解決方案》

找到答案了:
簡單的說,這是ezmlm郵件列表管理程序為了確認subscriber是否有效,所採取的一種核對措施。
流程如下:

ezmlm會跟蹤發送給allstaff成員的每一封郵件是否發送成功;
若不成功(bounced),ezmlm會在11.6天(1w秒)后發送一封確認郵件給subscriber;
若再次失敗(bounces too),ezmlm會再等候11.6天,然後再次發送一封探測郵件(send you a probe);
若探測郵件再次失敗,則ezmlm會將mail地址從maillist裡面刪除。

在伺服器14號出現磁碟滿的情況下,發送給allstaff列表的mail有大部分都被bounced了,所以……

——————————————————————————
相關資料:
http://www.stllinux.org/meeting_notes/1998/0521/bounces.html

Ezmlm Bounce Handling
ezmlm automatically handles bounces in a manner that assures that subscribers are not removed due to temporary failures, but at the same time removes addresses that fail continuously (for more than 3 weeks).

ezmlm uses VERP. This way, ezmlm knows the subscriber address corresponding to any bounce received. ezmlm keeps track of bounces and after about 11 days sends a list of missed messages to the subscriber.

If this message bounces, ezmlm waits another 11 days, then sends a probe message to the subscriber. If this probe message bounces, the subscriber address is removed.


http://www.ezmlm.org/man/man1/ezmlm-warn.1.html

NAME
ezmlm-warn - send out bounce warnings   
SYNOPSIS
ezmlm-warn [ -dD ][ -t timeout ][ -l lockout ] dir   
DESCRIPTION
ezmlm-warn sends out warning messages for the mailing list stored in dir.
ezmlm-warn scans dir/bounce/d/ for directories older than timeout days ago (see -t). The directories are created by B ezmlm-return and contain bounces. If ezmlm-warn sees a distribution bounce for box@domain received more than timeout days ago, it sends box@domain a list of all the message numbers missed recently, and deletes the bounce. If it sees a warning bounce for box@domain received more than timeout days ago, it sends box@domain a probe, and deletes the bounce.

ezmlm-warn uses dir/bounce/lastd to keep track of when it was last run. If insufficient time has passed (see -l) ezmlm-warn exits without further action.

ezmlm-warn keeps files with the bounced message numbers in dir/bounce/h. Expired files are removed and dir/bounce/lasth keeps track of the last subdirectory scanned.

ezmlm-warn will not send a warning or probe to an address that is not currently a subscriber.   

OPTIONS
-d
process bounces for the digest list, rather than for the main list. Digest list bounces are stored in dir/digest/bounce/ rather than in dir/bounce/.
-D
(Default.) Process bounces for the main list.
-l lockout
ezmlm-warn will abort execution if it was run less than lockout seconds ago. The default is timeout / 50, which with the default timeout is 20,000 seconds (approx. 5.6 hours). There is no reason to use this switch, except for testing and possibly in combination with -t.
-t timeout
Bounces received more than timeout days ago are processed. This overrides the default of 1,000,000 seconds (approximately 10 days) and may possibly be useful for very large busy lists. Also, a timeout of zero can be used to send a warning to all addresses for which a bounce has been received and a probe for all addresses for which a warning has bounces. This is useful to rapidly clear out bouncing addresses from a (low quality) address list.


慚愧,滿以為這是一個很有深度的問題,原來人家的manpage就已經寫得很清楚了!不求甚解啊!

可以通過編輯allstaff/editor文件的方法來取消掉ezmlm的這個功能。
原文如下:

|/usr/local/bin/ezmlm/ezmlm-reject '/home/vpopmail/domains/mydomian.com/allstaff'
|/usr/local/bin/ezmlm/ezmlm-issubn '/home/vpopmail/domains/mydomian.com/allstaff' '/home/vpopmail/domains/mydomian.com/allstaff/allow' '/home/vpopmail/domains/mydomian.com/allstaff/mod' || { echo "Sorry, only subscribers may post. If you are a subscriber, please forward this message to sdstaff-owner@mydomian.com to get your new address included. (#5.7.2)"; exit 100 ; }
|/usr/local/bin/ezmlm/ezmlm-send '/home/vpopmail/domains/mydomian.com/allstaff'
|/usr/local/bin/ezmlm/ezmlm-warn '/home/vpopmail/domains/mydomian.com/allstaff' || exit 0


把最後的一行刪除就好了。

BTW:另外再提一個ezmlm的技巧,把editor文件裡面的藍色字體部分刪除,就可以達到「僅特殊開通的人員才可以發送郵件給allstaff,而不是默認的:成員均可以發送」。

[ 本帖最後由 busyant 於 2007-5-28 14:56 編輯 ]
《解決方案》

恩 看完了 .不錯
《解決方案》

Thanks
《解決方案》

謝LZ分享

[火星人 ] 個人認為關於ezmlm的較有深度的問題。[已解決]已經有643次圍觀

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