OSEC

Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email hr@neohapsis.com
 
Re: warning: connect to transport mydomain.com, 203.201.146.10: No such file or directory

From: Magnus Bäck (magnusdsek.lth.se)
Date: Wed Mar 02 2005 - 06:27:09 CST


On Wed, March 2, 2005 12:29 pm, Philipp Snizek said:

> I'm trying to have the /etc/postfix/transport in a sql db.
>
> the table looks like this:
>
> create table postfix_transport (
> id int not null primary key auto_increment,
> forward_to varchar(80) not null,
> domain varchar(80) unique not null
> ) type=myisam;
>
>
> /etc/postfix/mysql-transport:
>
> user = dbuser
> password = mypassword
> dbname = postfix
> table = postfix_transport
> select_field = `domain`,`forward_to`
> where_field = domain
> hosts = 127.0.0.1
>
> I know, I've got the problem because of the "," (see ^^^ below).
> select_field = `domain`,`forward_to`
> ^^^
> And thus, the log sais:
> warning: connect to transport mydomain.com,193.201.146.10: No such
> file or directory
>
> Although I could solve this already once I can't remember the
> solution.
>
> What's the correct syntax in mysql-transport?

See mysql_table(5). What are you trying to achieve? If you only want to
return the IP address, why are you selecting the domain field? And what on
earth is with the backticks?

Get things working without MySQL first, then construct a MySQL lookup
table configuration that exactly matches your simple hash/dbm/btree lookup
table.

You will probably need something like this:

select_field = CONCAT('smtp:[', forward_to, ']')

--
Magnus Bäck
magnusdsek.lth.se