Error: Postfix - do not list domain in BOTH mydestination and virtual_mailbox_domains

You see the following error in your mail log:

Feb 24 21:42:39 mail postfix/trivial-rewrite[1896]: warning: do not list domain in BOTH mydestination and virtual_mailbox_domains



You have in the resource (for example a MySQL database) referenced in the virtual_mailbox_domains directive in /etc/postfix/ AND in the mydestination line (also in /etc/postfix/! This doesn't work. You can list either in virtual_mailbox_domains or in mydestination, but not in both.

Please correct this and restart Postfix:

/etc/init.d/postfix restart
Share this page:

Suggested articles

10 Comment(s)

Add comment


By: Christopher Thomas

you mention that to solve the problem, you need to make both different, but never went far enough, nobody knows how to fix the problem, just that there is a problem. the error message already explained the problem, therefore in order to be a "howto" we need to know "howto" fix it.


That would depend on how the server is set up.  There is no one-size-fits all solution.  It's different for every configuration.

By: Anonymous

In my case, at least, removing from mydestination cleared things up. On my server, mydestination is just localhost, localhost.localdomain

By: Anonymous

GREAT SOLUTION, works for me.

By: SpartakusMd

This worked for me also.

By: masud Hussain

The solution is as simple as you mentioned.  it is working.......   :)

By: Scott Brower

I see that this is old but there is a step that may help someone moving forward:

If you edit /etc/postfix/virtual don't forget to rehash it by running 

# postmap /etc/postfix/virtual 

Otherwise the virtual.db will be older and postfix won't see it.


By: Mauricio

Great! I could fix this issue.

Thank you


perfect, I could not find the solution. It only remains to make ispconfig accept 10MB email, modify the /etc/postfix/ ... message_size_limit and virtual_message_size but in webmail it is still 2MB  

By: Adam

well, it would be much better if you gave some examples of what you can do, and explain why you shouldn't use it in both, now you're only explaining what we already knew; Don't do it