Unix 上での &fml8; のインストール
インストールの準備
configure を実行する(後述)前に、
ユーザ fml とグループ fml を作ってください。
例
% su root
# groupadd fml
# useradd -g fml -m fml
configure を実行する
configure (by GNU autoconf) および make を実行して下さい。
configure の前に、
ユーザ fml とグループ fml を作っておく必要がありますので注意して下さい。
ここまでの作業をまとめて書くと、次のようになります。
% su root
# groupadd fml
# useradd -g fml -m fml
# ./configure
# make install
configure が適宜 script 群や .cf 群の変数を書き換えます。
make install を実行する際には、
(configure が生成した) etc/fml/install.cf を元に、
(configure が生成した) install.pl (perl script) が、
実際のインストール作業を行ないます。
ユーザ名や基本的なディレクトリ構成などは configure の引数で変更して下さい。
変更できる変数は以下のものです。configure --help で表示されます。
fml では各ディレクトリに、さらに /fml といった suffix をつけます。
変更できるのは、その直前の prefix 部分までです。
変数 configure のデフォルト値 fml の利用するディレクトリ例
--------------------------------------------------------
prefix /usr/local /usr/local
exec_prefix /usr/local /usr/local
bindir ${exec_prefix}/bin /usr/local/bin
sbindir ${exec_prefix}/sbin /usr/local/sbin
libexecdir ${exec_prefix}/libexec /usr/local/libexec/fml
datadir ${prefix}/share /usr/local/share/fml
sysconfdir ${prefix}/etc /usr/local/etc/fml
sharedstatedir ${prefix}/com
localstatedir ${prefix}/var
libdir ${exec_prefix}/lib /usr/local/lib/fml
includedir ${prefix}/include
oldincludedir /usr/include
infodir ${prefix}/info
mandir ${prefix}/man
そして、これらの変数も configure の引数で上書きすることができます。
fmlconfdir $sysconfidr/fml /usr/local/etc/fml
mlspooldir /var/spool/ml /var/spool/ml
fml_owner fml fml
fml_group fml fml
default_domain 推測する 推測する
これらのオプションは
configure --help
で表示されます。
例
./configure --help
`configure' configures this package to adapt to many kinds of systems.
... snip ...
Installation directories:
--prefix=PREFIX install architecture-independent files in PREFIX
[/usr/local]
--exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
[PREFIX]
... snip ...
Fine tuning of the installation directories:
--bindir=DIR user executables [EPREFIX/bin]
--sbindir=DIR system admin executables [EPREFIX/sbin]
--libexecdir=DIR program executables [EPREFIX/libexec]
--sysconfdir=DIR read-only single-machine data [PREFIX/etc]
--sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
--localstatedir=DIR modifiable single-machine data [PREFIX/var]
--libdir=DIR object code libraries [EPREFIX/lib]
--includedir=DIR C header files [PREFIX/include]
--oldincludedir=DIR C header files for non-gcc [/usr/include]
--datarootdir=DIR read-only arch.-independent data root [PREFIX/share]
--datadir=DIR read-only architecture-independent data [DATAROOTDIR]
--infodir=DIR info documentation [DATAROOTDIR/info]
--localedir=DIR locale-dependent data [DATAROOTDIR/locale]
--mandir=DIR man documentation [DATAROOTDIR/man]
--docdir=DIR documentation root [DATAROOTDIR/doc/PACKAGE]
--htmldir=DIR html documentation [DOCDIR]
--dvidir=DIR dvi documentation [DOCDIR]
--pdfdir=DIR pdf documentation [DOCDIR]
--psdir=DIR ps documentation [DOCDIR]
Optional Packages:
--with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
--without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
--without-warning run perl as perl without -w
--with-fmlconfdir=DIR use DIR instead of SYSCONFDIR/fml
--with-mlspooldir=DIR use DIR instead of /var/spool/ml
--with-fml-owner=USER use USER instead of fml
--with-fml-group=GROUP use GROUP instead of fml
--with-default-domain=DOMAIN use DOMAIN as the default ML domain
--with-default-hostname=HOSTNAME use HOSTNAME as the default hostname
--without-mime-component-filter disable mime_component_filter
--with-group-writable-fmlconfdir=DIR instead of \$fmlconfdir/config.gw
--with-ml-home-prefix-map=PATH use PATH as primary_ml_home_prefix_map
--with-group-writable-ml-home-prefix-map
例: configure の実行
例: NetBSD では /usr/pkg 以下へインストール。
% ./configure --prefix=/usr/pkg
例: FreeBSD の場合、/usr/local 以下へインストール(デフォルトのまま)。
% ./configure
例: main.cf の置き場所として
/etc/fml を使うなら、こうする(Debian であれば、こうするべき?)。
# ./configure --with-fmlconfdir=/etc/fml
checking for perl... perl
checking for perl... /usr/bin/perl
"checking whether optional useful commands are available or not"
checking for cc... /usr/bin/cc
checking for install... /usr/bin/install
checking for cksum... /usr/bin/cksum
checking for sum... /usr/bin/sum
checking for md5... /usr/bin/md5
checking for digest... /usr/bin/digest
checking for ls... /bin/ls
checking for tar... /bin/tar
checking for gzip... /usr/bin/gzip
checking for zcat... /usr/bin/zcat
checking for gzcat... /usr/bin/gzcat
checking for gunzip... /usr/bin/gunzip
checking for lha... no
checking for ish... no
checking for bzip2... /usr/bin/bzip2
checking for bunzip2... /usr/bin/bunzip2
checking for uuencode... /usr/bin/uuencode
checking for compress... /usr/bin/compress
checking for sendmail... /usr/sbin/sendmail
checking for makemap... no
checking for newaliases... /usr/bin/newaliases
checking for postfix... /usr/sbin/postfix
checking for postalias... /usr/sbin/postalias
checking for postconf... /usr/sbin/postconf
checking for postmap... /usr/sbin/postmap
checking for nkf... /usr/bin/nkf
checking for kakasi... no
checking for namazu... no
checking for pgp... /usr/bin/pgp
checking for pgp5... /usr/bin/pgp5
checking for pgpe... /usr/bin/pgpe
checking for pgpk... /usr/bin/pgpk
checking for pgps... /usr/bin/pgps
checking for pgpv... /usr/bin/pgpv
checking for gpg... /usr/bin/gpg
checking for gpgv... /usr/bin/gpgv
checking for gpgsplit... /usr/bin/gpgsplit
checking for less... /usr/bin/less
checking for more... /usr/bin/more
checking for w3m... /usr/bin/w3m
checking for spamassassin... no
checking for spamd... no
checking for spamc... no
checking for bogofilter... no
checking for clamscan... /usr/bin/clamscan
checking for vi... /usr/bin/vi
checking for ng... /usr/bin/ng
checking for mule... /usr/bin/mule
checking for emacs... no
checking for xemacs... no
configure: creating ./config.status
config.status: creating install.pl
config.status: creating config.sh
config.status: creating fml/etc/install.cf
config.status: creating fml/etc/main.cf
config.status: creating fml/etc/default_config.cf.ja
config.status: creating fml/etc/default_config.cf.en
config.status: creating fml/etc/site_default_config.cf
config.status: creating fml/libexec/loader
config.status: creating fml/bin/fmladdr
config.status: creating fml/bin/fmlalias
config.status: creating fml/bin/fmlconf
config.status: creating fml/bin/fmldoc
config.status: creating fml/bin/fmlhtmlify
config.status: creating fml/bin/fmlsch
config.status: creating fml/bin/fmlproj
config.status: creating fml/bin/fmlpgp
config.status: creating fml/bin/fmlpgp5
config.status: creating fml/bin/fmlpgpe
config.status: creating fml/bin/fmlpgpk
config.status: creating fml/bin/fmlpgps
config.status: creating fml/bin/fmlpgpv
config.status: creating fml/bin/fmlgpg
config.status: creating fml/bin/fmlgpgv
config.status: creating fml/bin/fml
config.status: creating fml/bin/makefml
enabled: perl -w
fml has been configured with the following options:
prefix: /usr/local
exec_prefix: ${prefix}
bindir: ${exec_prefix}/bin
sbindir: ${exec_prefix}/sbin
lib_dir: ${exec_prefix}/lib
libexec_dir: ${exec_prefix}/libexec
mandir: ${datarootdir}/man
datarootdir: ${prefix}/share
datadir: ${datarootdir}
fml process owner: fml
fml process group: fml
fmlconfdir: /etc/fml
ml_home_prefix_map: /etc/fml/ml_home_prefix
mlspooldir: /var/spool/ml
default domain: home.fml.org
default hostname: elena.home.fml.org
mime based filter: yes
Now you must run "make install" as user "root".
補足: いや、こういうタイプの設定をする OS の場合
/usr/local ではなく /usr 直下に入れるのでしょうか?
その場合は、次のように指定してください。
# ./configure --prefix=/usr --with-fmlconfdir=/etc/fml
補足: 各ディレクトリの役割
それぞれのディレクトリの役割は次の通りです。
なお、デフォルトでは /usr/local 以下にインストールされます。
ディレクトリの構造
ディレクトリ
説明
/usr/local/etc/fml
基本設定ファイルを置く場所。
&fml4; の
/usr/local/fml/.fml や default_config.ph を置く場所に相当します。
/usr/local/etc/fml/main.cf では、
使用する &fml8; のバージョンやライブラリの場所(ディレクトリ)
などが指定可能です
(【重要】
バージョンアップして問題があった場合には、
バージョン変数を編集することで、
すぐに古いバージョンへの切り戻しが可能です)。
/usr/local/libexec/fml
実行ファイル ( &fml4; の /usr/local/fml 相当)
/usr/local/lib/fml
perl モジュール群を置く場所 ( &fml4; の /usr/local/fml 相当)
/usr/local/share/fml
メッセージなどのテンプレートを置く( &fml4; の
/usr/local/fml/messages/ 相当)。
この下に言語依存のサブディレクトリが作られます。
/var/spool/ml
デフォルトドメインのML群のトップディレクトリ。
&fml4; と同じ目的で使われます。
注意: /var/spool/ml のオーナは configure で指定した
owner 変数(デフォルトはユーザ fml)に設定されます。
なお、ドメインごとに別の prefix を用意して下さい。
たとえば fml.org 用は /var/spool/ml で、
nuinui.net 用には /var/spool/nuinui.net などのように。
このドメインとディレクトリの対応関係は
ml_home_prefix_maps (
バーチャルドメインの節
を参照
)に記述します(
makefml/fml の newdomain コマンドで設定されます)。
バーチャルドメインの詳細は
を参照して下さい。
fml のインストール: make install
configure を実行後、ユーザ root になり、make install を実行して下さい。
% su root
# make install
configure はユーザ root で実行する必要はありませんが、
make install は必ずユーザ root で実行して下さい。
% su root
# ./configure
# make install
間違えないように、はじめから
configure も root で実行するほうがいいのかもしれません。
main.cf を編集する
必要なら /usr/local/etc/fml/main.cf を編集して下さい。
configure が、あなたの環境に合わせて main.cf を書換えしているはずなので
configure のオプション指定が正しければ、編集の必要は、まずないはずです。
mani.cf は大枠の最も基本的な設定です。
より細かな設定、
たとえばサイト共通の fml の動作指定などは site_default_config.cf の役割です。
各ML固有の設定は、
各MLのホームディレクトリにある config.cf ファイルを編集して下さい。
逆にいえば、特定のメーリングリストで優先される順は次のようになります。
$ml_home_dir/config.cf
site_default_config.cf
main.cf
§.main.cf;
site_default_config.cf を編集する (オプション)
/usr/local/etc/fml/site_default_config.cf は、
そのホスト共通の設定ファイル
これは &fml4; の site_force.ph に相当するものです。
です。必要に応じて編集してください。
もちろん、
この設定より、
各MLの設定(例: /var/spool/ml/elena/config.cf)が優先されます。
デフォルトでは &fml4; と合わせるために、
および見本として:)
subject のタグをつけない設定とフィルタ関連の設定だけが入っています。
# $FML: fml_on_unix.sgml,v 1.13 2008/08/18 13:21:42 fukachan Exp $
#
# site default_config.cf EXAMPLE
#
# fml-devel loads .cf files in this order for elena ML.
# 1. ${prefix}/etc/fml/defaults/$VERSION/default_config.cf
# 2. ${prefix}/etc/fml/site_default_config.cf
# 3. ${prefix}/etc/fml/domains/$DOMAIN/default_config.cf
# 4. /tmp/dir/elena/config.cf
#
# This file overrides the default "default_config.cf" configurations
# in the following way.
#
# We want to disable the subject tag in articles by default.
article_header_rewrite_rules -= rewrite_article_subject_tag
# mime based comonent filter
use_mime_component_filter = yes
# [site specific options]
# Example:
# key = value
# key += value
# key -= value
=cut
#
# you can write hooks here after.
# Example:
# $distribute_run_start_hook = q{ ... };
フィルタをどうするか?
デフォルトではすべてのフィルタが有効です。
&fml4; の推奨設定に相当しています。
「フィルタのかけすぎ」という見解もあるかもしれませんが、
あえてデフォルトは厳しい設定にしてあります。
フィルタが、かかっているのはよいのですが、
mime component filter のデフォルトをどうすれば良いのかは基準が曖昧です。
デフォルトでは、
MLへの投稿が許されるのは text/plain のメールのみとしてあります。
これで text/html で送ってくる寝ぼけたメールも、
添付ファイルで送られてくるウィルスもデフォルトでは通りません。
なお、(すべてのMLで)
mime component filter を無効にするには
site_default_config.cf で
use_mime_component_filter = no
としてください。
mime component filter を有効にしたいがルールをカスタマイズしたいという場合、
site_default_config.cf では
use_mime_component_filter = yes
のままにして、
/usr/local/etc/fml/mime_component_filter
をカスタマイズしてください。
ただ、仕事のメールで添付ファイルなしは厳しいようなので、
社内向けメールなど仕事用のMLサーバとして使うなら、
インストール後、すぐに
[/usr/local/etc/fml/site_default_config.cf]
use_mime_component_filter = no
に変更しておくとよいでしょう。
バーチャルドメインの場合
最初に(つまり、そのドメインでMLを作る前に)、
newdomain コマンドで
ml_home_prefix_maps に利用したいドメインと
ml_home_prefix の対応関係を定義してください。
[/var/spool/ml/etc/fml/ml_home_prefix]
nuinui.net /var/spool/nuinui.net
newdomain コマンドについては
「MLの作成」
の節で後述します。
ml_home_prefix_maps のパスを変更したい場合は
/usr/local/etc/fml/main.cf を編集して下さい
(もっとも、たいてい、編集は不要です)。
なお、
site_default_config.cf は、
ドメインに関わらず適用されることに注意してください。
つまり、この設定はバーチャルドメインにも適用されます。
§.install.postfix;
§.install.qmail;
レシピ’s
§.install.recipes;