5

I just was installing new mail server on Ubuntu 16.04, starting my installing and configuring postfix and mysql,:

apt install postfix postfix-mysql mysql-server mysql-client

After configuring postfix (3.1) and create db base for the mail, i tried to test if postfix can reach the db and retrieve all domains / users:

postmap -q mydomain.com mysql:/etc/postfix/mysql-virtual_domains.cf

I got the error:

postmap: fatal: unsupported dictionary type: mysql

Seems my server doesn't support mysql for some reason!

# postconf -m
btree
cidr
environ
fail
hash
inline
internal
memcache
nis
pipemap
proxy
randmap
regexp
socketmap
static
tcp
texthash
unionmap
unix

/etc/postfix# cat dynamicmaps.cf 
# dict-type so-name (pathname)  dict-function   mkmap-function
cdb postfix-cdb.so.1.0.1    dict_cdb_open   mkmap_cdb_open
ldap    postfix-ldap.so.1.0.1   dict_ldap_open
mysql   postfix-mysql.so.1.0.1  dict_mysql_open
pcre    postfix-pcre.so.1.0.1   dict_pcre_open
pgsql   postfix-pgsql.so.1.0.1  dict_pgsql_open
sqlite  postfix-sqlite.so.1.0.1 dict_sqlite_open

Any help please?

6

After installing postfix-mysql try restarting postfix:

postfix reload
4

After many hours spending time on this issue, I found and resolved it:

change mysql line in file /etc/postfix/dynamicmaps.cf to:

mysql   /usr/lib/postfix/postfix-mysql.so.1.0.1 dict_mysql_open

and then reload postfix postfix reload.

0

Thanks for your case, I realized that forgot to install postfix-mysql. After do,

apt install postfix-mysql

the line,

mysql   /usr/lib/postfix/postfix-mysql.so.1.0.1 dict_mysql_open

was automatically added on /etc/postfix/dynamicmaps.cf, but AFAIK not in your case. Is strange.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.