qmail install メモ1

 

■qmailインストール

(1)qmailインストール準備
qmailインストールに必要なユーザ、グループを作成する
 

[root@ns6 ~]# mkdir /var/qmail ← qmailインストールディレクトリ作成

[root@ns6 ~]# groupadd nofiles ← nofilesグループ作成

[root@ns6 ~]# useradd -g nofiles -s /sbin/nologin alias -m -d /var/qmail/alias -k /dev/null ← aliasユーザ作成

[root@ns6 ~]# useradd -g nofiles -d /var/qmail -s /sbin/nologin -M qmaild ← qmaildユーザ作成

[root@ns6 ~]# useradd -g nofiles -d /var/qmail -s /sbin/nologin -M qmaill ← qmaillユーザ作成

[root@ns6 ~]# useradd -g nofiles -d /var/qmail -s /sbin/nologin -M qmailp ← qmailpユーザ作成

[root@ns6 ~]# groupadd qmail ← qmailグループ作成

[root@ns6 ~]# useradd -g qmail -d /var/qmail -s /sbin/nologin -M qmailq ← qmailqユーザ作成

[root@ns6 ~]# useradd -g qmail -d /var/qmail -s /sbin/nologin -M qmailr ← qmailrユーザ作成

[root@ns6 ~]# useradd -g qmail -d /var/qmail -s /sbin/nologin -M qmails ← qmailsユーザ作成

 

(2)qmailインストール
 

[root@ns6 ~]# wget http://cr.yp.to/software/qmail-1.03.tar.gz ← qmailダウンロード

※qmailの最新版のURLはqmailダウンロードページで確認すること

[root@ns6 ~]# tar zxvf qmail-1.03.tar.gz ← qmail展開

[root@ns6 ~]# cd qmail-1.03 ← qmail展開先ディレクトリへ移動

[root@ns6 qmail-1.03]# wget http://www.itheart.com/phpgw/qmail-date-localtime.patch
 ← 日本標準時間対応パッチダウンロード

[root@ns6 qmail-1.03]# wget http://members.elysium.pl/brush/qmail-smtpd-auth/dist/qmail-smtpd-auth-0.31.tar.gz
 ← SMTP-Auth対応パッチダウンロード

[root@ns6 qmail-1.03]# wget http://qmail.mirrors.summersault.com/qmail-smtpd-relay-reject ← 不正中継拒否対応パッチダウンロード

[root@ns6 qmail-1.03]# tar zxvf qmail-smtpd-auth-0.31.tar.gz ← SMTP-Auth対応パッチ展開

[root@ns6 qmail-1.03]# /bin/mv qmail-smtpd-auth-0.31/* . ← SMTP-Auth対応パッチをqmail展開先ディレクトリへ移動

[root@ns6 qmail-1.03]# patch < qmail-date-localtime.patch ← 日本標準時間対応パッチ施行
patching file date822fmt.c

[root@ns6 qmail-1.03]# patch < auth.patch ← SMTP-Auth対応パッチ施行
patching file Makefile
patching file TARGETS
patching file qmail-smtpd.8
patching file qmail-smtpd.c

[root@ns6 qmail-1.03]# patch < qmail-smtpd-relay-reject ← 不正中継拒否対応パッチ施行
patching file qmail-smtpd.c
Hunk #1 succeeded at 56 (offset 3 lines).
Hunk #2 succeeded at 226 (offset 9 lines).
Hunk #3 succeeded at 277 (offset 11 lines).

[root@ns6 qmail-1.03]# vi error.h ← error.h編集
extern int errno;
↓
#include<errno.h> ← 変更

上記は以下のようなエラーメッセージを出力してインストールが失敗してしまうことの対処
/lib/libc.so.6: could not read symbols: 不正な値です
collect2: ld はステータス 1 で終了しました
make: *** [auto-str] エラー 1

[root@ns6 qmail-1.03]# make setup check ← qmailインストール
・
・
・
./install
./instcheck

