配置邮件列表别名文件:
基本的邮件列表功能
在别名文件 majordomo.aliases 中,进行如下配置:
test: :include:/usr/local/majordomo/lists/testowner-test: root test-owner: root test-request: "|/usr/local/majordomo/wrapper request-answer test"
test-approval: root
|
需要创建文件 /usr/local/majordomo/lists/test,因为邮件别名 test 包含(:include:)了该文件。 |
|
使用 perl 脚本 request-answer 处理发向 test-request 别名的邮件。 |
该邮件列表 test,只能完成邮件到邮件列表的原样拷贝。如果需要改动邮件内容,如加头加尾,需要用 perl 程序 resend 处理到 test 的邮件,如下例。
使用 resend 处理邮件列表
在别名文件 majordomo.aliases 中,进行如下配置:
test: "|/usr/local/majordomo/wrapper resend -l test test-list"test-list: :include:/usr/local/majordomo/lists/test
owner-test: root test-owner: root test-request: "|/usr/local/majordomo/wrapper request-answer test" test-approval: root
|
即用perl程序 resend 处理发送到 test 邮件列表(-l test)的邮件,处理完毕,发送到 test-list 别名中。 |
|
test-list别名包含 test 别名文件。注意一定是名字 test,否则用户发送 lists 给 majordomo 时,得到错误的mail-list清单。 |
resend 通过配置文件——lists目录下的<list-name>.config,对邮件进行处理。配置文件的具体配置,参见 resend 的 man 手册。
对 mail-list 用另外的邮件地址管理订阅和退订
在别名文件 majordomo.aliases 中,修改相应的 test-request 别名:
test-request: "|/usr/local/majordomo/wrapper majordomo -l test"
更多示例:
#
# Sample mailing list
#
# Adding "nobody" prevents expansion to "long" under sendmail v8:
owner-sample: long, nobody
sample-owner: long, nobody
#sample: "|/usr/local/majordomo/wrapper resend -p bulk -M 10000 -R -l sample -f sample-owner -h girl.ee.ntu.edu.tw -s sample-outgoing"
sample: "|/usr/local/majordomo/wrapper resend -l sample -h girl.ee.ntu.edu.tw sample-outgoing"
sample-approval: owner-sample
sample-outgoing: :include:/usr/local/majordomo/lists/sample, sample-archive,
"|/usr/local/majordomo/wrapper digest -r -C -l sample-digest sample-digest-outgoing"
#
# For digest version list
#
sample-digest: sample
sample-digest-outgoing: "|/usr/local/majordomo/wrapper request-answer sample-digest"
owner-sample-digest: owner-sample
owner-sample-digest-outgoing: owner-sample
owner-sample-digest-request: owner-sample
sample-digest-approval: sample-approval
#
# End of the digest version list
#
owner-sample-outgoing: owner-sample
sample-archive: "|/usr/local/majordomo/wrapper archive -f /usr/local/majordomo/archives/sample/sample -m -a"
owner-sample-archive: owner-sample
#
# For someone who may use listname-request to ask questions
#sample-request: "|/usr/local/majordomo/wrapper request-answer sample"
sample-request: "|/usr/local/majordomo/wrapper majordomo -l sample"
owner-sample-request: owner-sample
#
# End of listname-request version
test:"|/tools/majordomo/wrapper resend -l test -h cs.umb.edu test-outgoing"
test-digest:test
# I put the digest and archive programs on the outgoing list so that
# messages bounced by resend don't end up in the digest or archive
# unless I send them through resend explicitly.
test-outgoing::include:/usr/local/Lists/test,
"| /tools/majordomo/wrapper digest -r -C -l test-digest test-digest-outgoing",
"| /tools/majordomo/wrapper archive2.pl -a -m
-f /usr/local/mail/archive/test/test.archive"
# archive produces a monthly archive with the -m flag.
test-digest-outgoing::include:/usr/local/Lists/test-digest
owner-test:rouilj
owner-test-outgoing:owner-test
# note that the "-digest" and "-digest-outgoing" suffixes
# are required to allow the majordomo mkdigest command, and the
# config code to work properly.
owner-test-digest:owner-test
owner-test-digest-outgoing:owner-test
test-request: "|/tools/majordomo/wrapper request-answer test"
test-digest-request: "|/tools/majordomo/wrapper request-answer test-digest"
test-approval:rouilj
test-digest-approval:test-approval
关于邮件列表的配置文件
一个复杂的 footer [1]
'message_fronter', '#! local($TEMP) = $list;
if ( $list =~ /-digest$/ )
{
$TEMP =~ s/-digest$//;
"In this issue:\n\n\t_SUBJECTS_\n\nSee the end of the digest
for information on subscribing to the $TEMP\nor $TEMP-digest mailing lists.\n";
}
else
{
"";
}',
'message_footer', '#! local($TEMP) = $list;
if ( $list =~ /-digest$/ )
{
$TEMP =~ s/-digest$//;
"To subscribe to $TEMP-digest, send the command:\n\n\t
subscribe $TEMP-digest\n\nin the body of a message to \"Majordomo@
Majordomo.cso.uiuc.edu\". If you want\nto subscribe something
other than the account the mail is coming from,\nsuch as a local
redistribution list, then append that address to the\n\"subscribe\"
command; for example, to subscribe \"local-$TEMP\":\n\n\tsubscribe
$TEMP-digest local-$TEMP@your.domain.net\n\nA non-digest
(direct mail) version of this list is also available;
to\nsubscribe to that instead, replace all instances of
\"$TEMP-digest\"\nin the commands above with \"$TEMP\".";
}
else
{
"";
}',
以上设置比较复杂,如果没有设置相应的摘要邮件列表,或者不介意在摘要中每个文章都加上冗长的结尾的化,只要写一个字符串即可。如:
message_footer << END - ---------------------------------------------------------------------- 内部的 mail-list 使用指南: - 1. 将你机器的 DNS 服务器设置为内部 DNS; - 2. 只有在邮件服务器中将 SMTP 服务器设置为 内部邮件服务器, - 方可向 $LIST 发送邮件; - 3. 取消邮件列表: - 向 majordomo 发送邮件: - 内容为: unsubscribe $LIST <your_email_address>,标题为空; - 4. 寻求更多帮助,请发送邮件到 majordomo, - 内容为: help - - END
邮件订阅受控,即订阅之前,先要由管理员审核用户
参见:FAQ。
Copyright © 2006 WorldHello 开放文档之源 计划 |