Wietse Venema wrote:
You forgot to test the virtual alias expansion.
postmap -q [email protected] mysql:/etc/postfix/mysql-virtual.cf
Thus should produce the same result as a hash: table with:
[email protected] [email protected], [email protected]
Ditto for the transport map.
Now that I've fixed table lookup following from Magnus' advice, all is
working!
# postmap -q [email protected] mysql:/etc/postfix/mysql-virtual.cf
[email protected],[email protected]
The query now looks like this:
query = select coalesce(goto,email),replace(coalesce(goto,email), '@',
'@sms.') from users left join alias on (email=address) where email='%s'
I know it's not the best query out there, but since we do not allow @
signs in user names ("local part"), the problem is impractical.