Hi list

I really got a weird problem with one of my postfix installations and the mysql lookup. The weird thing is that it works on two of my three postfix installtions.
Have the following .cnf file for the mysql lookup

<<
hosts = 192.168.200.113
port = 3308
user = postfix
password = XXXXXX
dbname = postfix
query = SELECT 'reject' FROM `blacklist-cidr` WHERE inet_aton('%s') BETWEEN `network` AND `broadcast`
>>
port is correct for sure ;-)
When I try with postmap -q I get the following error

<<
postmap -q '192.167.34.21' mysql:/etc/postfix/mysql-blacklist.cf
postmap: warning: mysql query failed: Table 'postfix.blacklist-cidr' doesn't exist postmap: fatal: table mysql:/etc/postfix/mysql-blacklist.cf: query error: Success
>>

The same cnf file works like charm on the two other servers which are debian with the same postfix version too. When I connect manually from the mailserver with mysql command and fire the query it works as well.

<<
mysql -upostfix -pXXXXXX -h 192.168.200.113 -P 3308
mysql> use postfix
Database changed
mysql> SELECT 'reject' FROM `blacklist-cidr` WHERE inet_aton('192.167.34.21') BETWEEN `network` AND `broadcast`;
Empty set (0.12 sec)
>>

I know I could rename the table which I would do for sure if the problem would have shown up on all of my servers :-) It seems that on the affected server the backtick is handled differently by postfix from the two others.

tobi

Reply via email to