|
Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com |
From: Stephen Liu (satimis
yahoo.com)
Date: Tue Dec 02 2008 - 09:36:22 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
--- Barney Desmond <barneydesmond
gmail.com> 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
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]