Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

We have Postfix configured for virtual domains and virtual mailboxes and it's running quite nicely. However, Postfix now thinks that everything except my_destination should be delivered virtually. And this is a problem because it means we can't use virtual aliases to deliver external mail.

Whenever I try sending an email through this server to a domain which we are not responsible for (ie. does not appear in the mysql table of virtual domains and is not in my_destination) then we get the following error message:

554 5.1.1 : Recipient address rejected: User unknown in virtual mailbox table

And this happens for every single domain we do not host, regardless of what the domain name is. When I send email to an existing user at a domain listed in my_destination then it delivers locally ok.

How do we tell Postfix to not attempt virtual delivery for domains that it is not responsible for? How do I get it to deliver that email to the correct external host (presuming of course the sender has permission to relay).

share|improve this question

2 Answers 2

can you paste the contents of your main.cf removing any private info?

I can only assume that your transport_maps has gone a bit crazy

share|improve this answer
up vote 0 down vote accepted

My colleague resolved this in the early hours of this morning. He discovered that it was our SQL query for checking whether a domain was virtual or not. We'd incorrectly assumed that it should return a list of virtual domains with select distinct domain when in fact it actually wanted to check if a domain was virtual or not with select domain where domain = %s

We were switching from the old style configuration for MySQL lookups to the new one, and had made an incorrect assumption based on the fact that a text file would return a list of domains and so why shouldn't MySQL.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.