|
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 - 06:14:41 CST
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
--- Barney Desmond <barneydesmond
gmail.com> wrote:
> Stephen Liu wrote:
> > I have a /etc/postfix/mysql_*.cf file with following content;
>
> You haven't told us what this file is called. We dunno what it does,
> we
> have no way to tell.
Hi Barney,
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
mysql> SHOW tables;
+------------------+
| Tables_in_maildb |
+------------------+
| aliases |
| domains |
| transport |
| users |
+------------------+
4 rows in set (0.00 sec)
mysql> SELECT `domains` FROM `trasnport` 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
mysql> SELECT * from transport;
+------+----------------------+--------------------+-----------+---------+
| pkid | domain | hostname | transport |
enabled |
+------+----------------------+--------------------+-----------+---------+
| 1 | satimis.dnsalias.com | smtp:192.168.0.209 | :[] |
1 |
| 2 | satimis.changeip.net | smtp:192.168.0.208 | :[] |
1 |
| 3 | satimis.com | smtp:192.168.0.210 | :[] |
1 |
+------+----------------------+--------------------+-----------+---------+
3 rows in set (0.00 sec)
mysql> SELECT `domain` FROM `trasnport` WHERE `domain`=%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
mysql> SELECT `domain` FROM `trasnport` 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
Still the same.
> It could be virtual alias domains, it could be anything.
> http://www.postfix.org/mysql_table.5.html
Noted with thanks.
> > Please help me to understand table='t'. What is 't'?
>
>
> As the file says, 't' is the name of the table it's going to SELECT
> from.
But there is no table named 't'. The name of table starts with t is
'transport'.
I have changed;
table='t'
to;
query=
This routing mail server still works without problem.
B.R.
Stephen L
Send instant messages to your online friends http://uk.messenger.yahoo.com
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]