summaryrefslogtreecommitdiff
path: root/fml/lib
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-06-01 14:53:36 +0000
committerfukachan <fukachan>2002-06-01 14:53:36 +0000
commitafbec3876ce85d80b661390d62b6a65d281a8981 (patch)
tree81e8168def35a3944feb56220cdd63c62b6b5870 /fml/lib
parentab0ea895bb4394095b0750895695dd44c79bb660 (diff)
downloadfml8-afbec3876ce85d80b661390d62b6a65d281a8981.tar.gz
fml8-afbec3876ce85d80b661390d62b6a65d281a8981.tar.bz2
fml8-afbec3876ce85d80b661390d62b6a65d281a8981.zip
major variable naming overhaul
relocating variable definitions in etc/src/ aling rule: e.g. use_XXX XXX_rules XXX_dir XXX_cache_dir rename: $recipient_limit -> $smtp_recipient_limit $incoming_mail_dir -> $incoming_mail_cache_dir $outgoing_mail_dir -> $outgoing_mail_cache_dir $qmail_control_virtualdomains_file -> $qmail_virtualdomains_file s/header_filter/article_header_filter/ s/header_rewrite/article_header_rewrite/ s/body_filter/article_body_filter/ s/subject_tag/article_subject_tag/ verify_XXX_* -> check_XXX newly defined: $use_digest_header_rewrite removed: $smtp_log_dir $smtp_log_file
Diffstat (limited to 'fml/lib')
-rw-r--r--fml/lib/FML/Filter.pm14
-rw-r--r--fml/lib/FML/Filter/HeaderCheck.pm6
-rw-r--r--fml/lib/FML/Header.pm20
-rw-r--r--fml/lib/FML/Header/Subject.pm10
-rw-r--r--fml/lib/FML/MTAControl/Qmail.pm4
-rw-r--r--fml/lib/FML/Process/Distribute.pm22
-rw-r--r--fml/lib/FML/Process/Error.pm4
-rw-r--r--fml/lib/FML/Process/Kernel.pm6
8 files changed, 34 insertions, 52 deletions
diff --git a/fml/lib/FML/Filter.pm b/fml/lib/FML/Filter.pm
index 3d546af3..707b05b0 100644
--- a/fml/lib/FML/Filter.pm
+++ b/fml/lib/FML/Filter.pm
@@ -4,7 +4,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: Filter.pm,v 1.7 2002/04/08 10:17:32 tmu Exp $
+# $FML: Filter.pm,v 1.8 2002/04/10 04:30:00 fukachan Exp $
#
package FML::Filter;
@@ -70,13 +70,13 @@ sub check
my $config = $curproc->{ 'config' };
if (defined $message) {
- if ($config->yes( 'use_header_filter' )) {
+ if ($config->yes( 'use_article_header_filter' )) {
use FML::Filter::HeaderCheck;
my $obj = new FML::Filter::HeaderCheck;
# overwrite filter rules based on FML::Config
- if (defined $config->{ header_filter_rules }) {
- my (@rules) = split(/\s+/, $config->{ header_filter_rules });
+ if (defined $config->{ article_header_filter_rules }) {
+ my (@rules) = split(/\s+/, $config->{ article_header_filter_rules });
$obj->rules( \@rules );
}
@@ -91,13 +91,13 @@ sub check
}
}
- if ($config->yes( 'use_body_filter' )) {
+ if ($config->yes( 'use_article_body_filter' )) {
use FML::Filter::BodyCheck;
my $obj = new FML::Filter::BodyCheck;
# overwrite filter rules based on FML::Config
- if (defined $config->{ body_filter_rules }) {
- my (@rules) = split(/\s+/, $config->{ body_filter_rules });
+ if (defined $config->{ article_body_filter_rules }) {
+ my (@rules) = split(/\s+/, $config->{ article_body_filter_rules });
$obj->rules( \@rules );
}
diff --git a/fml/lib/FML/Filter/HeaderCheck.pm b/fml/lib/FML/Filter/HeaderCheck.pm
index 26863211..217e453e 100644
--- a/fml/lib/FML/Filter/HeaderCheck.pm
+++ b/fml/lib/FML/Filter/HeaderCheck.pm
@@ -4,7 +4,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: HeaderCheck.pm,v 1.14 2002/04/10 03:20:53 fukachan Exp $
+# $FML: HeaderCheck.pm,v 1.15 2002/04/10 09:57:23 fukachan Exp $
#
package FML::Filter::HeaderCheck;
@@ -37,7 +37,7 @@ usual constructor.
my $debug = 0;
-my (@default_rules) = qw(is_valid_message_id);
+my (@default_rules) = qw(check_message_id);
# Descriptions: constructor.
@@ -127,7 +127,7 @@ sub header_check
# Arguments: OBJ($self) OBJ($msg) HASH_REF($args)
# Side Effects: croak()
# Return Value: none
-sub is_valid_message_id
+sub check_message_id
{
my ($self, $msg, $args) = @_;
my $mid = $msg->get('message-id');
diff --git a/fml/lib/FML/Header.pm b/fml/lib/FML/Header.pm
index d944e624..0fdf746a 100644
--- a/fml/lib/FML/Header.pm
+++ b/fml/lib/FML/Header.pm
@@ -4,7 +4,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: Header.pm,v 1.42 2002/05/31 14:09:21 tmu Exp $
+# $FML: Header.pm,v 1.43 2002/06/01 02:21:56 fukachan Exp $
#
package FML::Header;
@@ -350,7 +350,7 @@ sub add_x_sequence
}
-=head2 C<rewrite_subject_tag($config, $args)>
+=head2 C<rewrite_article_subject_tag($config, $args)>
add subject tag like [elena:00010].
The actual function definitions exist in C<FML::Header::Subject>.
@@ -371,14 +371,14 @@ and now fml process time add to C<Date:>.
# Arguments: OBJ($header) OBJ($config) HASH_REF($args)
# Side Effects: update $header
# Return Value: none
-sub rewrite_subject_tag
+sub rewrite_article_subject_tag
{
my ($header, $config, $args) = @_;
my $pkg = "FML::Header::Subject";
eval qq{ require $pkg; $pkg->import();};
unless ($@) {
- $pkg->rewrite_subject_tag($header, $config, $args);
+ $pkg->rewrite_article_subject_tag($header, $config, $args);
}
else {
Log("Error: cannot load $pkg");
@@ -507,18 +507,18 @@ sub extract_message_id_references
=head1 FILTERING FUNCTIONS
-=head2 C<verify_message_id_uniqueness($config, $args)>
+=head2 C<check_message_id($config, $args)>
check whether message-id is unique or not. If the message-id is found
in the past message-id cache, the injected message must causes a mail
loop.
-=head2 C<verify_x_ml_info_uniqueness($config, $args)>
+=head2 C<check_x_ml_info($config, $args)>
The injected message loops if x-ml-info: has our own
C<address_for_post> address.
-=head2 C<verify_list_post_uniqueness($config, $args)>
+=head2 C<check_list_post($config, $args)>
The injected message loops if list-post: has our own
C<address_for_post> address.
@@ -531,7 +531,7 @@ C<address_for_post> address.
# Arguments: OBJ($header) OBJ($config) HASH_REF($args)
# Side Effects: update cache
# Return Value: STR or 0
-sub verify_message_id_uniqueness
+sub check_message_id
{
my ($header, $config, $args) = @_;
my $dir = $config->{ 'message_id_cache_dir' },
@@ -566,7 +566,7 @@ sub verify_message_id_uniqueness
# Arguments: OBJ($header) OBJ($config) HASH_REF($args)
# Side Effects: none
# Return Value: 1 or 0
-sub verify_x_ml_info_uniqueness
+sub check_x_ml_info
{
my ($header, $config, $args) = @_;
my $buf = $header->get('x-ml-info') || undef;
@@ -585,7 +585,7 @@ sub verify_x_ml_info_uniqueness
# Arguments: OBJ($header) OBJ($config) HASH_REF($args)
# Side Effects: none
# Return Value: 1 or 0
-sub verify_list_post_uniqueness
+sub check_list_post
{
my ($header, $config, $args) = @_;
my $buf = $header->get('list-post') || undef;
diff --git a/fml/lib/FML/Header/Subject.pm b/fml/lib/FML/Header/Subject.pm
index f4c5eaba..4e1eea6b 100644
--- a/fml/lib/FML/Header/Subject.pm
+++ b/fml/lib/FML/Header/Subject.pm
@@ -4,7 +4,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: Subject.pm,v 1.24 2002/04/24 14:28:15 tmu Exp $
+# $FML: Subject.pm,v 1.25 2002/05/23 11:03:29 tmu Exp $
#
package FML::Header::Subject;
@@ -20,7 +20,7 @@ FML::Header::Subject - manipule the mail header subject
=head1 SYNOPSIS
use FML::Header::Subject;
- FML::Header::Subject->rewrite_subject_tag($header, $config, $args);
+ FML::Header::Subject->rewrite_article_subject_tag($header, $config, $args);
=head1 DESCRIPTION
@@ -48,7 +48,7 @@ sub new
}
-=head2 C<rewrite_subject_tag($header, $config, $args)>
+=head2 C<rewrite_article_subject_tag($header, $config, $args)>
add or rewrite the subject tag for C<$header>.
This mothod cuts off Re: (reply identifier) in subject: and
@@ -61,13 +61,13 @@ replace the subject with the newer content.
# Arguments: OBJ($self) OBJ($header) OBJ($config) HASH_REF($args)
# Side Effects: the header subject is rewritten
# Return Value: none
-sub rewrite_subject_tag
+sub rewrite_article_subject_tag
{
my ($self, $header, $config, $args) = @_;
# for example, ml_name = elena
my $ml_name = $config->{ ml_name };
- my $tag = $config->{ subject_tag };
+ my $tag = $config->{ article_subject_tag };
my $subject = $header->get('subject');
# decode mime
diff --git a/fml/lib/FML/MTAControl/Qmail.pm b/fml/lib/FML/MTAControl/Qmail.pm
index 23cdc713..e5225925 100644
--- a/fml/lib/FML/MTAControl/Qmail.pm
+++ b/fml/lib/FML/MTAControl/Qmail.pm
@@ -4,7 +4,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: Qmail.pm,v 1.4 2002/06/01 05:02:32 fukachan Exp $
+# $FML: Qmail.pm,v 1.5 2002/06/01 05:09:24 fukachan Exp $
#
package FML::MTAControl::Qmail;
@@ -110,7 +110,7 @@ sub qmail_setup
$self->_install($src, $dst, $params);
}
- my $virtual_domain_conf = $config->{ qmail_control_virtualdomains_file };
+ my $virtual_domain_conf = $config->{ qmail_virtualdomains_file };
unless (-f $virtual_domain_conf) {
print STDERR " XXX We assume $ml_domain:fml-$ml_domain\n";
print STDERR " XXX in $virtual_domain_conf\n";
diff --git a/fml/lib/FML/Process/Distribute.pm b/fml/lib/FML/Process/Distribute.pm
index cb0518fd..9b2d2540 100644
--- a/fml/lib/FML/Process/Distribute.pm
+++ b/fml/lib/FML/Process/Distribute.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2000,2001,2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Distribute.pm,v 1.78 2002/05/27 11:20:01 fukachan Exp $
+# $FML: Distribute.pm,v 1.79 2002/06/01 05:09:25 fukachan Exp $
#
package FML::Process::Distribute;
@@ -397,24 +397,6 @@ sub _deliver_article
$handle = $wh;
}
- if (0) { # debug
- my $dir = $config->{ smtp_log_dir };
- use File::Utils qw(mkdirhier);
- mkdirhier($dir) unless -d $dir;
-
- my $f = $config->{ smtp_log_file };
- unlink $f if -f $f;
- if ($f) {
- use FileHandle;
- my $fh = new FileHandle "> $f";
- if (defined $fh) {
- $fh->autoflush(1);
- $sfp = sub { print $fh @_;};
- }
- }
- }
-
-
# delay loading of module
my $service = {};
eval q{
@@ -435,7 +417,7 @@ sub _deliver_article
'smtp_sender' => $config->{'smtp_sender'},
'recipient_maps' => $config->{recipient_maps},
- 'recipient_limit' => $config->{recipient_limit},
+ 'recipient_limit' => $config->{smtp_recipient_limit},
'message' => $message,
});
diff --git a/fml/lib/FML/Process/Error.pm b/fml/lib/FML/Process/Error.pm
index f839d529..2978056a 100644
--- a/fml/lib/FML/Process/Error.pm
+++ b/fml/lib/FML/Process/Error.pm
@@ -3,7 +3,7 @@
# Copyright (C) 2002 Ken'ichi Fukamachi
# All rights reserved.
#
-# $FML: Error.pm,v 1.6 2002/06/01 05:02:33 fukachan Exp $
+# $FML: Error.pm,v 1.7 2002/06/01 05:09:26 fukachan Exp $
#
package FML::Process::Error;
@@ -239,7 +239,7 @@ sub __open_cache
{
my ($curproc) = @_;
my $config = $curproc->{ config };
- my $dir = $config->{ error_cache_dir };
+ my $dir = $config->{ error_analyzer_cache_dir };
my $mode = 'temporal';
my $days = 14;
diff --git a/fml/lib/FML/Process/Kernel.pm b/fml/lib/FML/Process/Kernel.pm
index d70a8775..c3d1a705 100644
--- a/fml/lib/FML/Process/Kernel.pm
+++ b/fml/lib/FML/Process/Kernel.pm
@@ -4,7 +4,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: Kernel.pm,v 1.104 2002/06/01 04:59:09 fukachan Exp $
+# $FML: Kernel.pm,v 1.105 2002/06/01 05:09:26 fukachan Exp $
#
package FML::Process::Kernel;
@@ -465,7 +465,7 @@ sub parse_incoming_message
# save input message for further investigation
my $config = $curproc->{ config };
if ($config->yes('use_incoming_mail_cache')) {
- my $dir = $config->{ incoming_mail_dir };
+ my $dir = $config->{ incoming_mail_cache_dir };
my $modulus = $config->{ incoming_mail_cache_size };
my $obj = new File::CacheDir {
directory => $dir,
@@ -1301,7 +1301,7 @@ sub open_outgoing_message_channel
# save message for further investigation
if ($config->yes('use_outgoing_mail_cache')) {
- my $dir = $config->{ outgoing_mail_dir };
+ my $dir = $config->{ outgoing_mail_cache_dir };
my $modulus = $config->{ outgoing_mail_cache_size };
my $obj = new File::CacheDir {
directory => $dir,