http://tech.hitsug.net/?CentOS%2Fqmail
http://centossrv.com/qmail.shtml
http://www.syns.net/2/2/index.html
http://centos.i-recording.net/vpopmail_install.html
等のサイトを参考にさせて頂きました。感謝。
インストールする前の注意点
- 使う機能によってパッチを当てる数が違ってきます。
- qmailは、ユーザやグループに厳格です。気をつけましょう。
- 使用するポートを開放する事(ファイアウォール、ルータ等の設定)
- 25番ポート SMTP メール送信
- 110番ポート POP3 メール受信
- 587番ポート SMTP OP25B対策(サブミッションポート)
- 465番ポート SMTPS メール送信 SSL対応
- 995番ポート POP3S メール受信 SSL対応
1.qmailインストール準備
1-1.qmailインストールに必要なユーザ、グループを作成する 。
グループを「qmail, nofiles」の2つのグループを作成
[root@localhost ~]# cd
[root@localhost ~]# groupadd qmail
[root@localhost ~]# groupadd nofiles
1-2.インストール先ディレクトリの作成
[root@localhost ~]# mkdir /var/qmail
[root@localhost ~]# chgrp nofiles /var/qmail
[root@localhost ~]# ls -alh /var/
省略
drwxr-xr-x 2 root nofiles 4.0K Nov 16 18:07 qmail
省略
1-3.必要ユーザーの作成
「alias, qmaild, qmaill, qmailp, qmailq, qmailr, qmails」の6つのユーザを作成
それぞれの用途は
- alias -> alias (エイリアス)
- qmaild -> qmail daemon(デーモン)
- qmaill -> qmail log (ログ関係用)
- qmailp -> qmail ????
- qmailq -> qmail queue (待ち行列)
- qmailr -> qmail respawn (自動再起動)
- qmails -> qmail send (送信)
とおもう。。
ログインさせないので、それ用のshellがあるか確認
[root@localhost src]# cat /etc/shells
/bin/sh
/bin/bash
/sbin/nologin
/bin/tcsh
/bin/csh
/bin/ksh
とあるので、/sbin/nologin をつかいます。
#group nofiles
[root@localhost ~]# adduser -g nofiles -s /sbin/nologin -d /var/qmail/alias -M alias
[root@localhost ~]# adduser -g nofiles -s /sbin/nologin -d /var/qmail -M qmaild
[root@localhost ~]# adduser -g nofiles -s /sbin/nologin -d /var/qmail -M qmaill
[root@localhost ~]# adduser -g nofiles -s /sbin/nologin -d /var/qmail -M qmailp
#group qmail
[root@localhost ~]# adduser -g qmail -s /sbin/nologin -d /var/qmail -M qmailq
[root@localhost ~]# adduser -g qmail -s /sbin/nologin -d /var/qmail -M qmailr
[root@localhost ~]# adduser -g qmail -s /sbin/nologin -d /var/qmail -M qmails
-M オプションは、ユーザのホームディレクトリを作成しないです。つけないと、
adduser: warning: the home directory already exists.
Not copying any file from skel directory into it.
と言われます。
個人ユーザ用の設定ファイルがすでに存在しててあたらに作れなかったと言われているだけなので無視しても大丈夫ですが、.bashrcとかができるので削除しておいてください。
2.qmailインストール
※qmailや、patchの最新版のURLはそれぞれ確認すること。
とりあえず、必要な物のダウンロード先
2-1.qmailのインストール
作業ディレクトリは、 /usr/local/src
[root@localhost ~]# cd /usr/local/src/
Qmailディレクトリに移動
[root@localhost src]# tar xvfz qmail-1.03.tar.gz
qmail-1.03/
略
qmail-1.03/constmap.c
[root@localhost src]# cd qmail-1.03
patch類のダウンロード及び、適応。
[root@localhost qmail-1.03]# wget http://www.qmail.org/moni.csi.hu/pub/glibc-2.3.1/qmail-1.03.errno.patch
[root@localhost qmail-1.03]# wget http://www.itheart.com/phpgw/qmail-date-localtime.patch
[root@localhost qmail-1.03]# wget http://www.qmail.org/moni.csi.hu/pub/glibc-2.3.1/qmail-1.03.qmail_local.patch
[root@localhost qmail-1.03]# wget http://qmail.org/qmail-smtpd-relay-reject
[root@localhost qmail-1.03]# wget http://www.suspectclass.com/~sgifford/qmail/qmail-0.0.0.0.patch
[root@localhost qmail-1.03]# wget http://qmail.org/qmailqueue-patch
[root@localhost qmail-1.03]# wget http://members.elysium.pl/brush/qmail-smtpd-auth/dist/qmail-smtpd-auth-0.31.tar.gz
[root@localhost qmail-1.03]# wget http://tomclegg.net/qmail/qmail-remote-auth.patch
[root@localhost qmail-1.03]# tar xvfz qmail-smtpd-auth-0.31.tar.gz
qmail-smtpd-auth-0.31/
qmail-smtpd-auth-0.31/auth.patch
qmail-smtpd-auth-0.31/CHANGES
qmail-smtpd-auth-0.31/base64.c
qmail-smtpd-auth-0.31/base64.h
qmail-smtpd-auth-0.31/README.auth
[root@localhost qmail-1.03]# cp qmail-smtpd-auth-0.31/* ./
[root@localhost qmail-1.03]# patch < qmail-1.03.errno.patch
patching file cdb_seek.c
patching file dns.c
patching file error.3
patching file error.h
[root@localhost qmail-1.03]# patch < qmail-date-localtime.patch
patching file date822fmt.c
[root@localhost qmail-1.03]# patch < qmail-1.03.qmail_local.patch
patching file qmail-local.c
[root@localhost qmail-1.03]# patch < qmail-smtpd-relay-reject
patching file qmail-smtpd.c
[root@localhost qmail-1.03]# patch < qmail-0.0.0.0.patch
patching file ipme.c
[root@localhost qmail-1.03]# patch < qmailqueue-patch
patching file Makefile
patching file qmail.c
[root@localhost qmail-1.03]# patch < auth.patch
patching file Makefile
patching file TARGETS
patching file qmail-smtpd.8
patching file qmail-smtpd.c
Hunk #2 succeeded at 63 (offset 1 line).
Hunk #3 succeeded at 256 (offset 15 lines).
Hunk #4 succeeded at 416 (offset 2 lines).
Hunk #5 succeeded at 659 (offset 15 lines).
[root@localhost qmail-1.03]# patch < qmail-remote-auth.patch
patching file qmail-remote.c
patching file Makefile
入れ込みます。
[root@localhost qmail-1.03]# make
[root@localhost qmail-1.03]# make setup
./install
[root@localhost qmail-1.03]# make check
./instcheck
インストール状況の確認
[root@localhost qmail-1.03]# ls -al /var/qmail/
total 44
drwxr-xr-x 10 root qmail 4096 Nov 16 19:10 .
drwxr-xr-x 26 root root 4096 Nov 16 18:07 ..
drwxr-sr-x 2 alias qmail 4096 Nov 16 19:10 alias
drwxr-xr-x 2 root qmail 4096 Nov 16 19:10 bin
drwxr-xr-x 2 root qmail 4096 Nov 16 19:10 boot
drwxr-xr-x 2 root qmail 4096 Nov 16 19:15 control
drwxr-xr-x 2 root qmail 4096 Nov 16 19:10 doc
drwxr-xr-x 10 root qmail 4096 Nov 16 19:10 man
drwxr-x— 11 qmailq qmail 4096 Nov 16 19:10 queue
drwxr-xr-x 2 root qmail 4096 Nov 16 19:10 users
control以下が空っぽなのを確認
[root@localhost qmail-1.03]# ls -al /var/qmail/control/
total 28
drwxr-xr-x 2 root qmail 4096 Nov 16 19:15 .
drwxr-xr-x 10 root qmail 4096 Nov 16 19:10 ..
デフォルトのファイルをとりあえず作る。
[root@localhost qmail-1.03]# ./config-fast example.com <- 自ホストFQDN
Your fully qualified host name is localhost.ne.jp.
Putting localhost.ne.jp into control/me…
Putting ne.jp into control/defaultdomain…
Putting ne.jp into control/plusdomain…
Putting localhost.ne.jp into control/locals…
Putting localhost.ne.jp into control/rcpthosts…
Now qmail will refuse to accept SMTP messages except to localhost.ne.jp.
Make sure to change rcpthosts if you add hosts to locals or virtualdomains!
もう一度確認、ファイルができてます。
[root@localhost qmail-1.03]# ls -al /var/qmail/control/
total 28
drwxr-xr-x 2 root qmail 4096 Nov 16 19:15 .
drwxr-xr-x 10 root qmail 4096 Nov 16 19:10 ..
-rw-r–r– 1 root root 6 Nov 16 19:15 defaultdomain
-rw-r–r– 1 root root 10 Nov 16 19:15 locals
-rw-r–r– 1 root root 10 Nov 16 19:15 me
-rw-r–r– 1 root root 6 Nov 16 19:15 plusdomain
-rw-r–r– 1 root root 10 Nov 16 19:15 rcpthosts
FQDNを失敗した場合はこちらを修正すればOK
コマンドの登録
[root@localhost qmail-1.03]# cd
[root@localhost ~]# vi .bash_profile
export PATH=$PATH:/var/qmail/bin <- これをかきこみます。
[root@localhost ~]# source .bash_profile
[root@localhost ~]# which qmail-local
/var/qmail/bin/qmail-local
3.tcpserverインストール
qmailへのSMTP接続制御を行うため、tcpserverが含まれたucspi-tcpをインストールする
インストール作業
[root@localhost ~]# cd /usr/local/src/
[root@localhost src]# wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz
[root@localhost src]# tar xvfz ucspi-tcp-0.88.tar.gz
ucspi-tcp-0.88
略
ucspi-tcp-0.88/x86cpuid.c
[root@localhost src]#cd ucspi-tcp-0.88
[root@localhost ucspi-tcp-0.88]# wget http://www.qmail.org/rpms/patches/ucspi-tcp-0.88.errno.patch
[root@localhost ucspi-tcp-0.88]# wget http://www.nrg4u.com/qmail/ucspi-tcp-ssl-20050405.patch.gz
[root@localhost ucspi-tcp-0.88]# gunzip ucspi-tcp-ssl-20050405.patch.gz
[root@localhost ucspi-tcp-0.88]# patch < ucspi-tcp-ssl-20050405.patch
patching file FILES
patching file Makefile
patching file TARGETS
patching file addcr.1
patching file argv0.1
patching file date@.1
patching file delcr.1
patching file error.h
patching file finger@.1
patching file fixcrio.1
patching file hier.c
patching file http@.1
patching file mconnect.1
patching file recordio.1
patching file tcp-environ.5
patching file tcpcat.1
patching file tcpclient.1
patching file tcprules.1
patching file tcprules.c
patching file tcprulescheck.1
patching file tcprulescheck.c
patching file tcpserver.1
patching file tcpserver.c
patching file who@.1
ucspi-tcp-ssl-20050405.patch をあてると、同時にucspi-tcp-0.88.errno.patch
の内容も修正されるので、ucspi-tcp-0.88.errno.patch はあてる必要はありません。
sslは、rpm等で、openssl-devel等が入っているか確認してから入れて下さい。(入ってない場合は入れる事)
続きの作業
[root@localhost ucspi-tcp-0.88]# make
[root@localhost ucspi-tcp-0.88]# make setup
./install
[root@localhost ucspi-tcp-0.88]# make check
./instcheck
中継許可ホストに自ホストを登録
[root@centos ~]# echo ‘127.:allow,RELAYCLIENT=”"‘ >
/etc/tcp.smtp
/etc/tcp.smtpをcdb形式に変換
[root@centos ~]# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp
4.fastforwardインストール
sendmail用システム共通メール転送設定ファイル(/etc/aliases)をqmailで利用するのに必要なfastforwardをインストールする
インストール作業
[root@localhost ~]# cd /usr/local/src
[root@localhost src]# wget http://cr.yp.to/software/fastforward-0.51.tar.gz
[root@localhost src]# tar xvfz fastforward-0.51.tar.gz
[root@localhost fastforward-0.51]# vi error.h
extern int errno;
↓
#include ← 変更
[root@localhost fastforward-0.51]# make
[root@localhost fastforward-0.51]# make setup
./compile install.c
install.c: In function ‘main’:
install.c:103: warning: return type of ‘main’ is not ‘int’
./compile hier.c
./load install hier.o auto_qmail.o strerr.a substdio.a \
error.a open.a str.a
./install
[root@localhost fastforward-0.51]# make check
./compile instcheck.c
instcheck.c: In function ‘main’:
instcheck.c:80: warning: return type of ‘main’ is not ‘int’
./load instcheck hier.o auto_qmail.o strerr.a substdio.a \
error.a str.a
./instcheck
5.vpopmailのセットアップ
※qmailや、patchの最新版のURLはそれぞれ確認すること。
vpopmail-5.4.25 / vpopmailサイト / バーチャルドメインを実現させる。
[root@localhost src]# cd /usr/local/src
[root@localhost src]# wget http://sourceforge.net/projects/vpopmail/files/vpopmail-stable/5.4.28/vpopmail-5.4.28.tar.gz/download
[root@localhost src]# tar xvfz vpopmail-5.4.28.tar.gz
[root@localhost src]# cd vpopmail-5.4.28
[root@localhost vpopmail-5.4.28]# groupadd vchkpw
-> 89にする必要はないよ。そういう説明は多いがfreebsdの場合、89にデフォルトで予約されてるみたいだからそこからきてるみたい。
[root@localhost vpopmail-5.4.28]# useradd -g vchkpw -s /sbin/nologin -d /var/qmail/vpopmail -M vpopmail
[root@localhost vpopmail-5.4.28]# mkdir /var/qmail/vpopmail
[root@localhost vpopmail-5.4.28]# chown vpopmail:vchkpw /var/qmail/vpopmail/
[root@localhost vpopmail-5.4.28]# ls -al /var/qmail/
drwxr-xr-x 2 vpopmail vchkpw 4096 Nov 16 21:52 vpopmail
[root@localhost vpopmail-5.4.28]# ./configure –disable-clear-passwd –enable-logging=y –enable-qmail-ext –enable-roaming-users
configureがおわったら、最後に設定一覧がでてきます。
vpopmail 5.4.28
Current settings
—————————————
vpopmail directory = /var/qmail/vpopmail
domains directory = /var/qmail/vpopmail/domains
uid = 508
gid = 503
roaming users = ON –enable-roaming-users
tcpserver file = /home/vpopmail/etc/tcp.smtp
open_smtp file = /home/vpopmail/etc/open-smtp
rebuild tcpserver file = ON –enable-rebuild-tcpserver-file (default)
password learning = OFF –disable-learn-passwords (default)
md5 passwords = ON –enable-md5-passwords (default)
file locking = ON –enable-file-locking (default)
vdelivermail fsync = OFF –disable-file-sync (default)
make seekable = ON –enable-make-seekable (default)
clear passwd = OFF –disable-clear-passwd
user dir hashing = ON –enable-users-big-dir (default)
address extensions = ON –enable-qmail-ext
ip alias = OFF –disable-ip-alias-domains (default)
onchange script = OFF –disable-onchange-script (default)
domain quotas = OFF –disable-domainquotas (default)
auth module = cdb –enable-auth-module=cdb (default)
auth inc = -Icdb
auth lib =
system passwords = OFF –disable-passwd (default)
pop syslog = show successful and failed login attempts –enable-logging=y
auth logging = ON –enable-auth-logging (default)
spamassassin = OFF –disable-spamassassin (default)
maildrop = OFF –disable-maildrop (default)
****************************************************
If you plan to use the vpopmail usage daemon
run the following commands:
cd vusaged && ./configure && make
Then follow the INSTALL file to install
****************************************************
vpopmail をdaemonとして扱う場合は上記処理( cd vusaged && ./configure && make)をしましょう。
[root@localhost vpopmail-5.4.28]# make
省略
gcc -o vusagec vusagec.o client.o conf.o ippp.o libvpopmail.a -lcrypt
make[2]: Leaving directory /usr/local/src/vpopmail-5.4.30′
make[1]: Leaving directory /usr/local/src/vpopmail-5.4.30′
[root@localhost vpopmail-5.4.28]# make install
省略
make[2]: Leaving directory /usr/local/src/vpopmail-5.4.30′
make[1]: Leaving directory /usr/local/src/vpopmail-5.4.30′
****************************************************
If you plan to use the vpopmail usage daemon
run the following commands:
cd vusaged && ./configure && make
Then follow the INSTALL file to install
****************************************************
6.自動応答機能のセットアップ
autorespond-2.0.5 / サイト / 自動応答機能を実現するqmailアドオンツール
software http://www.inter7.com/?page=software
[root@localhost src]# cd /usr/local/src
[root@localhost src]# wget http://www.inter7.com/devel/autorespond-2.0.5.tar.gz
[root@localhost src]# tar xvfz autorespond-2.0.5.tar.gz
[root@localhost src]# cd autorespond-2.0.5
[root@localhost autorespond-2.0.5]# cat README
[root@localhost autorespond-2.0.5]# make
gcc -O2 -Wall -g autorespond.c -o autorespond
[root@localhost autorespond-2.0.5]# make install
install -d /usr/bin /usr/share/man/man1
install autorespond /usr/bin
install autorespond.1 /usr/share/man/man1
7.qmailadminのセットアップ
qmailadmin-1.2.1 / サイト / sourceforge / qmailadmin vpopmail用メールアカウント管理システム
[root@localhost src]# cd /usr/local/src
[root@localhost src]# wget http://sourceforge.net/projects/qmailadmin/files/qmailadmin-stable/1.2.13/qmailadmin-1.2.13.tar.gz/download
qmailadminのインストール先(webからの閲覧用)フォルダを作成しておきます。
下記は、/var/www/vhosts/qmailadmin.example.com/html をドキュメントルートとした http://qmailadmin.example.comからの閲覧先の例です。
[root@localhost src]# mkdir qmailadmin.example.com
[root@localhost src]# mkdir -p /var/www/vhosts/qmailadmin.example.com/html
[root@localhost src]# tar xvfz qmailadmin-1.2.13.tar.gz
[root@localhost src]# cd qmailadmin-1.2.13
[root@localhost qmailadmin-1.2.13]# cat INSTALL
[root@localhost qmailadmin-1.2.13]# ./configure \
–enable-cgibindir=/var/www/vhosts/qmailadmin.example.com/cgi-bin \
–enable-htmldir=/var/www/vhosts/qmailadmin.example.com/html \
–enable-imageurl=/images \
–enable-imagedir=/var/www/vhosts/qmailadmin.example.com/html/images \
–enable-htmllibdir=/var/www/vhosts/qmailadmin.example.com/html \
–enable-vpopmaildir=/var/qmail/vpopmail \
–enable-vpopuser=vpopmail \
–enable-autoresponder-bin=/usr/bin/autorespond \
–disable-ezmlmdir \
–disable-ezmlm-mysql \
–enable-help \
結果は下記の感じ
qmailadmin 1.2.13
Current settings
—————————————
cgi-bin dir = /var/www/vhosts/qmailadmin.example.com/cgi-bin
html dir = /var/www/vhosts/qmailadmin.example.com/html
image dir = /var/www/vhosts/qmailadmin.example.com/html/images
image URL = /images
template dir = /var/www/vhosts/qmailadmin.example.com/html
qmail dir = /var/qmail
vpopmail dir = /var/qmail/vpopmail
autorespond dir = /usr/bin
ezmlm dir = no
ezmlm idx = no
mysql for ezmlm = no
help = yes
modify quota = no
domain autofill = no
catchall accounts = yes
trivial passwords = yes
modify spam check = no
[root@localhost qmailadmin-1.2.13]# make
[root@localhost qmailadmin-1.2.13]# make install
本体は、cgi-binというフォルダにインストールしないと、formタグのリンク先がおかしくなるので
.htaccess で、ExecCGIとかで別けてない場合は注意が必要です。
8.qmailadmin-helpのインストール
qmailadmin-help-1.0.8.tar.gz / qmailadmin-help / qmailadmin ヘルプ
[root@localhost ~]# cd /usr/local/src
[root@localhost src]# wget http://www.inter7.com/devel/qmailadmin-help-1.0.8.tar.gz
[root@localhost src]# tar xvfz qmailadmin-help-1.0.8.tar.gz
[root@localhost src]# cd qmailadmin-help-1.0.8
[root@localhost qmailadmin-help-1.0.8]# cat INSTALL
Quick Install:
mkdir /var/www/html/images/qmailadmin/help
cp -rp * /var/www/html/images/qmailadmin/help
note: ./configure option –enable-htmldir=/var/www/html
Longer Install:
The files in this directory should be copied to
where your qmailadmin image files live. Normally
this is under –enable-htmldir /images/qmailadmin/help
Good Luck
Ken Jones
inter7.com
[root@localhost qmailadmin-help-1.0.8]# mkdir /var/www/vhosts/qmailadmin.localhost.ne.jp/html/images/help
[root@localhost qmailadmin-help-1.0.8]# cp -rp * /var/www/vhosts/qmailadmin.localhost.ne.jp/html/images/help
9.qmailの起動
- sendmailの停止
- /etc/init.d/qmail の作成
- chkconfigへの登録
- 4.起動スクリプトのコピー 修正
- 起動テスト
1.sendmailの停止
[root@localhost ~]# cd
[root@localhost ~]# /etc/init.d/sendmail status
sendmail (pid 5484 5475) を実行中…
[root@localhost ~]# /etc/init.d/sendmail stop
sm-client を停止中: [ OK ]
sendmail を停止中: [ OK ]
[root@localhost ~]# chkconfig –list | grep sendmail
sendmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off
[root@localhost ~]# chkconfig sendmail off
[root@localhost ~]# chkconfig –list | grep sendmail
sendmail 0:off 1:off 2:off 3:off 4:off 5:off 6:off
2./etc/init.d/qmail の作成
[root@localhost ~]#vi /etc/init.d/qmail
サンプルです。
–ここから
#!/bin/bash
#
# qmail
#
# chkconfig: 2345 80 30
# description: qmail start/stop script
# Source function library.
. /etc/rc.d/init.d/functions
PATH=/var/qmail/bin:/usr/local/bin:/bin:/usr/bin
[ -f /var/qmail/rc ] || exit 0
start() {
# Start daemons.
if [ -z $(/sbin/pidof qmail-send) ]; then
echo -n “Starting qmail”
# qmail
csh -cf ‘/var/qmail/rc &’ 2>&1 > /dev/null
# SMTP(21)
tcpserver -qv -l0 -HR -u id -u qmaild -g id -g qmaild \
-x /var/qmail/vpopmail/etc/tcp.smtp.cdb 0 smtp \
fixcrio qmail-smtpd hostname /bin/true 2>&1|\
splogger smtp &
# SMTP(587)
tcpserver -qv -l0 -HR -u id -u qmaild -g id -g qmaild \
-x /var/qmail/vpopmail/etc/tcp.smtp.cdb 0 587 \
fixcrio qmail-smtpd hostname /bin/true 2>&1|\
splogger smtp &
# POP3
tcpserver -H -R -l $HOSTNAME -v 0 pop3 \
/var/qmail/bin/qmail-popup $HOSTNAME \
/var/qmail/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir 2>&1 | /var/qmail/bin/splogger pop3 &
RETVAL=$?
echo
[ $RETVAL = 0 ] && touch /var/lock/subsys/qmail
return $RETVAL
else
echo “qmail is already started”
fi
}
stop() {
# Stop daemons.
if [ ! -z $(/sbin/pidof qmail-send) ]; then
echo -n “Shutting down qmail”
/bin/kill $(/sbin/pidof tcpserver)
/bin/kill $(/sbin/pidof qmail-send)
until [ -z $(/sbin/pidof qmail-send) ] && [ -z $(/sbin/pidof tcpserver) ]; do :; done
echo
rm -f /var/lock/subsys/qmail
else
echo “qmail is not running”
fi
}
case “$1″ in
start)
start
;;
stop)
stop
;;
restart)
stop
start
;;
status)
if [ ! -z $(/sbin/pidof qmail-send) ] ; then
echo -n “qmail (pid”
echo -n ” /sbin/pidof qmail-send”
echo -n ” /sbin/pidof tcpserver”
echo “) is running…”
else
echo “qmail is stopped”
fi
;;
*)
echo “Usage: qmail {start|stop|restart|status}”
exit 1
esac
exit 0
–ここまで
[root@localhost init.d]# chmod 755 /etc/init.d/qmail
3.chkconfigへの登録
[root@localhost init.d]# chkconfig –add qmail
[root@localhost init.d]# chkconfig –list | grep qmail
qmail 0:off 1:off 2:on 3:on 4:on 5:on 6:off
4.起動スクリプトのコピー 修正
[root@localhost ~]# cp /var/qmail/boot/home /var/qmail/rc
[root@localhost ~]# vi /var/qmail/rc
#!/bin/sh
# Using splogger to send the log through syslog.
# Using qmail-local to deliver messages to ~/Mailbox by default.
exec env – PATH=”/var/qmail/bin:$PATH” \
qmail-start ./Maildir splogger qmail <- Mailbox を Maildir へ修正。
5.起動テスト
[root@localhost ~]# /etc/init.d/qmail start
Starting qmail
[root@localhost ~]# /etc/init.d/qmail status
qmail (pid 22413 22420 22417 22414) is running…
[root@localhost ~]# ps ax | grep qmail
22413 pts/2 S 0:00 qmail-send
22414 pts/2 S 0:00 tcpserver -qv -l0 -HR -u 504 -g 504 -x /var/qmail/vpopmail/etc/tcp.smtp.cdb 0 smtp fixcrio qmail-smtpd www.example.com /bin/true
22417 pts/2 S 0:00 tcpserver -qv -l0 -HR -u 504 -g 504 -x /var/qmail/vpopmail/etc/tcp.smtp.cdb 0 587 fixcrio qmail-smtpd www.example.com /bin/true
22420 pts/2 S 0:00 tcpserver -H -R -l www.example.com -v 0 pop3 /var/qmail/bin/qmail-popup www.example.com /var/qmail/vpopmail/bin/vchkpw /var/qmail/bin/qmail-pop3d Maildir
22421 pts/2 S 0:00 /var/qmail/bin/splogger pop3
22425 pts/2 S 0:00 splogger qmail
22427 pts/2 S 0:00 qmail-lspawn ./Maildir
22428 pts/2 S 0:00 qmail-rspawn
22429 pts/2 S 0:00 qmail-clean
22438 pts/2 S+ 0:00 grep qmail