diff options
| -rw-r--r-- | fml/lib/FML/Process/QMail.pm | 96 | ||||
| -rwxr-xr-x | fml/libexec/process_switch | 3 |
2 files changed, 99 insertions, 0 deletions
diff --git a/fml/lib/FML/Process/QMail.pm b/fml/lib/FML/Process/QMail.pm new file mode 100644 index 00000000..252e9ee5 --- /dev/null +++ b/fml/lib/FML/Process/QMail.pm @@ -0,0 +1,96 @@ +#-*- perl -*- +# +# Copyright (C) 2001 Ken'ichi Fukamachi +# All rights reserved. This program is free software; you can +# redistribute it and/or modify it under the same terms as Perl itself. +# +# $Id$ +# $FML$ +# + +package FML::__HERE_IS_YOUR_MODULE_NAME__; +use strict; +use vars qw(@ISA @EXPORT @EXPORT_OK $AUTOLOAD); +use Carp; + +require Exporter; +@ISA = qw(Exporter); + + +sub new +{ + my ($self) = @_; + my ($type) = ref($self) || $self; + my $me = {}; + return bless $me, $type; +} + + +=head1 NAME + +NOT YET MERGED + +FML::__HERE_IS_YOUR_MODULE_NAME__.pm - what is this + +=head1 SYNOPSIS + +=head1 DESCRIPTION + +=head1 CLASSES + +=head1 METHODS + +=item C<new()> + +... what is this ... + +=head1 AUTHOR + +__YOUR_NAME__ + +=head1 COPYRIGHT + +Copyright (C) 2001 __YOUR_NAME__ + +All rights reserved. This program is free software; you can +redistribute it and/or modify it under the same terms as Perl itself. + +=head1 HISTORY + +FML::__HERE_IS_YOUR_MODULE_NAME__.pm appeared in fml5. + +=cut + + +sub DotQmailExt +{ + local(*e) = @_; + local($ext, $key, $keyctl); + + # get ? + ($ext = $ENV{'EXT'}) || return $NULL; + + &Log("dot-qmail-ext[0]: $ext") if $debug_qmail; + + $key = (split(/\@/, $MAIL_LIST))[0]; + $keyctl = (split(/\@/, $CONTROL_ADDRESS))[0]; + + if ($ext =~ /^($key)$/i) { + return $NULL; + } + elsif ($keyctl&& ($ext =~ /^($keyctl)$/i)) { + return $NULL; + } + + &Log("dot-qmail-ext: $ext") if $debug_qmail; + $ext =~ s/^$key//i; + $ext =~ s/\-\-/\@/i; # since @ cannot be used + $ext =~ s/\-/ /g; + $ext =~ s/\@/-/g; + &Log("\$ext -> $ext"); + + # XXX: "# command" is internal represention + $e{'Body'} = sprintf("# %s", $ext); +} + +1; diff --git a/fml/libexec/process_switch b/fml/libexec/process_switch index b7a7b413..ef48015f 100755 --- a/fml/libexec/process_switch +++ b/fml/libexec/process_switch @@ -69,6 +69,9 @@ sub _module_we_use elsif ($name eq 'mead') { $pkg = 'FML::Process::MailErrorAnalyzer'; } + elsif ($name eq 'qmail-ext') { + $pkg = 'FML::Process::QMail'; + } else { return ''; } |
