velvetpixel (User)
Posts: 156
|
| Mail issue: User unknown in virtual alias table 2008/05/19 17:05 |
|
|
Operating system CentOS Linux 5 Webmin version 1.410 Virtualmin version 3.56 (Pro)
Can't receive mail as mail sent to any user on the server gets a "User unknown in virtual alias table" error bounce.
Here is an example.
Create a virtual server called example.com Administration username of admin
Add a mail user named bob
Try to send bob an email at bob@example.com Get an error
Confirm bob has been added to the /etc/postfix/virtual file bob@example.com bob.example
This is the error that is logged: May 19 18:00:56 vps postfix/smtpd[7654]: NOQUEUE: reject: RCPT from wa-out-1112.google.com[209.85.146.177]: 550 5.1.1 <bob.example@example.com>: Recipient address rejected: User unknown in virtual alias table; from=<me@gmail.com> to=<bob.example@example.com> proto=ESMTP helo=<wa-out-1112.google.com>
Then it gets stranger :)
If I try to send an email to admin@example.com I get a bounce and this error is logged: May 19 18:44:24 vps postfix/error[24549]: 1A9DA5A086A4: to=<admin@MyVPSDomain.net>, orig_to=<admin@example.com>, relay=none, delay=0.28, delays=0.23/0.02/0/0.03, dsn=5.0.0, status=bounced (User unknown in virtual alias table)
Confirm admin has been added to the /etc/postfix/virtual file admin@example.com admin
so it looks like it is trying to map mail for the virtual server's admin to the wrong domain
MX comes up fine in a DNS lookup: ;; ANSWER SECTION: example.com. 19249 IN MX 5 mail.example.com.
In Webmin under Network Configuration/Hostname and DNS Client I have my DNS server IP as well as 127.0.0.1
All http and mysql services are working fine.
Of course example.com has been substituted in the info above for the real domain of my virtual server.
What can I do to fix the email issue?
Post edited by: velvetpixel, at: 2008/05/19 17:11
Webmin 1.441 - Virtualmin 3.64 - CentOS 5.2
|
|
|
|
The administrator has disabled public write access. |
velvetpixel (User)
Posts: 156
|
| Re:Mail issue: User unknown in virtual alias table 2008/05/19 17:08 |
|
|
Oh and here is my postconf output
postconf -n 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 home_mailbox = Maildir/ html_directory = no mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man mydestination = $myhostname, localhost.$mydomain, localhost, vps.MyVPSDomain.net myorigin = $mydomain newaliases_path = /usr/bin/newaliases.postfix qmgr_message_active_limit = 4000 readme_directory = /usr/share/doc/postfix-2.3.3/README_FILES sample_directory = /usr/share/doc/postfix-2.3.3/samples sender_bcc_maps = hash:/etc/postfix/bcc sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous unknown_local_recipient_reject_code = 550 virtual_alias_maps = hash:/etc/postfix/virtual
Webmin 1.441 - Virtualmin 3.64 - CentOS 5.2
|
|
|
|
The administrator has disabled public write access. |
velvetpixel (User)
Posts: 156
|
| Re:Mail issue: User unknown in virtual alias table 2008/05/20 00:20 |
|
|
OK
I poked around a bit and in Webmin/Postfix/General Options the second field is "What domains to receive mail for"
Mine looked like this: $myhostname, localhost.$mydomain, localhost, vps.MyVPSDomain.net
I added $mydomain to make it look like this: $myhostname, localhost.$mydomain, localhost, $mydomain, vps.MyVPSDomain.net
Now mail seems to work fine! :)
Before I did that I could not send mail to any user at any of my virtual servers and I also could not check mail in the Webmin Read User Mail module as two of the accounts listed there showed they had mail but when clicked the page listed no mail.
After I added $mydomain I am able to receive mail at all accounts and am able to view old and new mail in the Webmin Read User Mail module.
Is there a way that $mydomain was not added during install? I am on a OpenVZ VPS if that matters.
Is there anything else I should do to make sure that my mail system is functioning properly?
Webmin 1.441 - Virtualmin 3.64 - CentOS 5.2
|
|
|
|
The administrator has disabled public write access. |
ronald (User)
Posts: 578
|
| Re:Mail issue: User unknown in virtual alias table 2008/05/20 11:31 |
|
|
you know mail configuration usually gives me headaches. I have a centos 5 and default setup. all works fine. So all i can do is post my postconf -n and per haps this helps a bit.
postconf -n 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 default_destination_concurrency_limit = 10 home_mailbox = Maildir/ html_directory = no mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man maximal_queue_lifetime = 3d 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 permit_sasl_authenticated rejec t_unauth_destination smtpd_sasl_auth_enable = yes smtpd_sasl_security_options = noanonymous unknown_local_recipient_reject_code = 550 virtual_alias_maps = hash:/etc/postfix/virtual
|
|
|
|
The administrator has disabled public write access. |
velvetpixel (User)
Posts: 156
|
| Re:Mail issue: User unknown in virtual alias table 2008/05/20 11:44 |
|
|
Thanks for that!
It helps to be able to compare :)
Webmin 1.441 - Virtualmin 3.64 - CentOS 5.2
|
|
|
|
The administrator has disabled public write access. |
Joe (Admin)
Posts: 4213
|
| Re:Mail issue: User unknown in virtual alias table 2008/05/20 11:53 |
|
|
I poked around a bit and in Webmin/Postfix/General Options the second field is "What domains to receive mail for"
This probably isn't actually the ideal solution. You've probably got something set incorrectly in your hostname--do you have a fully qualified domain name? e.g.:
hostname -f
Does it result in a fully qualified domain? And can that name be looked up with host?
host name.from.above
(Where name.from.above should, obviously, be replaced with the name you got back from the hostname -f command.)
Postfix is very sensitive to having a valid fully qualified host name for the system, and this bit of the log:
to=<bob.example@example.com>
Makes it seem likely that your hostname is not correct, according to Postfix.
Oh, wait. I see your problem:
myorigin = $mydomain
You almost certainly DO NOT WANT this option. Get rid of it. It's not what you think it is, and it doesn't do what you want it to do.
|
|
|
|
The administrator has disabled public write access. |
velvetpixel (User)
Posts: 156
|
| Re:Mail issue: User unknown in virtual alias table 2008/05/20 12:23 |
|
|
Thanks for the reply Joe!
Yes my hostname is a FQDN and hostname -f returns the correct hostname and host returns the hostname has address of my server so that part is working fine.
Regarding $mydomain. When it is not in $myhostname, localhost.$mydomain, localhost, $mydomain, vps.MyVPSDomain.net then my mail is dead.
If I put it back in then mail works fine :(
How do I not get the "User unknown in virtual alias table" error without $mydomain being in that field?
Webmin 1.441 - Virtualmin 3.64 - CentOS 5.2
|
|
|
|
The administrator has disabled public write access. |
xerxeschua (User)
Posts: 14
|
|
|
|
The administrator has disabled public write access. |
Joe (Admin)
Posts: 4213
|
| Re:Mail issue: User unknown in virtual alias table 2008/05/20 15:33 |
|
|
velvetpixel, you ignored the most important piece of advice, I think. Re-read my message--and look at the directive I told you to get rid of (myorigin). It is the cause of your problem. The other stuff at the beginning was just pointing out that you're treating the symptoms and not the disease. The disease is myorigin, and you need to unset that variable for mail in a virtual hosting environment to work (or you could set it correctly, but I have no idea how to set it correctly, so let Postfix set it for you--it always gets it right).
|
|
|
|
The administrator has disabled public write access. |
Joe (Admin)
Posts: 4213
|
| Re:Mail issue: User unknown in virtual alias table 2008/05/20 15:35 |
|
|
xerxeschua, you have the same problem. myorigin should not be set.
|
|
|
|
The administrator has disabled public write access. |
|