User unknown in virtual alias table

5 posts / 0 new
Last post
#1 Wed, 06/20/2012 - 04:21
sootie607

User unknown in virtual alias table

Hi

Completely new to Postfix and I have inherited a problem due to a staff member leaving. We use Virtualmin and Webmin and due to a staff member leaving (under difficult circumstances) our hosting provider had to reset the root password (I'm not sure if this is relevent but please bear with me..). Everything was working ok until the password was changed.

We have a number of virtual servers running for different customers, but on some customers there appears to be the 'User unknown in virtual alias table' error for emails. However this appears only to happen if the email is from for 'system generated' email account. For instance an email from 'bob@mydomain.com' sent to 'fred@mydomain.com' will work, however 'webmaster@mydomain.com' to 'bob@mydomain.com' doesn't work. Also external emails to/from customers all work fine.

I've looked through a lot of forums but don't appear to be making progress :( Below is the main.cf file currently in use:

alias_database = hash:/etc/aliases

alias_maps = hash:/etc/aliases

allow_percent_hack = no

append_dot_mydomain = no

biff = no

broken_sasl_auth_clients = yes

config_directory = /etc/postfix

home_mailbox = Maildir/

inet_interfaces = all

mailbox_size_limit = 0

mydestination = test.example.mydomain.com, localhost.example.mydomain.com, localhost myhostname = test.example.mydomain.com

mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128

readme_directory = no

recipient_delimiter = +

sender_bcc_maps = hash:/etc/postfix/bcc

smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)

smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination smtpd_sasl_auth_enable = yes

smtpd_sasl_local_domain =

smtpd_tls_cert_file = /etc/ssl/certs/ssl-cert-snakeoil.pem

smtpd_tls_key_file = /etc/ssl/private/ssl-cert-snakeoil.key

smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache

smtpd_use_tls = yes

virtual_alias_domains = virtual1.co.uk, virtual2.co.uk, virtual3.co.uk, virtual4.co.uk, virtual5.co.uk

virtual_alias_maps = hash:/etc/postfix/virtual

Any help greatly appreciated!

Wed, 06/20/2012 - 08:28
andreychek

Howdy,

Hmm, I'm not entirely certain what would cause what you're seeing.

That doesn't sound related to a root password change -- and when "User Unknown" errors do occur, they typically happen all the time, rather than selectively.

I'll offer that one unusual thing about your Postfix config is that, by default, it's not necessary to set "virtual_alias_domains".

I'm not sure how those are being used, but you could always try to comment that line out of your /etc/postfix/main.cf and restart Postfix, to see if it makes a difference.

Also, what is the output of the command "hostname"?

You would normally want a FQDN -- something in the format of host.example.com. And whatever it is, you wouldn't want a Virtual Server with that same name (ie, if your hostname is host.example.com, don't make a Virtual Server named host.example.com).

-Eric

Wed, 06/20/2012 - 11:06 (Reply to #2)
sootie607

Hi Eric

Thanks for the reply. The hostname output matches the info in the main.cf file so no problems there.

It appears that any emails sent from system accounts for example 'webservice' are being delivered to external email accounts such as yahoo or hotmail. However they are not being delivered to the domain email account.

As I understand it the reason for the 'virtual_alias_domain' is to allow email to be forwarded (mapped) to users with Unix accounts.

Do I have to setup a 'virtual_mailbox_domain' then, as the users do not have Unix accounts?

Fri, 09/20/2013 - 18:19
glenvistalabs

For the record:

I was running into this exact same problem recently, and it went away immediately when I set "domains to receive mail for" to the "whole domain" radio button. To anyone having this problem: it might be good to check that variable.

The above change translated to, in main.cf: mydestination = $myhostname, localhost.$mydomain, $mydomain

Fri, 04/13/2018 - 07:50 (Reply to #4)
ItsGageHolland

This worked for me! All emails back up and functional! Cheers!

Gage Holland

QuakeMedia

Topic locked