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

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/

# 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 =

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?


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.

Okay, that all looks good.

What does “postconf -n” show?


# 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 :frowning:

…Unless it’s the mynetworks value?

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?


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… :frowning:

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

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… :frowning:

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=, 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!

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.


Email sent! :slight_smile: 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.


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!


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…

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!


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


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 :slight_smile:



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:, size=3288, nrcpt=1 (queue active)
May 2 16:48:50 phonemeonline postfix/error[13450]: 614FF830058:,, 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:
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:,[]: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

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