postfix broken on Virtualmin version 3.84.gpl GPL

19 posts / 0 new
Last post
#1 Tue, 04/05/2011 - 03:55
FirstMM

postfix broken on Virtualmin version 3.84.gpl GPL

Webmin version 1.540 Virtualmin version 3.84.gpl GPL

I recently updated the Virtualmin module on my cloud server (Fedora release 13 (Goddard)) and this seems to have broken the Postfix configuration.

After completing the upgrade I ran the "Re-Check Configuration" function in the control panel and was greeted with the following message:

Your Postfix configuration is missing the system's mail hostname xxx from the mydestination line, which will cause mail to bounce.

I have since checked this on other platforms including Centos and Redhat Enterprise and found the same problem. Postfix is definitely set up correctly, email does not bounce and did not receive this message before the upgrade.

The upshot is that the "Features and Plugins" page no longer functions.

Can anyone who has already updated tell me if they encountered similar problems and, if they did, what steps can be taken to work around the problem?

Thanks all, FirstMM

Tue, 04/05/2011 - 08:48
andreychek

We've seen a lot of problems occur when the system's hostname gets out of sync with what's listed on the "mydestination" line of /etc/postfix/main.cf and the entry /etc/hosts.

If you aren't having problems though, that's great :-)

However, a quick and easy fix would just be to edit /etc/postfix/main.cf, look for the "mydestination" line, and add your system's hostname to the end of that. That should prevent any weird email things from going on, but in your case, it will more importantly make that error message go away :-)

-Eric

