免费注册 查看新帖 |

Chinaunix

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

[Mail] 个人认为关于ezmlm的较有深度的问题。[已解决] [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2007-05-28 10:26 |只看该作者 |倒序浏览
环境如下:
服务器上有个allstaff@mydomain.com的邮件列表,包含公司内所有用户,约2k个帐号。平时使用一切正常。

5.14号,我在服务器上处理一个突发事件时,服务器磁盘空间被我占满,持续时长约5分钟。
此时正好有人往allstaff@mydomain.com发通知邮件,经过检查,大概有1k个帐号没有收到这封邮件。邮件日志内留下了类似如下的错误记录,约1k多条:


  1. May 14 10:12:24 mail qmail: 1179108744.924445 delivery 4674831: failure: failed_to_write_delivered_to_line_errno=28/
复制代码


因为这封邮件不是特别重要,我就没有再让发件人重发。
原以为事情就这样就过了,没想到昨天,某个兄弟转了一封邮件给我:

内容如下:


  1. -----邮件原件-----
  2. 发件人: allstaff-help@mydomain.com [mailto:allstaff-help@mydomain.com]
  3. 发送时间: 2007年5月26日 9:38
  4. 收件人: zhangxiaohua01@mydomain.com
  5. 主题: warning from allstaff@mydomain.com

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

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


  8. 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.

  9. 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.


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

  11. Here are the message numbers:

  12.    2170

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

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

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

  23. <zhangxiaohua01@mydomain.com>:
  24. 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 编辑 ]

论坛徽章:
0
2 [报告]
发表于 2007-05-28 10:49 |只看该作者
好好看了看邮件内容
我的理解是:
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个星期后才发出来呢?

论坛徽章:
0
3 [报告]
发表于 2007-05-28 11:49 |只看该作者
我认为可能与你的邮件队列生存时间有关系,/var/qmail/control/queuelifetime 的值是多少?

论坛徽章:
0
4 [报告]
发表于 2007-05-28 12:05 |只看该作者
原帖由 大麻 于 2007-5-28 11:49 发表
我认为可能与你的邮件队列生存时间有关系,/var/qmail/control/queuelifetime 的值是多少?

不是的,我设置的是1个小时而已

# cat /var/qmail/control/queuelifetime
3600

论坛徽章:
0
5 [报告]
发表于 2007-05-28 14:49 |只看该作者
找到答案了:
简单的说,这是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 编辑 ]

论坛徽章:
0
6 [报告]
发表于 2007-05-30 17:12 |只看该作者
恩 看完了 .不错

论坛徽章:
0
7 [报告]
发表于 2007-05-31 14:08 |只看该作者
Thanks

论坛徽章:
0
8 [报告]
发表于 2007-06-03 12:56 |只看该作者
谢LZ分享
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

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

清除 Cookies - ChinaUnix - Archiver - WAP - TOP