Mysql – postfix-thesql package on CentOS 7

centos7MySQLpostfix

I'm following this tutorial on how to install a secure mail server. The guide is for Ubuntu 14.04LTS but I'm doing it with a few modifications for my CentOS 7 system.

I am however stuck on finding/installing a package called postfix-mysql that is for using Postfix with a MySQL database.

Doing a yum search didn't give anything, nor did googling and there is no info about this package on Postfix's official site. I did however find a HowTo on their site about Building Postfix for MySQL support.

Is this package an Ubuntu-only thing or is it under a different name for CentOS? Or is the problem that it just isn't available for CentOS 7 yet? Would I need to compile Postfix to support MySQL or is it even already built-in and doesn't need the postfix-mysql package anymore?

It is alot of questions but I'd be grateful if someone who knows more about this to shed some light on it.

Best Answer

From Centos 5.9 postfix includes native mysql support.

You can check dependencies:

$ rpm -q --requires postfix | grep mysql
libmysqlclient.so.16()(64bit) 
libmysqlclient.so.16(libmysqlclient_16)(64bit) 
mysql-libs  

See also: [SOLVED] Postfix with MySQL support and CentOS 5.9 Release Notes

As alternatives, to checks if postfix installation is compiled with mysql, you can use command postconf. Command postconf -m will list all supported lookup table types.

# postconf -m
btree
cidr
environ
fail
hash
internal
ldap
memcache
mysql
nis
pcre
proxy
regexp
socketmap
static
tcp
texthash
unix

As you can see, mysql was listed as supported lookup table.