The version of Postfix that comes with Red Hat Enterprise Linux 5 or CentOS 5 does not support MySQL lookups. You can build your own custom Postfix RPM or get a prebuilt RPM from the CentOS Plus repository. You can use the CentOS repository in RHEL since CentOS is binary compatible with RHEL. This article describes how to install Postfix with MySQL lookup table support from the CentOS Plus repository.
1. Edit the file /etc/yum.repos.d/CentOS-Base.repo or its equivalent in RHEL and edit the lines below.
[base]
exclude=postfix
[update]
exclude=postfix
[centosplus]
enabled=1
includepkgs=postfix
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
gpgcheck=1
gpgkey=http://mirror.centos.org/centos/RPM-GPG-KEY-CentOS-5
REFERENCE