summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fml/etc/install.cf.in4
-rw-r--r--fml/etc/modules6
-rw-r--r--fml/lib/FML/Process/Emulate.pm79
3 files changed, 84 insertions, 5 deletions
diff --git a/fml/etc/install.cf.in b/fml/etc/install.cf.in
index 190426bf..33cf8a44 100644
--- a/fml/etc/install.cf.in
+++ b/fml/etc/install.cf.in
@@ -3,7 +3,7 @@
# All rights reserved. This program is free software; you can
# redistribute it and/or modify it under the same terms as Perl itself.
#
-# $FML: install.cf.in,v 1.16 2004/09/29 05:04:07 fukachan Exp $
+# $FML: install.cf.in,v 1.17 2004/11/21 06:58:52 fukachan Exp $
#
@@ -108,6 +108,8 @@ bin_programs = fml
libexec_programs = fml.pl
+ msend.pl
+ mead.pl
distribute
digest
command
diff --git a/fml/etc/modules b/fml/etc/modules
index b7b8a270..887c8ba0 100644
--- a/fml/etc/modules
+++ b/fml/etc/modules
@@ -1,5 +1,5 @@
#
-# $FML: modules,v 1.10 2004/10/09 12:10:12 fukachan Exp $
+# $FML: modules,v 1.11 2004/11/23 04:24:16 fukachan Exp $
#
# map between programs and modules (like /etc/name_to_sysnum on solaris ?)
#
@@ -47,9 +47,11 @@ admin/config.cgi FML::CGI::Admin::Menu $cgiargs
ml-admin/*/menu.cgi FML::CGI::MLAdmin::MenuOld $cgiargs
ml-admin/*/config.cgi FML::CGI::MLAdmin::Menu $cgiargs
-# libexec/ compatibility
+# fml4 libexec/ compatibility
fml.pl FML::Process::Emulate $ml
fml.pl__--ctladdr FML::Process::Emulate $ml $emulator_opts
+msend.pl FML::Process::Emulate $ml
+mead.pl FML::Process::Emulate $ml
# test
loader FML::Process::Distribute $ml
diff --git a/fml/lib/FML/Process/Emulate.pm b/fml/lib/FML/Process/Emulate.pm
index 2e7fd7e3..e5f5b65c 100644
--- a/fml/lib/FML/Process/Emulate.pm
+++ b/fml/lib/FML/Process/Emulate.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2004 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Emulate.pm,v 1.3 2004/11/25 12:25:56 fukachan Exp $
+# $FML: Emulate.pm,v 1.4 2004/12/09 04:53:41 fukachan Exp $
#
package FML::Process::Emulate;
@@ -101,8 +101,15 @@ sub _fml4_emulate
{
my ($curproc) = @_;
my $option = $curproc->command_line_options || {};
+ my $myname = $curproc->myname();
- if (defined $option->{ ctladdr } && $option->{ ctladdr }) {
+ if ($myname eq 'mead.pl') {
+ $curproc->_fml4_emulate_error_process();
+ }
+ elsif ($myname eq 'msend.pl') {
+ $curproc->_fml4_emulate_digest_process();
+ }
+ elsif (defined $option->{ ctladdr } && $option->{ ctladdr }) {
$curproc->_fml4_emulate_command_mail_process();
}
else {
@@ -171,6 +178,74 @@ sub _fml4_emulate_command_mail_process
}
+# Descriptions: emulate error (mead.pl in fact) process.
+# Arguments: OBJ($curproc)
+# Side Effects: none
+# Return Value: none
+sub _fml4_emulate_error_process
+{
+ my ($curproc) = @_;
+ my $config = $curproc->config();
+
+ # |/usr/local/fml/libexec/mead.pl \
+ # -E /usr/local/fml -S /var/spool/ml -D /var/spool/ml/elena
+
+ $curproc->log("start as error mail analyzer mode");
+
+ exit(0);
+
+ eval q{
+ use FML::Process::Error;
+ unshift(@ISA, "FML::Process::Error");
+ };
+ if ($@) {
+ $curproc->logerror($@);
+ croak("failed to initialize error_mail process.");
+ }
+
+ if ($config->yes('use_error_mail_analyzer_function')) {
+ $curproc->parse_incoming_message();
+ }
+ else {
+ $curproc->logerror("use of error_mail program prohibited");
+ exit(0);
+ }
+}
+
+
+# Descriptions: emulate digest (msend.pl in fact) process.
+# Arguments: OBJ($curproc)
+# Side Effects: none
+# Return Value: none
+sub _fml4_emulate_digest_process
+{
+ my ($curproc) = @_;
+ my $config = $curproc->config();
+
+ # /usr/local/fml/msend.pl /var/spool/ml/elena
+ $curproc->log("start as article digest mode");
+
+ exit(0);
+
+ eval q{
+ use FML::Process::Digest;
+ unshift(@ISA, "FML::Process::Digest");
+ };
+ if ($@) {
+ $curproc->logerror($@);
+ croak("failed to initialize digest_mail process.");
+ }
+
+ if ($config->yes('use_article_digest_function')) {
+ ;
+ }
+ else {
+ $curproc->logerror("use of article digest program prohibited");
+ exit(0);
+ }
+}
+
+
=head1 FALLBACK FOR ERROR RECOVORY
=head2 generate_config_cf_from_config_ph($fallback_args)