diff options
Diffstat (limited to 'fml/doc/en/tutorial/customize')
| -rw-r--r-- | fml/doc/en/tutorial/customize/recipes.header.sgml | 200 |
1 files changed, 200 insertions, 0 deletions
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 @@ +<!-- + $FML$ +--> + +<qandaset> + + +<qandaentry> + +<question> +<para> +make subject tag uppercase. +</para> +</question> + +<answer> +<para> + +<screen> +article_subject_tag = [\U$ml_name\E:%05d] +</screen> + +</para> +</answer> + +</qandaentry> + + +<qandaentry> + +<question> +<para> +make subject tag lowercase. +</para> +</question> + +<answer> +<para> +<screen> +article_subject_tag = [\L$ml_name\E:%05d] +</screen> +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. +</para> +</answer> + +</qandaentry> + + +<qandaentry> + +<question> +<para> +Enforece Reply-To: as address for post. +</para> +</question> + +<answer> +<para> +Append the following hook at the last of config.cf (after =cut line). +<screen> +$article_header_rewrite_end_hook = q{ + my $ml = $config->{ article_post_address }; + $header->replace('Reply-To', $ml); +}; +</screen> +or you can obtain the same effect by setting +<screen> +article_header_rewrite_rules += rewrite_reply_to_enforce_article_post_address +</screen> +</para> +</answer> + +</qandaentry> + + +<qandaentry> + +<question> +<para> +set Reply-To: as the sender. +</para> +</question> + +<answer> +<para> +Append the following hook at the last of config.cf (after =cut line). +<screen> +$article_header_rewrite_end_hook = q{ + my $cred = $curproc->credential(); + my $sender = $cred->sender(); + + $header->replace('Reply-To', $sender); +}; +</screen> +</para> +</answer> + +</qandaentry> + + +<qandaentry> + +<question> +<para> +set Reply-To: as the sender + ML. +</para> +</question> + +<answer> +<para> +Append the following hook at the last of config.cf (after =cut line). +<screen> +$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"); +}; +</screen> + +</para> +</answer> + +</qandaentry> + + +<qandaentry> + +<question> +<para> +If the posting is from a ML member, +set Reply-To: as the sender + ML itself. +</para> +</question> + +<answer> +<para> +Append the following hook at the last of config.cf (after =cut line). +<screen> +$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"); + } +}; +</screen> +</para> +</answer> + +</qandaentry> + + +<qandaentry> + +<question> +<para> +set Reply-To: as fml8 managed addresses found in To: and Cc: field. +</para> +</question> + +<answer> +<para> +Append the following hook at the last of config.cf (after =cut line). +<screen> +$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; +}; +</screen> + +</para> +</answer> + +</qandaentry> + + + +</qandaset> + |
