Majordomo Configuration/Mailing List

1.メーリングリスト作成
(1)MLの所有者とMLの名称を決定する。
 所有者をadmin、MLをtestとして作成する事にします。
(2)MLの本体を作成する。
[root@server /]# touch /usr/local/majordomo/lists/test
[root@server /]#
(3)MLのinformationを作成します。
[root@server /]# vi /usr/local/majordomo/lists/test.info
[root@server /]#
(4)MLに登録した場合に送信される最初の説明を設定します。
[root@server /]# vi /usr/local/majordomo/lists/test.intro
[root@server /]#
(5)MLの管理者用のPasswordを設定します。
[root@server /]# vi /usr/local/majordomo/lists/test.passwd
[root@server /]# chmod 600 /usr/local/majordomo/lists/test.passwd
[root@server /]#
 owner,groupを変更
[root@server /]# chown majordom /usr/local/majordomo/lists/test*
[root@server /]# chgrp majordom /usr/local/majordomo/lists/test*
[root@server /]#

2./etc/aliasesの修正
[root@server /]# vi /etc/aliases
--------------------------------
test: "|/usr/local/majordomo/wrapper resend -l test test-list"
test-list: :include:/usr/local/majordomo/lists/test
test-request: owner-test
test-owner: owner-test
owner-test: admin
:w
:q
[root@server /]# newaliases

3.MLメンバーの登録
 MLを体験した事がある人はすでに気づいておられるでしょうが、多くのMLはmajordomoへ参加申請のメールを送信することで登録が実現します。従って登録試験もメールで行うことが望ましいでしょう。
 メンバーリストを直接修正する場合は、/usr/local/majordomo/lists/testです。
 登録依頼メールは、majordomo宛に、
subscribe test 登録したいメールアドレス
と言う本文を送信します。
 通常この状態でメンバー登録が完了しています。テストメールを送信して確認してみましょう。
[root@server /]# mail -v test
Subject:
test
 ←[Control + D]で抜ける。
Cc:
test... aliased to "| /usr/local/majordomo-1.94.4/wrapper resend -l test -h we-shall.com test-going"
"| /usr/local/majordomo-1.94.4/wrapper resend -l test -h we-shall.com test-going" ... Connecting to prog...
"| /usr/local/majordomo-1.94.4/wrapper resend -l test -h we-shall.com test-going" ... Sent
[root@server /]#
 先に登録したメンバーにtest mailが配送されたか確認します。届いていればOK。

4.MLの設定
 運用したいメーリングリストの「返信先」とSubjectをカスタマイズします。[test.config]ではオーナーパスワードなどMLに対する各種設定を管理します。内容を各自でしっかり見ておくことが望ましいでしょう。
[root@server /]# cd /usr/local/majordomo/lists
[root@server /list]# vi test.config
# The configuration file for a majordomo mailing list.
# Comments start with the first # on a line, and continue to the end
# of the line. There is no way to escape the # character. The file
# uses either a key = value for simple (i.e. a single) values, or uses
# a here document
# key << END
# value 1
# value 2
# [ more values 1 per line]
# END
# for installing multiple values in array types. Note that the here
# document delimiter (END in the example above) must be the same at the end
# of the list of entries as it is after the << characters.
# Within a here document, the # sign is NOT a comment character.
# A blank line is allowed only as the last line in the here document.
--------------------------------
# reply_to [word] () <resend,digest>
# Put a reply-to header with value <value> into the outgoing
# message. If the token $SENDER is used, then the address of the
# sender is used as the value of the reply-to header. This is the
# value of the reply-to header for digest lists.
reply_to = test@we-shall.com
--------------------------------
# sender [word] (owner-souji) <majordomo,resend,digest>
# The envelope and sender address for the resent mail. This string
# has "@" and the value of resend_host appended to it to make a
# complete address. For majordomo, it provides the sender address
# for the welcome mail message generated as part of the subscribe
# command.
sender = test-owner
--------------------------------

# subject_prefix [word] (undef)
# This word will be prefixed to the subject line, if it is not
# already in the subject. The text is expanded before being used.
# The following expansion tokens are defined: $LIST - the name of
# the current list, $SENDER - the sender as taken from the from
# line, $VERSION, the version of majordomo.
subject_prefix = [Test-ML]
:w
:q

 メーリングリストのSubjectにMLの名称と連番が入っているのを見たことがあると思います。ここではその設定方法を説明します。
 majordomo-1.94以降にはToolsにsequencerと言うスクリプトが含まれています。
 testメーリングリストに連番をつけてみます。
[root@server /]# cd /usr/local/majordomo
[root@server /majordomo]# cp Tools/sequencer
[root@server /majordomo]# echo 1>test.seq
[root@server /majordomo]# chown majordom /usr/local/majordomo/lists/test*
[root@server /majordomo]# chgrp majordom /usr/local/majordomo/lists/test*
 /etc/aliasesにて[resend]に代えて[sequencer]を使うよう修正します。
[root@server /]# vi /etc/aliases
--------------------------------
test: "| /usr/local/majordomo/wrapper sequencer -l test -n -h we-shall.com test-going"
 もちろん、newaliasesを忘れずに。。。

 test MLの新しいconfigを設定します。
[root@server /]# vi /usr/local/majordomo/lists/test.config
--------------------------------
subject_prefix = [Test-ML:$SEQNUM]
 これでtestMLにメール出して、Subjectsに[Test-ML:1]と付いてくればOKです。

 注意:ML管理について、configをメールで取得し、修正後返信して更新する方法が存在しますが、プレフィックスに空白があるとうまく行かないと言うコメントを見ました。現段階でFIXされているかどうか、これが仕様なのかは確認しておりません。MLのconfigは直接Editすることをおすすめします。

5.失敗談
 MLの運用を開始して、早速壁に突き当たりました。どこでどう間違えたのか、設定がうまく行かない。と言うのも、開始したMLへ友人を登録しようとすると、その友人のメールサーバーから拒否される現象が発生。どうやら「Reply-to」が正常では無いというメッセージのようです。
 「はて?設定ファイルは正常に記述したはずだが」と再度確認すれど、登録上は正常に見える。今度は自分宛に送信してヘッダを確認する。すると・・・やはりReply-toが正常なメールアドレスではありません。これには悩まされました。
 本来は上述の例で[test.config]に
reply_to = test@we-shall.com
を指定することで実現されるはずです。インターネットの各サイトでの解説でもそうなっていました。ところが私が開始したMLでは思った通りになってくれません。何度も試行錯誤・・・。
 結局、「これは[Test-ML]では無く、majordomoだ」と考え、[majordomo.cf]を確認。
 案の定、
[root@server majordomo-1.94.4]# vi majordomo.cf
#
# A sample configuration file for majordomo. You must read through this and
# edit it accordingly!
#
# $whereami -- What machine am I running on?
#
$whereami = "mail.we-shall.com";
 と、本来[we-shall.com]になるべき箇所が間違っておりました。Makefileの段階で間違ったようです。



トップへ戻る

21/March/2000