3.1. Postfix installation from centosplus repository

To install postfix with MySQL and PostgreSQL support, you have to enable the CentOS plus repository. I'll assume that you want only the postfix package from the this repository, and I'll show how:
Make sure that you use yum-priorities plugin:

Enable yum-priorities

# yum install yum-priorities
# cat /etc/yum/pluginconf.d/priorities.conf
[main]
enabled = 1
If 'enabled=0', you may change that line to 'enabled = 1' with a text editor, or enable the plugin on the command line using '--enableplugin=priorities'.

Disable postfix package retrieval from the base repository by adding a filter to [base] and [updates] sections of /etc/yum.repos.d/CentOS-Base.repo, keeping a higher priority for these repositories:

Exclude postfix from base and updates repositories

[base]
name=CentOS-$releasever - Base
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=os
#baseurl=http://mirror.centos.org/centos/$releasever/os/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
exclude=postfix-*
priority=1

#released updates
[updates]
name=CentOS-$releasever - Updates
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=updates
#baseurl=http://mirror.centos.org/centos/$releasever/updates/$basearch/
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
exclude=postfix-*
priority=1



Enable centosplus repository, but with a lower priority:

Enable CentOS plus repository, with a lower priority

#additional packages that extend functionality of existing packages
[centosplus]
name=CentOS-$releasever - Plus
mirrorlist=http://mirrorlist.centos.org/?release=$releasever&arch=$basearch&repo=centosplus
#baseurl=http://mirror.centos.org/centos/$releasever/centosplus/$basearch/
gpgcheck=1
enabled=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-CentOS-5
priority=2

Perform postfix package installation

Postfix package installation

# yum install postfix
Loaded plugins: fastestmirror, priorities
Loading mirror speeds from cached hostfile
 * base: ftp.ines.lug.ro
 * updates: ftp.ines.lug.ro
 * centosplus: ftp.ines.lug.ro
 * addons: ftp.ines.lug.ro
 * extras: ftp.ines.lug.ro
460 packages excluded due to repository priority protections
Setting up Install Process
Parsing package install arguments
Resolving Dependencies
--> Running transaction check
---> Package postfix.i386 2:2.3.3-2.1.centos.mysql_pgsql set to be updated
--> Processing Dependency: postgresql for package: postfix
--> Running transaction check
---> Package postgresql.i386 0:8.1.11-1.el5_1.1 set to be updated
--> Finished Dependency Resolution

Dependencies Resolved

============================================================================================================================================
 Package                      Arch                   Version                                             Repository                    Size
============================================================================================================================================
Installing:
 postfix                      i386                   2:2.3.3-2.1.centos.mysql_pgsql                      centosplus                   3.7 M
Installing for dependencies:
 postgresql                   i386                   8.1.11-1.el5_1.1                                    base                         2.9 M

Transaction Summary
============================================================================================================================================
Install      2 Package(s)        
Update       0 Package(s)        
Remove       0 Package(s)        

Total download size: 6.6 M
Is this ok [y/N]:

Up: Postfix installation and configuration
Back: Dovecot installation and configuration
Next: Postfixadmin installation
Comments