fmlインストール
■ソースの取得fml project top pageより。
■fmlアカウントと必要なディレクトリの作成
# useradd fml
# mkdir /usr/local/fml
# mkdir /var/spool/ml
# chown fml:fml /usr/local/fml
# chown fml:fml /var/spool/ml
# chmod 755 /usr/local/fml
# chmod 755 /var/spool/ml
■インストール
# su - fml
$ cd fml-4.0-stable-200XXXXX
$ perl makefml install
unshift(@INC, /tmp/fml-4.0-stable-20040215/src) ---NOT USING configuration file (for the first time) THIS HOST (kvps-xx-xx-xx-xx.secure.ne.jp) IS [x86_64-unknown-linux-gnu] ---Please Define Your Fml System Configurations Personal Use or ML-Admin-Group-Shared or fmlserv you use? Personal, Group, Fmlserv (personal/group/fmlserv) [personal] DOMAIN NAME [secure.ne.jp] example.com FQDN [ml.example.com] ml.example.com EXEC FILES DIRECTORY [/usr/local/fml] TOP LEVEL ML DIRECTORY [/var/spool/ml] Language (Japanese or English) [Japanese] TimeZone (TZ: e.g. +0900, -0300) [+0900] --- summary --- DOMAIN: example.com FQDN: ml.example.com EXEC_DIR: /usr/local/fml ML_DIR: /var/spool/ml Language: Japanese TimeZone: +0900 The current configuration is saved in /usr/local/fml/.fml/system mkdir /var/spool/ml ---Install the Fml system to /usr/local/fml. (y/n) [n] y Installing fml system to /usr/local/fml Fixing Path: src ............................................................................ libexec ..... sbin . cf . bin .................... www/cgi-bin ......... www/lib ... sys ......... module .. Done. Generate nroff manuals: Installing bin ... Installing sbin . Installing libexec . Installing cf . Installing etc .... Installing sys .. Installing src ....... Installing drafts .. Installing messages ..... Installing www ...... Installing module ................................... Installing databases ... Installing doc ..................................................................................... Done. Setup CGI examples ........ CGI configuration is saved in /usr/local/fml/.fml/cgi.conf -- Enjoy Internetworking!
■Postfixの設定変更
# vi /etc/postfix/main.cf
# 以下を追加 allow_mail_to_commands = alias,forward,include
# /etc/rc.d/init.d/postfix restart
ドメイン追加時の設定
/var/spool/ml内をドメインごとに分け、設定ファイルsystemをコピーします。# su - fml
$ mkdir /var/spool/ml/example.com
$ cp /usr/local/fml/.fml/system /var/spool/ml/example.com/.
$ vi /var/spool/ml/example.com/system
$DOMAIN = 'example.com'; $ML_DIR = '/var/spool/ml/example.com'; $FQDN = 'ms.example.com';
メーリングリストを追加する
makefmlを実行するときには、-fオプションで設定ファイルを指定します。# su - fml
$ /usr/local/fml/makefml -f /var/spool/ml/example.com/system newml test-ml
# vi /etc/aliases
test-ml+example.com: :include:/var/spool/ml/example.com/test-ml/include test-ml-ctl+example.com: :include:/var/spool/ml/example.com/test-ml/include-ctl test-ml-request+example.com: test-ml-admin+example.com test-ml-admin: fml owner-test-ml+example.com: fml owner-test-ml-example.com: fml
# newaliases
# vi /etc/postfix/virtual
test-ml@example.com test-ml+example.com test-ml-ctl@example.com test-ml-ctl+example.com test-ml-admin@example.com test-ml-admin+example.com
# postmap /etc/postfix/virtual
TIPS
■管理者・パスワードの設定$ /usr/local/fml/makefml -f /var/spool/ml/example.com/system addadmin test-ml hoge@example.com
$ /usr/local/fml/makefml -f /var/spool/ml/example.com/system passwd test-ml hoge@example.com [password]
■メンバーの追加
$ /usr/local/fml/makefml -f /var/spool/ml/example.com/system add test-ml hoge@example.com
■メンバーの削除
$ /usr/local/fml/makefml -f /var/spool/ml/example.com/system bye test-ml hoge@example.com
■メーリングリストの削除
$ /usr/local/fml/makefml -f /var/spool/ml/example.com/system destructml test-ml
■スプールにメールを残さない設定
$ vi /var/spool/ml/example.com/test-ml/config.ph
$NOT_USE_SPOOL = "1";
■Reply-ToをFromにする
$ vi /var/spool/ml/example.com/test-ml/config.ph
$START_HOOK = q% &DEFINE_FIELD_FORCED("reply_to", "$From_address"); %;
■メール番号の表示形式と桁数設定
$ /usr/local/fml/makefml -f /var/spool/ml/example.com/system config test-ml
5 HEADER CONFIGRATION 1 SUBJECT_TAG_TYPE 3 Subject: [Elena:00100] (hml 1.6 compat) などを選択 0 END 2 SUBJECT_TAG_FIGURE 4 4 e.g [elena 0001] などを選択 0連打