summaryrefslogtreecommitdiff
path: root/fml/doc/ja/tutorial/customize
diff options
context:
space:
mode:
authorfukachan <fukachan>2005-11-30 21:58:04 +0000
committerfukachan <fukachan>2005-11-30 21:58:04 +0000
commit0d482aa858c3044f032d47a20c29a0767f6019d2 (patch)
tree2fc01b73942cfd28125e6e4808b16e3e2c6540a8 /fml/doc/ja/tutorial/customize
parentc2ce8c7e56e36012bce89d1777d165ae0804bf9a (diff)
downloadfml8-0d482aa858c3044f032d47a20c29a0767f6019d2.tar.gz
fml8-0d482aa858c3044f032d47a20c29a0767f6019d2.tar.bz2
fml8-0d482aa858c3044f032d47a20c29a0767f6019d2.zip
add recipes on autoreply
Diffstat (limited to 'fml/doc/ja/tutorial/customize')
-rw-r--r--fml/doc/ja/tutorial/customize/autoreply.sgml12
-rw-r--r--fml/doc/ja/tutorial/customize/recipes.autoreply.sgml125
2 files changed, 136 insertions, 1 deletions
diff --git a/fml/doc/ja/tutorial/customize/autoreply.sgml b/fml/doc/ja/tutorial/customize/autoreply.sgml
index d1846df8..1f85c95f 100644
--- a/fml/doc/ja/tutorial/customize/autoreply.sgml
+++ b/fml/doc/ja/tutorial/customize/autoreply.sgml
@@ -1,5 +1,5 @@
<!--
- $FML: autoreply.sgml,v 1.4 2004/10/06 09:07:34 fukachan Exp $
+ $FML: autoreply.sgml,v 1.5 2005/06/25 15:11:29 fukachan Exp $
-->
@@ -44,4 +44,14 @@ $curproc->stop_this_process();
つまり、なにも実行されなくなるというわけです。
</para>
+
+<sect2>
+ <title>
+ レシピ’s
+ </title>
+
+&sect.customize.autoreply.recipes;
+
+</sect2>
+
</sect1>
diff --git a/fml/doc/ja/tutorial/customize/recipes.autoreply.sgml b/fml/doc/ja/tutorial/customize/recipes.autoreply.sgml
new file mode 100644
index 00000000..4625fd68
--- /dev/null
+++ b/fml/doc/ja/tutorial/customize/recipes.autoreply.sgml
@@ -0,0 +1,125 @@
+<!--
+ $FML$
+-->
+
+<qandaset>
+
+
+<qandaentry>
+
+<question>
+<para>
+サービス案内を自動で送り返す
+</para>
+</question>
+
+<answer>
+<para>
+ガイドを送り返す仕組みを利用すると良いでしょう。デフォルトではテンプレー
+トのガイド案内が使われますが、各MLのホームディレクトリに guide ファ
+イルをおけばそれを送り返してくれます。
+</para>
+
+<para>
+「メールの内容にかかわらず常にガイドを送り返す」には、もうひと捻り必要
+です。
+</para>
+
+<para>
+このためには次のように HOOK で常に guide コマンドを実行するようにする
+とよいでしょう。なお通常の処理は行なわないようにしています。
+<screen>
+
+$distribute_run_start_hook = q{
+
+ # guide コマンドを呼び出します。
+ # guide コマンドの内容は汎用のメールキューシステムに渡されます。
+ use FML::Command;
+ my $dispatch = new FML::Command;
+ my $context = $curproc->command_context_init("guide");
+ $dispatch->guide($curproc, $context);
+
+ # 通常の処理を行ないません。
+ $curproc->stop_this_process();
+
+};
+
+# コマンドメールでも同じくガイドを送り返すように
+$command_mail_run_start_hook = $distribute_run_start_hook;
+
+</screen>
+&fml4; と異なり、配送用とコマンドメール用それぞれのプロセスごとにHOOK
+が分かれていることに注意して下さい。このため最後に同じ内容のコマンドメー
+ル用の HOOK も定義しています(コピーしています)。
+<screen>
+$command_mail_run_start_hook = $distribute_run_start_hook;
+</screen>
+</para>
+
+</answer>
+
+</qandaentry>
+
+
+
+<qandaentry>
+
+<question>
+<para>
+お礼”も”返す意見受け付け用ML
+</para>
+</question>
+
+<answer>
+<para>
+前レシピに似ていますが、少し違います。
+</para>
+
+<para>
+たとえば意見受付用のMLを考えてみましょう。
+このMLに意見を送ってくれた人には、
+とりあえずお礼の返事
+「ご意見ありがとうございました。返事はしばらく待ってね。」を出し、
+メールは関係者に配送します。
+よって、
+(1) だれでも投稿できて、
+(2) お礼を常に出し、
+(3) さらに普通のMLとして動作する、
+ように設定します。
+</para>
+
+<para>
+<screen>
+[config.cf]
+
+article_post_restrictions = permit_anyone
+
+=cut
+
+$distribute_run_start_hook = q{
+ my $cred = $curproc->credential();
+ my $sender = $cred->sender();
+
+ # MLのメンバーでないならガイドを送り返します。
+ # MLのメンバーに対しては普通のMLとなります。
+ unless ($cred->is_member($sender)) {
+
+ # guide コマンドを呼び出します。
+ use FML::Command;
+ my $dispatch = new FML::Command;
+ my $context = $curproc->command_context_init("guide");
+ $dispatch->guide($curproc, $context);
+ }
+
+};
+
+</screen>
+</para>
+
+</answer>
+
+</qandaentry>
+
+
+</qandaset>
+