This is a discussion on Re: FreeTDS support for table lookups within the mailing.postfix.users forums, part of the Mail Servers and Related category; On Sat, 8 May 2004, Wietse Venema wrote: > > There have been discussions in the past about unified interface ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
On Sat, 8 May 2004, Wietse Venema wrote:
> > There have been discussions in the past about unified interface and code > > for SQL lookups, but I suppose this won't happen in the near future? > > To the extent possible, this is done, except for free format MySQL > queries. > I would like to re-open the free-format query *syntax* discussion. As it stands we have: - ldapsource_{query_filter,result_filter} in main.cf. Input string is %s, domain is %d, localpart is %u. ${variable} expansions are made from the configuration parameter namespace. - LDAP {query_filter,result_filter} in /etc/postfix/ldapsource.cf. Same "%[sud]" substitutions, but no ${variable} expansions. - PGSQL/MYSQL via /etc/postfix/dbsource.cf only. No [%sud] syntax, input key, localpart, domain via ${special_variable} substitutions, no access to main.cf parameters. I would to propose the following unification: - All of multi-parameter map types support both external ".cf" and "mapsource_" prefix notation in main.cf. - Most or all map parameters (especially the host, port and other parameters likely to be the same accross multiple maps) support ${variable} expansion from the main.cf parameter namespace. - All query string parameters and result format parameters support the more compact %[sud] (and perhaps also %[SUD] for result formats to specify use of the lookup key rather than the result string). - The map parameters also support any special ${variable}s associated with %[sud]. - Parameters that hold passwords are read from a file when the parameter value starts with a "file:/" prefix. This would allow one: - To store all map definitions in main.cf with just passwords in external files) or in external files if preferred. - To use main.cf ${parameter} substitutions to define common elements of multiple maps. - To use whichever syntax %[sud...] or ${lookup,localpart,domain,...} is more intuitive to the user (Users migrating from Sendmail will find the %[letter] syntax more directly familiar). This is an extended version of work intiated by Liviu Daia, I would like to bring it to a conclusion in the Postfix 2.2 timeframe... -- Viktor. Disclaimer: off-list followups get on-list replies or get ignored. Please do not ignore the "Reply-To" header. To unsubscribe from the postfix-users list, visit http://www.postfix.org/lists.html or click the link below: <mailto:majordomo@postfix.org?body=unsubscribe%20p ostfix-users> |