Re: SOLVED: table lookup errors when postfix tries to read mysql virtual domain tables

This is a discussion on Re: SOLVED: table lookup errors when postfix tries to read mysql virtual domain tables within the mailing.postfix.users forums, part of the Mail Servers and Related category; Sorry, this part of the postmap output didn't paste in: OUTPUT: postmap: dict_lookup: additional_conditions = (notfound) postmap: cfg_get_str: /usr/local/...


Go Back   Usenet Forums > Mail Servers and Related > mailing.postfix.users

FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 06-05-2005
Bud Roth
 
Posts: n/a
Default Re: SOLVED: table lookup errors when postfix tries to read mysql virtual domain tables

Sorry, this part of the postmap output didn't paste in:

OUTPUT:
postmap: dict_lookup: additional_conditions = (notfound)
postmap: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_alias_maps.cf:
additional_conditions =
postmap: dict_lookup: domain = (notfound)
postmap: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_alias_maps.cf:
domain =
postmap: dict_lookup: hosts = localhost
postmap: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_alias_maps.cf:
hosts = localhost
postmap: mysql host_init: host=localhost, port=0, type=unix
postmap: dict_open: mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
postmap: dict_mysql_get_active: attempting to connect to host localhost
postmap: dict_mysql: successful connection to host localhost
postmap: warning: mysql query failed: 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 'goto FROM alias WHERE address='bud@obitori.net'' at line
1
postmap: dict_unregister: /usr/local/etc/postfix/mysql_virtual_alias_maps.cf 1

The bottom-most part with the syntax error is what is important.

On Sunday 05 June 2005 08:37, Bud Roth wrote:
> Per Magnus Black's suggestion, I ran:
>
> postmap -vv -q bud@obitori.net
> mysql:/usr/local/etc/postfix/mysql_virtual_alias_maps.cf
>
> OUTPUT:
> postmap: dict_lookup: additional_conditions = (notfound)
> postmap: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_alias_maps.cf:
> additional_conditions =
> postmap: dict_lookup: domain = (notfound)
> postmap: cfg_get_str: /usr/local/etc/postfix/mysql_virtual_alias_maps.cf:
> domain =
> postmap: dict_lookup: hosts = localhost
>
> This seemed to confirm Keith Matthews' suspicion that I had a Mysql table
> problem such as a misnamed column. I decided to drop the postfix tables
> and users created by the DATABASE_MYSQL.TXT file that comes with
> postfixadmin. (The text file creates the virtual alias, domain, and mailbox
> tables used by postfix as well as the PHP-based postfixadmin GUI.) I reran
> the script:
>
> mysql -u root -p < DATABASE_MYSQL.TXT
>
> and got a table creation error. To make a long story short, I cut the
> DATABASE_MYSQL.TXT file into pieces and ran them thru mysql. Finally, I
> located the problem in this part of the file:
>
> CREATE TABLE alias (
> address varchar(255) NOT NULL default '',
> goto text NOT NULL,
> domain varchar(255) NOT NULL default '',
> created datetime NOT NULL default '0000-00-00 00:00:00',
> modified datetime NOT NULL default '0000-00-00 00:00:00',
> active tinyint(1) NOT NULL default '1',
> PRIMARY KEY (address),
> KEY address (address)
> ) TYPE=MyISAM COMMENT='Postfix Admin - Virtual Aliases';
>
> The problem appears to be the "goto" column. See:
>
> http://dev.mysql.com/doc/mysql/en/reserved-words.html
>
> The above link lists "goto" as a reserved word. I changed the column name
> to "go2" in mysql's postfix.alias table and changed "goto" to "go2" in the
> postfix mysql_virtual_alias_maps.cf file. In addition, I had to make the
> same change in all the files located within /usr/local/www/postfixadmin,
> which I did with a perl script. The problem appears to be resolved.
>
> In conclusion, as Keith surmised, this is a postfixadmin problem, not a
> postfix problem. The initial table creation script is producing an error
> in my version of mysql (5.0.0-alpha Freebsd 5.3 RELEASE port.) Because the
> table is incorrectly created, postfix cannot access the columns it expects
> to finds and produces the errors contained in my original post. I opened a
> bug report with postfixadmin. Thanks for pointing me in the right
> direction.
>
> Bud
> Lake Barcroft, VA
>
> -------------------------------------------------------

Reply With Quote
Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT +1. The time now is 08:14 PM.


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.0.0