Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
From: Simone Felici (s.felicialpikom.it)
Date: Fri Jun 29 2007 - 02:35:42 CDT
>> <empty> it means "", not NULL.
>> I've tried manually the queries. If I use "AND", receiving a mails for
>> barsecondexample.com they are not routed. It search this:
>> SELECT CONCAT('smtp:', next) FROM smtproutes where
>> domain='secondexample.com' and account='bar';
>> 0 ROWS!
> it will indeed search for "this", but if no result is found, it will
> search for the domain part only.
I remember you the mails are NOT hostet on this server, it should only route the mails to my backend servers, depending on the account or domain. (I
don't know if this is an info you need).
I haven't understood what you mean. Can I specify two queries into my '/etc/postfix/mysql_transport.cf' file? So if the first obtain empty result the
program try the second one? I've tested, but it execute only the last insert:
user = root
password = <mysqlpwd>
hosts = 127.0.0.1
dbname = mailFrontend
query = SELECT CONCAT('smtp:', next) FROM smtproutes where domain='%d' and account='%u'
query = SELECT CONCAT('smtp:', next) FROM smtproutes where domain='%d'
> please follow what I ask you to do first, to see what the problem is. If
> you just want the sql query, I can give you hints, but it's better to
> find the culprit.
I would resolve this only with sql queries, if I can. Otherwise I'm open for all solutions to solve this problem. Sorry If I've not completly
understood your explanation. My english is a little poor :)
If I run "SELECT CONCAT('smtp:', next) FROM smtproutes where domain='example.com' and account=''" then I obtain no results because the "AND" clause
search for the domain AND the account=''. There aren't records with domain filled out and having account=''.
Simone Felici E-Mail: s.felicialpikom.it
Divisione Tecnica Tel: 0461 030 111
Alpikom S.p.A. Fax: 0461 030 112
v.Fersina, 23 - 38100 Trento URL: http://www.alpikom.it