Hi Sergei

Try the connection specified in the files manually by logging as that
exact user
and running the query. You might get some useful error messages from MySQL.

I tried pulling the info specified in the mysql_domains.cf file that's specified to retrieve domain info in my postfix setup. Here's what the file looks like:

[root@mail:/etc/postfix] #cat mysql_domains.cf
user=mail
password=secret
dbname=maildb
table=domains
select_field=domain
where_field=domain
hosts=127.0.0.1
additional_conditions = and enabled = 10

And I'm able to pull the info from the command line using the query specified in the file:

[root@mail:/etc/postfix] #mysql -umail -p -h 127.0.0.1 maildb -e "select domain from domains where domain like 'example.com'"
Enter password:
+--------------+
| domain       |
+--------------+
| example.com  |
+--------------+


Yet, nothing is still returned  by querying the file using postmap:

[root@mail:/etc/postfix] #postmap -q example.com mysql:/etc/postfix/mysql_domains.cf
[root@mail:/etc/postfix] #


Any further ideas would be welcome.

Thanks,
Tim

Reply via email to