■ソフトウェアのバージョン
--------------------------------
・postfix-2.3.3-2.1
・dovecot-1.0.7-7.e15
・postresql-8.2.14-1PGDG.rhe15
--------------------------------
インストール済み、Postfixの削除
# yum remove postfix
yumのアップデートから除外
# vi /etc/yum.conf
--------------------
exclude=postfix*
--------------------
PostgreSQLをインストール
# yum install --enablerepo=pgdg82 postgresql postgresql-server postgresql-devel postgresql-libs
Postfixのソースをダウンロード
# wget http://ftp.riken.jp/Linux/caos/centos/5.4/os/SRPMS/postfix-2.3.3-2.1.el5_2.src.rpm
# rpm -ivh postfix-2.3.3-2.1.el5_2.src.rpm
spec ファイルの編集
# vi /usr/src/redhat/SPECS/postfix.spec
TLSの設定の下に、それぞれ下記を追加。
-------------------------------------------------------------------
# 5行目あたり
%define PGSQL 1
# 177行目あたり
%if %{PGSQL}
Requires: postgresql
BuildRequires: postgresql, postgresql-devel
%endif
# 202行目あたり
%if %{PGSQL}
CCARGS="${CCARGS} -DHAS_PGSQL -I/usr/include/postgresql"
AUXLIBS="${AUXLIBS} -lpq -lssl -lcrypto -lcrypt"
%endif
-------------------------------------------------------------------
ビルドしよう。
# rpmbuild -ba postfix.spec
# cd /usr/src/redhat/RPMS/x86_64
# rpm -ivh postfix-2.3.3-2.1.x86_64.rpm
--------------------------------
・postfix-2.3.3-2.1
・dovecot-1.0.7-7.e15
・postresql-8.2.14-1PGDG.rhe15
--------------------------------
インストール済み、Postfixの削除
# yum remove postfix
yumのアップデートから除外
# vi /etc/yum.conf
--------------------
exclude=postfix*
--------------------
PostgreSQLをインストール
# yum install --enablerepo=pgdg82 postgresql postgresql-server postgresql-devel postgresql-libs
Postfixのソースをダウンロード
# wget http://ftp.riken.jp/Linux/caos/centos/5.4/os/SRPMS/postfix-2.3.3-2.1.el5_2.src.rpm
# rpm -ivh postfix-2.3.3-2.1.el5_2.src.rpm
spec ファイルの編集
# vi /usr/src/redhat/SPECS/postfix.spec
TLSの設定の下に、それぞれ下記を追加。
-------------------------------------------------------------------
# 5行目あたり
%define PGSQL 1
# 177行目あたり
%if %{PGSQL}
Requires: postgresql
BuildRequires: postgresql, postgresql-devel
%endif
# 202行目あたり
%if %{PGSQL}
CCARGS="${CCARGS} -DHAS_PGSQL -I/usr/include/postgresql"
AUXLIBS="${AUXLIBS} -lpq -lssl -lcrypto -lcrypt"
%endif
-------------------------------------------------------------------
ビルドしよう。
# rpmbuild -ba postfix.spec
# cd /usr/src/redhat/RPMS/x86_64
# rpm -ivh postfix-2.3.3-2.1.x86_64.rpm