Postgreyでグレイリスト処理をする
Modified: 1 August 2005
必要な関連パッケージのインストール
Perlのバージョン確認
# perl -v This is perl, v5.8.0 built for i386-linux-thread-multi (with 1 registered patch, see perl -V for more detail) Copyright 1987-2002, Larry Wall Perl may be copied only under the terms of either the Artistic License or the GNU General Public License, which may be found in the Perl 5 source kit. Complete documentation for Perl, including FAQ lists, should be found on this system using `man perl' or `perldoc perl'. If you have access to the Internet, point your browser at http://www.perl.com/, the Perl Home Page. #
Berkeley DB のインストール
まずは、Berkeley DB (Library)です。だいぶ時間がかかります。
# tar zxvf db-4.3.28.tar.tar # cd db-4.3.28 # cd build_unix # ../dist/configure # make # make install
Net::Server のインストール
# tar zxvf Net-Server-0.88.tar.tar # cd Net-Server-0.88 # perl Makefile.PL # make # make install
IO::Multiplex のインストール
# tar zxvf IO-Multiplex-1.08.tar.gz # cd IO-Multiplex-1.08 # perl Makefile.PL # make # make install
BerkeleyDB (Perl module)のインストール
# tar zxvf BerkeleyDB-0.26.tar.gz # cd BerkeleyDB-0.26 # perl Makefile.PL # make # make install
ダウンロードする
以下からダウンロードします。
http://isg.ee.ethz.ch/tools/postgrey/
2005年8月6日に、"postgrey-1.21.tar.tar" がダウンロードできました。
インストールする
tarを展開します。
# tar zxvf postgrey-1.21.tar.tar # cd postgrey-1.21実行ファイルをコピーします。
# cp postgrey /usr/local/bin設定ファイルをコピーします。
# cp postgrey_whitelist_clients /etc/postfix # cp postgrey_whitelist_recipients /etc/postfix実行ユーザを作成します。
# useradd postgrey # groupadd nogroupデータベースディレクトリを作成します。
# mkdir /var/spool/postfix/postgrey # chown postgrey /var/spool/postfix/postgrey # chgrp postgrey /var/spool/postfix/postgrey
起動テスト
ポート番号を指定して、起動してみます。
# /usr/local/bin/postgrey --inet=10023 2005/08/06-17:41:11 postgrey (type Net::Server::Multiplex) starting! pid(7579) Binding to TCP port 10023 on host localhost Setting gid to "503 503" 2005/08/06-17:41:11 Couldn't become gid "503": at line 486 in file /usr/lib/perl5/site_perl/5.8.0/Net/Server.pm 2005/08/06-17:41:11 Server closing! #失敗しました。