Loading ...
Sorry, an error occurred while loading the content.

246594Re: What is table='t'

Expand Messages
  • Barney Desmond
    Dec 2, 2008
      Stephen Liu wrote:
      > Sorry, it is /etc/postfix/mysql_relay_domains.cf
      >>> user=mail
      >>> password=mypasswd
      >>> dbname=maildb
      >>> table='t'
      >>> select_field=domains
      >>> where_field=domains
      >>> hosts=
      >>> additional_conditions = and enabled = 1
      >> At a guess, it's going to perform the query:
      >> SELECT `domains` FROM `t` WHERE `domains`=%s AND `enabled`=1;
      > mysql> SELECT `domains` FROM `t` WHERE `domains`=%s AND `enabled`=1;
      > ERROR 1064 (42000): You have an error in your SQL syntax; check the
      > manual that corresponds to your MySQL server version for the right
      > syntax to use near '%s AND `enabled`=1' at line 1

      You need to understand what postfix expects to do. You provide it a
      mysql query, and it will fill in the blank. Postfix lookups are
      key-value pairs, so there is exactly one blank to fill in, represented
      by %s.

      As a guess, you should check the other tables, maybe `domains`. You're
      looking for a table with a column called "domains".

      > I have changed;
      > table='t'
      > to;
      > query=
      > This routing mail server still works without problem.

      This probably just means it won't do that lookup any more, so you won't
      be accepting mail for the relay_domains that you'd expect.
    • Show all 8 messages in this topic