[root@ns6 qmail-1.03]# ./config-fast `hostname` ← qmail初期設定
Your fully qualified host name is ns6.ns6srv.com.
Putting ns6.ns6srv.com into control/me...
Putting ns6srv.com into control/defaultdomain...
Putting ns6srv.com into control/plusdomain...
Putting ns6.ns6srv.com into control/locals...
Putting ns6.ns6srv.com into control/rcpthosts...
Now qmail will refuse to accept SMTP messages except to ns6.ns6srv.com.
Make sure to change rcpthosts if you add hosts to locals or virtualdomains!

[root@ns6 qmail-1.03]# echo `hostname -d` > /var/qmail/control/me ← 自ドメイン名を送信元ドメイン名にする

[root@ns6 qmail-1.03]# echo `hostname -d` >> /var/qmail/control/rcpthosts ← 自ドメイン名を受信ドメイン名として追加

[root@ns6 qmail-1.03]# echo `hostname -d` >> /var/qmail/control/locals ← 自ドメイン名をローカルドメイン名として追加

[root@ns6 qmail-1.03]# cd ← qmail展開先ディレクトリを抜ける

[root@ns6 ~]# echo "MANPATH /var/qmail/man" >> /etc/man.config
 ← manコマンドでqmailコマンドのマニュアルを参照できるようにする

[root@ns6 ~]# rm -rf qmail-1.03 ← qmail展開先ディレクトリ削除

[root@ns6 ~]# rm -f qmail-1.03.tar.gz ← ダウンロードしたqmail削除

 

(3)checkpasswordインストール
SMTP認証、POP認証に使用するcheckpasswordをインストールする
 

[root@ns6 ~]# wget http://cr.yp.to/checkpwd/checkpassword-0.90.tar.gz ← checkpasswordダウンロード

※checkpasswordの最新版のURLはcheckpasswordダウンロードページで確認すること

[root@ns6 ~]# tar zxvf checkpassword-0.90.tar.gz ← checkpassword展開

[root@ns6 ~]# cd checkpassword-0.90 ← checkpassword展開先ディレクトリへ移動

[root@ns6 checkpassword-0.90]# vi error.h ← error.h編集
extern int errno;
↓
#include<errno.h> ← 変更

上記は以下のようなエラーメッセージを出力してインストールが失敗してしまうことの対処
/lib/libc.so.6: could not read symbols: 不正な値です
collect2: ld はステータス 1 で終了しました
make: *** [auto-str] エラー 1

[root@ns6 checkpassword-0.90]# make && make setup check ← checkpasswordインストール
・
・
・
./install
./instcheck

[root@ns6 checkpassword-0.90]# cd ← checkpassword展開先ディレクトリを抜ける

[root@ns6 ~]# rm -rf checkpassword-0.90 ← checkpassword展開先ディレクトリ削除

[root@ns6 ~]# rm -f checkpassword-0.90.tar.gz ← ダウンロードしたcheckpassword削除

[root@ns6 ~]# chown root:nofiles /bin/checkpassword ← checkpasswordの所有者、所有グループ変更

[root@ns6 ~]# chmod 4750 /bin/checkpassword ← checkpasswordが所有者権限で動作するように設定

 

(4)tcpserverインストール
qmailへのSMTP接続制御を行うため、tcpserverが含まれたucspi-tcpをインストールする
 

[root@ns6 ~]# wget http://cr.yp.to/ucspi-tcp/ucspi-tcp-0.88.tar.gz ← tcpserverダウンロード

※ucspi-tcpの最新版のURLはucspi-tcpダウンロードページで確認すること

[root@ns6 ~]# tar zxvf ucspi-tcp-0.88.tar.gz ← ucspi-tcp展開

[root@ns6 ~]# cd ucspi-tcp-0.88 ← ucspi-tcp展開先ディレクトリへ移動

[root@ns6 ucspi-tcp-0.88]# vi error.h ← error.h編集
extern int errno;
↓
#include<errno.h> ← 変更

上記は以下のようなエラーメッセージを出力してインストールが失敗してしまうことの対処
/lib/libc.so.6: could not read symbols: 不正な値です
collect2: ld はステータス 1 で終了しました
make: *** [auto-str] エラー 1

[root@ns6 ucspi-tcp-0.88]# make setup check ← ucspi-tcpインストール
・
・
・
./install
./instcheck

[root@ns6 ucspi-tcp-0.88]# cd ← ucspi-tcp展開先ディレクトリを抜ける

[root@ns6 ~]# rm -rf ucspi-tcp-0.88 ← ucspi-tcp展開先ディレクトリ削除

[root@ns6 ~]# rm -f ucspi-tcp-0.88.tar.gz ← ダウンロードしたucspi-tcp削除

[root@ns6 ~]# echo '127.:allow,RELAYCLIENT=""' > /etc/tcp.smtp ← 中継許可ホストに自ホストを登録

[root@ns6 ~]# tcprules /etc/tcp.smtp.cdb /etc/tcp.smtp.tmp < /etc/tcp.smtp ← /etc/tcp.smtpをcdb形式に変換

 

(5)dot-forwardインストール
sendmail用ユーザ別メール転送設定ファイル(~/.forward)をqmailでも利用する場合のみ、dot-forwardをインストールする
※.forwardを使わず、qmailの.forward相当である.qmailを使用する場合はインストールしなくてもよい
 

[root@ns6 ~]# wget http://cr.yp.to/software/dot-forward-0.71.tar.gz ← dot-forwardダウンロード

※dot-forwardの最新版のURLはdot-forwardダウンロードページで確認すること

[root@ns6 ~]# tar zxvf dot-forward-0.71.tar.gz ← dot-forward展開

[root@ns6 ~]# cd dot-forward-0.71 ← dot-forward展開先ディレクトリへ移動

[root@ns6 dot-forward-0.71]# vi error.h ← error.h編集
extern int errno;
↓
#include<errno.h> ← 変更

上記は以下のようなエラーメッセージを出力してインストールが失敗してしまうことの対処
/lib/libc.so.6: could not read symbols: 不正な値です
collect2: ld はステータス 1 で終了しました
make: *** [auto-str] エラー 1

[root@ns6 dot-forward-0.71]# make setup check ← dot-forwardインストール
・
・
・
./instcheck

[root@ns6 dot-forward-0.71]# cd ← dot-forward展開先ディレクトリを抜ける

[root@ns6 ~]# rm -rf dot-forward-0.71 ← dot-forward展開先ディレクトリ削除

[root@ns6 ~]# rm -f dot-forward-0.71.tar.gz ← ダウンロードしたdot-forward削除

 

(6)fastforwardインストール
sendmail用システム共通メール転送設定ファイル(/etc/aliases)をqmailで利用するのに必要なfastforwardをインストールする
 

[root@ns6 ~]# wget http://cr.yp.to/software/fastforward-0.51.tar.gz ← fastforwardダウンロード

※fastforwardの最新版のURLはfastforwardダウンロードページで確認すること

[root@ns6 ~]# tar zxvf fastforward-0.51.tar.gz ← fastforward展開

[root@ns6 ~]# cd fastforward-0.51 ← fastforward展開先ディレクトリへ移動

[root@ns6 fastforward-0.51]# vi error.h ← error.h編集
extern int errno;
↓
#include<errno.h> ← 変更

上記は以下のようなエラーメッセージを出力してインストールが失敗してしまうことの対処
/lib/libc.so.6: could not read symbols: 不正な値です
collect2: ld はステータス 1 で終了しました
make: *** [auto-str] エラー 1

[root@ns6 fastforward-0.51]# make setup check ← fastforwardインストール
・
・
・
./instcheck

[root@ns6 fastforward-0.51]# cd ← fastforward展開先ディレクトリを抜ける

[root@ns6 ~]# rm -rf fastforward-0.51 ← fastforward展開先ディレクトリ削除

[root@ns6 ~]# rm -f fastforward-0.51.tar.gz ← ダウンロードしたfastforward削除

[root@ns6 ~]# chmod 0 /usr/bin/newaliases ← 旧newaliasesコマンド無効化

[root@ns6 ~]# mv /usr/bin/newaliases /usr/bin/newaliases.bak ← 旧newaliasesコマンドをリネーム

[root@ns6 ~]# ln -s /var/qmail/bin/newaliases /usr/bin/newaliases ← newaliasesコマンドをfastforwardに置換え

[root@ns6 ~]# newaliases ← /etc/aliasesのcdb形式データベース作成

[root@ns6 ~]# ll /etc/aliases.cdb ← /etc/aliasesのcdb形式データベース作成確認
-rw-r--r--  1 root root 6594 10月 15 14:13 /etc/aliases.cdb

[root@ns6 ~]# echo "|/var/qmail/bin/fastforward -p -d /etc/aliases.cdb" > /var/qmail/alias/.qmail-default
 ← /etc/aliases.cdbをqmailが参照するように設定

 

 

■qmail設定

(1)qmail設定
 

[root@ns6 ~]# echo "10485760" > /var/qmail/control/databytes ← 送受信可能メールサイズを10MB=10*1024*1024に制限
※制限を超えた場合、送信元へエラー通知される

[root@ns6 ~]# touch /var/qmail/control/doublebounceto ← ダブルバウンスメール※は破棄する
※ダブルバウンスメールとは、送信者・受信者ともに存在しないメールのこと

 

(2)Maildir形式メールボックス作成
デフォルトでインストールされているsendmailのメール格納形式は共有ディレクトリ形式(「/var/spool/mail/ユーザ名」というファイルに全てのメールが蓄積されていく形式)だが、アクセス性能改善及びセキュリティ強化の観点からqmailデフォルトのMaildir形式へ移行する。【既存ユーザ対処】
既存ユーザのホームディレクトリにMaildir形式のメールボックスを作成して、蓄積済のメールデータを当該メールボックスへ移行する⇒メールデータ移行を参照【新規ユーザ対処】
新規ユーザ追加時に自動でホームディレクトリにMaildir形式のメールボックスが作成されるようにする
 

[root@ns6 ~]# rm -rf /etc/skel/Maildir

[root@ns6 ~]# /var/qmail/bin/maildirmake /etc/skel/Maildir

 

 

■qmail起動

(1)旧SMTPサーバー停止
SMTPサーバーをqmailに置換えるため、現在起動しているSMTPサーバー(当サイトの場合sendmailまたはPostfix)を停止する。
なお、sendmailまたはPostfixは不要だが、依存しているパッケージが多数あるのでアンインストールはしないようにする
 

【旧SMTPサーバーがsendmailの場合(デフォルトの場合)】
[root@ns6 ~]# /etc/rc.d/init.d/sendmail stop ← sendmail停止
sendmailを停止中:                                          [  OK  ]
sm-clientを停止中:                                         [  OK  ]

[root@ns6 ~]# chkconfig sendmail off ← sendmail自動起動設定解除

【旧SMTPサーバーがPostfixの場合】
[root@ns6 ~]# /etc/rc.d/init.d/postfix stop ← Postfix停止
Shutting down postfix:                                     [  OK  ]

[root@ns6 ~]# chkconfig postfix off ← Postfix自動起動設定解除

 

(2)sendmailコマンド置換え
CGI等でメール通知に利用するsendmailコマンドをqmailに置換える。
 

[root@ns6 ~]# chmod 0 /usr/lib/sendmail ← 旧sendmailコマンド無効化

[root@ns6 ~]# chmod 0 /usr/sbin/sendmail ← 旧sendmailコマンド無効化

[root@ns6 ~]# mv /usr/lib/sendmail /usr/lib/sendmail.bak ← 旧sendmailコマンドをリネーム

[root@ns6 ~]# mv /usr/sbin/sendmail /usr/sbin/sendmail.bak ← 旧sendmailコマンドをリネーム

[root@ns6 ~]# ln -s /var/qmail/bin/sendmail /usr/lib/sendmail ← sendmailコマンドをqmailに置換え

[root@ns6 ~]# ln -s /var/qmail/bin/sendmail /usr/sbin/sendmail ← sendmailコマンドをqmailに置換え

 

(3)qmail起動スクリプト作成
 

[root@ns6 ~]# cp /var/qmail/boot/home+df /var/qmail/rc
 ← qmail起動コマンドサンプルを所定の場所へコピー※dot-forward利用する場合

[root@ns6 ~]# cp /var/qmail/boot/home /var/qmail/rc
 ← qmail起動コマンドサンプルを所定の場所へコピー※dot-forward利用しない場合

[root@ns6 ~]# sed -i 's/Mailbox/Maildir\//g' /var/qmail/rc ← メールボックス形式をMaildirに変更

[root@ns6 ~]# yum -y install tcsh ← cシェルインストール

[root@ns6 ~]# vi /etc/rc.d/init.d/qmail ← 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
        tcpserver -qv -l0 -HR -u `id -u qmaild` -g `id -g qmaild` \
        -x /etc/tcp.smtp.cdb 0 smtp \
        fixcrio qmail-smtpd `hostname` /bin/checkpassword /bin/true 2>&1|\
        splogger smtp &

        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@ns6 ~]# chmod +x /etc/rc.d/init.d/qmail ← qmail起動スクリプトへ実行権限付加

 

(4)qmail起動
 

[root@ns6 ~]# /etc/rc.d/init.d/qmail start ← qmail起動
Starting qmail

[root@ns6 ~]# chkconfig qmail --add ← qmailをchkconfigへ追加

[root@ns6 ~]# chkconfig qmail on ← qmail自動起動設定

 

(5)ポート開放
ルーター側の設定でポート25番をOPENする。
※ルーターの設定は各ルーターのマニュアルまたはメーカー別ルーターポート開放手順を参照ポートチェック【外部からポート開放確認】で「host名」にサーバー名(例:ns6srv.com)、「port番号」に25と入力して「ポートチェック」ボタン押下し、「ホスト=ns6srv.com ポート=25 にアクセスできました。」と表示されることを確認。

 

■OP25B対策

OP25B(Outbound Port 25 Blocking)対策参照

 

■qmail-pop3d設定(受信メールサーバーをPOPにする場合)

(1)qmail-pop3d設定
 

[root@ns6 ~]# vi /etc/rc.d/init.d/qmail ← qmail起動スクリプト編集
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
        tcpserver -qv -l0 -HR -u `id -u qmaild` -g `id -g qmaild` \
        -x /etc/tcp.smtp.cdb 0 smtp rblsmtpd -r relays.ordb.org \
        fixcrio qmail-smtpd `hostname` /bin/checkpassword /bin/true 2>&1|\
        splogger smtp &

----追加(ここから)----
        # POP3
        tcpserver -qvRH -u `id -u qmaild` -g `id -g qmaild` \
        0 pop3 qmail-popup `hostname` /bin/checkpassword \
        qmail-pop3d Maildir 2>&1 | splogger pop3 &
----追加(ここまで)----

        RETVAL=$?
        echo
        [ $RETVAL = 0 ] && touch /var/lock/subsys/qmail
        return $RETVAL
    else
        echo "qmail is already started"
    fi
}

[root@ns6 ~]# /etc/rc.d/init.d/qmail restart ← qmail再起動
Shutting down qmail
Starting qmail

 

(2)ポート開放
ルーター側の設定でポート110番をOPENする。
※ルーターの設定は各ルーターのマニュアルまたはメーカー別ルーターポート開放手順を参照ポートチェック【外部からポート開放確認】で「host名」にサーバー名(例:ns6srv.com)、「port番号」に110と入力して「ポートチェック」ボタン押下し、「ホスト=ns6srv.com ポート=110 にアクセスできました。」と表示されることを確認。

 

■Dovecotインストール(受信メールサーバーをIMAPにする場合)

 

[root@ns6 ~]# yum -y install dovecot ← Dovecotインストール

 

■Dovecot設定

 

[root@ns6 ~]# vi /etc/dovecot.conf ← Dovecot設定ファイル編集
# Protocols we want to be serving: imap imaps pop3 pop3s
# If you only want to use dovecot-auth, you can set this to "none".
#protocols = imap imaps pop3 pop3s
protocols = imap imaps ← 追加

