- 1. 概要
- 2. 設定
1. 概要
「qmHandle」の設定は、あまり変化がないので、本章にまとめて記載します。
以下、すべて「root」ユーザ権限で。
2. 設定
/usr/local/etc/qmHandle.conf
の設定を行いますが、その前に。
「qmHandle.conf」は開始・停止のシェルスクリプトを設定します。
ここで紹介しているやり方ですと、「qmail」の起動スクリプトは、 複数あります。
それらを一気に起動・停止するスクリプトを作成しておきます。
仮にそのスクリプトを「/root/sh」に作成するものとします。
それぞれのスクリプトを
/root/sh/qmailstart.sh
/root/sh/qmailstop.sh
とします。
以下で、作成して、実行権限をつけておきます。
mkdir -pv /root/sh
cat << EOF >> /root/sh/qmailstart.sh
#!/bin/sh
#
service qmail-start start
service qmail-smtpd start
service qmail-smtpd-ssl start
service courier-authdaemond start
service qmail-pop3d start
service qmail-pop3d-ssl start
service courier-imap-imapd start
service courier-imap-imapd-ssl start
service sa-spamd start
EOF
cat << EOF >> /root/sh/qmailstop.sh
#!/bin/sh
#
service qmail-start stop
service qmail-smtpd stop
service qmail-smtpd-ssl stop
service courier-authdaemond stop
service qmail-pop3d stop
service qmail-pop3d-ssl stop
service courier-imap-imapd stop
service courier-imap-imapd-ssl stop
service sa-spamd stop
EOF
chmod -v +x /root/sh/qmail*.sh
その上で、
vi /usr/local/etc/qmHandle.conf
# This is if you have FreeBSD with its qmail package
our ($stopqmail) = 'service qmail.sh stop';
our ($startqmail) = 'service qmail.sh start';
の箇所を
# This is if you have FreeBSD with its qmail package
our ($stopqmail) = '/root/sh/qmailstop.sh';
our ($startqmail) = '/root/sh/qmailstart.sh';
と書き換えます。
|
|