postfix bouncing all mail!

30 posts / 0 new
Last post
#1 Tue, 08/18/2009 - 09:30

postfix bouncing all mail!

I created a new virtualmin server on Ubuntu 8.04 a few days ago, moving all my users to it from cPanel.

I've been really happy with it until now. While trying to solve the external mail client authentication nightmare (which was a success, damn saslauthd!), I've run in to an issue.

Earlier today I changed the hostname in the Postfix configuration, and now ALL mail is coming back bounced, with the following message:

Aug 18 15:22:13 kolacja postfix/error[7409]: 1AD121D2728: to=<>, orig_to=<>, relay=none, delay=0.24, delays=0.23/0/0/0.01, dsn=5.0.0, status=bounced (User unknown in virtual alias table)

Basically, ANY emails sent to users on the system get a bounce message as above showing in /var/log/mail.log. The end user receives the bounce message below.

Is there anything I can do to fix this, and quickly?

All I changed was adding the server's IP in to /etc/resolv.conf (it didn't seem to be there, but was), and changing 'myhostname' in /etc/postfix/

This is the mail system at host

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

<":blackhole:"> (expanded from <>): User unknown
   in virtual alias table
Reporting-MTA: dns;
X-Postfix-Queue-ID: 0A0A0A0AAA
X-Postfix-Sender: rfc822;
Arrival-Date: Tue, 18 Aug 2009 15:07:51 +0100 (BST)

Final-Recipient: rfc822; ":blackhole:"
Original-Recipient: rfc822;
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; User unknown in virtual alias table
Tue, 08/18/2009 - 09:33

I have a few questions --

  1. What does your /etc/hosts file look like?

  2. What does the command "hostname" return?

  3. What does this command show: grep myhostname /etc/postfix/

Tue, 08/18/2009 - 10:03
# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.       localhost.localdomain localhost                  (removed IP/name)
# The following lines are desirable for IPv6 capable hosts
#(added automatically by netbase upgrade)
::1     ip6-localhost ip6-loopback
feo0::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

# hostname (matches /etc/hosts and suchlike)

# grep myhostname /etc/postfix/
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
myhostname =
Tue, 08/18/2009 - 10:10

That all looks correct -- are you certain that you restarted Postfix after making those changes to the myhostname field?

Also, can you double-check that the IP address in the /etc/hosts file is correct, comparing that to the /sbin/ifconfig output?

Lastly, if you go into System Settings -> Re-Check Config, does it see any problems?


