Expires: Fri, 05 Aug 2005 03:12:11 GMT Date: Fri, 05 Aug 2005 03:12:01 GMT Pragma: no-cache Last-modified: Fri Aug 5 03:12:01 2005 Cache-control: no-cache Content-Type: text/html; charset=gb2312 Wiki: Mailman

[首页]Mailman

首页 | 最近修改 | 索引 | 个性设置 | 登录 | 上载

1. 资源
1.1. 网址链接
1.2. WIKI 关键字
2. 版本
3. FAQ
3.1. Q: 安装过程?
3.2. Q: 创建第一个邮件列表: test
3.3. Q: 快速创建 maillist
3.4. Q: 中文编码问题
3.5. Q: 如何将 Mailman 页面中的英文翻译成中文?
3.6. Q: MAIL<->NEWS Gateway ?
3.7. Q: 发往邮件列表的邮件被挂起,原因: "Message has implicit destination" ?

1. 资源

1.1. 网址链接

http://www.list.org/

1.2. WIKI 关键字

2. 版本

3. FAQ

3.1. Q: 安装过程?

创建账号,准备安装目录等...
bash# groupadd mailman
bash# useradd -g mailman -M -s /sbin/nologin mailman
bash# mkdir -p /usr/local/mailman
bash# chown -R mailman.mailman /usr/local/mailman
bash# chmod -R 2775 /usr/local/mailman

如下修改 misc/paths.py.in 文件
bash# cat >>paths.py.in<<EOF
import chinesetw
import chinesecn
EOF

上面命令行中关于 mail-gid, cgi-gid 的参数,用如下方法确定:
bash# grep DefaultUser /etc/mail/sendmail.cf
O DefaultUser=8:12
bash# grep -w 12 /etc/group
mail:x:12:mail
bash# grep "^User\|^Group" /etc/httpd.conf 
User nobody
Group nobody

以 sendmail 为例:

mm_cfg.py and Default.py 在创建新的 list 时被读取,并作为确省参数来配置新的 list 的参数。如果对 list 的参数不满意,可以通过地址 http://hostname/mailman/admin/ 来修改参数。

Default.py 文件中设置了所有可以定制的 mailman 变量,但这个文件不应该被修改,而是修改 mm_cfg.py 文件。修改 mm_cfg.py 来定制 mailman的另外一个好处是,mailman 重新安装时会保留服务器上已有的 mm_cfg.py 文件。

定制 mm_cfg.py 文件,需要将定制的内容写在 from Defaults import * 之后。

This is the one that password reminders will appear to come from. Usually this should be the "mailman" mailing list, but if you need to change this, be sure to change the MAILMAN_SITE_LIST variable in mm_cfg.py

You may also want to create a password for the site-wide "list creator" role (someone other than the site administrator who as privileges to create and remove lists through the web). Use the -c option to mmsitepass to set this.

3.2. Q: 创建第一个邮件列表: test

bash# bin/mmsitepass

http://my.dom.ain/mailman/create
填写相应字段,不要忘记在 "List creator's password" 填上刚刚创建的口令。

访问地址 http://my.dom.ain/mailman/admin/name-of-the-list, 修改确省配置以及管理邮件订阅者名单;

向新创建的列表发送邮件进行测试;

3.3. Q: 快速创建 maillist

###############################################
# Here's where we get the distributed defaults.

from Defaults import *

##################################################
# Put YOUR site-specific settings below this line.

IMAGE_LOGOS = '/images/'

DEFAULT_EMAIL_HOST = 'cvs.rd.is-one.net'
DEFAULT_URL_HOST = '10.0.0.7'
add_virtualhost(DEFAULT_URL_HOST, DEFAULT_EMAIL_HOST)

# Should a list, by default be advertised?  What is the default maximum number
# of explicit recipients allowed?  What is the default maximum message size
# allowed?
DEFAULT_MAX_NUM_RECIPIENTS = 50
DEFAULT_MAX_MESSAGE_SIZE = 0           # KB

DEFAULT_DIGEST_SIZE_THRESHHOLD = 1000     # KB

# What shold happen to non-member posts which are do not match explicit
# non-member actions?
# 0 = Accept
# 1 = Hold
# 2 = Reject
# 3 = Discard
DEFAULT_GENERIC_NONMEMBER_ACTION = 0

