|
[ qmail ] tcpserver は、qmailのSMTP接続制御を行います。 tcpserver インストール †通常(非SSL対応版) インストール †
[user@linux qmail]$ wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz ←■ tcpserverダウンロード [user@linux qmail]$ wget http://www.qmail.org/rpms/patches/ucspi-tcp-0.88.errno.patch ←■ エラー対策patchダウンロード [user@linux qmail]$ tar zxvf ucspi-tcp-0.88.tar.gz ←■ 展開する [user@linux qmail]$ cd ucspi-tcp-0.88/ ←■ ディレクトリ移動 ※ エラー対策 [user@linux ucspi-tcp-0.88]$ patch < ../ucspi-tcp-0.88.errno.patch ←■ error.h パッチファイル施行 [user@linux qmail]$ su - ←■ root権限になる [root@linux qmail]# make setup check ~ 中略 ~ ./install ./instcheck [root@linux qmail]# SSL対応版 インストール †SSL対応版は、tcpserver-ssl としてインストールする。
[user@linux qmail]$ wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz ←■ tcpserverダウンロード
[user@linux qmail]$ wget http://www.nrg4u.com/qmail/ucspi-tcp-ssl-20050405.patch.gz ←■ tcpserverSSL対応パッチダウンロード
[user@linux qmail]$ wget http://www.qmail.org/rpms/patches/ucspi-tcp-0.88.errno.patch ←■ エラー対策patchダウンロード
[user@linux qmail]$ tar zxvf ucspi-tcp-0.88.tar.gz ←■ 展開する
[user@linux qmail]$ gunzip ucspi-tcp-ssl-20050405.patch.gz ←■ tcpserverSSL対応パッチ展開
[user@linux qmail]$ mv ucspi-tcp-ssl-20050405.patch ucspi-tcp-0.88 ←■ tcpserverSSL対応パッチをtcpserver展開先ディレクトリへ移動させる
[user@linux qmail]$ cd ucspi-tcp-0.88/ ←■ ディレクトリ移動
[user@linux ucspi-tcp-0.88]$ patch < ucspi-tcp-ssl-20050405.patch ←■ tcpserverSSL対応パッチ施行
patching file FILES
patching file Makefile
~ 中略 ~
patching file tcpserver.c
patching file who@.1
[user@linux ucspi-tcp-0.88]$ su - ←■ root権限になる
[root@linux ucspi-tcp-0.88]# make ←■ tcpserverコンパイル
( cat warn-auto.sh; \
echo 'main="$1"; shift'; \
echo exec "`head -1 conf-ld`" \
'-o "$main" "$main".o ${1+"$@"}' \
) > load
~ 中略 ~
nroff -man argv0.1 > argv0.0
nroff -man recordio.1 > recordio.0
[root@linux ucspi-tcp-0.88]#
[root@linux ucspi-tcp-0.88]# mv tcpserver tcpserver-ssl ←■ SSL用にファイル名を変更する
[root@linux ucspi-tcp-0.88]# /bin/cp tcpserver-ssl /usr/local/bin ←■ SSL対応tcpserverをコピーする
[root@linux ucspi-tcp-0.88]#
サーバ証明書作成 †※ 応答するメールサーバ名はメールクライアントで設定するメールサーバー名と同じものを指定する [root@linux ~]# cd ucspi-tcp-0.88 ←■ ディレクトリ移動
[root@linux ucspi-tcp-0.88]# make cert ←■ サーバ証明書作成
openssl req -new -x509 -nodes \
-out cert.pem -days 366 \
-keyout cert.pem
Generating a 1024 bit RSA private key
....++++++
.++++++
writing new private key to 'cert.pem'
-----
You are about to be asked to enter information that will be incorporated
into your certificate request.
What you are about to enter is what is called a Distinguished Name or a DN.
There are quite a few fields but you can leave some blank
For some fields there will be a default value,
If you enter '.', the field will be left blank.
-----
Country Name (2 letter code) [GB]:JP ←■ サーバの所在地(国名)応答
State or Province Name (full name) [Berkshire]:Osaka ←■ サーバの所在地(都道府県名)応答
Locality Name (eg, city) [Newbury]:Osaka ←■ サーバの所在地(市区町村名)応答
Organization Name (eg, company) [My Company Ltd]:example.jp ←■ サーバ名応答(何でも良い)
Organizational Unit Name (eg, section) []: ←■ 空ENTER
Common Name (eg, your name or your server's hostname) []:mail.example.jp ←■ メールサーバ名応答 ※
Email Address []:postmaster@example.jp ←■ メールサーバ管理者アドレス応答
[root@linux ucspi-tcp-0.88]#
[root@linux ucspi-tcp-0.88]# cp cert.pem /var/qmail ←■ 作成したサーバ証明書をqmailインストールディレクトリへコピー
[root@linux ucspi-tcp-0.88]# chmod 600 /var/qmail/cert.pem ←■ サーバ証明書をroot以外参照禁止にする
[root@linux ucspi-tcp-0.88]# cd ←■ tcpserver展開先ディレクトリを抜ける
[root@linux ucspi-tcp-0.88]#
※ インストールの続き → qmail 起動設定 |