Wietse Venema wrote:
You forgot to test the virtual alias expansion.
postmap -q u...@example.com mysql:/etc/postfix/mysql-virtual.cf
Thus should produce the same result as a hash: table with:
u...@example.com u...@example.com, u...@sms.example.com
Ditto for the transport map.
Now that I've fixed table lookup following from Magnus' advice, all is
working!
# postmap -q ri...@example.com mysql:/etc/postfix/mysql-virtual.cf
ri...@example.com,ri...@sms.example.com
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.