From 09a3fbb1d38dcc8d54905f0fb188bc13f6de0df6 Mon Sep 17 00:00:00 2001 From: fukachan Date: Fri, 13 Jan 2006 00:07:14 +0000 Subject: add several Reply-To: related hacks --- fml/doc/en/tutorial/customize/recipes.header.sgml | 200 ++++++++++++++++++++++ fml/doc/ja/tutorial/customize/recipes.header.sgml | 152 +++++++++++++++- 2 files changed, 351 insertions(+), 1 deletion(-) create mode 100644 fml/doc/en/tutorial/customize/recipes.header.sgml diff --git a/fml/doc/en/tutorial/customize/recipes.header.sgml b/fml/doc/en/tutorial/customize/recipes.header.sgml new file mode 100644 index 00000000..6623e34e --- /dev/null +++ b/fml/doc/en/tutorial/customize/recipes.header.sgml @@ -0,0 +1,200 @@ + + + + + + + + + +make subject tag uppercase. + + + + + + + +article_subject_tag = [\U$ml_name\E:%05d] + + + + + + + + + + + + +make subject tag lowercase. + + + + + + +article_subject_tag = [\L$ml_name\E:%05d] + +On unix, you must use lowercase by default. +So the ml_name must be in lower case. +You need not use this setting in almost cases. + + + + + + + + + + +Enforece Reply-To: as address for post. + + + + + +Append the following hook at the last of config.cf (after =cut line). + +$article_header_rewrite_end_hook = q{ + my $ml = $config->{ article_post_address }; + $header->replace('Reply-To', $ml); +}; + +or you can obtain the same effect by setting + +article_header_rewrite_rules += rewrite_reply_to_enforce_article_post_address + + + + + + + + + + + +set Reply-To: as the sender. + + + + + +Append the following hook at the last of config.cf (after =cut line). + +$article_header_rewrite_end_hook = q{ + my $cred = $curproc->credential(); + my $sender = $cred->sender(); + + $header->replace('Reply-To', $sender); +}; + + + + + + + + + + + +set Reply-To: as the sender + ML. + + + + + +Append the following hook at the last of config.cf (after =cut line). + +$article_header_rewrite_end_hook = q{ + my $ml = $config->{ article_post_address }; + my $cred = $curproc->credential(); + my $sender = $cred->sender(); + + $header->replace('Reply-To', "$ml, $sender"); +}; + + + + + + + + + + + + +If the posting is from a ML member, +set Reply-To: as the sender + ML itself. + + + + + +Append the following hook at the last of config.cf (after =cut line). + +$article_header_rewrite_end_hook = q{ + my $ml = $config->{ article_post_address }; + my $cred = $curproc->credential(); + my $sender = $cred->sender(); + + if ($cred->is_member($sender)) { + $curproc->log("member"); + $header->replace('Reply-To', "$ml, $sender"); + } +}; + + + + + + + + + + + +set Reply-To: as fml8 managed addresses found in To: and Cc: field. + + + + + +Append the following hook at the last of config.cf (after =cut line). + +$article_header_rewrite_end_hook = q{ + my $to = $header->get('to'); + my $cc = $header->get('cc'); + my $addr = "$to, $cc"; + + use Mail::Address; + my (@addrlist) = Mail::Address->parse($addr); + + my $reply_to = ''; + for my $a (@addrlist) { + my $_addr = $a->address; + if ($curproc->is_valid_ml_address($_addr)) { + $reply_to .= $reply_to ? ", $_addr" : $_addr; + } + } + + $header->replace('Reply-To', $reply_to) if $reply_to; +}; + + + + + + + + + + + diff --git a/fml/doc/ja/tutorial/customize/recipes.header.sgml b/fml/doc/ja/tutorial/customize/recipes.header.sgml index 9a3e332e..7d889694 100644 --- a/fml/doc/ja/tutorial/customize/recipes.header.sgml +++ b/fml/doc/ja/tutorial/customize/recipes.header.sgml @@ -1,5 +1,5 @@ @@ -47,4 +47,154 @@ article_subject_tag = [\L$ml_name\E:%05d] + + + + +いつでも Reply-To: を投稿用アドレスに強制する。 + + + + + +次の HOOK を config.cf の最後(=cutより後)に書いて下さい。 + +$article_header_rewrite_end_hook = q{ + my $ml = $config->{ article_post_address }; + $header->replace('Reply-To', $ml); +}; + +なおヘッダ書き換えルールに以下の命令を追加しても同じことが出来ます。 + +article_header_rewrite_rules += rewrite_reply_to_enforce_article_post_address + + + + + + + + + + + +Reply-To: を送信者に設定する。 + + + + + +次の HOOK を config.cf の最後(=cutより後)に書いて下さい。 + +$article_header_rewrite_end_hook = q{ + my $cred = $curproc->credential(); + my $sender = $cred->sender(); + + $header->replace('Reply-To', $sender); +}; + + + + + + + + + + + + +Reply-To: を「送信者 + ML」に設定する。 + + + + + +次の HOOK を config.cf の最後(=cutより後)に書いて下さい。 + +$article_header_rewrite_end_hook = q{ + my $ml = $config->{ article_post_address }; + my $cred = $curproc->credential(); + my $sender = $cred->sender(); + + $header->replace('Reply-To', "$ml, $sender"); +}; + + + + + + + + + + + + +MLメンバーからの投稿であれば、Reply-To: を「送信者+ML」にする。 + + + + + +次の HOOK を config.cf の最後(=cutより後)に書いて下さい。 + +$article_header_rewrite_end_hook = q{ + my $ml = $config->{ article_post_address }; + my $cred = $curproc->credential(); + my $sender = $cred->sender(); + + if ($cred->is_member($sender)) { + $curproc->log("member"); + $header->replace('Reply-To', "$ml, $sender"); + } +}; + + + + + + + + + + + + +To: と Cc: の中にある fml8 が管理しているMLのアドレスだけを +Reply-To: に設定する。 + + + + + +だいぶ複雑ですが HOOK で実現できます。 +次の HOOK を config.cf の最後(=cutより後)に書いて下さい。 + +$article_header_rewrite_end_hook = q{ + my $to = $header->get('to'); + my $cc = $header->get('cc'); + my $addr = "$to, $cc"; + + use Mail::Address; + my (@addrlist) = Mail::Address->parse($addr); + + my $reply_to = ''; + for my $a (@addrlist) { + my $_addr = $a->address; + if ($curproc->is_valid_ml_address($_addr)) { + $reply_to .= $reply_to ? ", $_addr" : $_addr; + } + } + + $header->replace('Reply-To', $reply_to) if $reply_to; +}; + + + + + + + + -- cgit v1.2.1