# Mailman can be configured to "munge" Reply-To: headers for any passing
# messages.  One the one hand, there are a lot of good reasons not to munge
# Reply-To: but on the other, people really seem to want this feature.  See
# the help for reply_goes_to_list in the web UI for links discussing the
# issue.
# 0 - Reply-To: not munged
# 1 - Reply-To: set back to the list
# 2 - Reply-To: set to an explicit value (reply_to_address)
DEFAULT_REPLY_GOES_TO_LIST = 1

DEFAULT_MSG_FOOTER = """_______________________________________________
%(real_name)s mailing list
email address: %(real_name)s@%(host_name)s
web  archive : http://10.0.0.7/pipermail/%(_internal_name)s
"""

bash# bin/newlist listname [listadmin-addr [admin-password]]

bash# echo subscriber@host.name | bin/add_members -r - -wn -an listname

bash# bin/config_list -o filename listname

bash# bin/config_list -i filename listname

3.4. Q: 中文编码问题

中文字符以 &#number; 格式显示,在 IE 中显示为欧洲字符;

Dec 24 15:10:50 2003 (3526) SHUNTING: 1072249849.865207+77db27f35a1302967488b48a43f814f47a2886c7
Dec 24 15:11:57 2003 (3526) Uncaught runner exception: unknown encoding: gb2312
Dec 24 15:11:57 2003 (3526) Traceback (most recent call last):
  File "/usr/local/mailman/Mailman/Queue/Runner.py", line 110, in _oneloop
    self._onefile(msg, msgdata)
  File "/usr/local/mailman/Mailman/Queue/Runner.py", line 160, in _onefile
    keepqueued = self._dispose(mlist, msg, msgdata)
  File "/usr/local/mailman/Mailman/Queue/IncomingRunner.py", line 130, in _dispose
    more = self._dopipeline(mlist, msg, msgdata, pipeline)
  File "/usr/local/mailman/Mailman/Queue/IncomingRunner.py", line 153, in _dopipeline
    sys.modules[modname].process(mlist, msg, msgdata)
  File "/usr/local/mailman/Mailman/Handlers/CookHeaders.py", line 75, in process
    prefix_subject(mlist, msg, msgdata)
  File "/usr/local/mailman/Mailman/Handlers/CookHeaders.py", line 262, in prefix_subject
    h.append(s, c)
  File "/usr/local/mailman/pythonlib/email/Header.py", line 285, in append
    s = s.encode(outcodec, errors)
LookupError: unknown encoding: gb2312
未发出的邮件保存在 qfiles/shunt 目录下

安装中文字符集支持。参见: [本文中关于中文字符集的安装]

3.5. Q: 如何将 Mailman 页面中的英文翻译成中文?

在目录 messages 下存放着各个语种的 message catalog 文件,中文应该在 gb 目录下, 如果没有该目录 messages/gb/LC_MESSAGES/,从 mailman 源代码目录下复制文件 messages/mailman.pot,并改名为 mailman.po;

可以用 KDE's KBabel 工具,亦可以用普通的字处理软件打开 mailman.po 文件,逐条翻译;

翻译完毕,用工具 msgfmt 从 .po 文件生成 .mo 文件;
bash# msgfmt -v -o mailman.mo mailman.po

在目录 templates 下保存着各个语种的模板文件,如果不存在 gb 目录,将 en 目录的内容 复制到 gb 目录下;

翻译 gb 目录下的 .html, .txt 文件;

3.6. Q: MAIL<->NEWS Gateway ?

Majordomo 和 Newsgroup 互转比较麻烦,这方面 Mailman 做得非常好,只需要在管理界面配置关于 MAIL<->NEWS Gateway 的几个参数即可。

3.7. Q: 发往邮件列表的邮件被挂起,原因: "Message has implicit destination" ?

想创建一个邮件别名,包含几个邮件列表的地址,即 发往该邮件别名的邮件,能够同时被传递给多个邮件列表中。

为了防止垃圾邮件,Mailman 对收件人地址做了判断,如果收件人地址不是邮件列表本身,则认为是垃圾邮件,需要经过管理员的确认放可投递。

登录邮件列表管理界面,选择 Privacy options... --> Recipient filters --> require_explicit_destination, 将 require_explicit_destination 设置为 'no'.


首页 | 最近修改 | 索引 | 个性设置 | 登录 | 上载
编辑本页面 | 查看其他版本
最后修订 January 26, 2005 3:37 pm 被 localhost (差异)
搜索: