前回検証時にopen-smtpが作成されず構築失敗したんですが、open-smtpも作成されてPOP before SMTPも出来ました。
試行錯誤万歳ヾ(゚∀゚)ノ
というわけで、VpopmailでPOP before SMTPを導入します。
POP before SMTPとは
こういう感じの機能です。
試行錯誤万歳ヾ(゚∀゚)ノ
というわけで、VpopmailでPOP before SMTPを導入します。
POP before SMTPとは
電子メールの送信を行なう際のユーザ認証方法の一つ。
送信前に指定したPOP3サーバにあらかじめアクセスさせることによって、SMTPサーバの使用許可を与える方式。
「PbS」と略記されることも稀にある。
こういう感じの機能です。
では早速、構築方法を書いていきたいと思いますヾ(゚∀゚)ノ
今回は既にVpopmailで構築が完了している方を対象にしています。
[CentOS,qmail] Vpopmailでバーチャルドメインに対応
新規で構築する方は、まずこちらを参考にconfigureの前の段階まで進めて下さい。
Vpopmail(POPbeforeSMTP対応)インストール
記憶されたIPアドレスをクリアにする
構築時に「--enable-relay-clear-minutes=15」を指定したと思いますが、この設定は覚えたIPアドレスの有効期限を決めるだけで、有効期限が過ぎても削除しません。
なので、覚えたIPアドレスを一定時間でクリアする設定を行います。
インストールが完了したら
[CentOS,qmail] Vpopmailでバーチャルドメインに対応
を参考に初期設定、ドメインの設定を行います。
Crontab設定後、
[CentOS,qmail] Vpopmailでバーチャルドメインに対応
を参考にして、Vpopmailの初期設定とドメイン、ユーザの追加を行う。
ドメイン設定後、一度受信して「/home/vpopmail/etc/open-smtp」ファイルが自動作成され、中に自分のIPアドレスが記載されていれば構築完了ですヾ(゚∀゚)ノ
この設定で、SMTP認証とPOPbeforeSMTPが共存しているので、SMTP認証形式がCRAM-MD5にしか対応していないメールソフト(例えばnPOPとか)ではPOPbeforeSMTPを使用すればOKです。
今回は既にVpopmailで構築が完了している方を対象にしています。
[CentOS,qmail] Vpopmailでバーチャルドメインに対応
新規で構築する方は、まずこちらを参考にconfigureの前の段階まで進めて下さい。
Vpopmail(POPbeforeSMTP対応)インストール
# cd vpopmail-5.4.25
※vpopmailのディレクトリに移動
# make distclean
※一度でもVpopmailの構築をした場合は、新規でconfigureしても以前の設定が残ってしまう為、makeファイルを削除
# mkdir -p /home/vpopmail/etc/
# chown -R vpopmail:vchkpw /home/vpopmail/
# cp /etc/tcp.smtp* /home/vpopmail/etc/
新規インストール用
※新規でインストールする場合、configure時にtcp.smtpがないとエラーになるのでディレクトリを作成、所有者をvpopmailに変更し、tcp.cmtpをコピーする
# ./configure \
--enable-roaming-users \
--disable-clear-passwd \
--enable-relay-clear-minutes=15 \
--enable-tcpserver-file=/home/vpopmail/etc/tcp.smtp \
--enable-logging=y
# make && make install-strip
※コンパイル後にインストール
※vpopmailのディレクトリに移動
# make distclean
※一度でもVpopmailの構築をした場合は、新規でconfigureしても以前の設定が残ってしまう為、makeファイルを削除
# mkdir -p /home/vpopmail/etc/
# chown -R vpopmail:vchkpw /home/vpopmail/
# cp /etc/tcp.smtp* /home/vpopmail/etc/
新規インストール用
※新規でインストールする場合、configure時にtcp.smtpがないとエラーになるのでディレクトリを作成、所有者をvpopmailに変更し、tcp.cmtpをコピーする
# ./configure \
--enable-roaming-users \
--disable-clear-passwd \
--enable-relay-clear-minutes=15 \
--enable-tcpserver-file=/home/vpopmail/etc/tcp.smtp \
--enable-logging=y
vpopmail 5.4.25
Current settings
---------------------------------------
vpopmail directory = /home/vpopmail
domains directory = /home/vpopmail/domains
uid = 89
gid = 89
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 = OFF --disable-qmail-ext (default)
ip alias = OFF --disable-ip-alias-domains (default)
onchange script = OFF --disable-onchange-script (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)
Current settings
---------------------------------------
vpopmail directory = /home/vpopmail
domains directory = /home/vpopmail/domains
uid = 89
gid = 89
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 = OFF --disable-qmail-ext (default)
ip alias = OFF --disable-ip-alias-domains (default)
onchange script = OFF --disable-onchange-script (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)
# make && make install-strip
※コンパイル後にインストール
記憶されたIPアドレスをクリアにする
構築時に「--enable-relay-clear-minutes=15」を指定したと思いますが、この設定は覚えたIPアドレスの有効期限を決めるだけで、有効期限が過ぎても削除しません。
なので、覚えたIPアドレスを一定時間でクリアする設定を行います。
インストールが完了したら
[CentOS,qmail] Vpopmailでバーチャルドメインに対応
を参考に初期設定、ドメインの設定を行います。
crontab-e
*/15 * * * * /home/vpopmail/bin/clearopensmtp 2>&1 > /dev/null
※15分毎にIPアドレスをクリアする設定
※15分毎にIPアドレスをクリアする設定
Crontab設定後、
[CentOS,qmail] Vpopmailでバーチャルドメインに対応
を参考にして、Vpopmailの初期設定とドメイン、ユーザの追加を行う。
ドメイン設定後、一度受信して「/home/vpopmail/etc/open-smtp」ファイルが自動作成され、中に自分のIPアドレスが記載されていれば構築完了ですヾ(゚∀゚)ノ
この設定で、SMTP認証とPOPbeforeSMTPが共存しているので、SMTP認証形式がCRAM-MD5にしか対応していないメールソフト(例えばnPOPとか)ではPOPbeforeSMTPを使用すればOKです。
コメント