diff options
| author | fukachan <fukachan> | 2005-07-20 10:37:40 +0000 |
|---|---|---|
| committer | fukachan <fukachan> | 2005-07-20 10:37:40 +0000 |
| commit | 4829badef574589c3e6fd9588a6ffc482322fa1a (patch) | |
| tree | dd2ae298b39405f1a4c5a5f69775b83d3d3c97c1 /fml/doc/en/tutorial/customize | |
| parent | 8295ed65d40f99906e12bfb945cf51be18d09ce8 (diff) | |
| download | fml8-4829badef574589c3e6fd9588a6ffc482322fa1a.tar.gz fml8-4829badef574589c3e6fd9588a6ffc482322fa1a.tar.bz2 fml8-4829badef574589c3e6fd9588a6ffc482322fa1a.zip | |
translated.
Diffstat (limited to 'fml/doc/en/tutorial/customize')
18 files changed, 605 insertions, 56 deletions
diff --git a/fml/doc/en/tutorial/customize/autoreply.sgml b/fml/doc/en/tutorial/customize/autoreply.sgml index 4c891b83..e957baec 100644 --- a/fml/doc/en/tutorial/customize/autoreply.sgml +++ b/fml/doc/en/tutorial/customize/autoreply.sgml @@ -1,5 +1,5 @@ <!-- - $FML$ + $FML: autoreply.sgml,v 1.1 2003/07/26 07:31:27 fukachan Exp $ $jaFML: autoreply.sgml,v 1.2 2003/01/05 08:00:59 fukachan Exp $ --> @@ -10,14 +10,14 @@ <para> Modify delivery process ( libexec/distribute ) to send back -/etc/fml/help file. For example, when a user can send anything to +/some/where/help file. For example, when a user can send anything to help@fml.org, fml sends back help file to the sender. </para> <para> In this case, set at config.cf <screen> -post_restrictions = permit_anyone +article_post_restrictions = permit_anyone </screen> and define the following hook after =cut line. <screen> @@ -25,15 +25,25 @@ $distribute_run_start_hook = q{ $curproc->reply_message( { type => "text/plain; charset=iso-2022-jp", - path => "/etc/fml/help", + path => "/some/where/help", filename => "help", disposition => "help example", }); - $curproc->refuse_further_processing(); + $curproc->stop_this_process(); }; </screen> +The last +<screen> +$curproc->stop_this_process(); +</screen> +method of &fml8; corresponds to the statement +<screen> +$DO_NOTHING = 1; +</screen> +of &fml4;. +After this statement, the normal processing stops. </para> </sect1> diff --git a/fml/doc/en/tutorial/customize/case_studies.sgml b/fml/doc/en/tutorial/customize/case_studies.sgml index 4294cdd9..421ea077 100644 --- a/fml/doc/en/tutorial/customize/case_studies.sgml +++ b/fml/doc/en/tutorial/customize/case_studies.sgml @@ -1,5 +1,5 @@ <!-- - $FML$ + $FML: case_studies.sgml,v 1.1 2003/07/26 07:31:27 fukachan Exp $ $jaFML: case_studies.sgml,v 1.4 2003/04/15 14:51:36 fukachan Exp $ --> @@ -10,15 +10,22 @@ </title> <para> +Edit /usr/local/etc/fml/site_default_config.cf to apply the effect to +all ML's. +</para> + +<para> no tag of subject. <footnote> <para> -This is default in &fml8;. +This is default in &fml8; (default site_default_config.cf includes +this configuration). </para> </footnote> <screen> article_header_rewrite_rules -= rewrite_article_subject_tag </screen> +This means header rewrite rules minus "adding subject tag" operation. </para> <para> @@ -26,18 +33,23 @@ Prepend office# at X-ML-Name:. That is, mlname is changed to office#mlname. <screen> # office#$mlname -x_ml_name = office#$ml_name +outgoing_mail_header_x_ml_name = office#$ml_name </screen> </para> <para> -Anybody can post to this ML since customers send mail to here. +Anybody can post to this ML since customers send mails to this address. <screen> post_restrictions = permit_anyone </screen> -Disale almost all filters. +In this case, anybody including system special accounts e.g. root, +postmaster can post. +</para> + +<para> +Disale almost all filters since a lot of customer messsages looks +something wrong. <screen> -use_body_filter = no use_article_body_filter = no use_article_non_mime_filter = no use_article_mime_component_filter = no @@ -56,10 +68,11 @@ spool_type = subdir <para> disable command mail. <screen> -use_command_mail_program = no +use_command_mail_function = no </screen> -To enable the use of command mail by CGI, we use this variable. -It is recommended to remove proper alias entries if could. +If somenoby want to use command mail (e.g. by CGI), we use this +variable. It is recommended to remove proper alias entries if could to +ensure the command mail is prohibited. </para> </sect1> @@ -71,7 +84,8 @@ It is recommended to remove proper alias entries if could. </title> <para> -Edit /etc/fml/site_default_config.cf and reflects all ML's. +Edit /usr/local/etc/fml/site_default_config.cf to apply the effect to +all ML's. </para> <para> diff --git a/fml/doc/en/tutorial/customize/chapter.command.sgml b/fml/doc/en/tutorial/customize/chapter.command.sgml index 7af1cf35..98d6db37 100644 --- a/fml/doc/en/tutorial/customize/chapter.command.sgml +++ b/fml/doc/en/tutorial/customize/chapter.command.sgml @@ -1,5 +1,5 @@ <!-- - $FML$ + $FML: chapter.command.sgml,v 1.1 2003/07/26 07:31:27 fukachan Exp $ $jaFML: chapter.command.sgml,v 1.1 2002/09/15 01:46:30 fukachan Exp $ --> @@ -15,8 +15,7 @@ </title> <para> -To extend help command of elena ML. -Create help.pm perl module at +To extend help command of elena ML, create help.pm perl module at <screen> /var/spool/ml/elena/local/lib/FML/Command/User/help.pm </screen> diff --git a/fml/doc/en/tutorial/customize/chapter.config.sgml b/fml/doc/en/tutorial/customize/chapter.config.sgml index 72a3b25c..2d49b288 100644 --- a/fml/doc/en/tutorial/customize/chapter.config.sgml +++ b/fml/doc/en/tutorial/customize/chapter.config.sgml @@ -1,5 +1,5 @@ <!-- - $FML$ + $FML: chapter.config.sgml,v 1.1 2003/07/26 07:31:27 fukachan Exp $ $jaFML: chapter.config.sgml,v 1.3 2003/04/15 14:51:36 fukachan Exp $ --> @@ -20,7 +20,7 @@ The format is same as config.cf. </para> <para> -This file corresponds to site_init.ph of &fml4;. +This file corresponds to site_force.ph of &fml4;. </para> </sect1> diff --git a/fml/doc/en/tutorial/customize/chapter.ml_style.sgml b/fml/doc/en/tutorial/customize/chapter.ml_style.sgml index b43ab7bb..d2d8b2f7 100644 --- a/fml/doc/en/tutorial/customize/chapter.ml_style.sgml +++ b/fml/doc/en/tutorial/customize/chapter.ml_style.sgml @@ -1,5 +1,5 @@ <!-- - $FML$ + $FML: chapter.ml_style.sgml,v 1.1 2003/07/26 07:31:28 fukachan Exp $ $jaFML: chapter.ml_style.sgml,v 1.4 2003/02/16 13:07:15 fukachan Exp $ --> <chapter id="cuctomize"> @@ -13,6 +13,8 @@ §.config.command.rejectall; §.config.mailmagazine; §.config.post.permit.anyone; +§.config.post.check.article.thread; +§.config.post.check.pgp; §.config.ml.hier; <!-- procmail --> diff --git a/fml/doc/en/tutorial/customize/command_permit_anyone.sgml b/fml/doc/en/tutorial/customize/command_permit_anyone.sgml index b33fd0b9..1f41c8a7 100644 --- a/fml/doc/en/tutorial/customize/command_permit_anyone.sgml +++ b/fml/doc/en/tutorial/customize/command_permit_anyone.sgml @@ -1,5 +1,5 @@ <!-- - $FML$ + $FML: command_permit_anyone.sgml,v 1.1 2003/07/26 07:31:28 fukachan Exp $ $jaFML: command_permit_anyone.sgml,v 1.2 2003/01/05 08:00:59 fukachan Exp $ --> @@ -9,11 +9,11 @@ </title> <para> -$command_restrictions defines who can use command mail. +$command_mail_restrictions defines who can use command mail. By default user registerd as a poster can use command mail. To set anyone can use command mail, set <screen> -command_restrictions = permit_anyone +command_mail_restrictions = permit_anyone </screen> </para> diff --git a/fml/doc/en/tutorial/customize/command_rejectall.sgml b/fml/doc/en/tutorial/customize/command_rejectall.sgml index aaf44c69..2d35c24d 100644 --- a/fml/doc/en/tutorial/customize/command_rejectall.sgml +++ b/fml/doc/en/tutorial/customize/command_rejectall.sgml @@ -1,5 +1,5 @@ <!-- - $FML$ + $FML: command_rejectall.sgml,v 1.1 2003/07/26 07:31:28 fukachan Exp $ $jaFML: command_rejectall.sgml,v 1.3 2003/04/15 14:51:36 fukachan Exp $ --> @@ -13,20 +13,28 @@ It is most safe to remove entries from aliases. </para> <para> +Another 2nd best solution follows: <screen> -use_command_mail_program = no +use_command_mail_function = no </screen> -In this case, /usr/local/libexec/fml/command is kicked off once but -does not work and exit as soon as possible. +In this case, /usr/local/libexec/fml/command runs once but does not +work and ends as soon as possible. </para> <para> -In another level of rejection, this configuration is possible: +This solution may be possible. <screen> -command_restrictions = reject +use_command_mail_function = yes + +command_mail_restrictions = reject </screen> -When fml receives the command mail, +When fml receives the incoming command mail, it inform the rejection to the sender. </para> +<para> +This configuration works but it evalutates each line. +It is useless. +</para> + </sect1> diff --git a/fml/doc/en/tutorial/customize/filter.sgml b/fml/doc/en/tutorial/customize/filter.sgml index 5baf6c30..631565d5 100644 --- a/fml/doc/en/tutorial/customize/filter.sgml +++ b/fml/doc/en/tutorial/customize/filter.sgml @@ -1,5 +1,5 @@ <!-- - $FML$ + $FML: filter.sgml,v 1.1 2003/07/26 07:31:28 fukachan Exp $ $jaFML: filter.sgml,v 1.2 2003/04/13 04:36:11 fukachan Exp $ --> @@ -11,6 +11,8 @@ <qandaset> &recipe.filter.notice; +&recipe.filter.spamassassin; +&recipe.filter.attachments; </qandaset> diff --git a/fml/doc/en/tutorial/customize/mailmagazine.sgml b/fml/doc/en/tutorial/customize/mailmagazine.sgml index 542344f7..d8bbf738 100644 --- a/fml/doc/en/tutorial/customize/mailmagazine.sgml +++ b/fml/doc/en/tutorial/customize/mailmagazine.sgml @@ -1,33 +1,57 @@ <!-- - $FML: mailmagazine.sgml,v 1.1 2003/07/26 07:31:28 fukachan Exp $ + $FML: mailmagazine.sgml,v 1.2 2003/07/27 17:47:06 fukachan Exp $ $jaFML: mailmagazine.sgml,v 1.3 2003/07/27 17:45:30 fukachan Exp $ --> -<sect1 id="config.mailmagazine"> + +<sect1 id="config.mailmagazine.1"> <title> - case study: mail magazine + case study: mail magazine (1) </title> +<warning> +<para> +Please use +<link linkend="config.post.check.pgp"> +PGP auth +</link> +if could, though we describe header based auth here. +Also please set up MTA properly e.g. to disable smtp interfaces as +could as possible. +</para> + +<para> +It is a problem that PGP auth requires user's skill at some level. +</para> + +</warning> + <para> -Consider asymmetric case of member list (list of persons who can post) -and recipient list. +In the case of header based auth, you can create a mail magazine by +using the asymmetirc member list. Consider asymmetric case of member +list (list of persons who can post) and recipient list below. </para> <para> -Firstly, remove primary_member_maps from $member_maps. Instead, add +Firstly, remove $primary_member_map from $member_maps. Instead, define $ml_home_dir/members-mailmag who can post to $member_maps. <screen> member_maps = $ml_home_dir/members-mailmag </screen> +The use of "subscribe" command is same as default one since +"subscribe" command changes $primary_member_map not $member_maps. It +is a little tricky but crafty use of $primary_XXX_map and $XX_maps +enhances &fml8; configuration. </para> <para> In this case, when a new user is subscribed, the user address is added -to both $ml_home_dir/members and $ml_home_dir/recipinets. -But $member_maps is defined as $ml_home_dir/members-mailmag. -$ml_home_dir/members is not used. -Hence, recipients is updated but the list of posters is unchanged. +to both $ml_home_dir/members ($primary_member_map) and +$ml_home_dir/recipinets ($primary_recipient_map). But $member_maps is +defined as $ml_home_dir/members-mailmag. $ml_home_dir/members is not +used. Hence, only the list of recipients is updated but the list of +posters is NOT changed. </para> <warning> @@ -36,9 +60,68 @@ Strictly speaking, this configuration is not enough safe. If somebody fakes From: address, he/she can post since fml checks only From: address. </para> + +<para> +So, pgp auth is recommended. +</para> + </warning> <para> +Another solution. +<screen> +primary_member_map = $tmp_dir/members-dummy +</screen> +and use $member_maps (member_maps = $ml_home_dir/members) for normal +use. It has only poster's addresses. +</para> + +</sect1> + + +<sect1 id="config.mailmagazine.2"> + <title> + CASE STUDY: mail magazine (2) + </title> +<para> +After 2004/06, &fml8; supports the queuing system. So the outgoing +mail fails once, after the confirmation of content, you flush again to +deliver if the content is ok. +</para> + +<para> +The queuing system support enables "queue once, dequeue after content +confirmation". It avoids delivery of wrong content. +</para> + +<para> +The configuration is as follows. +</para> + +<para> +Specify irrelevant port at config.cf. +<screen> +smtp_servers = IRRELEVANT_PORT + +[Example] + +smtp_servers = 127.0.0.1:2025 +</screen> +This makes the delivery fail. The message is queued. +</para> + +<para> +Check the content. If the content is correct and delivery is ready, +runs the following command by specifying the correct transport. +<screen> +% fml -o smtp_servers=TRANSPORT ML_NAME flushq + +[Example] + +% fml -o smtp_servers=127.0.0.1:25 ML_NAME flushq +</screen> +"flush" and "flushq" command are same. +</para> </sect1> diff --git a/fml/doc/en/tutorial/customize/ml.hier.ml b/fml/doc/en/tutorial/customize/ml.hier.ml index 6aeb282a..ca2a3854 100644 --- a/fml/doc/en/tutorial/customize/ml.hier.ml +++ b/fml/doc/en/tutorial/customize/ml.hier.ml @@ -1,5 +1,5 @@ <!-- - $FML$ + $FML: ml.hier.ml,v 1.1 2003/08/02 01:19:10 fukachan Exp $ $jaFML: ml.hier.ml,v 1.1 2002/07/29 12:16:19 fukachan Exp $ --> @@ -46,4 +46,13 @@ post_restrictions = permit_anyone </screen> </para> +<para> +This example is simplest. It is easy to use this style. +</para> + +<para> +If you need to use SQL e.g. MySQL, it is modern. +It needs a lot of preparions and operation know-how. +</para> + </sect1> diff --git a/fml/doc/en/tutorial/customize/post_check_article_thread.sgml b/fml/doc/en/tutorial/customize/post_check_article_thread.sgml new file mode 100644 index 00000000..32af61b5 --- /dev/null +++ b/fml/doc/en/tutorial/customize/post_check_article_thread.sgml @@ -0,0 +1,133 @@ +<!-- + $FML$ + $jaFML: post_check_article_thread.sgml,v 1.3 2005/06/25 14:12:52 fukachan Exp $ +--> + + +<sect1 id="config.post.check.article.thread"> + <title> + CASE STUDY: article posting allowd if it is a reply to the former one. + </title> + +<para> +From time to time we can find that a posted article is denied due to +posting from not a member. +</para> + +<para> +One reason is that the member who replied some article forgot to +notify changes of his/her mail address to the mailing list +administrator. Another reason that his/her mail address is changed +from @DOMAIN to @SUB.DOMAIN vice versa. Yet another reason is that +he/she replied it from other location which recieved the article via +mail forwarding at some other host. +</para> + +<para> +After 2004/10/28 &fml8; current, &fml8; supports "allow article post +irrespective of the From: address if some condition satisfied" at +article_post_restrictions. +</para> + +<para> +The current implementation suppors the condition that "if the reply +refers a known message-id within some time limit". Precisely +speaking, "knonw mesage-is" implies the id is found at the database +which holds In-Reply-To: and References: of old articles within some +time limit (e.g. one week). +</para> + + +<sect2> + <title> + Examles + </title> + +<para> +"check_article_thread" is the keyword to support this check. +<screen> +article_post_restrictions = reject_system_special_accounts + check_article_thread + permit_member_maps + reject +</screen> +not used by default. +To use it, specify it at article_post_restrictions. +</para> + +</sect2> + + +<sect2> + <title> + Discussion + </title> + +<para> +Hmm, this is similar to a cookie. +There are some problems. +</para> + +<para> +1) what is proper time scale ? +$article_post_article_thread_lifetime controlls it. one day by default. +<screen> +article_post_article_thread_lifetime = 86400 +</screen> +</para> + +<para> +Also, boundary of the time scale ? When starts the allowd window ? It +starts from the first article of the specific thread ? Or from the +last article ? +</para> + +<para> +2) more restricted condition support required ? +If so, we should check the corelation between subject: and the thread? +</para> + +</sect2> + + +<sect2> + <title> + Applied example: small persons can starts article thread. + </title> + +<para> +<screen> +member_maps = $tmp_dir/members-thread-init + +article_post_restrictions = reject_system_special_accounts + check_article_thread + permit_member_maps + reject + + +</screen> +Persons registered at members-thread-init can post article always. +Other persons can post the article if the article is a reply to some +other article. +</para> + +<para> +Hmm, it looks a variation of moderator system ? +</para> + +<para> +Better if they use PGP auth. +<screen> +member_maps = $tmp_dir/members-thread-init + +article_post_restrictions = reject_system_special_accounts + check_article_thread + check_pgp_signature + reject + +</screen> +</para> + +</sect2> + +</sect1> diff --git a/fml/doc/en/tutorial/customize/post_check_pgp_signature.sgml b/fml/doc/en/tutorial/customize/post_check_pgp_signature.sgml new file mode 100644 index 00000000..c41a2ff0 --- /dev/null +++ b/fml/doc/en/tutorial/customize/post_check_pgp_signature.sgml @@ -0,0 +1,95 @@ +<!-- + $FML: post_check_pgp_signature.sgml,v 1.2 2005/06/25 15:11:29 fukachan Exp $ +--> + + +<sect1 id="config.post.check.pgp"> + <title> + CASE STUDY: PGP/PGP based authentication in posting + </title> + +<caution> +<para> +Please install Crypt::OpenPGP perl module. It is better to use OS +dependent pacakge system since it depends a lot of other packages. +</para> +</caution> + +<sect2> + <title> + Configuration Example + </title> + +<para> +check_pgp_signature options supports PGP/GPG based auth. +If the degital signature is confirmed, the user can post articles. +<screen> +article_post_restrictions = reject_system_special_accounts + check_pgp_signature + reject +</screen> +disabled by default. +change article_post_restrictions if use. +</para> + +</sect2> + + +<sect2> + <title> + Key operations + </title> + +<para> +PGP KEY RING directories are separeted. For example, the keyring dir +for article pgp auth is $ml_home_dir/etc/pgp-article-post-auth/ +directory, the keyring dir for remote administration by command mail +is $ml_home_dir/etc/pgp-admin-command-mail-auth/ directory. +</para> + +<para> +Use pgp2, pgp5 and gpg commands to edit keys under them +It is useful to use the following fmlpgp wrapper command. +The wrapper sets up proper environment variables. +<screen> +Example: elena ML + +fmlpgp elena --article-post-auth -kg +</screen> +the command line options available: +<screen> +--article-post-auth (auth for post article) +--command-mail-auth (auth for command mail) +--admin-command-mail-auth (auth for admin command mail) +--article-post-encrypt (article encryption) +</screen> +</para> + +<para> +Available wrappers follow: +</para> + +<para> +pgp2: +fmlpgp +</para> + +<para> +pgp5: +fmlpgp5 +fmlpgpe +fmlpgpk +fmlpgps +fmlpgpv +</para> + +<para> +gpg: +fmlgpg +fmlgpgv +</para> + +</sect2> + + +</sect1> diff --git a/fml/doc/en/tutorial/customize/post_permit_anyone.sgml b/fml/doc/en/tutorial/customize/post_permit_anyone.sgml index 56d66f6c..b498d33e 100644 --- a/fml/doc/en/tutorial/customize/post_permit_anyone.sgml +++ b/fml/doc/en/tutorial/customize/post_permit_anyone.sgml @@ -1,5 +1,5 @@ <!-- - $FML: post_permit_anyone.sgml,v 1.1 2003/07/26 07:31:28 fukachan Exp $ + $FML: post_permit_anyone.sgml,v 1.2 2003/11/30 10:01:13 fukachan Exp $ $jaFML: post_permit_anyone.sgml,v 1.3 2003/04/15 14:51:37 fukachan Exp $ --> @@ -10,21 +10,32 @@ <para> <screen> -post_restrictions = permit_anyone +article_post_restrictions = permit_anyone </screen> -$post_restrictions parameter controls who can post to this ML. -To set this as "permit_anyone", anybody can post. +$post_restrictions parameter controls who can post to this ML. To set +this as "permit_anyone", anybody (including system special account +e.g. root, postmaster) can post. </para> <para> -By default, +By default, for &fml4; compatibility, <screen> -post_restrictions = reject_system_special_accounts - permit_member_maps - reject +article_post_restrictions = reject_system_special_accounts + permit_member_maps + reject </screen> -"reject_system_special_accounts" denys post if +"reject_system_special_accounts" denies post if From: looks like system accounts e.g. root, postmaster. </para> +<para> +This configuration means that +system special accounts cannot post and +the user contained in $member_maps can post article. +</para> + +<para> +Attention that reject_XXX and permit_XXX statement is first match. +</para> + </sect1> diff --git a/fml/doc/en/tutorial/customize/recipe.filter.attachments.sgml b/fml/doc/en/tutorial/customize/recipe.filter.attachments.sgml new file mode 100644 index 00000000..b8fd40bc --- /dev/null +++ b/fml/doc/en/tutorial/customize/recipe.filter.attachments.sgml @@ -0,0 +1,96 @@ +<qandaentry> + +<question> +<para> +HOOK to reject a message with danger attachment +</para> +</question> + +<answer> + +<para> +&fml8; analyzed the incoming message firstly and creates a chain of +Mail::Message objects on the memory. It is easy for &fml8; to analyze +the chain to check the message content. +</para> + +<para> +The following examples uses hooks. In all cases, if matched, call +stop_this_process() to stop further processing. Pay attension that +these examples do not try to return error messsages. +</para> + +<para> +If you need to return error messages, use reply_message(). It is +better not to return it since this message must be a virus or a spam. +</para> + +<para> +Here is an example to check attachment keywords e.g. .exe in mesages. +Before &fml8; 2004/12/08 current, it follows: +<screen> +$distribute_verify_request_start_hook = q{ + my $msg = $curproc->incoming_message() || undef; + for (my $m = $msg; $m ; $m = $m->{ next } ) { + my $hs = $m->message_fields() || ''; + if ($hs =~ /filename=.*\.(com|vbs|vbe|wsh|wse|js|exe|doc|rtf)/o) { + $curproc->log("attachment \.$1 found"); + $curproc->stop_this_process(); + } + } +}; +</screen> +After &fml8; 2004/12/08 current, it follows: +<screen> +$distribute_verify_request_start_hook = q{ + my $msg = $curproc->incoming_message() || undef; + my $list = $msg->message_chain_as_array_ref(); + for my $m (@$list) { + my $hs = $m->message_fields() || ''; + if ($hs =~ /filename=.*\.(com|vbs|vbe|wsh|wse|js|exe|doc|rtf)/o) { + $curproc->log("[new] attachment \.$1 found"); + $curproc->stop_this_process(); + } + } +}; +</screen> +</para> + +<para> +Another solution is to trap +<screen> +Content-Disposition: attachment; +</screen> +to detect the existence of attachments. +Before &fml8; 2004/12/08 current, it follows: +<screen> +$distribute_verify_request_start_hook = q{ + my $msg = $curproc->incoming_message() || undef; + for (my $m = $msg; $m ; $m = $m->{ next } ) { + my $hs = $m->message_fields() || ''; + if ($hs =~ /Content-Disposition:.*attachment;/o) { + $curproc->log("attachment \.$1 found"); + $curproc->stop_this_process(); + } + } +}; +</screen> +After &fml8; 2004/12/08 current, it follows: +<screen> +$distribute_verify_request_start_hook = q{ + my $msg = $curproc->incoming_message() || undef; + my $list = $msg->message_chain_as_array_ref(); + for my $m (@$list) { + my $hs = $m->message_fields() || ''; + if ($hs =~ /Content-Disposition:.*attachment;/o) { + $curproc->log("[new] attachment \.$1 found"); + $curproc->stop_this_process(); + } + } +}; +</screen> +</para> + +</answer> + +</qandaentry> diff --git a/fml/doc/en/tutorial/customize/recipe.filter.notice.sgml b/fml/doc/en/tutorial/customize/recipe.filter.notice.sgml index 919ec236..34c4a7d9 100644 --- a/fml/doc/en/tutorial/customize/recipe.filter.notice.sgml +++ b/fml/doc/en/tutorial/customize/recipe.filter.notice.sgml @@ -1,5 +1,5 @@ <!-- - $FML$ + $FML: recipe.filter.notice.sgml,v 1.1 2003/07/26 07:31:28 fukachan Exp $ $jaFML: recipe.filter.notice.sgml,v 1.2 2003/04/15 14:51:37 fukachan Exp $ --> @@ -21,7 +21,7 @@ use_article_filter_reject_notice = yes article_filter_reject_notice_recipient = maintainer sender </screen> When the filter system rejects the request, -fml sends back it to the ML maintainer not the sender. +fml sends back it to both the ML maintainer and the sender. </para> diff --git a/fml/doc/en/tutorial/customize/recipe.filter.spamassassin.sgml b/fml/doc/en/tutorial/customize/recipe.filter.spamassassin.sgml new file mode 100644 index 00000000..57bd7af7 --- /dev/null +++ b/fml/doc/en/tutorial/customize/recipe.filter.spamassassin.sgml @@ -0,0 +1,85 @@ +<qandaentry> + +<question> +<para> +reject SPAM messages using spamassassin by a &fml8; hook. +</para> +</question> + +<answer> + +<para> +<caution> +<para> +In this case, &fml8; use not spamassassin internal filter but use a +hook. +</para> +</caution> +</para> + +<para> +<screen> +$distribute_verify_request_end_hook = q{ + my $spamassassin = '/usr/pkg/bin/spamc -c'; + + use FileHandle; + my $wh = new FileHandle "| $spamassassin"; + + if (defined $wh) { + $wh->autoflush(1); + my $msg = $curproc->incoming_message(); + $msg->print($wh); + $wh->close(); + if ($?) { + $curproc->log("spam: (code = $?)"); + $curproc->stop_this_process(); + } + } +}; +</screen> +</para> + +</answer> + +</qandaentry> + + +<qandaentry> +<question> +<para> +Add X-Spam-Status: Yes header field +if spamassassin determines the message as a spam. +</para> +</question> + +<answer> +<para> +<screen> +$distribute_verify_request_end_hook = q{ + my $spamassassin = '/usr/pkg/bin/spamc -c'; + + use FileHandle; + my $wh = new FileHandle "| $spamassassin"; + + if (defined $wh) { + $wh->autoflush(1); + my $msg = $curproc->incoming_message(); + $msg->print($wh); + $wh->close(); + if ($?) { + $curproc->log("spam: (code = $?)"); + my $hdr = $curproc->incoming_message_header(); + $hdr->add('X-Spam-Status', 'Yes'); + } + } +}; +</screen> +</para> + +<para> +This is a little tricky but it works well. +</para> + +</answer> + +</qandaentry> diff --git a/fml/doc/en/tutorial/customize/recipe.header.tag.lowercase.sgml b/fml/doc/en/tutorial/customize/recipe.header.tag.lowercase.sgml index 5089baf5..c8afeac1 100644 --- a/fml/doc/en/tutorial/customize/recipe.header.tag.lowercase.sgml +++ b/fml/doc/en/tutorial/customize/recipe.header.tag.lowercase.sgml @@ -1,5 +1,5 @@ <!-- - $FML$ + $FML: recipe.header.tag.lowercase.sgml,v 1.1 2003/07/26 07:31:28 fukachan Exp $ $jaFML: recipe.header.tag.lowercase.sgml,v 1.1 2002/10/29 03:32:21 fukachan Exp $ --> @@ -17,6 +17,7 @@ lower the tag in article Subject: <screen> article_subject_tag = [\L$ml_name\E:%05d] </screen> +(available after 2002/10/29 snapshot) </para> </answer> diff --git a/fml/doc/en/tutorial/customize/recipe.header.tag.uppercase.sgml b/fml/doc/en/tutorial/customize/recipe.header.tag.uppercase.sgml index 7c0a6af9..8eee8beb 100644 --- a/fml/doc/en/tutorial/customize/recipe.header.tag.uppercase.sgml +++ b/fml/doc/en/tutorial/customize/recipe.header.tag.uppercase.sgml @@ -1,5 +1,5 @@ <!-- - $FML$ + $FML: recipe.header.tag.uppercase.sgml,v 1.1 2003/07/26 07:31:29 fukachan Exp $ $jaFML: recipe.header.tag.uppercase.sgml,v 1.1 2002/10/29 03:32:21 fukachan Exp $ --> @@ -17,6 +17,7 @@ upper the tag in article Subject: <screen> article_subject_tag = [\U$ml_name\E:%05d] </screen> +(available after 2002/10/29 snapshot) </para> </answer> |
