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.

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 abuse@xxxxxxxxxx.com domain@xxxxxxxxxxxx.com or admin@xxxxxxxxxxxxx.com)

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

<admin@xxxxxxxxxxxx.com> (expanded from <abuse@xxxxxxxxxxxx.com>): User
unknown in virtual alias table

Final-Recipient: rfc822; admin@xxxxxxxxxxxx.com
Original-Recipient: rfc822;abuse@xxxxxxxxxxxxxxx.com
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?

Thanks

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=<dd8f3afc0909301513n5e991fc5h1a351c51949fa957@mail.gmail.com>
	Sep 30 15:13:47 dedq239 postfix/qmgr[7177]: 207C6B18158: from=<calumbrodie@googlemail.com>, size=1805, nrcpt=1 (queue active)
	Sep 30 15:13:47 dedq239 postfix/error[7238]: 207C6B18158: to=<admin@myvirtualdomain.com>, orig_to=<abuse@myvirtualdomain.com>, 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=<calumbrodie@googlemail.com>, relay=gmail-smtp-in.l.google.com[209.85.216.55]: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 mail-bw0-f228.google.com[209.85.218.228]

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
abuse-myvirtualdomain.com: admin@myvirtualdomain.com

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    myvirtualdomain.com
postmaster@myvirtualdomain.com  admin@myvirtualdomain.com
webmaster@myvirtualdomain.com   admin@myvirtualdomain.com
hostmaster@myvirtualdomain.com  admin@myvirtualdomain.com
abuse@myvirtualdomain.com   admin@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

3 Answers 3

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/main.cf 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

"postmaster@domain.co.uk dummy"

from postfix/main.cf file

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

postmap /usr/local/etc/postfix/virtual_mailbox_maps
newaliases
# 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 main.cf 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 main.cf file and also created /usr/local/etc/postfix/virtual_mailbox_maps in which I added 4 lines along the lines of email@mydomain.com <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 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 myvirtualdomain.com. The config you've posted does not indicate it's value. Possibly: postconf -e "virtual_alias_domains = myvirtualdomain.com" && 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

 
discard

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