Tue, 08/18/2009 - 11:31 (Reply to #4)

I've restarted Postfix and restarted the server itself...

The /etc/hosts IP matches the primary IP for ifconfig eth0. However, there is an eth0:0 address that's not listed in /etc/hosts, which is a second address tied to the first (IIRC) for a second nameserver IP.

Recheck config gives this output:

The status of your system is being checked to ensure that all enabled features are available, that the mail server is properly configured, and that quotas are active ..
BIND DNS server is installed, and the system is configured to use it.
Mail server Postfix is installed and configured.

Apache is installed.

Webalizer is installed.

Apache is configured to host SSL websites.

MySQL is installed and running.

ProFTPd is installed.

Logrotate is installed.

SpamAssassin and Procmail are installed and configured for use.

ClamAV is installed and assumed to be running.

Plugin DAV Login is installed OK.

Plugin AWstats reporting is installed OK.

Plugin Mailman is installed OK.

Plugin Protected web directories is installed OK.

Using network interface eth0 for virtual IPs.

Default IP address for virtual servers is

Both user and group quotas are enabled for home and email directories.

All commands needed to create and restore backups are installed.

.. your system is ready for use by Virtualmin.
Tue, 08/18/2009 - 15:15

Okay, that all looks good.

What does "postconf -n" show?


Tue, 08/18/2009 - 17:16 (Reply to #6)
# 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/
inet_interfaces = all
mailbox_command = /usr/bin/procmail-wrapper -o -a $DOMAIN -d $LOGNAME
mailbox_size_limit = 0
message_size_limit = 104857600
mydestination =,, , localhost
myhostname =
mynetworks = [::ffff:]/104 [::1]/128
myorigin = /etc/mailname
readme_directory = no
recipient_delimiter = +
relayhost =
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_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:${data_directory}/smtpd_scache
smtpd_use_tls = yes
virtual_alias_maps = hash:/etc/postfix/virtual

I can't see anything wrong here either :(

...Unless it's the mynetworks value?

Tue, 08/18/2009 - 21:47

Hmm, so, what was the "myhostname" param set to before when things were working correctly?

Also, what are the contents of /etc/mailname set to?


Tue, 08/18/2009 - 23:21

Running cat /etc/mailname brings up the same host name ( as all the other commands.

The myhostname parameter was previously. I used this to set up the server and configure Virtualmin, and then move the cPanel accounts from over to the new box before repointing the nameserver IPs for and at the two IPs on the new Virtualmin server.

Once that move was complete and all was working, I changed the hostname et al to I only changed the myhostname parameter when someone pointed out they could see "" in an email field, which naturally I wanted to change to match everything else.

I have considered changing this back to see if it starts working, however that'd just put me back to square one.

Would it help to test this to see if it un-breaks the email delivery? I'm just a bit worried as it's quite pressing... :(

Tue, 08/18/2009 - 23:27

Hrm, after reading through the error message a few more times, I'm curious what happens if you add "" to your "mydestination" line in /etc/postfix/

Add it in addition to what else is there, so that it'd look something like:

mydestination =,,, localhost

Wed, 08/19/2009 - 00:11 (Reply to #10)

I've added that and restarted postfix, however I've had the same bounce message back again. Rebooting the server doesn't make any difference either.. :(

Here's a detail of the last message I attempted to send:

I've also noted that there's a new message on line two of this output.. "unreasonable virtual_alias_maps map nesting for [email address]"

# cat /var/log/mail.log | grep A12891D2779
Aug 19 06:03:47 kolacja postfix/smtpd[3901]: A12891D2779:[]
Aug 19 06:03:47 kolacja postfix/cleanup[3906]: warning: A12891D2779: unreasonable virtual_alias_maps map nesting for
Aug 19 06:03:47 kolacja postfix/cleanup[3906]: A12891D2779: message-id=<>
Aug 19 06:03:47 kolacja postfix/qmgr[3699]: A12891D2779: from=<>, size=849, nrcpt=1 (queue active)
Aug 19 06:03:47 kolacja postfix/local[3907]: A12891D2779: to=<>, orig_to=<andy@>, relay=local, delay=0.29, delays=0.27/0.01/0/0.01, dsn=5.1.1, status=bounced (unknown user: ":blackhole:")
Aug 19 06:03:47 kolacja postfix/bounce[3908]: A12891D2779: sender non-delivery notification: E33E61D27AE
Aug 19 06:03:47 kolacja postfix/qmgr[3699]: A12891D2779: removed

So I ran this command:

# postconf virtual_alias_maps
virtual_alias_maps = hash:/etc/postfix/virtual

Which just points to the table of email address and aliases which I don't quite understand yet (as in how they exactly route), but they look to make sense.

I can email this directly to you if you'd like to take a look, or login details for the server so you can inspect yourself, but don't really want to post it in the forum directly!

Wed, 08/19/2009 - 00:24

Sure, I can take a look.

You can either enable Remote Access via the Support Module, or simply email me the info.

You can send it to "" -- be sure to include a link to this forum post in the message body.

It's unfortunately probably going to be morning until I can take a look (it's getting late on the Eastern coast of the US!), but I'll look first thing when I get up if you're able to get the login details to me.

Thanks! -Eric

Wed, 08/19/2009 - 00:49 (Reply to #12)

Email sent! :) Thanks.

I've been up most the night trying to figure this out, and had to come in to my work two hours ago at 5am UK time, so I know how it is.

Sun, 08/23/2009 - 09:53


I just wanted to follow-up and make sure everything was working well.

I sent an email regarding some fixes I had made a few days back, and just wanted to make sure you received it and that your emails were going through.

Have a good one!


Sun, 05/02/2010 - 15:00 (Reply to #14)

Hey Eric i have a server that is doing the same thing.. pritty much can you get a chance take a look at it.. i will email you the information you need.. John

Sun, 05/02/2010 - 15:26 (Reply to #15)

Hey there John,

Can you post what you're seeing in your email logs whenever an email is sent to your server? The mail logs are in either /var/log/mail.log or /var/log/maillog.

Knowing what error you're seeing will simplify solving that... thanks!


Sun, 05/02/2010 - 15:45 (Reply to #16)

Hey bud can i email them to you.. i also sent you some emails.. with information it is from jdamron

Sun, 05/02/2010 - 15:48 (Reply to #17)


If you have questions, it's best to keep them in the forums here... it's too hard to keep track of things over email as well! Plus, then others can take advantage of the information later :-)



Sun, 05/02/2010 - 16:04 (Reply to #18)
May  2 16:48:50 phonemeonline postfix/smtpd[13416]: connect from[]
May  2 16:48:50 phonemeonline postfix/smtpd[13416]: 614FF830058:[]
May  2 16:48:50 phonemeonline postfix/cleanup[13449]: 614FF830058: message-id=<006101caea38$9d270a10$d7751e30$@com>
May  2 16:48:50 phonemeonline postfix/qmgr[12206]: 614FF830058: from=<>, size=3288, nrcpt=1 (queue active)
May  2 16:48:50 phonemeonline postfix/error[13450]: 614FF830058: to=<>, orig_to=<>, relay=none, delay=0.18, delays=0.15/0.01/0/0.02, dsn=5.0.0, status=bounced (User unknown in virtual alias table)
May  2 16:48:50 phonemeonline postfix/cleanup[13449]: 89BB865805C: message-id=<>
May  2 16:48:50 phonemeonline postfix/bounce[13451]: 614FF830058: sender non-delivery notification: 89BB865805C
May  2 16:48:50 phonemeonline postfix/qmgr[12206]: 89BB865805C: from=<>, size=5176, nrcpt=1 (queue active)
May  2 16:48:50 phonemeonline postfix/qmgr[12206]: 614FF830058: removed
May  2 16:48:50 phonemeonline postfix/smtpd[13416]: disconnect from[]
May  2 16:48:51 phonemeonline postfix/smtp[13452]: 89BB865805C: to=<>,[]:25, delay=1, delays=0.01/0.01/0.6/0.38, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 08DCBBF8077)
May  2 16:48:51 phonemeonline postfix/qmgr[12206]: 89BB865805C: removed
Sun, 05/02/2010 - 17:55

i gess i lost you.. have not heard anything in awile..

Sun, 05/02/2010 - 18:49

Hi there John,

So it looks like the message is being initially sent to "", then forwarded to "" for final delivery.

However, it doesn't look like Postfix sees a user named "".

Is there a user or alias named "marcien.indyhomevalues" for the Virtual Server?

Have a good one!


Sun, 05/02/2010 - 19:16 (Reply to #21)

No not at all that is what i am seeing also... and can not figure it out.. really got me puzzled on this one.. would you like a login to see if you can figure it out.. and i will post what was worng on here.. for others to know.. let me know..

This is what happend.. we migrated a plesk8 server over to Virtualmin and it now bounces emails..

Sun, 05/02/2010 - 22:14

Okay, I can take a look -- go ahead and send me your login info.


Sun, 05/02/2010 - 22:40 (Reply to #23)

Sent bud... let me know what you think you can call me also

Mon, 05/03/2010 - 06:52 (Reply to #24)

Hey was wondering if you took a moment to take a look and see what was wrong.. please get back with me.. John

Mon, 05/03/2010 - 16:19 (Reply to #25)

YOU ARE DU BOMB ERIC... once agan you help agan... i owe you one more Case of beer... hahaha

Thu, 07/14/2011 - 13:57

John I thought you were going to post the fix here?!

Eric, by any chance do you remember what you did to fix the problem?

Thank you

Wed, 12/28/2011 - 09:22

Hello, I have a similar problem and have tried everything i know how to per this thread. Any help would be sincerely appreciated.



Scott Kappler

Wed, 09/26/2012 - 09:28
Shabbir Mansuri


please help
I am not receiving bounce back mails.

showing postfix error.

find attached logs

Sun, 04/28/2019 - 18:02

I'm only testing fresh centos7 on openstack instance

Same problems why is here the solution not posted as written?


If you have questions, it's best to keep them in the forums here... it's too hard to keep track of things over email as well! Plus, then others can take advantage of the information later :-)



unreasonable virtual_alias_maps map nesting for deferring delivery

and this for emailuser that should be/is there at users: status=bounced (User unknown in virtual alias table

Could be solution for problem above to disable and enable i don't understand why? but seems to solve hmm

For alias virtualserver users it doesn't work still also with new users status=bounced (User unknown in virtual alias table)