User unknown in virtual alias table

Hello everyone!

I’m using virtualmin/webmin. Did fresh install and everything is ok except mailserver ofc :slight_smile:

I guess I’ve got a problem with postfix. Whenver I try to send mail from outside mail like gmail or local mail from same domain to any of newly created emails I get: User unknown in virtual alias table.

When I’m sending mail from to I get:

Sep  6 08:17:17 server postfix/error[16827]: 145AD40A40: to=<>, orig_to=<>, relay=none, delay=0, delays=0/0/0/0, dsn=5.0.0, status=bounced (User unknown in virtual alias table)

My setup is following:

Server: CentOS 6.7,
server hostname:,
domain I used when creating virtual server:

I also have: which I’m not using anywhere but I can if needed


readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
virtual_alias_maps = hash:/etc/postfix/virtual
sender_bcc_maps = hash:/etc/postfix/bcc
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
home_mailbox = Maildir/
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
mailbox_size_limit = 0
allow_percent_hack = no
myorigin =
myhostname = 
mydestination = localhost

/etc/postfix/virtual:      example       test.example

Tried to google it and made few reinstalls but always the same problem so I’m guessing I’m doing something wrong with hostnames or something I’m missing in configuration?

Any help would be much appreciated!

I sorted it out.

I found old thread on this forum that helped me out a lot:

Had to change like this:

myorigin =         #Deleted this
myhostname =   #Changed this into
mydestination = localhost        #Changed this into: $myhostname localhost.$mydomain
mydomain =       #Added this

So ye, it was a problem related to hostname and right config I just didn’t know how to set it up right.

Also I could recommend this page: for better understanding what is what and what is used for what :). (awesome sentence I know)

Sorry for double thread.