postfix : User unknown in virtual alias table

I am trying to configure postfix to work but i got always the same error. I can send email but i cannot get a reply.

postfix/error[26116]: 4A52811A1132: to=<prova.example@example.it>, orig_to=<prova@example.it>, relay=none, delay=0.34, delays=0.32/0.01/0/0.01, dsn=5.0.0, status=bounced (User unknown in virtual alias table)

I have checked around reading all discussion on it, but i got no solution.
Any idea ?
Thank you

postconf -n

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
broken_sasl_auth_clients = yes
config_directory = /etc/postfix
home_mailbox = Maildir/
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
mydestination = localhost
myhostname = example.it
mynetworks = 127.0.0.0/8
recipient_delimiter = +
sender_bcc_maps = hash:/etc/postfix/bcc
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
smtpd_recipient_restrictions = permit_mynetworks permit_sasl_authenticated reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
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:${queue_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = hash:/etc/postfix/virtual<br><br>Post edited by: alfredolo, at: 2008/09/26 13:30

Are you able to log into Usermin as this user?

Also, if you go into Virtualmin, choose the domain from the drop-down, and select Edit Mail and FTP users, click the email account, and then choose Email Settings.

Is "Primary email address enabled" set to "Yes"?
-Eric

Thanks for reply.

I can enter Usermin and write email to other server (i have tryed gmail). When i try to reply to this user i got the error.

Yes it is the primary email, I have cheded now

Any idea ?
Thank you !

Alright, do you think you could email me the following details (from your Usermin account) – you can send it to eric@virtualmin.com :

  • Your username and email address

  • You posted a line from your maillog above – could you include several lines in the email to me – all the ones relating to you receiving the message would be great.

We’ll see if we can figure things out after seeing the details in your email. Thanks,
-Eric

Thank you very much for interesting.
I have sended you the email with all information you needed.
Thank you again

Okay, so, your email account is "prova@example.it" – but, whenever I try to send a mail to it, it seems to be trying to forward that to a different address – "prova.example@example.it".

I’m not sure if you’re intentionally forwarding that or not, but my guess is that prova.example@example.it doesn’t exist, or isn’t setup correctly.
-Eric

I have created the user prova in example.it domain using the function in Virtualmin -> Edit Mail and FTP Users -> Add a user to this server.
I have not modified it by myself.

If i try to change /etc/postfix/virtual :
prova@example.it prova.example@example.it
into
prova@example.it prova

I get always the same error.
The user prova exist into /home/example/homes/ directory

If i try to change /etc/postfix/virtual :

I’m confused. Why are you changing the Virtualmin created entries?

If mail isn’t being delivered in this case, it’s because your server is misconfigured. I can think of two reasons:

Hostname on the system is wrong–is it "example.it"?

You’ve got myorigin set in main.cf. Nobody ever sets this correctly, and you don’t want it in a virtual hosting environment, anyway…so unset it.

I’m betting on the latter.

I don’t know whether or not this will help you, but I’ve encountered this error message many time. It always seems to be something in user alias. Where usrername@domain.tdl is the email address and username.domain@domain.tdl is addedd to the “Additional Email” options under the user account.

You right it was a configuration error. Now it work great, thank you very much…
Just a little problem with clamav it make the cpu to 100% and i have to kill it… Just removed antivirus from email and it is perfect.

Thank you very much !
Alfred

Switch to the daemonized version of clamav (clamd+clamdscan). This is configurable in the Email Messages:Spam and Virus Scanning page. (The SpamAssassin service will need to be started before you switch to spamc, the daemonized version of it…but on CentOS, Virtualmin will setup and start clamd for you, if it’s not already running. The spamassassin service can be started and set to start on boot in the Webmin:System:Bootup and Shutdown module.)

andreychek wrote:

If mail isn't being delivered in this case, it's because your server is misconfigured. I can think of two reasons:

Hostname on the system is wrong–is it "example.it"?

You’ve got myorigin set in main.cf. Nobody ever sets this correctly, and you don’t want it in a virtual hosting environment, anyway…so unset it.

Hi,
I have the same problem:

my hostname is "www.comunicazioneitaliana.it"
my main.cf does not set myorigin
anyway when I send an e-mail to a virtual server (info@duuytren.it) I have this error in the log file:

[code:1]to=<info.dupuytren@www.comunicazioneitaliana.com>, orig_to=<info@dupuytren.it>, relay=none, delay=0.09, delays=0.04/0.04/0/0.01, dsn=5.0.0, status=bounced (User unknown in virtual alias table)[/code:1]

What can I do to solve this?

Thank you

Hi, I am italian too…
I have fixed it changing main.cf , try this maybe it work :

myhostname = mail.comunicazioneitaliana.it
mydomain = comunicazioneitaliana.it
mydestination = $myhostname localhost.$mydomain mail.comunicazioneitaliana.it

Grazie!

Thank you!

I finally received an e-mail :smiley:

Can I suggest that Virtualmin makes the right configuration when joined to postfix?

But… great job boys, Virtualmin is really a great job.

Can I suggest that Virtualmin makes the right configuration when joined to postfix?

As long as your hostname on your system is set correctly, and matches what Postfix thinks it is (it gets it via the gethostname system call), no extra configuration is needed. Usually, after running install.sh mail works fine.

ok thank you

SO the hostname linux command must return example.com or mail.example.com to set the system hostname correctly ?

ok…
I ave resolved.

with this Good Guide

[code:1]Usermin Webmail Sends With Incorrect From: Address

In most cases, if Usermin webmail does not include the correct From: address, it is incorrectly configured. The default was not being set correctly in our automated installer until recently due to a bug.

The old default would default to a From: address of the form "user-domain@hostingco.tld", when it should instead be "user@domain.tld".

To correct this problem:

Browse to Webmin:Usermin Configuration:Usermin Module Configuration:Read Mail page

Locate the option labeled From: address mapping file, and set it to /etc/postfix/virtual

Locate the option labeled Address mapping file format, and set it to Address to username (virtusertable)

Save it.
[/code:1]

Usermin Configuration…
Usermin Module Configuration…
Read Mail…
i ave set:

Allow editing of From: address Yes

From: address mapping file /etc/postfix/virtual
Address mapping file format Address to username (virtusertable)

Hi,
I also have a problem with one virtual domain,
maryleishmanfoundation.com

I get the error

Requested action not taken: mailbox unavailable 550 5.1.1 <brian@maryleishmanfoundation.com>: Recipient address rejected: User unknown in virtual alias table

my server name (and hostname) is : fife.biz.

I have another domain ‘parstrust.co.uk’ that I can send and receive email.
I thought it was a DNS problem, but as far as I can ss its OK.

I do get this error:

Apr 27 18:31:49 srv126 postfix/trivial-rewrite[8573]: warning: database /etc/postfix/virtual.db is older than source file /etc/postfix/virtual
Apr 27 18:39:22 srv126 postfix/smtpd[32313]: NOQUEUE: reject: RCPT from localhost[127.0.0.1]: 550 5.1.1 <brian@maryleishmanfoundation.com>: Recipient address rejected: User unknown in virtual alias table; from=<brian.maryleishmanfoundation@maryleishmanfoundation.com> to=<brian@maryleishmanfoundation.com> proto=ESMTP helo=<maryleishmanfoundation.com>

‘maryleishmanfoundation’ website was probably the first website on the new server, perhaps I did some change after that.
I think the problem is ‘fife.biz’ is my main server name

thanks brian

Operating system CentOS Linux 5.3 Perl version 5.008008
Path to Perl /usr/bin/perl
Postfix version 2.3.3
Mail injection command /usr/lib/sendmail -t
BIND version 9.3.4
Apache version 2.2.3
PHP version 5.1.6
Webalizer version 2.01-10
Logrotate version 3.7.4
MySQL version 5.0.45
ProFTPd version 1.30
SpamAssasssin version 3.2.5
ClamAV version 0.95.1

I have also just realised that if I login under ‘Usermin’ and send an email the sender is brian.maryleishmanfoundation@fife.biz
instead of brian.maryleishmanfoundation@maryleishmanfoundation.com

so I know its a virtual name problem.

thanks for any help