# Location for users' mailboxes. This is the same as the old default_mail_env
# setting. The default is empty, which means that Dovecot tries to find the
# mailboxes automatically. This won't work if the user doesn't have any mail
# yet, so you should explicitly tell Dovecot the full location.
#
# If you're using mbox, giving a path to the INBOX file (eg. /var/mail/%u)
# isn't enough. You'll also need to tell Dovecot where the other mailboxes are
# and where Dovecot can place its index files. This is called the "root mail
# directory", and it must be the first path given in the mail_location setting.
#
# There are a few special variables you can use, eg.:
#
#   %u - username
#   %n - user part in user@domain, same as %u if there's no domain
#   %d - domain part in user@domain, empty if there's no domain
#   %h - home directory
#
# See doc/variables.txt for full list. Some examples:
#
#   mail_location = maildir:~/Maildir
#   mail_location = mbox:~/mail:INBOX=/var/mail/%u
#   mail_location = mbox:/var/mail/%d/%1n/%n:INDEX=/var/indexes/%d/%1n/%n
#
# http://wiki.dovecot.org/MailLocation
#
#mail_location =
mail_location = maildir:~/Maildir ← 追加(メールボックス形式をMaildir形式とする)

# ':' separated list of directories under which chrooting is allowed for mail
# processes (ie. /var/mail will allow chrooting to /var/mail/foo/bar too).
# This setting doesn't affect login_chroot or auth_chroot variables.
# WARNING: Never add directories here which local users can modify, that
# may lead to root exploit. Usually this should be done only if you don't
# allow shell access for users. See doc/configuration.txt for more information.
#valid_chroot_dirs =
valid_chroot_dirs = /home ← 追加※OpenSSHでChrootを設定している場合のみ

 

■Dovecot起動

(1)Dovecot起動
 

[root@ns6 ~]# /etc/rc.d/init.d/dovecot start ← Dovecot起動
Dovecot Imapを起動中:                                      [  OK  ]

[root@ns6 ~]# chkconfig dovecot on ← Dovecot自動起動設定

[root@ns6 ~]# chkconfig --list dovecot ← Dovecot自動起動設定確認
dovecot         0:off   1:off   2:on    3:on    4:on    5:on    6:off ← ランレベル2~5のonを確認
(2)ポート143番のOPEN
ルーター側の設定でポート143番をOPENする。
※ルーターの設定は各ルーターのマニュアルまたはメーカー別ルーターポート開放手順を参照ポートチェック【外部からポート開放確認】で「host名」にサーバー名(例:ns6srv.com)、「port番号」に143と入力して「ポートチェック」ボタン押下し、「ホスト=ns6srv.com ポート=143 にアクセスできました。」と表示されることを確認。

 

■メールユーザ追加

(1)メールユーザ追加(SSHによるリモート接続はできないようにする場合)
※例としてユーザ名をns6とする
 

[root@ns6 ~]# useradd -s /sbin/nologin ns6 ← ユーザ追加

[root@ns6 ~]# passwd ns6 ← パスワード設定
Changing password for user ns6.
New UNIX password:  ← パスワード応答
Retype new UNIX password:  ← パスワード応答(確認)
passwd: all authentication tokens updated successfully.

 

(2)メールユーザ追加(SSHによるリモート接続もできるようにする場合)
※例としてユーザ名をns6とする
 

[root@ns6 ~]# useradd ns6 ← ユーザ追加

[root@ns6 ~]# passwd ns6 ← パスワード設定
Changing password for user ns6.
New UNIX password:  ← パスワード応答
Retype new UNIX password:  ← パスワード応答(確認)
passwd: all authentication tokens updated successfully.

 

(3)既存ユーザをメールユーザとする場合
既存ユーザはそのままメールユーザとして使える

 

■メールソフト設定(受信メールサーバーをPOPにする場合)

 

 

■メールソフト設定(受信メールサーバーをIMAPにする場合)

 

■メールサーバー確認

・内部で同一ユーザ同士でメールの送受信
・内部で他ユーザ間でメールの送受信
・内部で外部(プロバイダのメールアドレス等)との送受信
・内部で携帯との送受信※
・外部(会社等)で同一ユーザ同士でメールの送受信
・外部(会社等)で他ユーザ間でメールの送受信
・外部(会社等)で外部(プロバイダのメールアドレス等)との送受信
・外部(会社等)で携帯との送受信※※携帯はドメイン指定受信等でメールサーバーからのメールが拒否されないようにしておくこと

 

■メール不正中継拒否テスト

RBL.JPで「ホスト名」に自宅サーバーのホスト名(例:ns6srv.com)を入力して「Check」ボタンを押下する。
19種類のテストが行われ、ページ最後尾にno relays accepted.と表示されればOK。