Sat, 04/30/2011 - 15:52 (Reply to #2)
carneiro

I update virtualmin (clicking on update all button) and virtualmin broke.

It says: "Your Postfix configuration is missing the system's mail hostname from the mydestination line, which will cause mail to bounce."

mydestination line is ok, with my machine domain. I didn't change it and it was working.

Virtualmin is not working because when I try to list virtual servers it doesn't let me to because I need to "re-check" config.

Any ideas?

Thanks!

Sat, 04/30/2011 - 17:07 (Reply to #3)
andreychek

Howdy,

What you may want to try is, on the command line, run the command "hostname".

Once you do that -- is the resulting name included on your "mydestination" line of your Postfix config? If it's not, you may want to add that in.

-Eric

Tue, 05/03/2011 - 10:21 (Reply to #4)
carneiro

Thanks for your answer Andrey.

I did it, but it didn't work.

The long hostname was already there (hostname -f). I added que short one, restarted postfix and tried to click "re-check" again.

But virtualmin says "Your Postfix configuration is missing the system's mail hostname from the mydestination line, which will cause mail to bounce."

The e-mails are working. And at previous Virtualmin version, no messages were displayed. Postfix main.cf was the same, I guess.

Well, everything else is ok. I just can't list virtualservers, but as they are at top left select box thats ok.

For now, no side effects. Thanks.

Tue, 05/03/2011 - 10:28
andreychek

Howdy,

Well, there is a bug in the current Virtualmin version that allows it to get confused in some cases, and not always correctly see what items are actually in the mydestination line.

My recommendation is to try the Re-Check config again once the next Virtualmin version comes out (in the next few days), and if it still doesn't work -- let us know, that may be a bug you're seeing. We'll get it figured out :-)

-Eric

Wed, 05/04/2011 - 15:02 (Reply to #6)
carneiro

Thanks Eric. I'll try it and let you know then.

Thu, 05/19/2011 - 02:34
sinjab

I solved this problem by running: postconf -e 'myhostname = PLACE_YOUR_HOSTNAME_HERE'

Fri, 05/20/2011 - 20:30
sefs

Hi there.

This is how i solved my problem with this.

The error msg gave me the name it said it was looking for eg...

"Your Postfix configuration is missing the system's mail hostname xxxxxx.ttt from the mydestination line, which will cause mail to bounce."

What I did next was to pop open the search widget and searched all of /etc for any file contain xxxxxx.ttt.

It found three files /etc/webilizer/webilizer.conf /etc/mailname /etc/mailman/mm_cfg.py

so I changed wherever it had xxxxxxx.ttt to whatever my real hostname for this server was and that solved it for me. But I believe the file that was creating this error was the /etc/mailname file.

I am on ubuntu server

and my my /etc/hosts file looks like

127.0.0.1 localhost 127.0.1.1 myhostname 192.168.1.100 myhostname.dev

other ipv6 garble

/etc/hostname

myhostname

Mon, 04/16/2012 - 07:08 (Reply to #9)
yngens

thank you sefs,

your post helped me to update the change in hostname in all the important places.

Mon, 05/20/2013 - 06:54 (Reply to #10)
fuggi

@sefs: Thank you! Same cause of error in my case. And yes, the only file I changed was /etc/mailname and then it worked.

Thu, 08/18/2011 - 04:00
ufo

Hi,

I have the same issue as above after update. Operating system Debian Linux 6.0 Webmin version 1.560
Virtualmin version 3.87.gpl GPL

"Your Postfix configuration is missing the system's mail hostname host.domain.com from the mydestination line, which will cause mail to bounce.

.. your system is not ready for use by Virtualmin."

I've check many times main.cf postfix config and restarted postfix after change. I've tried many configurations but Virtualmin configuration check show still the same error message and stop. It's so strange as it was working configuration before update. Also I have no bounce and postfix seems to work ok.

Anyone have an idea where this issue could be and how to fix it?

Thu, 08/18/2011 - 08:07
andreychek

Howdy,

Can you run the following commands, and post their output here?

hostname

cat /etc/hosts

grep mydestination /etc/postfix/main.cf

The "hostname" as returned from the hostname command should be in each of the above.

Thanks,

-Eric

Thu, 08/18/2011 - 15:21
ufo

Hi,

hostname returns: host

hostname -f returns: host.domain.com

cat /etc/hosts return:

127.0.0.1 localhost
123.123.123.123 host.domain.com host

# IPv6
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts

grep mydestination /etc/postfix/main.cf

mydestination = domain1.com, localhost.domain.com, localhost, domain2.com, domain3.com, host.domain.com, host
Thu, 08/18/2011 - 21:52
andreychek

So, this is a bit of a shot in the dark, but I'm curious if it resolves your issue...

If you run these two commands:

hostname host.domain.com

/etc/init.d/webmin restart

Are you then able to successfully run the Re-Check Config?

-Eric

Fri, 08/19/2011 - 00:28
ufo

Unfortunately the issue still exist. :( config re-check stop with the same message.

Tue, 09/20/2011 - 12:28
kavroni

go to webmin>servers>postfix mail server > General options in the line What domain to use in outbound mail x Use hostname x Use domainname x text box check the first option. Use hostname. i had this problem and fixed in this way

Sat, 10/01/2011 - 19:28
kenlyle

This worked for me. I had added myhostname = domain.tld in the main.cf and $myhostname to the mydestination line, like in the main.cf.default. Altogether, it's solved. Thanks for taking the time to post a solution.

Sun, 08/12/2012 - 12:09
nexusguy59

Hey Guys,

I was having this problem so I followed these steps to make it work again. I got a lot of this from reading this thread and tried a few things on my own.

First thing I did was check my hostname with:

hostname -f the result was this hhws2

That was incorrect so I used this to fix the hostname: echo myserver.mydomain.tld > /etc/hostname /etc/init.d/hostname restart

the next thing I did was to fix the mailname file like this postconf -e 'myhostname = virtualmin2'

Then I did this to make sure it worked properly note: Don't jump me for this but I like nano and hate vi nano /etc/mailman

the contents were as expected: virtualmin2

I edited the /etc/hosts file nano /etc/hosts changed the line to look like the following xxx.xxx.xxx.xxx virtualmin2 Saved it

Then I restarted the network /etc/init.d/networking restart -- Just my practice to make sure the network picks up the new hostname. Then I restarted postfix from the webmin cp and everything worked fine.

Hope this helps someone to keep from having to read as much as I did. :)

Have an awesome day.

Michael Cooper Linux Certified Professional http://www.coopfire.com