Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have no experience in setting up postfix, and thought virtualmin minght do the legwork for me. Appears not. When I try to send mail to the domain (either or

I get the following message returned

This is the mail system at host dedq239.localdomain.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to <postmaster>

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

The mail system

<> (expanded from <>): User
unknown in virtual alias table

Final-Recipient: rfc822;
Original-Recipient: rfc822;
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; User unknown in virtual alias table

How can I diagnose the problem here? It seems that the mail gets to my server but the server fails to locally deliver the message to the correct user. (This is a guess, truthfully I have no idea what is happening). I have checked my virtual alias table and it seems to be set up correctly (I can post if this would be helpful). Can anyone give me a clue as to the next step?


alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
local_recipient_maps = $virtual_mailbox_maps
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES
sample_directory = /usr/share/doc/postfix-2.3.3/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks reject_unauth_destination
smtpd_sasl_auth_enable = yes
soft_bounce = no
unknown_local_recipient_reject_code = 550
virtual_alias_maps = hash:/etc/postfix/virtual

My mail log file (the last entry)

	Sep 30 15:13:47 dedq239 postfix/cleanup[7237]: 207C6B18158: message-id=<>
	Sep 30 15:13:47 dedq239 postfix/qmgr[7177]: 207C6B18158: from=<>, size=1805, nrcpt=1 (queue active)
	Sep 30 15:13:47 dedq239 postfix/error[7238]: 207C6B18158: to=<>, orig_to=<>, relay=none, delay=0.64, delays=0.61/0.01/0/0.02, dsn=5.0.0, status=bounced (User unknown in virtual alias table)
	Sep 30 15:13:47 dedq239 postfix/cleanup[7237]: 8DC13B18169: message-id=<20090930221347.8DC13B18169@dedq239.localdomain>
	Sep 30 15:13:47 dedq239 postfix/qmgr[7177]: 8DC13B18169: from=<>, size=3691, nrcpt=1 (queue active)
	Sep 30 15:13:47 dedq239 postfix/bounce[7239]: 207C6B18158: sender non-delivery notification: 8DC13B18169
	Sep 30 15:13:47 dedq239 postfix/qmgr[7177]: 207C6B18158: removed
	Sep 30 15:13:48 dedq239 postfix/smtp[7240]: 8DC13B18169: to=<>,[]:25, delay=1.3, delays=0.02/0.01/0.58/0.75, dsn=2.0.0, status=sent (250 2.0.0 OK 1254348828 36si15082901pxi.91)
	Sep 30 15:13:48 dedq239 postfix/qmgr[7177]: 8DC13B18169: removed
	Sep 30 15:14:17 dedq239 postfix/smtpd[7233]: disconnect from[]

etc.aliases file below I have not touched this file - myvirtualdomain is a replacement for my real domain name

#  Aliases in this file will NOT be expanded in the header from
#  Mail, but WILL be visible over networks or from /bin/mail.
#   >>>>>>>>>>	The program "newaliases" must be run after
#   >> NOTE >>	this file is updated for any changes to
#   >>>>>>>>>>	show through to sendmail.

# Basic system aliases -- these MUST be present.
mailer-daemon:  postmaster
postmaster: root

# General redirections for pseudo accounts.
bin:    	root
daemon: 	root
adm:    	root
lp: 	root
sync:   	root
shutdown:   root
halt:   	root
mail:   	root
news:   	root
uucp:   	root
operator:   root
games:  	root
gopher: 	root
ftp:    	root
nobody: 	root
radiusd:    root
nut:    	root
dbus:   	root
vcsa:   	root
canna:  	root
wnn:    	root
rpm:    	root
nscd:   	root
pcap:   	root
apache: 	root
webalizer:  root
dovecot:    root
fax:    	root
quagga: 	root
radvd:  	root
pvm:    	root
amanda: 	root
privoxy:    root
ident:  	root
named:  	root
xfs:    	root
gdm:    	root
mailnull:   root
postgres:   root
sshd:   	root
smmsp:  	root
postfix:    root
netdump:    root
ldap:   	root
squid:  	root
ntp:    	root
mysql:  	root
desktop:    root
rpcuser:    root
rpc:    	root
nfsnobody:  root

ingres: 	root
system: 	root
toor:   	root
manager:    root
dumper: 	root
abuse:  	root

newsadm:    news
newsadmin:  news
usenet: 	news
ftpadm: 	ftp
ftpadmin:   ftp
ftp-adm:    ftp
ftp-admin:  ftp
www:    	webmaster
webmaster:  root
noc:    	root
security:   root
hostmaster: root
info:   	postmaster
marketing:  postmaster
sales:  	postmaster
support:    postmaster

# trap decode to catch security attacks
decode: 	root

# Person who should get root's mail
#root:  	marc

My etc/postfix/virtual file is below - again myvirtualdomain is a replacement. I think this file was generated by Virtualmin and I have tried messing around with is with no success... This is the version without my changes.

myunixusername@myvirtualdomain .com myunixusername
myvirtualdomain .com
share|improve this question
Post the output of a postconf -n, as well as the contents of /etc/postfix/virtual and /etc/aliases. – Bill Weiss Sep 30 '09 at 22:30
Thanks for the interest Bill. I have added the files that you requested above. – brodiebrodie Oct 1 '09 at 8:39

You need to somehow get email from admin@ to a local user (root?). Note that it's not in your /etc/aliases, or any of the other files.

share|improve this answer

I think your problem lies in the "local_recipient_maps" setting in your postfix/ file

You can specify email accounts that are allowed to receive mail and if the email address is not listed then the server will immediately block any request and i think thats what your seeing.

Diagnostic-Code: X-Postfix; User unknown in virtual alias table

i have this var set up like this

local_recipient_maps = $virtual_mailbox_maps virtual_mailbox_maps = hash:/usr/local/etc/postfix/virtual_mailbox_maps

then the virtual_mailbox_map file contains all entries to allowed mailboxes/aliases

" dummy"

from postfix/ file

once you have made these changes you will need to has the files

postmap /usr/local/etc/postfix/virtual_mailbox_maps
# If this parameter is defined, then the SMTP server will reject
# mail for unknown local users. This parameter is defined by default.
share|improve this answer
Hi, Thanks for answering my question. I tried to make the change you asked, but it had no effect. I have attached my file to the original question so that you can taker a look. The only thing I have changed from the original file is I added the line ( net_interfaces=all ) I reverted the changes you asked me to make becuase the appeared to have no effect. Can you see anything else that may be misconfigured? – brodiebrodie Sep 30 '09 at 15:06
Just to be clear I added the lines you asked to the file and also created /usr/local/etc/postfix/virtual_mailbox_maps in which I added 4 lines along the lines of <space> unixuserwiththemailbox – brodiebrodie Sep 30 '09 at 15:09
sorry i missed a step you need to run the following commands in order for them to work. postmap /usr/local/etc/postfix/virtual_mailbox_maps newaliases postfix reads the virtual_mailbox_maps file as a hash and i assume /etc/aliases is the same hence newaliases ive edited my origonal comment as well – Alistair Prestidge Sep 30 '09 at 16:58
Hi penfold, I'm sorry but this didn't make any difference. I've added my log file to the original question – brodiebrodie Sep 30 '09 at 22:19

Some low hanging fruit to try and pick:

  1. you've specified hash: for your virtual_alias_maps, but did you run postmap /etc/postfix/virtual

  2. what is the output of: postconf local_recipient_maps

  3. what is the output of: postconf -n

edit: if you copy/pasted the file, then the "myvirtualdomain .com" has an extra space. I don't believe this line belongs there.

According to the docs, virtual_alias_domains defaults to $virtual_alias_maps, but should, in your case, actually contain The config you've posted does not indicate it's value. Possibly: postconf -e "virtual_alias_domains =" && postfix reload

This kinda jives with my theory that you're bouncing the email because the server's not accepting email for that domain.

Here's the explanation in postfix's documentation

share|improve this answer
1)yes - and then I restarted the postfix server 2)local_recipient_maps = $virtual_mailbox_maps 3)This is in the original question - I've updated it to the output I just got 2 minutes ago – brodiebrodie Oct 1 '09 at 8:31

Your Answer


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