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

246601Re: What is table='t'

Expand Messages
  • Stephen Liu
    Dec 2, 2008
      --- Barney Desmond <barneydesmond@...> wrote:

      > 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=127.0.0.1
      > >>> 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.


      Hi Barney,


      That line;
      table='t'

      seems having no function.


      Whatever I put there;

      table='t'
      table=
      query=


      OR even deleting that line. Other mail servers receive mails without
      problem. All incoming mails were routed to their mail servers
      according to domains.


      Remark: each time after editing /etc/postfix/mysql_relay_domains.cf

      ran;
      # postfix reload
      # postfix check
      # tail /var/log/mail.log

      to make sure no error/warning popup


      Stephen L


      Send instant messages to your online friends http://uk.messenger.yahoo.com
    • Show all 8 messages in this topic