On Fri, Jan 29, 2010 at 06:41:48PM +0100, Robert Schetterer wrote: > >> smtpd_sender_login_maps = hash:/etc/postfix/sasl_senders > >> > >> pico /etc/postfix/sasl_senders > >> > >> @domain.de username > >> > >> which works as desired > > > > As documented, in indexed files the first non-whitespace token is the > > lookup *key*, and the remainder of the (possibly "folded") line is > > the *value*. > > > > $ postmap -q "@domain.de" hash:/etc/postfix/sasl_senders > > username > > sorry viktor, i dont understand, perhaps my english leaks here > would you like to say that this cannot be done with sql?
Nothing of the sort. Just create an SQL query that returns ONLY the lookup value and NOT the key. $ postmap -q "key" mysql:/etc/postfix/mumble.cf value This is equivalent to a source file for indexing via postmap for "hash", "btree", "cdb", ... containing: # Lookup key Lookup value key value Postfix uses the key to retrieve the value. You have royally confused yourself into a misguided belief that the lookup key needs to be returned by the query, just because that's what you see in the *source* files used by postmap(1) to construct simple indexed tables. In those tables too, the lookup result is just the value. -- Viktor. P.S. Morgan Stanley is looking for a New York City based, Senior Unix system/email administrator to architect and sustain our perimeter email environment. If you are interested, please drop me a note.