postfix bouncing all mail!

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

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=<:blackhole:@mydomain.net>, orig_to=<user@hostedsite.com>, 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 127.0.0.1 was), and changing 'myhostname' in /etc/postfix/main.cf.

This is the mail system at host server.mydomain.net.

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:"@mydomain.net> (expanded from <user@hostedsite.com>): User unknown
   in virtual alias table
Reporting-MTA: dns; server.mydomain.net
Original-Envelope-Id: 000000000000@origin.emaildomain.com
X-Postfix-Queue-ID: 0A0A0A0AAA
X-Postfix-Sender: rfc822; original@email.com
Arrival-Date: Tue, 18 Aug 2009 15:07:51 +0100 (BST)

Final-Recipient: rfc822; ":blackhole:"@mydomain.net
Original-Recipient: rfc822;user@hostedsite.com
Action: failed
Status: 5.0.0
Diagnostic-Code: X-Postfix; User unknown in virtual alias table
Tue, 08/18/2009 - 09:33
andreychek

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/main.cf

Tue, 08/18/2009 - 10:03
omfgbunnies
# cat /etc/hosts
# Do not remove the following line, or various programs
# that require network functionality will fail.
127.0.0.1       localhost.localdomain localhost
000.000.000.000 server.mydomain.net                  (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
server.mydomain.net (matches /etc/hosts and suchlike)

# grep myhostname /etc/postfix/main.cf
smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
myhostname = server.mydomain.net
Tue, 08/18/2009 - 10:10
andreychek

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?

-Eric

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

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 000.000.000.000.

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
andreychek

Okay, that all looks good.

What does "postconf -n" show?

-Eric

Tue, 08/18/2009 - 17:16 (Reply to #6)
omfgbunnies
# 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 = server.mydomain.net, localhost.mydomain.net, , localhost
myhostname = server.mydomain.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/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
andreychek

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?

-Eric

Tue, 08/18/2009 - 23:21
omfgbunnies

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

The myhostname parameter was t.ickle.us previously. I used this to set up the server and configure Virtualmin, and then move the cPanel accounts from server.mydomain.net over to the new box before repointing the nameserver IPs for ns1.mydomain.net and ns2.mydomain.net 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 server.mydomain.net. I only changed the myhostname parameter when someone pointed out they could see "t.ickle.us" 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
andreychek

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

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

mydestination = server.mydomain.net, localhost.mydomain.net, mydomain.net, localhost

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

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: client=asmtpout028.mac.com[17.148.16.103]
Aug 19 06:03:47 kolacja postfix/cleanup[3906]: warning: A12891D2779: unreasonable virtual_alias_maps map nesting for andy@somesite.co.uk
Aug 19 06:03:47 kolacja postfix/cleanup[3906]: A12891D2779: message-id=<A7359AF8-9999-4F8C-98B9-629A33F45CF5@me.com>
Aug 19 06:03:47 kolacja postfix/qmgr[3699]: A12891D2779: from=<anotheremailaddress@me.com>, size=849, nrcpt=1 (queue active)
Aug 19 06:03:47 kolacja postfix/local[3907]: A12891D2779: to=<:blackhole:@mydomain.net>, orig_to=<andy@ somesite.co.uk>, 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
andreychek

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 "eric@virtualmin.com" -- 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)
omfgbunnies

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
andreychek

Howdy,

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!

-Eric

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

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)
andreychek

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!

-Eric

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

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)
andreychek

Howdy,

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

Thanks!

-Eric

Sun, 05/02/2010 - 16:04 (Reply to #18)
jdamron
May  2 16:48:50 phonemeonline postfix/smtpd[13416]: connect from vms173005pub.verizon.net[206.46.173.5]
May  2 16:48:50 phonemeonline postfix/smtpd[13416]: 614FF830058: client=vms173005pub.verizon.net[206.46.173.5]
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=<jdamron@lynkerworld.com>, size=3288, nrcpt=1 (queue active)
May  2 16:48:50 phonemeonline postfix/error[13450]: 614FF830058: to=<marcien.indyhomevalues@callme-online.com>, orig_to=<marcien@indyhomevalues.com>, 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=<20100502204850.89BB865805C@phonemeonline.net>
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 vms173005pub.verizon.net[206.46.173.5]
May  2 16:48:51 phonemeonline postfix/smtp[13452]: 89BB865805C: to=<jdamron@lynkerworld.com>, relay=mail.lynkerworld.com[72.94.52.38]: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
jdamron

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

Sun, 05/02/2010 - 18:49
andreychek

Hi there John,

So it looks like the message is being initially sent to "marcien@indyhomevalues.com", then forwarded to "marcien.indyhomevalues@callme-online.com" for final delivery.

However, it doesn't look like Postfix sees a user named "marcien.indyhomevalues@callme-online.com".

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

Have a good one!

-Eric

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

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
andreychek

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

-Eric

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

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

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

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)
jdamron

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
thetitan

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
kappler0

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

thanks

Scott

Scott Kappler

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

Hi,

please help
I am not receiving bounce back mails.

showing postfix error.

find attached logs

Sun, 04/28/2019 - 18:02
Jfro

I'm only testing fresh centos7 on openstack instance

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

Howdy,

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

Thanks!

-Eric

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 https://www.virtualmin.com/comment/748256#comment-748256

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