summaryrefslogtreecommitdiff
path: root/fml
diff options
context:
space:
mode:
authorfukachan <fukachan>2002-10-29 10:38:15 +0000
committerfukachan <fukachan>2002-10-29 10:38:15 +0000
commitfd4eed1dc39b6edc49e8667ce1cf089662c39554 (patch)
tree8c21ee8b330b299cbfa16eef1903b431b16f0756 /fml
parent82001f3d939afb46bbdb5a067ccde92f5ea34b2d (diff)
downloadfml8-fd4eed1dc39b6edc49e8667ce1cf089662c39554.tar.gz
fml8-fd4eed1dc39b6edc49e8667ce1cf089662c39554.tar.bz2
fml8-fd4eed1dc39b6edc49e8667ce1cf089662c39554.zip
handle both public and private directories in initialization phase.
create variables: $newml_command_init_public_dirs $newml_command_init_private_dirs changed newml codes to use them.
Diffstat (limited to 'fml')
-rw-r--r--fml/etc/default_config.cf.ja.in27
-rw-r--r--fml/etc/src/config.cf.ja/directory.cf27
-rw-r--r--fml/lib/FML/Command/Admin/newml.pm15
3 files changed, 41 insertions, 28 deletions
diff --git a/fml/etc/default_config.cf.ja.in b/fml/etc/default_config.cf.ja.in
index e7484af3..c3cd9caf 100644
--- a/fml/etc/default_config.cf.ja.in
+++ b/fml/etc/default_config.cf.ja.in
@@ -120,19 +120,20 @@ timezone = +0900
=head2 newml で初期化する
-newml_command_init_dirs = $domain_config_base_dir
- $domain_mail_config_dir
- $domain_postfix_config_dir
- $domain_qmail_config_dir
- $domain_exim_config_dir
- $domain_sendmail_config_dir
- $domain_procmail_config_dir
- $shared_db_dir
- $var_dir
- $db_dir
- $lock_dir
- $tmp_dir
- $spool_dir
+newml_command_init_public_dirs = $domain_config_base_dir
+ $domain_mail_config_dir
+ $domain_postfix_config_dir
+ $domain_qmail_config_dir
+ $domain_exim_config_dir
+ $domain_sendmail_config_dir
+ $domain_procmail_config_dir
+ $shared_db_dir
+
+newml_command_init_private_dirs = $tmp_dir
+ $spool_dir
+ $var_dir
+ $db_dir
+ $lock_dir
=head2 fml system directories
diff --git a/fml/etc/src/config.cf.ja/directory.cf b/fml/etc/src/config.cf.ja/directory.cf
index 680f6128..bede5087 100644
--- a/fml/etc/src/config.cf.ja/directory.cf
+++ b/fml/etc/src/config.cf.ja/directory.cf
@@ -3,19 +3,20 @@
=head2 newml で初期化する
-newml_command_init_dirs = $domain_config_base_dir
- $domain_mail_config_dir
- $domain_postfix_config_dir
- $domain_qmail_config_dir
- $domain_exim_config_dir
- $domain_sendmail_config_dir
- $domain_procmail_config_dir
- $shared_db_dir
- $var_dir
- $db_dir
- $lock_dir
- $tmp_dir
- $spool_dir
+newml_command_init_public_dirs = $domain_config_base_dir
+ $domain_mail_config_dir
+ $domain_postfix_config_dir
+ $domain_qmail_config_dir
+ $domain_exim_config_dir
+ $domain_sendmail_config_dir
+ $domain_procmail_config_dir
+ $shared_db_dir
+
+newml_command_init_private_dirs = $tmp_dir
+ $spool_dir
+ $var_dir
+ $db_dir
+ $lock_dir
=head2 fml system directories
diff --git a/fml/lib/FML/Command/Admin/newml.pm b/fml/lib/FML/Command/Admin/newml.pm
index f1ec6d2d..4ddc1d43 100644
--- a/fml/lib/FML/Command/Admin/newml.pm
+++ b/fml/lib/FML/Command/Admin/newml.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: newml.pm,v 1.52 2002/09/22 14:56:45 fukachan Exp $
+# $FML: newml.pm,v 1.53 2002/10/29 09:07:39 fukachan Exp $
#
package FML::Command::Admin::newml;
@@ -145,13 +145,21 @@ sub _init_ml_home_dir
}
# $ml_home_dir/etc/mail
- my $dirlist = $config->get_as_array_ref('newml_command_init_dirs');
+ my $dirlist = $config->get_as_array_ref('newml_command_init_public_dirs');
for my $_dir (@$dirlist) {
unless (-d $_dir) {
print STDERR "creating ", $_dir, "\n";
$curproc->mkdir( $_dir, "mode=public");
}
}
+
+ $dirlist = $config->get_as_array_ref('newml_command_init_private_dirs');
+ for my $_dir (@$dirlist) {
+ unless (-d $_dir) {
+ print STDERR "creating ", $_dir, "\n";
+ $curproc->mkdir( $_dir, "mode=private");
+ }
+ }
}
@@ -212,6 +220,7 @@ sub _update_aliases
my $ml_name = $config->{ ml_name };
my $ml_domain = $config->{ ml_domain };
my $alias = $config->{ mail_aliases_file };
+ my $mask = umask( 022 );
# append
if ($self->_is_mta_alias_maps_has_ml_entry($curproc, $params, $ml_name)) {
@@ -239,6 +248,8 @@ sub _update_aliases
};
croak($@) if $@;
}
+
+ umask( $mask );
}