I have Postfix and Dovecot running. Postfix is set up to use Dovecot as mail transport. Everything is pretty much by book but every received email is bounced back. I am testing the mail server from gmail.
There are some strange queries for each email:
SELECT email FROM users WHERE email ='receiver@domain' (This is ok)
SELECT email FROM users WHERE email ='receiver@domain' (This is ok)
SELECT email FROM users WHERE email ='sender@gmail.com' (Why is postfix checking sender's email against db?)
SELECT email FROM users WHERE email ='@gmail.com' (Why is postfix checking senders domain against db?)
First two mysql queries return a valid result (triple checked).
Bounce message: Diagnostic-Code: X-Postfix; unknown user: "receiver.name"
Only useful bit from maillog: status=bounced (unknown user: "receiver.name")
Any troubleshoot ideas or solutions? I have turned verbose debugging both for Postfix and Dovecot but there is nothing more in the logs.
EDIT: master.cf - http://pastebin.com/raw.php?i=Yt8QzPfT main.cf - http://pastebin.com/raw.php?i=rTdEM9m4