On Friday 31 July 2009, Tino Donderwinkel wrote: > I have a virtual_alias map setup that uses this mySQL query; > > SELECT rcpt FROM aliases WHERE alias = '%s' OR alias = (SELECT > CONCAT('%u@', alias_of) FROM domains WHERE domain = '%d')
hmm I think the way the % vars are replaced is the problem, try this. CONCAT('%u', '@', alias_of) or the easier way (this is what I use. SELECT goto FROM alias, alias_domain WHERE alias_domain.alias_domain = '%d' AND alias.address = concat('%u', '@', alias_domain.target_domain) AND alias.active = 1 AND alias_domain.active = 1 -- Simple things make people happy. Willy De la Court PGP Public Key at http://www.linux-lovers.be/download/public_key.asc PGP Key fingerprint = 784E E18F 7F85 9C7C AC1A D5FB FE08 686C 37C7 A689